@sentry/mcp-server 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (813) hide show
  1. package/dist/{chunk-CUT6urMc.cjs → chunk-DoeelZqw.cjs} +21 -0
  2. package/dist/cli/parse.cjs +1 -1
  3. package/dist/cli/parse.d.cts +1 -3
  4. package/dist/cli/parse.d.cts.map +1 -1
  5. package/dist/cli/parse.d.ts +1 -3
  6. package/dist/cli/parse.d.ts.map +1 -1
  7. package/dist/cli/parse.js +1 -1
  8. package/dist/cli/resolve.cjs +1 -5
  9. package/dist/cli/resolve.d.cts +1 -3
  10. package/dist/cli/resolve.d.cts.map +1 -1
  11. package/dist/cli/resolve.d.ts +1 -3
  12. package/dist/cli/resolve.d.ts.map +1 -1
  13. package/dist/cli/resolve.js +1 -5
  14. package/dist/cli/types.d.cts +1 -3
  15. package/dist/cli/types.d.ts +1 -3
  16. package/dist/cli/usage.cjs +1 -1
  17. package/dist/cli/usage.d.cts +2 -2
  18. package/dist/cli/usage.d.ts +2 -2
  19. package/dist/cli/usage.js +1 -1
  20. package/dist/config-Bs1p6XwV.js +3 -0
  21. package/dist/config-DFewJLVx.cjs +6 -0
  22. package/dist/{config-jAHLRqMZ.js → config-DtimzxvV-BItTrGiz.js} +3 -306
  23. package/dist/config-DtimzxvV-BItTrGiz.js.map +1 -0
  24. package/dist/{config-2JTOC4-d.cjs → config-DtimzxvV-D3ccpxhQ.cjs} +2 -311
  25. package/dist/config-DtimzxvV-D3ccpxhQ.cjs.map +1 -0
  26. package/dist/index.cjs +21352 -77
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +21376 -69
  29. package/dist/index.js.map +1 -1
  30. package/dist/{parse-Br-BwKdT.cjs → parse-By6nDBNs.cjs} +2 -2
  31. package/dist/{parse-Br-BwKdT.cjs.map → parse-By6nDBNs.cjs.map} +1 -1
  32. package/dist/{parse-BvHK_nys.js → parse-Dn9XeQSj.js} +1 -1
  33. package/dist/{parse-BvHK_nys.js.map → parse-Dn9XeQSj.js.map} +1 -1
  34. package/dist/resolve-BCdS4js5.js +590 -0
  35. package/dist/resolve-BCdS4js5.js.map +1 -0
  36. package/dist/resolve-BMmRdCFJ.cjs +692 -0
  37. package/dist/resolve-BMmRdCFJ.cjs.map +1 -0
  38. package/dist/{stdio-2BaHF2h-.js → stdio-Cp-EJZB9.js} +7 -3
  39. package/dist/stdio-Cp-EJZB9.js.map +1 -0
  40. package/dist/{stdio-DL-ID7Q4.cjs → stdio-iRuX-anh.cjs} +20 -4
  41. package/dist/stdio-iRuX-anh.cjs.map +1 -0
  42. package/dist/transports/stdio.cjs +1 -2
  43. package/dist/transports/stdio.d.cts +1 -3
  44. package/dist/transports/stdio.d.cts.map +1 -1
  45. package/dist/transports/stdio.d.ts +1 -3
  46. package/dist/transports/stdio.d.ts.map +1 -1
  47. package/dist/transports/stdio.js +1 -2
  48. package/dist/{types-BeIzCAF1.d.cts → types-CM88pHH_.d.ts} +3 -3
  49. package/dist/{types-C70IdmF4.d.ts.map → types-CM88pHH_.d.ts.map} +1 -1
  50. package/dist/{types-C70IdmF4.d.ts → types-CnLRMjvf.d.cts} +3 -3
  51. package/dist/{types-BeIzCAF1.d.cts.map → types-CnLRMjvf.d.cts.map} +1 -1
  52. package/dist/{usage-CpguKuwi.js → usage-DMGbIpV-.js} +1 -1
  53. package/dist/usage-DMGbIpV-.js.map +1 -0
  54. package/dist/{usage-CMWaPhZv.cjs → usage-iwGZsu3a.cjs} +1 -1
  55. package/dist/usage-iwGZsu3a.cjs.map +1 -0
  56. package/package.json +20 -105
  57. package/README.md +0 -121
  58. package/dist/agent-9s0S2VUD.js +0 -43
  59. package/dist/agent-9s0S2VUD.js.map +0 -1
  60. package/dist/agent-BI-VWYjJ.d.ts +0 -93
  61. package/dist/agent-BI-VWYjJ.d.ts.map +0 -1
  62. package/dist/agent-Bm5Hsfal.d.cts +0 -32
  63. package/dist/agent-Bm5Hsfal.d.cts.map +0 -1
  64. package/dist/agent-BmPRmM9x.d.cts +0 -93
  65. package/dist/agent-BmPRmM9x.d.cts.map +0 -1
  66. package/dist/agent-BsCC60AU.js +0 -64
  67. package/dist/agent-BsCC60AU.js.map +0 -1
  68. package/dist/agent-CJ6SVqAB.d.ts +0 -32
  69. package/dist/agent-CJ6SVqAB.d.ts.map +0 -1
  70. package/dist/agent-CirZFiaJ.cjs +0 -55
  71. package/dist/agent-CirZFiaJ.cjs.map +0 -1
  72. package/dist/agent-CnHO6uyy.cjs +0 -76
  73. package/dist/agent-CnHO6uyy.cjs.map +0 -1
  74. package/dist/agent-D8Mz9ung.d.cts +0 -35
  75. package/dist/agent-D8Mz9ung.d.cts.map +0 -1
  76. package/dist/agent-DD0p64Dq.js +0 -29
  77. package/dist/agent-DD0p64Dq.js.map +0 -1
  78. package/dist/agent-DQdvMLcG.d.ts +0 -35
  79. package/dist/agent-DQdvMLcG.d.ts.map +0 -1
  80. package/dist/agent-DaUNg6Ut.cjs +0 -35
  81. package/dist/agent-DaUNg6Ut.cjs.map +0 -1
  82. package/dist/analyze-issue-with-seer-6OwT1RJP.js +0 -200
  83. package/dist/analyze-issue-with-seer-6OwT1RJP.js.map +0 -1
  84. package/dist/analyze-issue-with-seer-wsCEFdZs.cjs +0 -206
  85. package/dist/analyze-issue-with-seer-wsCEFdZs.cjs.map +0 -1
  86. package/dist/api-BCICbJoI.js +0 -63
  87. package/dist/api-BCICbJoI.js.map +0 -1
  88. package/dist/api-CfzBwheo.cjs +0 -80
  89. package/dist/api-CfzBwheo.cjs.map +0 -1
  90. package/dist/api-client/client.cjs +0 -9
  91. package/dist/api-client/client.d.cts +0 -4
  92. package/dist/api-client/client.d.ts +0 -4
  93. package/dist/api-client/client.js +0 -9
  94. package/dist/api-client/errors.cjs +0 -11
  95. package/dist/api-client/errors.d.cts +0 -2
  96. package/dist/api-client/errors.d.ts +0 -2
  97. package/dist/api-client/errors.js +0 -3
  98. package/dist/api-client/index.cjs +0 -70
  99. package/dist/api-client/index.d.cts +0 -6
  100. package/dist/api-client/index.d.ts +0 -6
  101. package/dist/api-client/index.js +0 -11
  102. package/dist/api-client/schema.cjs +0 -52
  103. package/dist/api-client/schema.d.cts +0 -2
  104. package/dist/api-client/schema.d.ts +0 -2
  105. package/dist/api-client/schema.js +0 -3
  106. package/dist/api-client/types.cjs +0 -1
  107. package/dist/api-client/types.d.cts +0 -3
  108. package/dist/api-client/types.d.ts +0 -3
  109. package/dist/api-client/types.js +0 -1
  110. package/dist/api-client-BGgaBFuD.cjs +0 -0
  111. package/dist/api-client-CSLxiNP9.js +0 -0
  112. package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts +0 -34
  113. package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts.map +0 -1
  114. package/dist/callEmbeddedAgent-CFHLQjFx.d.cts +0 -34
  115. package/dist/callEmbeddedAgent-CFHLQjFx.d.cts.map +0 -1
  116. package/dist/callEmbeddedAgent-COB8Jrcn.cjs +0 -51
  117. package/dist/callEmbeddedAgent-COB8Jrcn.cjs.map +0 -1
  118. package/dist/callEmbeddedAgent-rEUWAl2g.js +0 -45
  119. package/dist/callEmbeddedAgent-rEUWAl2g.js.map +0 -1
  120. package/dist/client-8_aKE-B-.d.cts +0 -844
  121. package/dist/client-8_aKE-B-.d.cts.map +0 -1
  122. package/dist/client-BGVY6gBL.d.ts +0 -844
  123. package/dist/client-BGVY6gBL.d.ts.map +0 -1
  124. package/dist/client-Be1DR1al.js +0 -1098
  125. package/dist/client-Be1DR1al.js.map +0 -1
  126. package/dist/client-DSxCsnqO.cjs +0 -1103
  127. package/dist/client-DSxCsnqO.cjs.map +0 -1
  128. package/dist/config-2JTOC4-d.cjs.map +0 -1
  129. package/dist/config-BFaJp4hW.js +0 -74
  130. package/dist/config-BFaJp4hW.js.map +0 -1
  131. package/dist/config-BMLvvgGQ.cjs +0 -37
  132. package/dist/config-BMLvvgGQ.cjs.map +0 -1
  133. package/dist/config-BacDkkdz.cjs +0 -80
  134. package/dist/config-BacDkkdz.cjs.map +0 -1
  135. package/dist/config-Dh25cVhL.js +0 -25
  136. package/dist/config-Dh25cVhL.js.map +0 -1
  137. package/dist/config-jAHLRqMZ.js.map +0 -1
  138. package/dist/constants-CgLLujFn.cjs +0 -220
  139. package/dist/constants-CgLLujFn.cjs.map +0 -1
  140. package/dist/constants-D8axTonA.js +0 -184
  141. package/dist/constants-D8axTonA.js.map +0 -1
  142. package/dist/constants.cjs +0 -10
  143. package/dist/constants.d.cts +0 -36
  144. package/dist/constants.d.cts.map +0 -1
  145. package/dist/constants.d.ts +0 -36
  146. package/dist/constants.d.ts.map +0 -1
  147. package/dist/constants.js +0 -4
  148. package/dist/constraint-helpers-CBddlAo8.js +0 -64
  149. package/dist/constraint-helpers-CBddlAo8.js.map +0 -1
  150. package/dist/constraint-helpers-UEovDW_M.cjs +0 -76
  151. package/dist/constraint-helpers-UEovDW_M.cjs.map +0 -1
  152. package/dist/create-dsn-C5vd9Btg.cjs +0 -74
  153. package/dist/create-dsn-C5vd9Btg.cjs.map +0 -1
  154. package/dist/create-dsn-DBqCDM_6.js +0 -68
  155. package/dist/create-dsn-DBqCDM_6.js.map +0 -1
  156. package/dist/create-project-BsN4Q0cl.js +0 -86
  157. package/dist/create-project-BsN4Q0cl.js.map +0 -1
  158. package/dist/create-project-D4W66CxU.cjs +0 -92
  159. package/dist/create-project-D4W66CxU.cjs.map +0 -1
  160. package/dist/create-team-DUBAEGGr.js +0 -63
  161. package/dist/create-team-DUBAEGGr.js.map +0 -1
  162. package/dist/create-team-DV6XmZkb.cjs +0 -69
  163. package/dist/create-team-DV6XmZkb.cjs.map +0 -1
  164. package/dist/dataset-fields-Bp_g-sD6.cjs +0 -179
  165. package/dist/dataset-fields-Bp_g-sD6.cjs.map +0 -1
  166. package/dist/dataset-fields-dZ43jEgF.js +0 -155
  167. package/dist/dataset-fields-dZ43jEgF.js.map +0 -1
  168. package/dist/define-CLp6EtpZ.cjs +0 -14
  169. package/dist/define-CLp6EtpZ.cjs.map +0 -1
  170. package/dist/define-vA6uuVue.js +0 -8
  171. package/dist/define-vA6uuVue.js.map +0 -1
  172. package/dist/enhance-error-BULHg3Tl.js +0 -32
  173. package/dist/enhance-error-BULHg3Tl.js.map +0 -1
  174. package/dist/enhance-error-vihkdCX5.cjs +0 -37
  175. package/dist/enhance-error-vihkdCX5.cjs.map +0 -1
  176. package/dist/error-handling-CLnyY1TR.js +0 -97
  177. package/dist/error-handling-CLnyY1TR.js.map +0 -1
  178. package/dist/error-handling-FGjcJT8U.cjs +0 -132
  179. package/dist/error-handling-FGjcJT8U.cjs.map +0 -1
  180. package/dist/errors-BXmNwD2K.js +0 -26
  181. package/dist/errors-BXmNwD2K.js.map +0 -1
  182. package/dist/errors-BYClKbv4.d.cts +0 -20
  183. package/dist/errors-BYClKbv4.d.cts.map +0 -1
  184. package/dist/errors-Cn4l-BlC.d.ts +0 -20
  185. package/dist/errors-Cn4l-BlC.d.ts.map +0 -1
  186. package/dist/errors-CyAWBU2S.d.ts +0 -126
  187. package/dist/errors-CyAWBU2S.d.ts.map +0 -1
  188. package/dist/errors-DMiENfq7.d.cts +0 -126
  189. package/dist/errors-DMiENfq7.d.cts.map +0 -1
  190. package/dist/errors-DUEMWOr1.js +0 -217
  191. package/dist/errors-DUEMWOr1.js.map +0 -1
  192. package/dist/errors-DWysOIMw.cjs +0 -271
  193. package/dist/errors-DWysOIMw.cjs.map +0 -1
  194. package/dist/errors-umQzF_vW.cjs +0 -38
  195. package/dist/errors-umQzF_vW.cjs.map +0 -1
  196. package/dist/errors.cjs +0 -4
  197. package/dist/errors.d.cts +0 -2
  198. package/dist/errors.d.ts +0 -2
  199. package/dist/errors.js +0 -3
  200. package/dist/fetch-utils-C6qSgZai.js +0 -52
  201. package/dist/fetch-utils-C6qSgZai.js.map +0 -1
  202. package/dist/fetch-utils-DRgOJp3e.cjs +0 -64
  203. package/dist/fetch-utils-DRgOJp3e.cjs.map +0 -1
  204. package/dist/find-dsns-BabAfVEt.cjs +0 -64
  205. package/dist/find-dsns-BabAfVEt.cjs.map +0 -1
  206. package/dist/find-dsns-C-Q6yJT5.js +0 -58
  207. package/dist/find-dsns-C-Q6yJT5.js.map +0 -1
  208. package/dist/find-organizations-Bo-JdU-R.js +0 -59
  209. package/dist/find-organizations-Bo-JdU-R.js.map +0 -1
  210. package/dist/find-organizations-CEEqa1an.cjs +0 -64
  211. package/dist/find-organizations-CEEqa1an.cjs.map +0 -1
  212. package/dist/find-projects-BWyvosHM.cjs +0 -59
  213. package/dist/find-projects-BWyvosHM.cjs.map +0 -1
  214. package/dist/find-projects-zM4CM_xX.js +0 -53
  215. package/dist/find-projects-zM4CM_xX.js.map +0 -1
  216. package/dist/find-releases-DMJrj5wz.cjs +0 -105
  217. package/dist/find-releases-DMJrj5wz.cjs.map +0 -1
  218. package/dist/find-releases-DzdGLPSN.js +0 -99
  219. package/dist/find-releases-DzdGLPSN.js.map +0 -1
  220. package/dist/find-teams-CR_hdlun.js +0 -56
  221. package/dist/find-teams-CR_hdlun.js.map +0 -1
  222. package/dist/find-teams-lOqS_719.cjs +0 -62
  223. package/dist/find-teams-lOqS_719.cjs.map +0 -1
  224. package/dist/formatters-B6H5qTFe.cjs +0 -98
  225. package/dist/formatters-B6H5qTFe.cjs.map +0 -1
  226. package/dist/formatters-BOJNlDKG.js +0 -223
  227. package/dist/formatters-BOJNlDKG.js.map +0 -1
  228. package/dist/formatters-C9MhdNDX.js +0 -86
  229. package/dist/formatters-C9MhdNDX.js.map +0 -1
  230. package/dist/formatters-ObdzRwld.cjs +0 -247
  231. package/dist/formatters-ObdzRwld.cjs.map +0 -1
  232. package/dist/formatting-BatGC-29.cjs +0 -984
  233. package/dist/formatting-BatGC-29.cjs.map +0 -1
  234. package/dist/formatting-Bm1GxhEu.d.ts +0 -54
  235. package/dist/formatting-Bm1GxhEu.d.ts.map +0 -1
  236. package/dist/formatting-C6hyL-Yv.cjs +0 -20
  237. package/dist/formatting-C6hyL-Yv.cjs.map +0 -1
  238. package/dist/formatting-DJFcfTJG.js +0 -14
  239. package/dist/formatting-DJFcfTJG.js.map +0 -1
  240. package/dist/formatting-DUODx6N5.js +0 -967
  241. package/dist/formatting-DUODx6N5.js.map +0 -1
  242. package/dist/formatting-GZdM57wq.d.cts +0 -54
  243. package/dist/formatting-GZdM57wq.d.cts.map +0 -1
  244. package/dist/get-doc-CbVw4ada.cjs +0 -93
  245. package/dist/get-doc-CbVw4ada.cjs.map +0 -1
  246. package/dist/get-doc-FuILofQP.js +0 -87
  247. package/dist/get-doc-FuILofQP.js.map +0 -1
  248. package/dist/get-event-attachment-DuyBT68p.cjs +0 -150
  249. package/dist/get-event-attachment-DuyBT68p.cjs.map +0 -1
  250. package/dist/get-event-attachment-Dzg2R7ng.js +0 -144
  251. package/dist/get-event-attachment-Dzg2R7ng.js.map +0 -1
  252. package/dist/get-issue-details-BY7S1YyX.cjs +0 -201
  253. package/dist/get-issue-details-BY7S1YyX.cjs.map +0 -1
  254. package/dist/get-issue-details-BxJzOzFQ.js +0 -195
  255. package/dist/get-issue-details-BxJzOzFQ.js.map +0 -1
  256. package/dist/get-trace-details-DD0p3apU.cjs +0 -313
  257. package/dist/get-trace-details-DD0p3apU.cjs.map +0 -1
  258. package/dist/get-trace-details-Dv2FB534.js +0 -307
  259. package/dist/get-trace-details-Dv2FB534.js.map +0 -1
  260. package/dist/handler-0iIvlYwy.d.cts +0 -11
  261. package/dist/handler-0iIvlYwy.d.cts.map +0 -1
  262. package/dist/handler-8JzODzam.d.cts +0 -15
  263. package/dist/handler-8JzODzam.d.cts.map +0 -1
  264. package/dist/handler-9UUkphzv.d.ts +0 -15
  265. package/dist/handler-9UUkphzv.d.ts.map +0 -1
  266. package/dist/handler-BfTAwyrq.js +0 -153
  267. package/dist/handler-BfTAwyrq.js.map +0 -1
  268. package/dist/handler-BhjeSo2N.js +0 -132
  269. package/dist/handler-BhjeSo2N.js.map +0 -1
  270. package/dist/handler-BjTPOR8v.cjs +0 -138
  271. package/dist/handler-BjTPOR8v.cjs.map +0 -1
  272. package/dist/handler-C5Tgh1wj.cjs +0 -159
  273. package/dist/handler-C5Tgh1wj.cjs.map +0 -1
  274. package/dist/handler-ClZBIn0B.d.cts +0 -15
  275. package/dist/handler-ClZBIn0B.d.cts.map +0 -1
  276. package/dist/handler-CmAbLcaV.d.ts +0 -15
  277. package/dist/handler-CmAbLcaV.d.ts.map +0 -1
  278. package/dist/handler-DbUy8Z54.d.ts +0 -11
  279. package/dist/handler-DbUy8Z54.d.ts.map +0 -1
  280. package/dist/index-CmCelmEL.d.cts +0 -1
  281. package/dist/index-NfFbnYt3.d.ts +0 -1
  282. package/dist/internal/agents/callEmbeddedAgent.cjs +0 -6
  283. package/dist/internal/agents/callEmbeddedAgent.d.cts +0 -2
  284. package/dist/internal/agents/callEmbeddedAgent.d.ts +0 -2
  285. package/dist/internal/agents/callEmbeddedAgent.js +0 -6
  286. package/dist/internal/agents/openai-provider.cjs +0 -5
  287. package/dist/internal/agents/openai-provider.d.cts +0 -22
  288. package/dist/internal/agents/openai-provider.d.cts.map +0 -1
  289. package/dist/internal/agents/openai-provider.d.ts +0 -22
  290. package/dist/internal/agents/openai-provider.d.ts.map +0 -1
  291. package/dist/internal/agents/openai-provider.js +0 -4
  292. package/dist/internal/agents/tools/dataset-fields.cjs +0 -16
  293. package/dist/internal/agents/tools/dataset-fields.d.cts +0 -58
  294. package/dist/internal/agents/tools/dataset-fields.d.cts.map +0 -1
  295. package/dist/internal/agents/tools/dataset-fields.d.ts +0 -58
  296. package/dist/internal/agents/tools/dataset-fields.d.ts.map +0 -1
  297. package/dist/internal/agents/tools/dataset-fields.js +0 -13
  298. package/dist/internal/agents/tools/otel-semantics.cjs +0 -14
  299. package/dist/internal/agents/tools/otel-semantics.d.cts +0 -41
  300. package/dist/internal/agents/tools/otel-semantics.d.cts.map +0 -1
  301. package/dist/internal/agents/tools/otel-semantics.d.ts +0 -41
  302. package/dist/internal/agents/tools/otel-semantics.d.ts.map +0 -1
  303. package/dist/internal/agents/tools/otel-semantics.js +0 -13
  304. package/dist/internal/agents/tools/utils.cjs +0 -12
  305. package/dist/internal/agents/tools/utils.d.cts +0 -2
  306. package/dist/internal/agents/tools/utils.d.ts +0 -2
  307. package/dist/internal/agents/tools/utils.js +0 -12
  308. package/dist/internal/agents/tools/whoami.cjs +0 -14
  309. package/dist/internal/agents/tools/whoami.d.cts +0 -33
  310. package/dist/internal/agents/tools/whoami.d.cts.map +0 -1
  311. package/dist/internal/agents/tools/whoami.d.ts +0 -33
  312. package/dist/internal/agents/tools/whoami.d.ts.map +0 -1
  313. package/dist/internal/agents/tools/whoami.js +0 -13
  314. package/dist/internal/constraint-helpers.cjs +0 -4
  315. package/dist/internal/constraint-helpers.d.cts +0 -54
  316. package/dist/internal/constraint-helpers.d.cts.map +0 -1
  317. package/dist/internal/constraint-helpers.d.ts +0 -54
  318. package/dist/internal/constraint-helpers.d.ts.map +0 -1
  319. package/dist/internal/constraint-helpers.js +0 -3
  320. package/dist/internal/error-handling.cjs +0 -17
  321. package/dist/internal/error-handling.d.cts +0 -40
  322. package/dist/internal/error-handling.d.cts.map +0 -1
  323. package/dist/internal/error-handling.d.ts +0 -40
  324. package/dist/internal/error-handling.d.ts.map +0 -1
  325. package/dist/internal/error-handling.js +0 -12
  326. package/dist/internal/fetch-utils.cjs +0 -4
  327. package/dist/internal/fetch-utils.d.cts +0 -33
  328. package/dist/internal/fetch-utils.d.cts.map +0 -1
  329. package/dist/internal/fetch-utils.d.ts +0 -33
  330. package/dist/internal/fetch-utils.d.ts.map +0 -1
  331. package/dist/internal/fetch-utils.js +0 -3
  332. package/dist/internal/formatting.cjs +0 -7
  333. package/dist/internal/formatting.d.cts +0 -7
  334. package/dist/internal/formatting.d.ts +0 -7
  335. package/dist/internal/formatting.js +0 -5
  336. package/dist/internal/issue-helpers.cjs +0 -6
  337. package/dist/internal/issue-helpers.d.cts +0 -2
  338. package/dist/internal/issue-helpers.d.ts +0 -2
  339. package/dist/internal/issue-helpers.js +0 -4
  340. package/dist/internal/test-fixtures.cjs +0 -224
  341. package/dist/internal/test-fixtures.cjs.map +0 -1
  342. package/dist/internal/test-fixtures.d.cts +0 -130
  343. package/dist/internal/test-fixtures.d.cts.map +0 -1
  344. package/dist/internal/test-fixtures.d.ts +0 -130
  345. package/dist/internal/test-fixtures.d.ts.map +0 -1
  346. package/dist/internal/test-fixtures.js +0 -215
  347. package/dist/internal/test-fixtures.js.map +0 -1
  348. package/dist/internal/tool-helpers/api.cjs +0 -17
  349. package/dist/internal/tool-helpers/api.d.cts +0 -42
  350. package/dist/internal/tool-helpers/api.d.cts.map +0 -1
  351. package/dist/internal/tool-helpers/api.d.ts +0 -42
  352. package/dist/internal/tool-helpers/api.d.ts.map +0 -1
  353. package/dist/internal/tool-helpers/api.js +0 -15
  354. package/dist/internal/tool-helpers/define.cjs +0 -3
  355. package/dist/internal/tool-helpers/define.d.cts +0 -13
  356. package/dist/internal/tool-helpers/define.d.cts.map +0 -1
  357. package/dist/internal/tool-helpers/define.d.ts +0 -13
  358. package/dist/internal/tool-helpers/define.d.ts.map +0 -1
  359. package/dist/internal/tool-helpers/define.js +0 -3
  360. package/dist/internal/tool-helpers/enhance-error.cjs +0 -12
  361. package/dist/internal/tool-helpers/enhance-error.d.cts +0 -29
  362. package/dist/internal/tool-helpers/enhance-error.d.cts.map +0 -1
  363. package/dist/internal/tool-helpers/enhance-error.d.ts +0 -29
  364. package/dist/internal/tool-helpers/enhance-error.d.ts.map +0 -1
  365. package/dist/internal/tool-helpers/enhance-error.js +0 -12
  366. package/dist/internal/tool-helpers/formatting.cjs +0 -3
  367. package/dist/internal/tool-helpers/formatting.d.cts +0 -16
  368. package/dist/internal/tool-helpers/formatting.d.cts.map +0 -1
  369. package/dist/internal/tool-helpers/formatting.d.ts +0 -16
  370. package/dist/internal/tool-helpers/formatting.d.ts.map +0 -1
  371. package/dist/internal/tool-helpers/formatting.js +0 -3
  372. package/dist/internal/tool-helpers/issue.cjs +0 -9
  373. package/dist/internal/tool-helpers/issue.d.cts +0 -8
  374. package/dist/internal/tool-helpers/issue.d.ts +0 -8
  375. package/dist/internal/tool-helpers/issue.js +0 -8
  376. package/dist/internal/tool-helpers/seer.cjs +0 -11
  377. package/dist/internal/tool-helpers/seer.d.cts +0 -31
  378. package/dist/internal/tool-helpers/seer.d.cts.map +0 -1
  379. package/dist/internal/tool-helpers/seer.d.ts +0 -31
  380. package/dist/internal/tool-helpers/seer.d.ts.map +0 -1
  381. package/dist/internal/tool-helpers/seer.js +0 -3
  382. package/dist/internal/tool-helpers/validate-region-url.cjs +0 -6
  383. package/dist/internal/tool-helpers/validate-region-url.d.cts +0 -20
  384. package/dist/internal/tool-helpers/validate-region-url.d.cts.map +0 -1
  385. package/dist/internal/tool-helpers/validate-region-url.d.ts +0 -20
  386. package/dist/internal/tool-helpers/validate-region-url.d.ts.map +0 -1
  387. package/dist/internal/tool-helpers/validate-region-url.js +0 -6
  388. package/dist/issue-1C6txnk3.js +0 -0
  389. package/dist/issue-ChNk4cuO.cjs +0 -0
  390. package/dist/issue-helpers-D-hBnXTk.cjs +0 -97
  391. package/dist/issue-helpers-D-hBnXTk.cjs.map +0 -1
  392. package/dist/issue-helpers-D4NRLqkR.d.ts +0 -52
  393. package/dist/issue-helpers-D4NRLqkR.d.ts.map +0 -1
  394. package/dist/issue-helpers-DtCbXiRZ.js +0 -80
  395. package/dist/issue-helpers-DtCbXiRZ.js.map +0 -1
  396. package/dist/issue-helpers-ILmSPsJZ.d.cts +0 -52
  397. package/dist/issue-helpers-ILmSPsJZ.d.cts.map +0 -1
  398. package/dist/logging-BgTqJ4mI.d.ts +0 -31
  399. package/dist/logging-BgTqJ4mI.d.ts.map +0 -1
  400. package/dist/logging-BjKioF_x.d.cts +0 -31
  401. package/dist/logging-BjKioF_x.d.cts.map +0 -1
  402. package/dist/logging-C-ST7-Ow.cjs +0 -298
  403. package/dist/logging-C-ST7-Ow.cjs.map +0 -1
  404. package/dist/logging-ChQnSEmD.js +0 -256
  405. package/dist/logging-ChQnSEmD.js.map +0 -1
  406. package/dist/openai-provider-BsMAb6zY.js +0 -48
  407. package/dist/openai-provider-BsMAb6zY.js.map +0 -1
  408. package/dist/openai-provider-BycgrQgi.cjs +0 -60
  409. package/dist/openai-provider-BycgrQgi.cjs.map +0 -1
  410. package/dist/otel-semantics-CWWWmiNy.js +0 -5070
  411. package/dist/otel-semantics-CWWWmiNy.js.map +0 -1
  412. package/dist/otel-semantics-n8_5Ib9C.cjs +0 -5082
  413. package/dist/otel-semantics-n8_5Ib9C.cjs.map +0 -1
  414. package/dist/permissions-Berbg2vC.cjs +0 -209
  415. package/dist/permissions-Berbg2vC.cjs.map +0 -1
  416. package/dist/permissions-CiIVEs4_.d.ts +0 -79
  417. package/dist/permissions-CiIVEs4_.d.ts.map +0 -1
  418. package/dist/permissions-Cm5e34n2.d.cts +0 -79
  419. package/dist/permissions-Cm5e34n2.d.cts.map +0 -1
  420. package/dist/permissions-DvkVlUJ1.js +0 -155
  421. package/dist/permissions-DvkVlUJ1.js.map +0 -1
  422. package/dist/permissions.cjs +0 -11
  423. package/dist/permissions.d.cts +0 -2
  424. package/dist/permissions.d.ts +0 -2
  425. package/dist/permissions.js +0 -3
  426. package/dist/resolve-CrYQ5aF_.cjs +0 -107
  427. package/dist/resolve-CrYQ5aF_.cjs.map +0 -1
  428. package/dist/resolve-DQ-6eLec.js +0 -90
  429. package/dist/resolve-DQ-6eLec.js.map +0 -1
  430. package/dist/schema-1xQ4asuW.cjs +0 -801
  431. package/dist/schema-1xQ4asuW.cjs.map +0 -1
  432. package/dist/schema-BGVOjcD7.cjs +0 -141
  433. package/dist/schema-BGVOjcD7.cjs.map +0 -1
  434. package/dist/schema-CZXkkfj-.d.cts +0 -16950
  435. package/dist/schema-CZXkkfj-.d.cts.map +0 -1
  436. package/dist/schema-Cfvy5rTy.d.ts +0 -16950
  437. package/dist/schema-Cfvy5rTy.d.ts.map +0 -1
  438. package/dist/schema-ChlpIaqA.js +0 -39
  439. package/dist/schema-ChlpIaqA.js.map +0 -1
  440. package/dist/schema-oeFNxyo_.js +0 -501
  441. package/dist/schema-oeFNxyo_.js.map +0 -1
  442. package/dist/schema.cjs +0 -22
  443. package/dist/schema.d.cts +0 -34
  444. package/dist/schema.d.cts.map +0 -1
  445. package/dist/schema.d.ts +0 -34
  446. package/dist/schema.d.ts.map +0 -1
  447. package/dist/schema.js +0 -6
  448. package/dist/search-docs-C5x-ZRhd.cjs +0 -97
  449. package/dist/search-docs-C5x-ZRhd.cjs.map +0 -1
  450. package/dist/search-docs-UCe9oXQt.js +0 -91
  451. package/dist/search-docs-UCe9oXQt.js.map +0 -1
  452. package/dist/search-events-B-MXKSB_.js +0 -0
  453. package/dist/search-events-BrEw3wC-.cjs +0 -0
  454. package/dist/search-issues-C7Zs6rFB.cjs +0 -0
  455. package/dist/search-issues-DUSkomYp.js +0 -0
  456. package/dist/seer-CSFgx4AP.js +0 -89
  457. package/dist/seer-CSFgx4AP.js.map +0 -1
  458. package/dist/seer-sA1asAZs.cjs +0 -143
  459. package/dist/seer-sA1asAZs.cjs.map +0 -1
  460. package/dist/sentry-3DC3Kob2.cjs +0 -110
  461. package/dist/sentry-3DC3Kob2.cjs.map +0 -1
  462. package/dist/sentry-CfePWwtE.d.cts +0 -9
  463. package/dist/sentry-CfePWwtE.d.cts.map +0 -1
  464. package/dist/sentry-Cfj4OGMQ.js +0 -104
  465. package/dist/sentry-Cfj4OGMQ.js.map +0 -1
  466. package/dist/sentry-DKiJwGZX.d.ts +0 -9
  467. package/dist/sentry-DKiJwGZX.d.ts.map +0 -1
  468. package/dist/server-BbJwtfJr.js +0 -336
  469. package/dist/server-BbJwtfJr.js.map +0 -1
  470. package/dist/server-OW--pQOQ.cjs +0 -354
  471. package/dist/server-OW--pQOQ.cjs.map +0 -1
  472. package/dist/server.cjs +0 -65
  473. package/dist/server.d.cts +0 -59
  474. package/dist/server.d.cts.map +0 -1
  475. package/dist/server.d.ts +0 -59
  476. package/dist/server.d.ts.map +0 -1
  477. package/dist/server.js +0 -65
  478. package/dist/skillDefinitions.cjs +0 -258
  479. package/dist/skillDefinitions.cjs.map +0 -1
  480. package/dist/skillDefinitions.d.cts +0 -18
  481. package/dist/skillDefinitions.d.cts.map +0 -1
  482. package/dist/skillDefinitions.d.ts +0 -18
  483. package/dist/skillDefinitions.d.ts.map +0 -1
  484. package/dist/skillDefinitions.js +0 -257
  485. package/dist/skillDefinitions.js.map +0 -1
  486. package/dist/skills-BmFl7P6V.js +0 -94
  487. package/dist/skills-BmFl7P6V.js.map +0 -1
  488. package/dist/skills-COOuBrrA.cjs +0 -148
  489. package/dist/skills-COOuBrrA.cjs.map +0 -1
  490. package/dist/skills-HlAeBq_E.d.cts +0 -33
  491. package/dist/skills-HlAeBq_E.d.cts.map +0 -1
  492. package/dist/skills-g0WCenTA.d.ts +0 -33
  493. package/dist/skills-g0WCenTA.d.ts.map +0 -1
  494. package/dist/skills.cjs +0 -11
  495. package/dist/skills.d.cts +0 -2
  496. package/dist/skills.d.ts +0 -2
  497. package/dist/skills.js +0 -3
  498. package/dist/slug-validation-Bkteg65O.js +0 -93
  499. package/dist/slug-validation-Bkteg65O.js.map +0 -1
  500. package/dist/slug-validation-D5VJqMwH.cjs +0 -111
  501. package/dist/slug-validation-D5VJqMwH.cjs.map +0 -1
  502. package/dist/stdio-2BaHF2h-.js.map +0 -1
  503. package/dist/stdio-DL-ID7Q4.cjs.map +0 -1
  504. package/dist/telem/index.cjs +0 -10
  505. package/dist/telem/index.d.cts +0 -3
  506. package/dist/telem/index.d.ts +0 -3
  507. package/dist/telem/index.js +0 -4
  508. package/dist/telem/logging.cjs +0 -9
  509. package/dist/telem/logging.d.cts +0 -2
  510. package/dist/telem/logging.d.ts +0 -2
  511. package/dist/telem/logging.js +0 -3
  512. package/dist/telem/sentry.cjs +0 -3
  513. package/dist/telem/sentry.d.cts +0 -2
  514. package/dist/telem/sentry.d.ts +0 -2
  515. package/dist/telem/sentry.js +0 -3
  516. package/dist/test-setup.cjs +0 -56
  517. package/dist/test-setup.cjs.map +0 -1
  518. package/dist/test-setup.d.cts +0 -33
  519. package/dist/test-setup.d.cts.map +0 -1
  520. package/dist/test-setup.d.ts +0 -33
  521. package/dist/test-setup.d.ts.map +0 -1
  522. package/dist/test-setup.js +0 -55
  523. package/dist/test-setup.js.map +0 -1
  524. package/dist/test-utils/context.cjs +0 -32
  525. package/dist/test-utils/context.cjs.map +0 -1
  526. package/dist/test-utils/context.d.cts +0 -18
  527. package/dist/test-utils/context.d.cts.map +0 -1
  528. package/dist/test-utils/context.d.ts +0 -18
  529. package/dist/test-utils/context.d.ts.map +0 -1
  530. package/dist/test-utils/context.js +0 -30
  531. package/dist/test-utils/context.js.map +0 -1
  532. package/dist/toolDefinitions.cjs +0 -838
  533. package/dist/toolDefinitions.cjs.map +0 -1
  534. package/dist/toolDefinitions.d.cts +0 -13
  535. package/dist/toolDefinitions.d.cts.map +0 -1
  536. package/dist/toolDefinitions.d.ts +0 -13
  537. package/dist/toolDefinitions.d.ts.map +0 -1
  538. package/dist/toolDefinitions.js +0 -837
  539. package/dist/toolDefinitions.js.map +0 -1
  540. package/dist/tools/analyze-issue-with-seer.cjs +0 -24
  541. package/dist/tools/analyze-issue-with-seer.d.cts +0 -17
  542. package/dist/tools/analyze-issue-with-seer.d.cts.map +0 -1
  543. package/dist/tools/analyze-issue-with-seer.d.ts +0 -17
  544. package/dist/tools/analyze-issue-with-seer.d.ts.map +0 -1
  545. package/dist/tools/analyze-issue-with-seer.js +0 -24
  546. package/dist/tools/create-dsn.cjs +0 -19
  547. package/dist/tools/create-dsn.d.cts +0 -16
  548. package/dist/tools/create-dsn.d.cts.map +0 -1
  549. package/dist/tools/create-dsn.d.ts +0 -16
  550. package/dist/tools/create-dsn.d.ts.map +0 -1
  551. package/dist/tools/create-dsn.js +0 -19
  552. package/dist/tools/create-project.cjs +0 -19
  553. package/dist/tools/create-project.d.cts +0 -17
  554. package/dist/tools/create-project.d.cts.map +0 -1
  555. package/dist/tools/create-project.d.ts +0 -17
  556. package/dist/tools/create-project.d.ts.map +0 -1
  557. package/dist/tools/create-project.js +0 -19
  558. package/dist/tools/create-team.cjs +0 -19
  559. package/dist/tools/create-team.d.cts +0 -15
  560. package/dist/tools/create-team.d.cts.map +0 -1
  561. package/dist/tools/create-team.d.ts +0 -15
  562. package/dist/tools/create-team.d.ts.map +0 -1
  563. package/dist/tools/create-team.js +0 -19
  564. package/dist/tools/find-dsns.cjs +0 -19
  565. package/dist/tools/find-dsns.d.cts +0 -15
  566. package/dist/tools/find-dsns.d.cts.map +0 -1
  567. package/dist/tools/find-dsns.d.ts +0 -15
  568. package/dist/tools/find-dsns.d.ts.map +0 -1
  569. package/dist/tools/find-dsns.js +0 -19
  570. package/dist/tools/find-organizations.cjs +0 -19
  571. package/dist/tools/find-organizations.d.cts +0 -13
  572. package/dist/tools/find-organizations.d.cts.map +0 -1
  573. package/dist/tools/find-organizations.d.ts +0 -13
  574. package/dist/tools/find-organizations.d.ts.map +0 -1
  575. package/dist/tools/find-organizations.js +0 -19
  576. package/dist/tools/find-projects.cjs +0 -19
  577. package/dist/tools/find-projects.d.cts +0 -15
  578. package/dist/tools/find-projects.d.cts.map +0 -1
  579. package/dist/tools/find-projects.d.ts +0 -15
  580. package/dist/tools/find-projects.d.ts.map +0 -1
  581. package/dist/tools/find-projects.js +0 -19
  582. package/dist/tools/find-releases.cjs +0 -19
  583. package/dist/tools/find-releases.d.cts +0 -16
  584. package/dist/tools/find-releases.d.cts.map +0 -1
  585. package/dist/tools/find-releases.d.ts +0 -16
  586. package/dist/tools/find-releases.d.ts.map +0 -1
  587. package/dist/tools/find-releases.js +0 -19
  588. package/dist/tools/find-teams.cjs +0 -19
  589. package/dist/tools/find-teams.d.cts +0 -15
  590. package/dist/tools/find-teams.d.cts.map +0 -1
  591. package/dist/tools/find-teams.d.ts +0 -15
  592. package/dist/tools/find-teams.d.ts.map +0 -1
  593. package/dist/tools/find-teams.js +0 -19
  594. package/dist/tools/get-doc.cjs +0 -14
  595. package/dist/tools/get-doc.d.cts +0 -13
  596. package/dist/tools/get-doc.d.cts.map +0 -1
  597. package/dist/tools/get-doc.d.ts +0 -13
  598. package/dist/tools/get-doc.d.ts.map +0 -1
  599. package/dist/tools/get-doc.js +0 -14
  600. package/dist/tools/get-event-attachment.cjs +0 -19
  601. package/dist/tools/get-event-attachment.d.cts +0 -17
  602. package/dist/tools/get-event-attachment.d.cts.map +0 -1
  603. package/dist/tools/get-event-attachment.d.ts +0 -17
  604. package/dist/tools/get-event-attachment.d.ts.map +0 -1
  605. package/dist/tools/get-event-attachment.js +0 -19
  606. package/dist/tools/get-issue-details.cjs +0 -24
  607. package/dist/tools/get-issue-details.d.cts +0 -17
  608. package/dist/tools/get-issue-details.d.cts.map +0 -1
  609. package/dist/tools/get-issue-details.d.ts +0 -17
  610. package/dist/tools/get-issue-details.d.ts.map +0 -1
  611. package/dist/tools/get-issue-details.js +0 -24
  612. package/dist/tools/get-trace-details.cjs +0 -19
  613. package/dist/tools/get-trace-details.d.cts +0 -15
  614. package/dist/tools/get-trace-details.d.cts.map +0 -1
  615. package/dist/tools/get-trace-details.d.ts +0 -15
  616. package/dist/tools/get-trace-details.d.ts.map +0 -1
  617. package/dist/tools/get-trace-details.js +0 -19
  618. package/dist/tools/index.cjs +0 -65
  619. package/dist/tools/index.d.cts +0 -129
  620. package/dist/tools/index.d.cts.map +0 -1
  621. package/dist/tools/index.d.ts +0 -129
  622. package/dist/tools/index.d.ts.map +0 -1
  623. package/dist/tools/index.js +0 -65
  624. package/dist/tools/search-docs.cjs +0 -18
  625. package/dist/tools/search-docs.d.cts +0 -15
  626. package/dist/tools/search-docs.d.cts.map +0 -1
  627. package/dist/tools/search-docs.d.ts +0 -15
  628. package/dist/tools/search-docs.d.ts.map +0 -1
  629. package/dist/tools/search-docs.js +0 -18
  630. package/dist/tools/search-events/agent.cjs +0 -20
  631. package/dist/tools/search-events/agent.d.cts +0 -7
  632. package/dist/tools/search-events/agent.d.ts +0 -7
  633. package/dist/tools/search-events/agent.js +0 -19
  634. package/dist/tools/search-events/config.cjs +0 -8
  635. package/dist/tools/search-events/config.d.cts +0 -132
  636. package/dist/tools/search-events/config.d.cts.map +0 -1
  637. package/dist/tools/search-events/config.d.ts +0 -132
  638. package/dist/tools/search-events/config.d.ts.map +0 -1
  639. package/dist/tools/search-events/config.js +0 -3
  640. package/dist/tools/search-events/formatters.cjs +0 -17
  641. package/dist/tools/search-events/formatters.d.cts +0 -43
  642. package/dist/tools/search-events/formatters.d.cts.map +0 -1
  643. package/dist/tools/search-events/formatters.d.ts +0 -43
  644. package/dist/tools/search-events/formatters.d.ts.map +0 -1
  645. package/dist/tools/search-events/formatters.js +0 -14
  646. package/dist/tools/search-events/handler.cjs +0 -28
  647. package/dist/tools/search-events/handler.d.cts +0 -6
  648. package/dist/tools/search-events/handler.d.ts +0 -6
  649. package/dist/tools/search-events/handler.js +0 -28
  650. package/dist/tools/search-events/index.cjs +0 -31
  651. package/dist/tools/search-events/index.d.cts +0 -12
  652. package/dist/tools/search-events/index.d.ts +0 -12
  653. package/dist/tools/search-events/index.js +0 -29
  654. package/dist/tools/search-events/utils.cjs +0 -17
  655. package/dist/tools/search-events/utils.d.cts +0 -8
  656. package/dist/tools/search-events/utils.d.ts +0 -8
  657. package/dist/tools/search-events/utils.js +0 -13
  658. package/dist/tools/search-issues/agent.cjs +0 -19
  659. package/dist/tools/search-issues/agent.d.cts +0 -7
  660. package/dist/tools/search-issues/agent.d.ts +0 -7
  661. package/dist/tools/search-issues/agent.js +0 -18
  662. package/dist/tools/search-issues/config.cjs +0 -3
  663. package/dist/tools/search-issues/config.d.cts +0 -9
  664. package/dist/tools/search-issues/config.d.cts.map +0 -1
  665. package/dist/tools/search-issues/config.d.ts +0 -9
  666. package/dist/tools/search-issues/config.d.ts.map +0 -1
  667. package/dist/tools/search-issues/config.js +0 -3
  668. package/dist/tools/search-issues/formatters.cjs +0 -5
  669. package/dist/tools/search-issues/formatters.d.cts +0 -28
  670. package/dist/tools/search-issues/formatters.d.cts.map +0 -1
  671. package/dist/tools/search-issues/formatters.d.ts +0 -28
  672. package/dist/tools/search-issues/formatters.d.ts.map +0 -1
  673. package/dist/tools/search-issues/formatters.js +0 -4
  674. package/dist/tools/search-issues/handler.cjs +0 -27
  675. package/dist/tools/search-issues/handler.d.cts +0 -6
  676. package/dist/tools/search-issues/handler.d.ts +0 -6
  677. package/dist/tools/search-issues/handler.js +0 -27
  678. package/dist/tools/search-issues/index.cjs +0 -30
  679. package/dist/tools/search-issues/index.d.cts +0 -12
  680. package/dist/tools/search-issues/index.d.ts +0 -12
  681. package/dist/tools/search-issues/index.js +0 -28
  682. package/dist/tools/types.cjs +0 -0
  683. package/dist/tools/types.d.cts +0 -5
  684. package/dist/tools/types.d.ts +0 -5
  685. package/dist/tools/types.js +0 -0
  686. package/dist/tools/update-issue.cjs +0 -24
  687. package/dist/tools/update-issue.d.cts +0 -18
  688. package/dist/tools/update-issue.d.cts.map +0 -1
  689. package/dist/tools/update-issue.d.ts +0 -18
  690. package/dist/tools/update-issue.d.ts.map +0 -1
  691. package/dist/tools/update-issue.js +0 -24
  692. package/dist/tools/update-project.cjs +0 -19
  693. package/dist/tools/update-project.d.cts +0 -19
  694. package/dist/tools/update-project.d.cts.map +0 -1
  695. package/dist/tools/update-project.d.ts +0 -19
  696. package/dist/tools/update-project.d.ts.map +0 -1
  697. package/dist/tools/update-project.js +0 -19
  698. package/dist/tools/use-sentry/agent.cjs +0 -8
  699. package/dist/tools/use-sentry/agent.d.cts +0 -3
  700. package/dist/tools/use-sentry/agent.d.ts +0 -3
  701. package/dist/tools/use-sentry/agent.js +0 -8
  702. package/dist/tools/use-sentry/config.cjs +0 -4
  703. package/dist/tools/use-sentry/config.d.cts +0 -21
  704. package/dist/tools/use-sentry/config.d.cts.map +0 -1
  705. package/dist/tools/use-sentry/config.d.ts +0 -21
  706. package/dist/tools/use-sentry/config.d.ts.map +0 -1
  707. package/dist/tools/use-sentry/config.js +0 -3
  708. package/dist/tools/use-sentry/handler.cjs +0 -65
  709. package/dist/tools/use-sentry/handler.d.cts +0 -6
  710. package/dist/tools/use-sentry/handler.d.ts +0 -6
  711. package/dist/tools/use-sentry/handler.js +0 -65
  712. package/dist/tools/use-sentry/index.cjs +0 -67
  713. package/dist/tools/use-sentry/index.d.cts +0 -8
  714. package/dist/tools/use-sentry/index.d.ts +0 -8
  715. package/dist/tools/use-sentry/index.js +0 -65
  716. package/dist/tools/use-sentry/tool-wrapper.cjs +0 -63
  717. package/dist/tools/use-sentry/tool-wrapper.cjs.map +0 -1
  718. package/dist/tools/use-sentry/tool-wrapper.d.cts +0 -119
  719. package/dist/tools/use-sentry/tool-wrapper.d.cts.map +0 -1
  720. package/dist/tools/use-sentry/tool-wrapper.d.ts +0 -119
  721. package/dist/tools/use-sentry/tool-wrapper.d.ts.map +0 -1
  722. package/dist/tools/use-sentry/tool-wrapper.js +0 -62
  723. package/dist/tools/use-sentry/tool-wrapper.js.map +0 -1
  724. package/dist/tools/whoami.cjs +0 -17
  725. package/dist/tools/whoami.d.cts +0 -10
  726. package/dist/tools/whoami.d.cts.map +0 -1
  727. package/dist/tools/whoami.d.ts +0 -10
  728. package/dist/tools/whoami.d.ts.map +0 -1
  729. package/dist/tools/whoami.js +0 -17
  730. package/dist/types-B_3dsqbN.d.cts +0 -38
  731. package/dist/types-B_3dsqbN.d.cts.map +0 -1
  732. package/dist/types-Cet6uyS6.d.ts +0 -41
  733. package/dist/types-Cet6uyS6.d.ts.map +0 -1
  734. package/dist/types-CokRupPo.d.cts +0 -33
  735. package/dist/types-CokRupPo.d.cts.map +0 -1
  736. package/dist/types-D1CEiyup.d.cts +0 -41
  737. package/dist/types-D1CEiyup.d.cts.map +0 -1
  738. package/dist/types-D670-rDz.js +0 -0
  739. package/dist/types-OrkP7cEA.d.ts +0 -33
  740. package/dist/types-OrkP7cEA.d.ts.map +0 -1
  741. package/dist/types-n3wuZu5X.cjs +0 -0
  742. package/dist/types-u52qwG59.d.ts +0 -38
  743. package/dist/types-u52qwG59.d.ts.map +0 -1
  744. package/dist/types.cjs +0 -16
  745. package/dist/types.cjs.map +0 -1
  746. package/dist/types.d.cts +0 -4
  747. package/dist/types.d.ts +0 -4
  748. package/dist/types.js +0 -15
  749. package/dist/types.js.map +0 -1
  750. package/dist/update-issue-BGm8g4G0.js +0 -118
  751. package/dist/update-issue-BGm8g4G0.js.map +0 -1
  752. package/dist/update-issue-Dx2EZ5pY.cjs +0 -124
  753. package/dist/update-issue-Dx2EZ5pY.cjs.map +0 -1
  754. package/dist/update-project-B0clXxii.js +0 -128
  755. package/dist/update-project-B0clXxii.js.map +0 -1
  756. package/dist/update-project-BJkzcapF.cjs +0 -134
  757. package/dist/update-project-BJkzcapF.cjs.map +0 -1
  758. package/dist/url-utils-CbcNJVYS.cjs +0 -235
  759. package/dist/url-utils-CbcNJVYS.cjs.map +0 -1
  760. package/dist/url-utils-CfKwo6s5.js +0 -175
  761. package/dist/url-utils-CfKwo6s5.js.map +0 -1
  762. package/dist/usage-CMWaPhZv.cjs.map +0 -1
  763. package/dist/usage-CpguKuwi.js.map +0 -1
  764. package/dist/utils/slug-validation.cjs +0 -5
  765. package/dist/utils/slug-validation.d.cts +0 -51
  766. package/dist/utils/slug-validation.d.cts.map +0 -1
  767. package/dist/utils/slug-validation.d.ts +0 -51
  768. package/dist/utils/slug-validation.d.ts.map +0 -1
  769. package/dist/utils/slug-validation.js +0 -3
  770. package/dist/utils/url-utils.cjs +0 -12
  771. package/dist/utils/url-utils.d.cts +0 -87
  772. package/dist/utils/url-utils.d.cts.map +0 -1
  773. package/dist/utils/url-utils.d.ts +0 -87
  774. package/dist/utils/url-utils.d.ts.map +0 -1
  775. package/dist/utils/url-utils.js +0 -3
  776. package/dist/utils-C7sQWgE3.d.cts +0 -39
  777. package/dist/utils-C7sQWgE3.d.cts.map +0 -1
  778. package/dist/utils-CIt6Amml.cjs +0 -124
  779. package/dist/utils-CIt6Amml.cjs.map +0 -1
  780. package/dist/utils-CaNeCYCH.js +0 -94
  781. package/dist/utils-CaNeCYCH.js.map +0 -1
  782. package/dist/utils-CmH2wxA_.d.ts +0 -39
  783. package/dist/utils-CmH2wxA_.d.ts.map +0 -1
  784. package/dist/utils-DJIwl8YR.cjs +0 -96
  785. package/dist/utils-DJIwl8YR.cjs.map +0 -1
  786. package/dist/utils-DOb7bs5_.js +0 -90
  787. package/dist/utils-DOb7bs5_.js.map +0 -1
  788. package/dist/utils-R15EJutP.d.ts +0 -43
  789. package/dist/utils-R15EJutP.d.ts.map +0 -1
  790. package/dist/utils-RPc9DHgJ.d.cts +0 -43
  791. package/dist/utils-RPc9DHgJ.d.cts.map +0 -1
  792. package/dist/validate-region-url-Bdokgz65.js +0 -37
  793. package/dist/validate-region-url-Bdokgz65.js.map +0 -1
  794. package/dist/validate-region-url-BvT-IgKg.cjs +0 -42
  795. package/dist/validate-region-url-BvT-IgKg.cjs.map +0 -1
  796. package/dist/version-CaFsr_xb.cjs +0 -19
  797. package/dist/version-CaFsr_xb.cjs.map +0 -1
  798. package/dist/version-DY1nl1TZ.js +0 -7
  799. package/dist/version-DY1nl1TZ.js.map +0 -1
  800. package/dist/version.cjs +0 -4
  801. package/dist/version.d.cts +0 -8
  802. package/dist/version.d.cts.map +0 -1
  803. package/dist/version.d.ts +0 -8
  804. package/dist/version.d.ts.map +0 -1
  805. package/dist/version.js +0 -3
  806. package/dist/whoami-9JymZ3NV.cjs +0 -46
  807. package/dist/whoami-9JymZ3NV.cjs.map +0 -1
  808. package/dist/whoami-BsX-LoXG.js +0 -34
  809. package/dist/whoami-BsX-LoXG.js.map +0 -1
  810. package/dist/whoami-DRDjyhDL.cjs +0 -44
  811. package/dist/whoami-DRDjyhDL.cjs.map +0 -1
  812. package/dist/whoami-FliA3IrX.js +0 -39
  813. package/dist/whoami-FliA3IrX.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["message: string"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * Main CLI entry point for the Sentry MCP server.\n *\n * Handles command-line argument parsing, environment configuration, Sentry\n * initialization, and starts the MCP server with stdio transport. Requires\n * a Sentry access token and optionally accepts host and DSN configuration.\n *\n * @example CLI Usage\n * ```bash\n * npx @sentry/mcp-server --access-token=TOKEN --host=sentry.io\n * npx @sentry/mcp-server --access-token=TOKEN --url=https://sentry.example.com\n * ```\n */\n\nimport { buildServer } from \"./server\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\nimport { buildUsage } from \"./cli/usage\";\nimport { parseArgv, parseEnv, merge } from \"./cli/parse\";\nimport { finalize } from \"./cli/resolve\";\nimport { sentryBeforeSend } from \"./telem/sentry\";\nimport { ALL_SCOPES } from \"./permissions\";\nimport { DEFAULT_SCOPES, DEFAULT_SKILLS } from \"./constants\";\nimport { SKILLS } from \"./skills\";\nimport { setOpenAIBaseUrl } from \"./internal/agents/openai-provider\";\n\nconst packageName = \"@sentry/mcp-server\";\nconst allSkills = Object.keys(SKILLS) as ReadonlyArray<\n (typeof SKILLS)[keyof typeof SKILLS][\"id\"]\n>;\nconst usageText = buildUsage(\n packageName,\n DEFAULT_SCOPES,\n ALL_SCOPES,\n DEFAULT_SKILLS,\n allSkills,\n);\n\nfunction die(message: string): never {\n console.error(message);\n console.error(usageText);\n process.exit(1);\n}\nconst cli = parseArgv(process.argv.slice(2));\nif (cli.help) {\n console.log(usageText);\n process.exit(0);\n}\nif (cli.version) {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n}\nif (cli.unknownArgs.length > 0) {\n console.error(\"Error: Invalid argument(s):\", cli.unknownArgs.join(\", \"));\n console.error(usageText);\n process.exit(1);\n}\n\nconst env = parseEnv(process.env);\nconst cfg = (() => {\n try {\n return finalize(merge(cli, env));\n } catch (err) {\n die(err instanceof Error ? err.message : String(err));\n }\n})();\n\n// Check for OpenAI API key and warn if missing\nif (!process.env.OPENAI_API_KEY) {\n console.warn(\"Warning: OPENAI_API_KEY environment variable is not set.\");\n console.warn(\"The following AI-powered search tools will be unavailable:\");\n console.warn(\" - search_events (natural language event search)\");\n console.warn(\" - search_issues (natural language issue search)\");\n console.warn(\n \"All other tools will function normally. To enable AI-powered search, set OPENAI_API_KEY.\",\n );\n console.warn(\"\");\n}\n\n// Configure OpenAI settings from CLI flags\n// Note: baseUrl can only be set via CLI flag, not env var (security: prevents credential theft)\nsetOpenAIBaseUrl(cfg.openaiBaseUrl);\nif (cfg.openaiModel) {\n process.env.OPENAI_MODEL = cfg.openaiModel;\n}\n\nSentry.init({\n dsn: cfg.sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n beforeSend: sentryBeforeSend,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"mcp.agent_mode\": cli.agent ? \"true\" : \"false\",\n \"sentry.host\": cfg.sentryHost,\n \"mcp.mcp-url\": cfg.mcpUrl,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n Sentry.vercelAIIntegration({\n recordInputs: true,\n recordOutputs: true,\n }),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\n// Log agent mode status\nif (cli.agent) {\n console.warn(\"Agent mode enabled: Only use_sentry tool is available.\");\n console.warn(\n \"The use_sentry tool provides access to all Sentry operations through natural language.\",\n );\n console.warn(\"\");\n}\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// Build context once for server configuration and runtime\nconst context = {\n accessToken: cfg.accessToken,\n grantedScopes: cfg.finalScopes,\n grantedSkills: cfg.finalSkills,\n constraints: {\n organizationSlug: cfg.organizationSlug ?? null,\n projectSlug: cfg.projectSlug ?? null,\n },\n sentryHost: cfg.sentryHost,\n mcpUrl: cfg.mcpUrl,\n openaiBaseUrl: cfg.openaiBaseUrl,\n};\n\n// Build server with context to filter tools based on granted scopes\n// Use agentMode when --agent flag is set (only exposes use_sentry tool)\nconst server = buildServer({\n context,\n agentMode: cli.agent,\n});\n\nstartStdio(server, context).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAc;AACpB,MAAM,YAAY,OAAO,KAAK,OAAO;AAGrC,MAAM,YAAY,WAChB,aACA,gBACA,YACA,gBACA,UACD;AAED,SAAS,IAAIA,SAAwB;AACnC,SAAQ,MAAM,QAAQ;AACtB,SAAQ,MAAM,UAAU;AACxB,SAAQ,KAAK,EAAE;AAChB;AACD,MAAM,MAAM,UAAU,QAAQ,KAAK,MAAM,EAAE,CAAC;AAC5C,IAAI,IAAI,MAAM;AACZ,SAAQ,IAAI,UAAU;AACtB,SAAQ,KAAK,EAAE;AAChB;AACD,IAAI,IAAI,SAAS;AACf,SAAQ,OAAO,YAAY,GAAG,cAAc;AAC5C,SAAQ,KAAK,EAAE;AAChB;AACD,IAAI,IAAI,YAAY,SAAS,GAAG;AAC9B,SAAQ,MAAM,+BAA+B,IAAI,YAAY,KAAK,KAAK,CAAC;AACxE,SAAQ,MAAM,UAAU;AACxB,SAAQ,KAAK,EAAE;AAChB;AAED,MAAM,MAAM,SAAS,QAAQ,IAAI;AACjC,MAAM,MAAM,CAAC,MAAM;AACjB,KAAI;AACF,SAAO,SAAS,MAAM,KAAK,IAAI,CAAC;CACjC,SAAQ,KAAK;AACZ,MAAI,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI,CAAC;CACtD;AACF,IAAG;AAGJ,KAAK,QAAQ,IAAI,gBAAgB;AAC/B,SAAQ,KAAK,2DAA2D;AACxE,SAAQ,KAAK,6DAA6D;AAC1E,SAAQ,KAAK,oDAAoD;AACjE,SAAQ,KAAK,oDAAoD;AACjE,SAAQ,KACN,2FACD;AACD,SAAQ,KAAK,GAAG;AACjB;AAID,iBAAiB,IAAI,cAAc;AACnC,IAAI,IAAI,YACN,SAAQ,IAAI,eAAe,IAAI;AAGjC,OAAO,KAAK;CACV,KAAK,IAAI;CACT,gBAAgB;CAChB,kBAAkB;CAClB,YAAY;CACZ,cAAc,EACZ,MAAM;EACJ,sBAAsB;EACtB,iBAAiB;EACjB,kBAAkB,IAAI,QAAQ,SAAS;EACvC,eAAe,IAAI;EACnB,eAAe,IAAI;CACpB,EACF;CACD;CACA,cAAc;EACZ,OAAO,2BAA2B;EAClC,OAAO,sBAAsB;EAC7B,OAAO,oBAAoB;GACzB,cAAc;GACd,eAAe;EAChB,EAAC;CACH;CACD;AAGD,EAAC;AAGF,IAAI,IAAI,OAAO;AACb,SAAQ,KAAK,yDAAyD;AACtE,SAAQ,KACN,yFACD;AACD,SAAQ,KAAK,GAAG;AACjB;AAED,MAAM,iBAAiB;AAGvB,MAAM,UAAU;CACd,aAAa,IAAI;CACjB,eAAe,IAAI;CACnB,eAAe,IAAI;CACnB,aAAa;EACX,kBAAkB,IAAI,oBAAoB;EAC1C,aAAa,IAAI,eAAe;CACjC;CACD,YAAY,IAAI;CAChB,QAAQ,IAAI;CACZ,eAAe,IAAI;AACpB;AAID,MAAM,SAAS,YAAY;CACzB;CACA,WAAW,IAAI;AAChB,EAAC;AAEF,WAAW,QAAQ,QAAQ,CAAC,MAAM,CAAC,QAAQ;AACzC,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
1
+ {"version":3,"file":"index.js","names":["filter","LoggerImpl","name","logger","filter","LoggerCtx","inspect","util","console","cfg","logger","filter","attributes","text","context","ApiError","ApiClientError","ApiPermissionError","ApiNotFoundError","ApiValidationError","ApiAuthenticationError","ApiRateLimitError","ApiServerError","isAggregateQuery","name","context","context","RESULT_LIMIT","context","RESULT_LIMIT","context","context","context","context","trace","description","name","context","context","trace","context","text","context","marker","symbol","_a","_AISDKError","name14","marker15","name","marker2","symbol2","_a2","name2","marker3","symbol3","_a3","getErrorMessage","name3","marker4","symbol4","_a4","InvalidArgumentError","name4","marker5","symbol5","_a5","name5","marker6","symbol6","_a6","name6","marker7","symbol7","_a7","text","name7","marker8","symbol8","_a8","name8","marker9","symbol9","_a9","name9","marker10","symbol10","_a10","name10","marker11","symbol11","_a11","name11","marker12","symbol12","_a12","name12","marker13","symbol13","_a13","_TypeValidationError","name13","marker14","symbol14","_a14","text","InvalidArgumentError","description","zodSchema","text","InvalidArgumentError2","APICallError2","APICallError3","_a","text","tool","UnsupportedFunctionalityError2","UnsupportedFunctionalityError3","_a2","UnsupportedFunctionalityError4","UnsupportedFunctionalityError5","UnsupportedFunctionalityError6","UnsupportedFunctionalityError7","name","object","types","x","base","jsonSchema","name","schema","_a","isCompatible","_a","__read","__spreadArray","DiagComponentLogger","namespace","logger","DiagLogLevel","logger","__read","__spreadArray","API_NAME","DiagAPI","logger","_a","description","BaseContext","context","__read","__spreadArray","NoopContextManager","API_NAME","ContextAPI","context","_a","TraceFlags","NonRecordingSpan","context","getActiveSpan","_a","NoopTracer","name","context","ProxyTracer","name","context","NoopTracerProvider","ProxyTracerProvider","name","_a","SpanStatusCode","TraceAPI","getActiveSpan","name","AISDKError2","attributes","AISDKError4","AISDKError5","AISDKError6","AISDKError7","AISDKError8","AISDKError9","AISDKError10","AISDKError11","AISDKError12","AISDKError13","AISDKError15","context","RECOMMENDED_FIELDS","formatExplanation","context","isAggregateQuery","context","context","context","context","context","delay","context","context","context","systemPrompt","systemPrompt","handler_default","context","systemPrompt","systemPrompt","trace","context","server","description","message: string"],"sources":["../../mcp-core/dist/errors-BXmNwD2K.js","../../mcp-core/dist/slug-validation-BKH2JUpn.js","../../mcp-core/dist/schema-yM01CDL7.js","../../mcp-core/dist/define-DUKsI6o0.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/filter.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/level.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/logger.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/util.node.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/formatter.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/sink.js","../../../node_modules/.pnpm/@logtape+logtape@1.1.1/node_modules/@logtape/logtape/dist/config.js","../../mcp-core/dist/logging-DipAE5VU.js","../../mcp-core/dist/schema-COv2Mx9E.js","../../mcp-core/dist/errors-h_Ebmo8b.js","../../mcp-core/dist/client-B9APZB0N.js","../../mcp-core/dist/validate-region-url-DAFGgDb3.js","../../mcp-core/dist/api-C49LlEqH.js","../../mcp-core/dist/whoami-BoraVlxR.js","../../mcp-core/dist/find-organizations-Df_7XcZh.js","../../mcp-core/dist/find-teams-Ci9--JWk.js","../../mcp-core/dist/find-projects-_xE0VUHG.js","../../mcp-core/dist/find-releases-B-2KNnj4.js","../../mcp-core/dist/issue-helpers-CW_FS0Jn.js","../../mcp-core/dist/seer-D6i7nmhd.js","../../mcp-core/dist/formatting-CGRFosDy.js","../../mcp-core/dist/enhance-error-oY19n4bn.js","../../mcp-core/dist/get-issue-details-Dkx3WdXu.js","../../mcp-core/dist/get-trace-details-f5XoKmIu.js","../../mcp-core/dist/get-event-attachment-B5GR2cWj.js","../../mcp-core/dist/formatting-CIwRyNGU.js","../../mcp-core/dist/update-issue-BKnQHYYL.js","../../../node_modules/.pnpm/@ai-sdk+provider@1.1.3/node_modules/@ai-sdk/provider/dist/index.mjs","../../../node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/non-secure/index.js","../../../node_modules/.pnpm/secure-json-parse@2.7.0/node_modules/secure-json-parse/index.js","../../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs","../../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs","../../mcp-core/dist/openai-provider-C18ibzKZ.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js","../../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js","../../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.76/node_modules/@ai-sdk/ui-utils/dist/index.mjs","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/version.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/semver.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/types.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/diag.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/context.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/context.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/status.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/trace.js","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace-api.js","../../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.76/node_modules/ai/dist/index.mjs","../../mcp-core/dist/callEmbeddedAgent-CX8bB_WX.js","../../mcp-core/dist/utils-Bq75Ba9Z.js","../../mcp-core/dist/otel-semantics-DEnkwUAq.js","../../mcp-core/dist/whoami-BHrE9F4J.js","../../mcp-core/dist/utils-EGQqk2W7.js","../../mcp-core/dist/agent-DUcsM6ug.js","../../mcp-core/dist/formatters-BDf0umPC.js","../../mcp-core/dist/handler-DJ0HK96y.js","../../mcp-core/dist/create-team-BAdl8A5-.js","../../mcp-core/dist/create-project-OSqZHO31.js","../../mcp-core/dist/update-project-DUo5F94A.js","../../mcp-core/dist/create-dsn-cwJCYVxO.js","../../mcp-core/dist/find-dsns-op9qb46s.js","../../mcp-core/dist/fetch-utils-BWMzxmEl.js","../../mcp-core/dist/analyze-issue-with-seer-Bn3h3z1Q.js","../../mcp-core/dist/search-docs-BTxn8zJZ.js","../../mcp-core/dist/get-doc-CkdqvAbH.js","../../mcp-core/dist/dataset-fields-DNUZW54W.js","../../mcp-core/dist/config-48eLu9dt.js","../../mcp-core/dist/agent-BEGFNdJ3.js","../../mcp-core/dist/formatters-ddoifBDN.js","../../mcp-core/dist/handler-BEqYQTaW.js","../../mcp-core/dist/config-DkQjdsDV.js","../../mcp-core/dist/agent-BH2CU6gS.js","../../mcp-core/dist/error-handling-jSzAQs4J.js","../../mcp-core/dist/constraint-helpers-CBddlAo8.js","../../mcp-core/dist/server-8ny70iLt.js","../../mcp-core/dist/sentry-Bz8KwQu9.js","../src/index.ts"],"sourcesContent":["//#region src/errors.ts\n/**\n* Error thrown when user input validation fails.\n* These errors should be returned to the user directly without logging to Sentry.\n*/\nvar UserInputError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"UserInputError\";\n\t}\n};\n/**\n* Error thrown when configuration is invalid or missing.\n* These errors should be returned to the user directly without logging to Sentry.\n* Typically used for environment configuration issues, connection settings, etc.\n*/\nvar ConfigurationError = class extends Error {\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"ConfigurationError\";\n\t}\n};\n\n//#endregion\nexport { ConfigurationError, UserInputError };\n//# sourceMappingURL=errors-BXmNwD2K.js.map","import { z } from \"zod\";\n\n//#region src/utils/slug-validation.ts\n/**\n* Maximum reasonable length for a slug.\n*/\nconst MAX_SLUG_LENGTH = 100;\n/**\n* Maximum reasonable length for a numeric ID.\n*/\nconst MAX_ID_LENGTH = 20;\n/**\n* Helper to check if a string is a numeric ID.\n*/\nfunction isNumericId(value) {\n\treturn /^\\d+$/.test(value);\n}\n/**\n* Valid slug pattern: alphanumeric, hyphens, underscores, and dots.\n* Must start with alphanumeric character.\n*/\nconst VALID_SLUG_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;\n/**\n* Validates a slug to prevent path traversal and injection attacks.\n* Designed to be used with Zod's superRefine() method.\n*\n* @example\n* ```typescript\n* const OrganizationSlug = z.string()\n* .toLowerCase()\n* .trim()\n* .superRefine(validateSlug)\n* .describe(\"Organization slug\");\n*\n* const TeamSlug = z.string()\n* .toLowerCase()\n* .trim()\n* .superRefine(validateSlug)\n* .describe(\"Team slug\");\n* ```\n*/\nfunction validateSlug(val, ctx) {\n\tif (val.length === 0) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"Slug cannot be empty\"\n\t\t});\n\t\treturn;\n\t}\n\tif (val.length > MAX_SLUG_LENGTH) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Slug exceeds maximum length of ${MAX_SLUG_LENGTH} characters`\n\t\t});\n\t\treturn;\n\t}\n\tif (!VALID_SLUG_PATTERN.test(val)) ctx.addIssue({\n\t\tcode: z.ZodIssueCode.custom,\n\t\tmessage: \"Slug must contain only alphanumeric characters, hyphens, underscores, and dots, and must start with an alphanumeric character\"\n\t});\n}\n/**\n* Validates a parameter that can be either a slug or numeric ID.\n* Designed to be used with Zod's superRefine() method.\n*\n* @example\n* ```typescript\n* const ProjectSlugOrId = z.string()\n* .toLowerCase()\n* .trim()\n* .superRefine(validateSlugOrId)\n* .describe(\"Project slug or numeric ID\");\n*\n* const IssueSlugOrId = z.string()\n* .trim()\n* .superRefine(validateSlugOrId)\n* .describe(\"Issue slug or numeric ID\");\n* ```\n*/\nfunction validateSlugOrId(val, ctx) {\n\tif (isNumericId(val)) {\n\t\tif (val.length > MAX_ID_LENGTH) ctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: `Numeric ID exceeds maximum length of ${MAX_ID_LENGTH} characters`\n\t\t});\n\t\treturn;\n\t}\n\tvalidateSlug(val, ctx);\n}\n\n//#endregion\nexport { isNumericId, validateSlug, validateSlugOrId };\n//# sourceMappingURL=slug-validation-BKH2JUpn.js.map","import { SENTRY_GUIDES } from \"./constants-D8axTonA.js\";\nimport { validateSlug } from \"./slug-validation-BKH2JUpn.js\";\nimport { z } from \"zod\";\n\n//#region src/schema.ts\nconst ParamOrganizationSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe(\"The organization's slug. You can find a existing list of organizations you have access to using the `find_organizations()` tool.\");\nconst ParamTeamSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe(\"The team's slug. You can find a list of existing teams in an organization using the `find_teams()` tool.\");\nconst ParamProjectSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe(\"The project's slug. You can find a list of existing projects in an organization using the `find_projects()` tool.\");\nconst ParamProjectSlugOrAll = z.string().toLowerCase().trim().superRefine(validateSlug).describe(\"The project's slug. This will default to all projects you have access to. It is encouraged to specify this when possible.\");\nconst ParamSearchQuery = z.string().trim().describe(\"Search query to filter results by name or slug. Use this to narrow down results when there are many items.\");\nconst ParamIssueShortId = z.string().toUpperCase().trim().describe(\"The Issue ID. e.g. `PROJECT-1Z43`\");\nconst ParamIssueUrl = z.string().url().trim().describe(\"The URL of the issue. e.g. https://my-organization.sentry.io/issues/PROJECT-1Z43\");\nconst ParamTraceId = z.string().trim().regex(/^[0-9a-fA-F]{32}$/, \"Trace ID must be a 32-character hexadecimal string\").describe(\"The trace ID. e.g. `a4d1aae7216b47ff8117cf4e09ce9d0a`\");\nconst ParamPlatform = z.string().toLowerCase().trim().describe(\"The platform for the project. e.g., python, javascript, react, etc.\");\nconst ParamTransaction = z.string().trim().describe(\"The transaction name. Also known as the endpoint, or route name.\");\nconst ParamQuery = z.string().trim().describe(`The search query to apply. Use the \\`help(subject=\"query_syntax\")\\` tool to get more information about the query syntax rather than guessing.`);\n/**\n* Region URL parameter for Sentry API requests.\n*\n* Handles region-specific URLs for Sentry's Cloud Service while gracefully\n* supporting self-hosted Sentry installations that may return empty regionUrl values.\n* This schema accepts both valid URLs and empty strings to ensure compatibility\n* across different Sentry deployment types.\n*/\nconst ParamRegionUrl = z.string().trim().refine((value) => !value || z.string().url().safeParse(value).success, { message: \"Must be a valid URL or empty string (for self-hosted Sentry)\" }).describe(\"The region URL for the organization you're querying, if known. For Sentry's Cloud Service (sentry.io), this is typically the region-specific URL like 'https://us.sentry.io'. For self-hosted Sentry installations, this parameter is usually not needed and should be omitted. You can find the correct regionUrl from the organization details using the `find_organizations()` tool.\");\nconst ParamIssueStatus = z.enum([\n\t\"resolved\",\n\t\"resolvedInNextRelease\",\n\t\"unresolved\",\n\t\"ignored\"\n]).describe(\"The new status for the issue. Valid values are 'resolved', 'resolvedInNextRelease', 'unresolved', and 'ignored'.\");\nconst ParamAssignedTo = z.string().trim().describe(\"The assignee in format 'user:ID' or 'team:ID' where ID is numeric. Example: 'user:123456' or 'team:789'. Use the whoami tool to find your user ID.\");\nconst ParamSentryGuide = z.enum(SENTRY_GUIDES).describe(\"Optional guide filter to limit search results to specific documentation sections. Use either a platform (e.g., 'javascript', 'python') or platform/guide combination (e.g., 'javascript/nextjs', 'python/django').\");\nconst ParamEventId = z.string().trim().describe(\"The ID of the event.\");\nconst ParamAttachmentId = z.string().trim().describe(\"The ID of the attachment to download.\");\n\n//#endregion\nexport { ParamAssignedTo, ParamAttachmentId, ParamEventId, ParamIssueShortId, ParamIssueStatus, ParamIssueUrl, ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamProjectSlugOrAll, ParamQuery, ParamRegionUrl, ParamSearchQuery, ParamSentryGuide, ParamTeamSlug, ParamTraceId, ParamTransaction };\n//# sourceMappingURL=schema-yM01CDL7.js.map","//#region src/internal/tool-helpers/define.ts\nfunction defineTool(config) {\n\treturn config;\n}\n\n//#endregion\nexport { defineTool };\n//# sourceMappingURL=define-DUKsI6o0.js.map","//#region src/filter.ts\n/**\n* Converts a {@link FilterLike} value to an actual {@link Filter}.\n*\n* @param filter The filter-like value to convert.\n* @returns The actual filter.\n*/\nfunction toFilter(filter) {\n\tif (typeof filter === \"function\") return filter;\n\treturn getLevelFilter(filter);\n}\n/**\n* Returns a filter that accepts log records with the specified level.\n*\n* @param level The level to filter by. If `null`, the filter will reject all\n* records.\n* @returns The filter.\n*/\nfunction getLevelFilter(level) {\n\tif (level == null) return () => false;\n\tif (level === \"fatal\") return (record) => record.level === \"fatal\";\n\telse if (level === \"error\") return (record) => record.level === \"fatal\" || record.level === \"error\";\n\telse if (level === \"warning\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\";\n\telse if (level === \"info\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\" || record.level === \"info\";\n\telse if (level === \"debug\") return (record) => record.level === \"fatal\" || record.level === \"error\" || record.level === \"warning\" || record.level === \"info\" || record.level === \"debug\";\n\telse if (level === \"trace\") return () => true;\n\tthrow new TypeError(`Invalid log level: ${level}.`);\n}\n\n//#endregion\nexport { getLevelFilter, toFilter };\n//# sourceMappingURL=filter.js.map","//#region src/level.ts\nconst logLevels = [\n\t\"trace\",\n\t\"debug\",\n\t\"info\",\n\t\"warning\",\n\t\"error\",\n\t\"fatal\"\n];\n/**\n* Lists all available log levels with the order of their severity.\n* The `\"trace\"` level goes first, and the `\"fatal\"` level goes last.\n* @returns A new copy of the array of log levels.\n* @since 1.0.0\n*/\nfunction getLogLevels() {\n\treturn [...logLevels];\n}\n/**\n* Parses a log level from a string.\n*\n* @param level The log level as a string. This is case-insensitive.\n* @returns The log level.\n* @throws {TypeError} If the log level is invalid.\n*/\nfunction parseLogLevel(level) {\n\tlevel = level.toLowerCase();\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return level;\n\t\tdefault: throw new TypeError(`Invalid log level: ${level}.`);\n\t}\n}\n/**\n* Checks if a string is a valid log level. This function can be used as\n* as a type guard to narrow the type of a string to a {@link LogLevel}.\n*\n* @param level The log level as a string. This is case-sensitive.\n* @returns `true` if the string is a valid log level.\n*/\nfunction isLogLevel(level) {\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\tcase \"debug\":\n\t\tcase \"info\":\n\t\tcase \"warning\":\n\t\tcase \"error\":\n\t\tcase \"fatal\": return true;\n\t\tdefault: return false;\n\t}\n}\n/**\n* Compares two log levels.\n* @param a The first log level.\n* @param b The second log level.\n* @returns A negative number if `a` is less than `b`, a positive number if `a`\n* is greater than `b`, or zero if they are equal.\n* @since 0.8.0\n*/\nfunction compareLogLevel(a, b) {\n\tconst aIndex = logLevels.indexOf(a);\n\tif (aIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(a)}.`);\n\tconst bIndex = logLevels.indexOf(b);\n\tif (bIndex < 0) throw new TypeError(`Invalid log level: ${JSON.stringify(b)}.`);\n\treturn aIndex - bIndex;\n}\n\n//#endregion\nexport { compareLogLevel, getLogLevels, isLogLevel, parseLogLevel };\n//# sourceMappingURL=level.js.map","import { compareLogLevel } from \"./level.js\";\n\n//#region src/logger.ts\n/**\n* Get a logger with the given category.\n*\n* ```typescript\n* const logger = getLogger([\"my-app\"]);\n* ```\n*\n* @param category The category of the logger. It can be a string or an array\n* of strings. If it is a string, it is equivalent to an array\n* with a single element.\n* @returns The logger.\n*/\nfunction getLogger(category = []) {\n\treturn LoggerImpl.getLogger(category);\n}\n/**\n* The symbol for the global root logger.\n*/\nconst globalRootLoggerSymbol = Symbol.for(\"logtape.rootLogger\");\n/**\n* A logger implementation. Do not use this directly; use {@link getLogger}\n* instead. This class is exported for testing purposes.\n*/\nvar LoggerImpl = class LoggerImpl {\n\tparent;\n\tchildren;\n\tcategory;\n\tsinks;\n\tparentSinks = \"inherit\";\n\tfilters;\n\tlowestLevel = \"trace\";\n\tcontextLocalStorage;\n\tstatic getLogger(category = []) {\n\t\tlet rootLogger = globalRootLoggerSymbol in globalThis ? globalThis[globalRootLoggerSymbol] ?? null : null;\n\t\tif (rootLogger == null) {\n\t\t\trootLogger = new LoggerImpl(null, []);\n\t\t\tglobalThis[globalRootLoggerSymbol] = rootLogger;\n\t\t}\n\t\tif (typeof category === \"string\") return rootLogger.getChild(category);\n\t\tif (category.length === 0) return rootLogger;\n\t\treturn rootLogger.getChild(category);\n\t}\n\tconstructor(parent, category) {\n\t\tthis.parent = parent;\n\t\tthis.children = {};\n\t\tthis.category = category;\n\t\tthis.sinks = [];\n\t\tthis.filters = [];\n\t}\n\tgetChild(subcategory) {\n\t\tconst name = typeof subcategory === \"string\" ? subcategory : subcategory[0];\n\t\tconst childRef = this.children[name];\n\t\tlet child = childRef instanceof LoggerImpl ? childRef : childRef?.deref();\n\t\tif (child == null) {\n\t\t\tchild = new LoggerImpl(this, [...this.category, name]);\n\t\t\tthis.children[name] = \"WeakRef\" in globalThis ? new WeakRef(child) : child;\n\t\t}\n\t\tif (typeof subcategory === \"string\" || subcategory.length === 1) return child;\n\t\treturn child.getChild(subcategory.slice(1));\n\t}\n\t/**\n\t* Reset the logger. This removes all sinks and filters from the logger.\n\t*/\n\treset() {\n\t\twhile (this.sinks.length > 0) this.sinks.shift();\n\t\tthis.parentSinks = \"inherit\";\n\t\twhile (this.filters.length > 0) this.filters.shift();\n\t\tthis.lowestLevel = \"trace\";\n\t}\n\t/**\n\t* Reset the logger and all its descendants. This removes all sinks and\n\t* filters from the logger and all its descendants.\n\t*/\n\tresetDescendants() {\n\t\tfor (const child of Object.values(this.children)) {\n\t\t\tconst logger = child instanceof LoggerImpl ? child : child.deref();\n\t\t\tif (logger != null) logger.resetDescendants();\n\t\t}\n\t\tthis.reset();\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this, { ...properties });\n\t}\n\tfilter(record) {\n\t\tfor (const filter of this.filters) if (!filter(record)) return false;\n\t\tif (this.filters.length < 1) return this.parent?.filter(record) ?? true;\n\t\treturn true;\n\t}\n\t*getSinks(level) {\n\t\tif (this.lowestLevel === null || compareLogLevel(level, this.lowestLevel) < 0) return;\n\t\tif (this.parent != null && this.parentSinks === \"inherit\") for (const sink of this.parent.getSinks(level)) yield sink;\n\t\tfor (const sink of this.sinks) yield sink;\n\t}\n\temit(record, bypassSinks) {\n\t\tconst fullRecord = \"category\" in record ? record : {\n\t\t\t...record,\n\t\t\tcategory: this.category\n\t\t};\n\t\tif (this.lowestLevel === null || compareLogLevel(fullRecord.level, this.lowestLevel) < 0 || !this.filter(fullRecord)) return;\n\t\tfor (const sink of this.getSinks(fullRecord.level)) {\n\t\t\tif (bypassSinks?.has(sink)) continue;\n\t\t\ttry {\n\t\t\t\tsink(fullRecord);\n\t\t\t} catch (error) {\n\t\t\t\tconst bypassSinks2 = new Set(bypassSinks);\n\t\t\t\tbypassSinks2.add(sink);\n\t\t\t\tmetaLogger.log(\"fatal\", \"Failed to emit a log record to sink {sink}: {error}\", {\n\t\t\t\t\tsink,\n\t\t\t\t\terror,\n\t\t\t\t\trecord: fullRecord\n\t\t\t\t}, bypassSinks2);\n\t\t\t}\n\t\t}\n\t}\n\tlog(level, rawMessage, properties, bypassSinks) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tlet cachedProps = void 0;\n\t\tconst record = typeof properties === \"function\" ? {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tget message() {\n\t\t\t\treturn parseMessageTemplate(rawMessage, this.properties);\n\t\t\t},\n\t\t\trawMessage,\n\t\t\tget properties() {\n\t\t\t\tif (cachedProps == null) cachedProps = {\n\t\t\t\t\t...implicitContext,\n\t\t\t\t\t...properties()\n\t\t\t\t};\n\t\t\t\treturn cachedProps;\n\t\t\t}\n\t\t} : {\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\ttimestamp: Date.now(),\n\t\t\tmessage: parseMessageTemplate(rawMessage, {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}),\n\t\t\trawMessage,\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t};\n\t\tthis.emit(record, bypassSinks);\n\t}\n\tlogLazily(level, callback, properties = {}) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tlet rawMessage = void 0;\n\t\tlet msg = void 0;\n\t\tfunction realizeMessage() {\n\t\t\tif (msg == null || rawMessage == null) {\n\t\t\t\tmsg = callback((tpl, ...values) => {\n\t\t\t\t\trawMessage = tpl;\n\t\t\t\t\treturn renderMessage(tpl, values);\n\t\t\t\t});\n\t\t\t\tif (rawMessage == null) throw new TypeError(\"No log record was made.\");\n\t\t\t}\n\t\t\treturn [msg, rawMessage];\n\t\t}\n\t\tthis.emit({\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tget message() {\n\t\t\t\treturn realizeMessage()[0];\n\t\t\t},\n\t\t\tget rawMessage() {\n\t\t\t\treturn realizeMessage()[1];\n\t\t\t},\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t});\n\t}\n\tlogTemplate(level, messageTemplate, values, properties = {}) {\n\t\tconst implicitContext = LoggerImpl.getLogger().contextLocalStorage?.getStore() ?? {};\n\t\tthis.emit({\n\t\t\tcategory: this.category,\n\t\t\tlevel,\n\t\t\tmessage: renderMessage(messageTemplate, values),\n\t\t\trawMessage: messageTemplate,\n\t\t\ttimestamp: Date.now(),\n\t\t\tproperties: {\n\t\t\t\t...implicitContext,\n\t\t\t\t...properties\n\t\t\t}\n\t\t});\n\t}\n\ttrace(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"trace\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message);\n\t\telse this.logTemplate(\"trace\", message, values);\n\t}\n\tdebug(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"debug\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message);\n\t\telse this.logTemplate(\"debug\", message, values);\n\t}\n\tinfo(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"info\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message);\n\t\telse this.logTemplate(\"info\", message, values);\n\t}\n\twarn(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"warning\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message);\n\t\telse this.logTemplate(\"warning\", message, values);\n\t}\n\twarning(message, ...values) {\n\t\tthis.warn(message, ...values);\n\t}\n\terror(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"error\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message);\n\t\telse this.logTemplate(\"error\", message, values);\n\t}\n\tfatal(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"fatal\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message);\n\t\telse this.logTemplate(\"fatal\", message, values);\n\t}\n};\n/**\n* A logger implementation with contextual properties. Do not use this\n* directly; use {@link Logger.with} instead. This class is exported\n* for testing purposes.\n*/\nvar LoggerCtx = class LoggerCtx {\n\tlogger;\n\tproperties;\n\tconstructor(logger, properties) {\n\t\tthis.logger = logger;\n\t\tthis.properties = properties;\n\t}\n\tget category() {\n\t\treturn this.logger.category;\n\t}\n\tget parent() {\n\t\treturn this.logger.parent;\n\t}\n\tgetChild(subcategory) {\n\t\treturn this.logger.getChild(subcategory).with(this.properties);\n\t}\n\twith(properties) {\n\t\treturn new LoggerCtx(this.logger, {\n\t\t\t...this.properties,\n\t\t\t...properties\n\t\t});\n\t}\n\tlog(level, message, properties, bypassSinks) {\n\t\tthis.logger.log(level, message, typeof properties === \"function\" ? () => ({\n\t\t\t...this.properties,\n\t\t\t...properties()\n\t\t}) : {\n\t\t\t...this.properties,\n\t\t\t...properties\n\t\t}, bypassSinks);\n\t}\n\tlogLazily(level, callback) {\n\t\tthis.logger.logLazily(level, callback, this.properties);\n\t}\n\tlogTemplate(level, messageTemplate, values) {\n\t\tthis.logger.logTemplate(level, messageTemplate, values, this.properties);\n\t}\n\temit(record) {\n\t\tconst recordWithContext = {\n\t\t\t...record,\n\t\t\tproperties: {\n\t\t\t\t...this.properties,\n\t\t\t\t...record.properties\n\t\t\t}\n\t\t};\n\t\tthis.logger.emit(recordWithContext);\n\t}\n\ttrace(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"trace\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"trace\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"trace\", \"{*}\", message);\n\t\telse this.logTemplate(\"trace\", message, values);\n\t}\n\tdebug(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"debug\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"debug\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"debug\", \"{*}\", message);\n\t\telse this.logTemplate(\"debug\", message, values);\n\t}\n\tinfo(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"info\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"info\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"info\", \"{*}\", message);\n\t\telse this.logTemplate(\"info\", message, values);\n\t}\n\twarn(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"warning\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"warning\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"warning\", \"{*}\", message);\n\t\telse this.logTemplate(\"warning\", message, values);\n\t}\n\twarning(message, ...values) {\n\t\tthis.warn(message, ...values);\n\t}\n\terror(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"error\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"error\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"error\", \"{*}\", message);\n\t\telse this.logTemplate(\"error\", message, values);\n\t}\n\tfatal(message, ...values) {\n\t\tif (typeof message === \"string\") this.log(\"fatal\", message, values[0] ?? {});\n\t\telse if (typeof message === \"function\") this.logLazily(\"fatal\", message);\n\t\telse if (!Array.isArray(message)) this.log(\"fatal\", \"{*}\", message);\n\t\telse this.logTemplate(\"fatal\", message, values);\n\t}\n};\n/**\n* The meta logger. It is a logger with the category `[\"logtape\", \"meta\"]`.\n*/\nconst metaLogger = LoggerImpl.getLogger([\"logtape\", \"meta\"]);\n/**\n* Parse a message template into a message template array and a values array.\n* @param template The message template.\n* @param properties The values to replace placeholders with.\n* @returns The message template array and the values array.\n*/\nfunction parseMessageTemplate(template, properties) {\n\tconst length = template.length;\n\tif (length === 0) return [\"\"];\n\tif (!template.includes(\"{\")) return [template];\n\tconst message = [];\n\tlet startIndex = 0;\n\tfor (let i = 0; i < length; i++) {\n\t\tconst char = template[i];\n\t\tif (char === \"{\") {\n\t\t\tconst nextChar = i + 1 < length ? template[i + 1] : \"\";\n\t\t\tif (nextChar === \"{\") {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst closeIndex = template.indexOf(\"}\", i + 1);\n\t\t\tif (closeIndex === -1) continue;\n\t\t\tconst beforeText = template.slice(startIndex, i);\n\t\t\tmessage.push(beforeText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\t\t\tconst key = template.slice(i + 1, closeIndex);\n\t\t\tlet prop;\n\t\t\tconst trimmedKey = key.trim();\n\t\t\tif (trimmedKey === \"*\") prop = key in properties ? properties[key] : \"*\" in properties ? properties[\"*\"] : properties;\n\t\t\telse if (key !== trimmedKey) prop = key in properties ? properties[key] : properties[trimmedKey];\n\t\t\telse prop = properties[key];\n\t\t\tmessage.push(prop);\n\t\t\ti = closeIndex;\n\t\t\tstartIndex = i + 1;\n\t\t} else if (char === \"}\" && i + 1 < length && template[i + 1] === \"}\") i++;\n\t}\n\tconst remainingText = template.slice(startIndex);\n\tmessage.push(remainingText.replace(/{{/g, \"{\").replace(/}}/g, \"}\"));\n\treturn message;\n}\n/**\n* Render a message template with values.\n* @param template The message template.\n* @param values The message template values.\n* @returns The message template values interleaved between the substitution\n* values.\n*/\nfunction renderMessage(template, values) {\n\tconst args = [];\n\tfor (let i = 0; i < template.length; i++) {\n\t\targs.push(template[i]);\n\t\tif (i < values.length) args.push(values[i]);\n\t}\n\treturn args;\n}\n\n//#endregion\nexport { LoggerImpl, getLogger };\n//# sourceMappingURL=logger.js.map","import util from \"node:util\";\n\n//#region src/util.node.ts\nfunction inspect(obj, options) {\n\treturn util.inspect(obj, options);\n}\n\n//#endregion\nexport { inspect };\n//# sourceMappingURL=util.node.js.map","import * as util from \"#util\";\n\n//#region src/formatter.ts\n/**\n* The severity level abbreviations.\n*/\nconst levelAbbreviations = {\n\t\"trace\": \"TRC\",\n\t\"debug\": \"DBG\",\n\t\"info\": \"INF\",\n\t\"warning\": \"WRN\",\n\t\"error\": \"ERR\",\n\t\"fatal\": \"FTL\"\n};\n/**\n* A platform-specific inspect function. In Deno, this is {@link Deno.inspect},\n* and in Node.js/Bun it is `util.inspect()`. If neither is available, it\n* falls back to {@link JSON.stringify}.\n*\n* @param value The value to inspect.\n* @param options The options for inspecting the value.\n* If `colors` is `true`, the output will be ANSI-colored.\n* @returns The string representation of the value.\n*/\nconst inspect = typeof document !== \"undefined\" || typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\" ? (v) => JSON.stringify(v) : \"Deno\" in globalThis && \"inspect\" in globalThis.Deno && typeof globalThis.Deno.inspect === \"function\" ? (v, opts) => globalThis.Deno.inspect(v, {\n\tstrAbbreviateSize: Infinity,\n\titerableLimit: Infinity,\n\t...opts\n}) : util != null && \"inspect\" in util && typeof util.inspect === \"function\" ? (v, opts) => util.inspect(v, {\n\tmaxArrayLength: Infinity,\n\tmaxStringLength: Infinity,\n\t...opts\n}) : (v) => JSON.stringify(v);\nfunction padZero(num) {\n\treturn num < 10 ? `0${num}` : `${num}`;\n}\nfunction padThree(num) {\n\treturn num < 10 ? `00${num}` : num < 100 ? `0${num}` : `${num}`;\n}\nconst timestampFormatters = {\n\t\"date-time-timezone\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms} +00:00`;\n\t},\n\t\"date-time-tz\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms} +00`;\n\t},\n\t\"date-time\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${year}-${month}-${day} ${hour}:${minute}:${second}.${ms}`;\n\t},\n\t\"time-timezone\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms} +00:00`;\n\t},\n\t\"time-tz\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms} +00`;\n\t},\n\t\"time\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst hour = padZero(d.getUTCHours());\n\t\tconst minute = padZero(d.getUTCMinutes());\n\t\tconst second = padZero(d.getUTCSeconds());\n\t\tconst ms = padThree(d.getUTCMilliseconds());\n\t\treturn `${hour}:${minute}:${second}.${ms}`;\n\t},\n\t\"date\": (ts) => {\n\t\tconst d = new Date(ts);\n\t\tconst year = d.getUTCFullYear();\n\t\tconst month = padZero(d.getUTCMonth() + 1);\n\t\tconst day = padZero(d.getUTCDate());\n\t\treturn `${year}-${month}-${day}`;\n\t},\n\t\"rfc3339\": (ts) => new Date(ts).toISOString(),\n\t\"none\": () => null\n};\nconst levelRenderersCache = {\n\tABBR: levelAbbreviations,\n\tabbr: {\n\t\ttrace: \"trc\",\n\t\tdebug: \"dbg\",\n\t\tinfo: \"inf\",\n\t\twarning: \"wrn\",\n\t\terror: \"err\",\n\t\tfatal: \"ftl\"\n\t},\n\tFULL: {\n\t\ttrace: \"TRACE\",\n\t\tdebug: \"DEBUG\",\n\t\tinfo: \"INFO\",\n\t\twarning: \"WARNING\",\n\t\terror: \"ERROR\",\n\t\tfatal: \"FATAL\"\n\t},\n\tfull: {\n\t\ttrace: \"trace\",\n\t\tdebug: \"debug\",\n\t\tinfo: \"info\",\n\t\twarning: \"warning\",\n\t\terror: \"error\",\n\t\tfatal: \"fatal\"\n\t},\n\tL: {\n\t\ttrace: \"T\",\n\t\tdebug: \"D\",\n\t\tinfo: \"I\",\n\t\twarning: \"W\",\n\t\terror: \"E\",\n\t\tfatal: \"F\"\n\t},\n\tl: {\n\t\ttrace: \"t\",\n\t\tdebug: \"d\",\n\t\tinfo: \"i\",\n\t\twarning: \"w\",\n\t\terror: \"e\",\n\t\tfatal: \"f\"\n\t}\n};\n/**\n* Get a text formatter with the specified options. Although it's flexible\n* enough to create a custom formatter, if you want more control, you can\n* create a custom formatter that satisfies the {@link TextFormatter} type\n* instead.\n*\n* For more information on the options, see {@link TextFormatterOptions}.\n*\n* By default, the formatter formats log records as follows:\n*\n* ```\n* 2023-11-14 22:13:20.000 +00:00 [INF] category·subcategory: Hello, world!\n* ```\n* @param options The options for the text formatter.\n* @returns The text formatter.\n* @since 0.6.0\n*/\nfunction getTextFormatter(options = {}) {\n\tconst timestampRenderer = (() => {\n\t\tconst tsOption = options.timestamp;\n\t\tif (tsOption == null) return timestampFormatters[\"date-time-timezone\"];\n\t\telse if (tsOption === \"disabled\") return timestampFormatters[\"none\"];\n\t\telse if (typeof tsOption === \"string\" && tsOption in timestampFormatters) return timestampFormatters[tsOption];\n\t\telse return tsOption;\n\t})();\n\tconst categorySeparator = options.category ?? \"·\";\n\tconst valueRenderer = options.value ?? inspect;\n\tconst levelRenderer = (() => {\n\t\tconst levelOption = options.level;\n\t\tif (levelOption == null || levelOption === \"ABBR\") return (level) => levelRenderersCache.ABBR[level];\n\t\telse if (levelOption === \"abbr\") return (level) => levelRenderersCache.abbr[level];\n\t\telse if (levelOption === \"FULL\") return (level) => levelRenderersCache.FULL[level];\n\t\telse if (levelOption === \"full\") return (level) => levelRenderersCache.full[level];\n\t\telse if (levelOption === \"L\") return (level) => levelRenderersCache.L[level];\n\t\telse if (levelOption === \"l\") return (level) => levelRenderersCache.l[level];\n\t\telse return levelOption;\n\t})();\n\tconst formatter = options.format ?? (({ timestamp, level, category, message }) => `${timestamp ? `${timestamp} ` : \"\"}[${level}] ${category}: ${message}`);\n\treturn (record) => {\n\t\tconst msgParts = record.message;\n\t\tconst msgLen = msgParts.length;\n\t\tlet message;\n\t\tif (msgLen === 1) message = msgParts[0];\n\t\telse if (msgLen <= 6) {\n\t\t\tmessage = \"\";\n\t\t\tfor (let i = 0; i < msgLen; i++) message += i % 2 === 0 ? msgParts[i] : valueRenderer(msgParts[i]);\n\t\t} else {\n\t\t\tconst parts = new Array(msgLen);\n\t\t\tfor (let i = 0; i < msgLen; i++) parts[i] = i % 2 === 0 ? msgParts[i] : valueRenderer(msgParts[i]);\n\t\t\tmessage = parts.join(\"\");\n\t\t}\n\t\tconst timestamp = timestampRenderer(record.timestamp);\n\t\tconst level = levelRenderer(record.level);\n\t\tconst category = typeof categorySeparator === \"function\" ? categorySeparator(record.category) : record.category.join(categorySeparator);\n\t\tconst values = {\n\t\t\ttimestamp,\n\t\t\tlevel,\n\t\t\tcategory,\n\t\t\tmessage,\n\t\t\trecord\n\t\t};\n\t\treturn `${formatter(values)}\\n`;\n\t};\n}\n/**\n* The default text formatter. This formatter formats log records as follows:\n*\n* ```\n* 2023-11-14 22:13:20.000 +00:00 [INF] category·subcategory: Hello, world!\n* ```\n*\n* @param record The log record to format.\n* @returns The formatted log record.\n*/\nconst defaultTextFormatter = getTextFormatter();\nconst RESET = \"\\x1B[0m\";\nconst ansiColors = {\n\tblack: \"\\x1B[30m\",\n\tred: \"\\x1B[31m\",\n\tgreen: \"\\x1B[32m\",\n\tyellow: \"\\x1B[33m\",\n\tblue: \"\\x1B[34m\",\n\tmagenta: \"\\x1B[35m\",\n\tcyan: \"\\x1B[36m\",\n\twhite: \"\\x1B[37m\"\n};\nconst ansiStyles = {\n\tbold: \"\\x1B[1m\",\n\tdim: \"\\x1B[2m\",\n\titalic: \"\\x1B[3m\",\n\tunderline: \"\\x1B[4m\",\n\tstrikethrough: \"\\x1B[9m\"\n};\nconst defaultLevelColors = {\n\ttrace: null,\n\tdebug: \"blue\",\n\tinfo: \"green\",\n\twarning: \"yellow\",\n\terror: \"red\",\n\tfatal: \"magenta\"\n};\n/**\n* Get an ANSI color formatter with the specified options.\n*\n* ![A preview of an ANSI color formatter.](https://i.imgur.com/I8LlBUf.png)\n* @param option The options for the ANSI color formatter.\n* @returns The ANSI color formatter.\n* @since 0.6.0\n*/\nfunction getAnsiColorFormatter(options = {}) {\n\tconst format = options.format;\n\tconst timestampStyle = typeof options.timestampStyle === \"undefined\" ? \"dim\" : options.timestampStyle;\n\tconst timestampColor = options.timestampColor ?? null;\n\tconst timestampPrefix = `${timestampStyle == null ? \"\" : ansiStyles[timestampStyle]}${timestampColor == null ? \"\" : ansiColors[timestampColor]}`;\n\tconst timestampSuffix = timestampStyle == null && timestampColor == null ? \"\" : RESET;\n\tconst levelStyle = typeof options.levelStyle === \"undefined\" ? \"bold\" : options.levelStyle;\n\tconst levelColors = options.levelColors ?? defaultLevelColors;\n\tconst categoryStyle = typeof options.categoryStyle === \"undefined\" ? \"dim\" : options.categoryStyle;\n\tconst categoryColor = options.categoryColor ?? null;\n\tconst categoryPrefix = `${categoryStyle == null ? \"\" : ansiStyles[categoryStyle]}${categoryColor == null ? \"\" : ansiColors[categoryColor]}`;\n\tconst categorySuffix = categoryStyle == null && categoryColor == null ? \"\" : RESET;\n\treturn getTextFormatter({\n\t\ttimestamp: \"date-time-tz\",\n\t\tvalue(value) {\n\t\t\treturn inspect(value, { colors: true });\n\t\t},\n\t\t...options,\n\t\tformat({ timestamp, level, category, message, record }) {\n\t\t\tconst levelColor = levelColors[record.level];\n\t\t\ttimestamp = `${timestampPrefix}${timestamp}${timestampSuffix}`;\n\t\t\tlevel = `${levelStyle == null ? \"\" : ansiStyles[levelStyle]}${levelColor == null ? \"\" : ansiColors[levelColor]}${level}${levelStyle == null && levelColor == null ? \"\" : RESET}`;\n\t\t\treturn format == null ? `${timestamp} ${level} ${categoryPrefix}${category}:${categorySuffix} ${message}` : format({\n\t\t\t\ttimestamp,\n\t\t\t\tlevel,\n\t\t\t\tcategory: `${categoryPrefix}${category}${categorySuffix}`,\n\t\t\t\tmessage,\n\t\t\t\trecord\n\t\t\t});\n\t\t}\n\t});\n}\n/**\n* A text formatter that uses ANSI colors to format log records.\n*\n* ![A preview of ansiColorFormatter.](https://i.imgur.com/I8LlBUf.png)\n*\n* @param record The log record to format.\n* @returns The formatted log record.\n* @since 0.5.0\n*/\nconst ansiColorFormatter = getAnsiColorFormatter();\n/**\n* Get a [JSON Lines] formatter with the specified options. The log records\n* will be rendered as JSON objects, one per line, which is a common format\n* for log files. This format is also known as Newline-Delimited JSON (NDJSON).\n* It looks like this:\n*\n* ```json\n* {\"@timestamp\":\"2023-11-14T22:13:20.000Z\",\"level\":\"INFO\",\"message\":\"Hello, world!\",\"logger\":\"my.logger\",\"properties\":{\"key\":\"value\"}}\n* ```\n*\n* [JSON Lines]: https://jsonlines.org/\n* @param options The options for the JSON Lines formatter.\n* @returns The JSON Lines formatter.\n* @since 0.11.0\n*/\nfunction getJsonLinesFormatter(options = {}) {\n\tif (!options.categorySeparator && !options.message && !options.properties) return (record) => {\n\t\tif (record.message.length === 3) return JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: record.message[0] + JSON.stringify(record.message[1]) + record.message[2],\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t\tif (record.message.length === 1) return JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: record.message[0],\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t\tlet msg = record.message[0];\n\t\tfor (let i = 1; i < record.message.length; i++) msg += i & 1 ? JSON.stringify(record.message[i]) : record.message[i];\n\t\treturn JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: msg,\n\t\t\tlogger: record.category.join(\".\"),\n\t\t\tproperties: record.properties\n\t\t}) + \"\\n\";\n\t};\n\tconst isTemplateMessage = options.message === \"template\";\n\tconst propertiesOption = options.properties ?? \"nest:properties\";\n\tlet joinCategory;\n\tif (typeof options.categorySeparator === \"function\") joinCategory = options.categorySeparator;\n\telse {\n\t\tconst separator = options.categorySeparator ?? \".\";\n\t\tjoinCategory = (category) => category.join(separator);\n\t}\n\tlet getProperties;\n\tif (propertiesOption === \"flatten\") getProperties = (properties) => properties;\n\telse if (propertiesOption.startsWith(\"prepend:\")) {\n\t\tconst prefix = propertiesOption.substring(8);\n\t\tif (prefix === \"\") throw new TypeError(`Invalid properties option: ${JSON.stringify(propertiesOption)}. It must be of the form \"prepend:<prefix>\" where <prefix> is a non-empty string.`);\n\t\tgetProperties = (properties) => {\n\t\t\tconst result = {};\n\t\t\tfor (const key in properties) result[`${prefix}${key}`] = properties[key];\n\t\t\treturn result;\n\t\t};\n\t} else if (propertiesOption.startsWith(\"nest:\")) {\n\t\tconst key = propertiesOption.substring(5);\n\t\tgetProperties = (properties) => ({ [key]: properties });\n\t} else throw new TypeError(`Invalid properties option: ${JSON.stringify(propertiesOption)}. It must be \"flatten\", \"prepend:<prefix>\", or \"nest:<key>\".`);\n\tlet getMessage;\n\tif (isTemplateMessage) getMessage = (record) => {\n\t\tif (typeof record.rawMessage === \"string\") return record.rawMessage;\n\t\tlet msg = \"\";\n\t\tfor (let i = 0; i < record.rawMessage.length; i++) msg += i % 2 < 1 ? record.rawMessage[i] : \"{}\";\n\t\treturn msg;\n\t};\n\telse getMessage = (record) => {\n\t\tconst msgLen = record.message.length;\n\t\tif (msgLen === 1) return record.message[0];\n\t\tlet msg = \"\";\n\t\tfor (let i = 0; i < msgLen; i++) msg += i % 2 < 1 ? record.message[i] : JSON.stringify(record.message[i]);\n\t\treturn msg;\n\t};\n\treturn (record) => {\n\t\treturn JSON.stringify({\n\t\t\t\"@timestamp\": new Date(record.timestamp).toISOString(),\n\t\t\tlevel: record.level === \"warning\" ? \"WARN\" : record.level.toUpperCase(),\n\t\t\tmessage: getMessage(record),\n\t\t\tlogger: joinCategory(record.category),\n\t\t\t...getProperties(record.properties)\n\t\t}) + \"\\n\";\n\t};\n}\n/**\n* The default [JSON Lines] formatter. This formatter formats log records\n* as JSON objects, one per line, which is a common format for log files.\n* It looks like this:\n*\n* ```json\n* {\"@timestamp\":\"2023-11-14T22:13:20.000Z\",\"level\":\"INFO\",\"message\":\"Hello, world!\",\"logger\":\"my.logger\",\"properties\":{\"key\":\"value\"}}\n* ```\n*\n* You can customize the output by passing options to\n* {@link getJsonLinesFormatter}. For example, you can change the category\n* separator, the message format, and how the properties are formatted.\n*\n* [JSON Lines]: https://jsonlines.org/\n* @since 0.11.0\n*/\nconst jsonLinesFormatter = getJsonLinesFormatter();\n/**\n* The styles for the log level in the console.\n*/\nconst logLevelStyles = {\n\t\"trace\": \"background-color: gray; color: white;\",\n\t\"debug\": \"background-color: gray; color: white;\",\n\t\"info\": \"background-color: white; color: black;\",\n\t\"warning\": \"background-color: orange; color: black;\",\n\t\"error\": \"background-color: red; color: white;\",\n\t\"fatal\": \"background-color: maroon; color: white;\"\n};\n/**\n* The default console formatter.\n*\n* @param record The log record to format.\n* @returns The formatted log record, as an array of arguments for\n* {@link console.log}.\n*/\nfunction defaultConsoleFormatter(record) {\n\tlet msg = \"\";\n\tconst values = [];\n\tfor (let i = 0; i < record.message.length; i++) if (i % 2 === 0) msg += record.message[i];\n\telse {\n\t\tmsg += \"%o\";\n\t\tvalues.push(record.message[i]);\n\t}\n\tconst date = new Date(record.timestamp);\n\tconst time = `${date.getUTCHours().toString().padStart(2, \"0\")}:${date.getUTCMinutes().toString().padStart(2, \"0\")}:${date.getUTCSeconds().toString().padStart(2, \"0\")}.${date.getUTCMilliseconds().toString().padStart(3, \"0\")}`;\n\treturn [\n\t\t`%c${time} %c${levelAbbreviations[record.level]}%c %c${record.category.join(\"·\")} %c${msg}`,\n\t\t\"color: gray;\",\n\t\tlogLevelStyles[record.level],\n\t\t\"background-color: default;\",\n\t\t\"color: gray;\",\n\t\t\"color: default;\",\n\t\t...values\n\t];\n}\n\n//#endregion\nexport { ansiColorFormatter, defaultConsoleFormatter, defaultTextFormatter, getAnsiColorFormatter, getJsonLinesFormatter, getTextFormatter, jsonLinesFormatter };\n//# sourceMappingURL=formatter.js.map","import { toFilter } from \"./filter.js\";\nimport { compareLogLevel } from \"./level.js\";\nimport { defaultConsoleFormatter, defaultTextFormatter } from \"./formatter.js\";\n\n//#region src/sink.ts\n/**\n* Turns a sink into a filtered sink. The returned sink only logs records that\n* pass the filter.\n*\n* @example Filter a console sink to only log records with the info level\n* ```typescript\n* const sink = withFilter(getConsoleSink(), \"info\");\n* ```\n*\n* @param sink A sink to be filtered.\n* @param filter A filter to apply to the sink. It can be either a filter\n* function or a {@link LogLevel} string.\n* @returns A sink that only logs records that pass the filter.\n*/\nfunction withFilter(sink, filter) {\n\tconst filterFunc = toFilter(filter);\n\treturn (record) => {\n\t\tif (filterFunc(record)) sink(record);\n\t};\n}\n/**\n* A factory that returns a sink that writes to a {@link WritableStream}.\n*\n* Note that the `stream` is of Web Streams API, which is different from\n* Node.js streams. You can convert a Node.js stream to a Web Streams API\n* stream using [`stream.Writable.toWeb()`] method.\n*\n* [`stream.Writable.toWeb()`]: https://nodejs.org/api/stream.html#streamwritabletowebstreamwritable\n*\n* @example Sink to the standard error in Deno\n* ```typescript\n* const stderrSink = getStreamSink(Deno.stderr.writable);\n* ```\n*\n* @example Sink to the standard error in Node.js\n* ```typescript\n* import stream from \"node:stream\";\n* const stderrSink = getStreamSink(stream.Writable.toWeb(process.stderr));\n* ```\n*\n* @param stream The stream to write to.\n* @param options The options for the sink.\n* @returns A sink that writes to the stream.\n*/\nfunction getStreamSink(stream, options = {}) {\n\tconst formatter = options.formatter ?? defaultTextFormatter;\n\tconst encoder = options.encoder ?? new TextEncoder();\n\tconst writer = stream.getWriter();\n\tif (!options.nonBlocking) {\n\t\tlet lastPromise = Promise.resolve();\n\t\tconst sink = (record) => {\n\t\t\tconst bytes = encoder.encode(formatter(record));\n\t\t\tlastPromise = lastPromise.then(() => writer.ready).then(() => writer.write(bytes));\n\t\t};\n\t\tsink[Symbol.asyncDispose] = async () => {\n\t\t\tawait lastPromise;\n\t\t\tawait writer.close();\n\t\t};\n\t\treturn sink;\n\t}\n\tconst nonBlockingConfig = options.nonBlocking === true ? {} : options.nonBlocking;\n\tconst bufferSize = nonBlockingConfig.bufferSize ?? 100;\n\tconst flushInterval = nonBlockingConfig.flushInterval ?? 100;\n\tconst buffer = [];\n\tlet flushTimer = null;\n\tlet disposed = false;\n\tlet activeFlush = null;\n\tconst maxBufferSize = bufferSize * 2;\n\tasync function flush() {\n\t\tif (buffer.length === 0) return;\n\t\tconst records = buffer.splice(0);\n\t\tfor (const record of records) try {\n\t\t\tconst bytes = encoder.encode(formatter(record));\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(bytes);\n\t\t} catch {}\n\t}\n\tfunction scheduleFlush() {\n\t\tif (activeFlush) return;\n\t\tactiveFlush = flush().finally(() => {\n\t\t\tactiveFlush = null;\n\t\t});\n\t}\n\tfunction startFlushTimer() {\n\t\tif (flushTimer !== null || disposed) return;\n\t\tflushTimer = setInterval(() => {\n\t\t\tscheduleFlush();\n\t\t}, flushInterval);\n\t}\n\tconst nonBlockingSink = (record) => {\n\t\tif (disposed) return;\n\t\tif (buffer.length >= maxBufferSize) buffer.shift();\n\t\tbuffer.push(record);\n\t\tif (buffer.length >= bufferSize) scheduleFlush();\n\t\telse if (flushTimer === null) startFlushTimer();\n\t};\n\tnonBlockingSink[Symbol.asyncDispose] = async () => {\n\t\tdisposed = true;\n\t\tif (flushTimer !== null) {\n\t\t\tclearInterval(flushTimer);\n\t\t\tflushTimer = null;\n\t\t}\n\t\tawait flush();\n\t\ttry {\n\t\t\tawait writer.close();\n\t\t} catch {}\n\t};\n\treturn nonBlockingSink;\n}\n/**\n* A console sink factory that returns a sink that logs to the console.\n*\n* @param options The options for the sink.\n* @returns A sink that logs to the console. If `nonBlocking` is enabled,\n* returns a sink that also implements {@link Disposable}.\n*/\nfunction getConsoleSink(options = {}) {\n\tconst formatter = options.formatter ?? defaultConsoleFormatter;\n\tconst levelMap = {\n\t\ttrace: \"debug\",\n\t\tdebug: \"debug\",\n\t\tinfo: \"info\",\n\t\twarning: \"warn\",\n\t\terror: \"error\",\n\t\tfatal: \"error\",\n\t\t...options.levelMap ?? {}\n\t};\n\tconst console = options.console ?? globalThis.console;\n\tconst baseSink = (record) => {\n\t\tconst args = formatter(record);\n\t\tconst method = levelMap[record.level];\n\t\tif (method === void 0) throw new TypeError(`Invalid log level: ${record.level}.`);\n\t\tif (typeof args === \"string\") {\n\t\t\tconst msg = args.replace(/\\r?\\n$/, \"\");\n\t\t\tconsole[method](msg);\n\t\t} else console[method](...args);\n\t};\n\tif (!options.nonBlocking) return baseSink;\n\tconst nonBlockingConfig = options.nonBlocking === true ? {} : options.nonBlocking;\n\tconst bufferSize = nonBlockingConfig.bufferSize ?? 100;\n\tconst flushInterval = nonBlockingConfig.flushInterval ?? 100;\n\tconst buffer = [];\n\tlet flushTimer = null;\n\tlet disposed = false;\n\tlet flushScheduled = false;\n\tconst maxBufferSize = bufferSize * 2;\n\tfunction flush() {\n\t\tif (buffer.length === 0) return;\n\t\tconst records = buffer.splice(0);\n\t\tfor (const record of records) try {\n\t\t\tbaseSink(record);\n\t\t} catch {}\n\t}\n\tfunction scheduleFlush() {\n\t\tif (flushScheduled) return;\n\t\tflushScheduled = true;\n\t\tsetTimeout(() => {\n\t\t\tflushScheduled = false;\n\t\t\tflush();\n\t\t}, 0);\n\t}\n\tfunction startFlushTimer() {\n\t\tif (flushTimer !== null || disposed) return;\n\t\tflushTimer = setInterval(() => {\n\t\t\tflush();\n\t\t}, flushInterval);\n\t}\n\tconst nonBlockingSink = (record) => {\n\t\tif (disposed) return;\n\t\tif (buffer.length >= maxBufferSize) buffer.shift();\n\t\tbuffer.push(record);\n\t\tif (buffer.length >= bufferSize) scheduleFlush();\n\t\telse if (flushTimer === null) startFlushTimer();\n\t};\n\tnonBlockingSink[Symbol.dispose] = () => {\n\t\tdisposed = true;\n\t\tif (flushTimer !== null) {\n\t\t\tclearInterval(flushTimer);\n\t\t\tflushTimer = null;\n\t\t}\n\t\tflush();\n\t};\n\treturn nonBlockingSink;\n}\n/**\n* Converts an async sink into a regular sink with proper async handling.\n* The returned sink chains async operations to ensure proper ordering and\n* implements AsyncDisposable to wait for all pending operations on disposal.\n*\n* @example Create a sink that asynchronously posts to a webhook\n* ```typescript\n* const asyncSink: AsyncSink = async (record) => {\n* await fetch(\"https://example.com/logs\", {\n* method: \"POST\",\n* body: JSON.stringify(record),\n* });\n* };\n* const sink = fromAsyncSink(asyncSink);\n* ```\n*\n* @param asyncSink The async sink function to convert.\n* @returns A sink that properly handles async operations and disposal.\n* @since 1.0.0\n*/\nfunction fromAsyncSink(asyncSink) {\n\tlet lastPromise = Promise.resolve();\n\tconst sink = (record) => {\n\t\tlastPromise = lastPromise.then(() => asyncSink(record)).catch(() => {});\n\t};\n\tsink[Symbol.asyncDispose] = async () => {\n\t\tawait lastPromise;\n\t};\n\treturn sink;\n}\n/**\n* Creates a sink that buffers log records until a trigger level is reached.\n* This pattern, known as \"fingers crossed\" logging, keeps detailed debug logs\n* in memory and only outputs them when an error or other significant event occurs.\n*\n* @example Basic usage with default settings\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink());\n* // Debug and info logs are buffered\n* // When an error occurs, all buffered logs + the error are output\n* ```\n*\n* @example Custom trigger level and buffer size\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink(), {\n* triggerLevel: \"warning\", // Trigger on warning or higher\n* maxBufferSize: 500 // Keep last 500 records\n* });\n* ```\n*\n* @example Category isolation\n* ```typescript\n* const sink = fingersCrossed(getConsoleSink(), {\n* isolateByCategory: \"descendant\" // Separate buffers per category\n* });\n* // Error in [\"app\"] triggers flush of [\"app\"] and [\"app\", \"module\"] buffers\n* // But not [\"other\"] buffer\n* ```\n*\n* @param sink The sink to wrap. Buffered records are sent to this sink when\n* triggered.\n* @param options Configuration options for the fingers crossed behavior.\n* @returns A sink that buffers records until the trigger level is reached.\n* @since 1.1.0\n*/\nfunction fingersCrossed(sink, options = {}) {\n\tconst triggerLevel = options.triggerLevel ?? \"error\";\n\tconst maxBufferSize = Math.max(0, options.maxBufferSize ?? 1e3);\n\tconst isolateByCategory = options.isolateByCategory;\n\ttry {\n\t\tcompareLogLevel(\"trace\", triggerLevel);\n\t} catch (error) {\n\t\tthrow new TypeError(`Invalid triggerLevel: ${JSON.stringify(triggerLevel)}. ${error instanceof Error ? error.message : String(error)}`);\n\t}\n\tfunction isDescendant(parent, child) {\n\t\tif (parent.length === 0 || child.length === 0) return false;\n\t\tif (parent.length > child.length) return false;\n\t\treturn parent.every((p, i) => p === child[i]);\n\t}\n\tfunction isAncestor(child, parent) {\n\t\tif (child.length === 0 || parent.length === 0) return false;\n\t\tif (child.length < parent.length) return false;\n\t\treturn parent.every((p, i) => p === child[i]);\n\t}\n\tlet shouldFlushBuffer = null;\n\tif (isolateByCategory) if (typeof isolateByCategory === \"function\") shouldFlushBuffer = isolateByCategory;\n\telse switch (isolateByCategory) {\n\t\tcase \"descendant\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isDescendant(trigger, buffered);\n\t\t\tbreak;\n\t\tcase \"ancestor\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isAncestor(trigger, buffered);\n\t\t\tbreak;\n\t\tcase \"both\":\n\t\t\tshouldFlushBuffer = (trigger, buffered) => isDescendant(trigger, buffered) || isAncestor(trigger, buffered);\n\t\t\tbreak;\n\t}\n\tfunction getCategoryKey(category) {\n\t\treturn JSON.stringify(category);\n\t}\n\tfunction parseCategoryKey(key) {\n\t\treturn JSON.parse(key);\n\t}\n\tif (!isolateByCategory) {\n\t\tconst buffer = [];\n\t\tlet triggered = false;\n\t\treturn (record) => {\n\t\t\tif (triggered) {\n\t\t\t\tsink(record);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (compareLogLevel(record.level, triggerLevel) >= 0) {\n\t\t\t\ttriggered = true;\n\t\t\t\tfor (const bufferedRecord of buffer) sink(bufferedRecord);\n\t\t\t\tbuffer.length = 0;\n\t\t\t\tsink(record);\n\t\t\t} else {\n\t\t\t\tbuffer.push(record);\n\t\t\t\twhile (buffer.length > maxBufferSize) buffer.shift();\n\t\t\t}\n\t\t};\n\t} else {\n\t\tconst buffers = /* @__PURE__ */ new Map();\n\t\tconst triggered = /* @__PURE__ */ new Set();\n\t\treturn (record) => {\n\t\t\tconst categoryKey = getCategoryKey(record.category);\n\t\t\tif (triggered.has(categoryKey)) {\n\t\t\t\tsink(record);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (compareLogLevel(record.level, triggerLevel) >= 0) {\n\t\t\t\tconst keysToFlush = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [bufferedKey] of buffers) if (bufferedKey === categoryKey) keysToFlush.add(bufferedKey);\n\t\t\t\telse if (shouldFlushBuffer) {\n\t\t\t\t\tconst bufferedCategory = parseCategoryKey(bufferedKey);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (shouldFlushBuffer(record.category, bufferedCategory)) keysToFlush.add(bufferedKey);\n\t\t\t\t\t} catch {}\n\t\t\t\t}\n\t\t\t\tconst allRecordsToFlush = [];\n\t\t\t\tfor (const key of keysToFlush) {\n\t\t\t\t\tconst buffer = buffers.get(key);\n\t\t\t\t\tif (buffer) {\n\t\t\t\t\t\tallRecordsToFlush.push(...buffer);\n\t\t\t\t\t\tbuffers.delete(key);\n\t\t\t\t\t\ttriggered.add(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tallRecordsToFlush.sort((a, b) => a.timestamp - b.timestamp);\n\t\t\t\tfor (const bufferedRecord of allRecordsToFlush) sink(bufferedRecord);\n\t\t\t\ttriggered.add(categoryKey);\n\t\t\t\tsink(record);\n\t\t\t} else {\n\t\t\t\tlet buffer = buffers.get(categoryKey);\n\t\t\t\tif (!buffer) {\n\t\t\t\t\tbuffer = [];\n\t\t\t\t\tbuffers.set(categoryKey, buffer);\n\t\t\t\t}\n\t\t\t\tbuffer.push(record);\n\t\t\t\twhile (buffer.length > maxBufferSize) buffer.shift();\n\t\t\t}\n\t\t};\n\t}\n}\n\n//#endregion\nexport { fingersCrossed, fromAsyncSink, getConsoleSink, getStreamSink, withFilter };\n//# sourceMappingURL=sink.js.map","import { toFilter } from \"./filter.js\";\nimport { LoggerImpl } from \"./logger.js\";\nimport { getConsoleSink } from \"./sink.js\";\n\n//#region src/config.ts\n/**\n* The current configuration, if any. Otherwise, `null`.\n*/\nlet currentConfig = null;\n/**\n* Strong references to the loggers.\n* This is to prevent the loggers from being garbage collected so that their\n* sinks and filters are not removed.\n*/\nconst strongRefs = /* @__PURE__ */ new Set();\n/**\n* Disposables to dispose when resetting the configuration.\n*/\nconst disposables = /* @__PURE__ */ new Set();\n/**\n* Async disposables to dispose when resetting the configuration.\n*/\nconst asyncDisposables = /* @__PURE__ */ new Set();\n/**\n* Check if a config is for the meta logger.\n*/\nfunction isLoggerConfigMeta(cfg) {\n\treturn cfg.category.length === 0 || cfg.category.length === 1 && cfg.category[0] === \"logtape\" || cfg.category.length === 2 && cfg.category[0] === \"logtape\" && cfg.category[1] === \"meta\";\n}\n/**\n* Configure the loggers with the specified configuration.\n*\n* Note that if the given sinks or filters are disposable, they will be\n* disposed when the configuration is reset, or when the process exits.\n*\n* @example\n* ```typescript\n* await configure({\n* sinks: {\n* console: getConsoleSink(),\n* },\n* filters: {\n* slow: (log) =>\n* \"duration\" in log.properties &&\n* log.properties.duration as number > 1000,\n* },\n* loggers: [\n* {\n* category: \"my-app\",\n* sinks: [\"console\"],\n* lowestLevel: \"info\",\n* },\n* {\n* category: [\"my-app\", \"sql\"],\n* filters: [\"slow\"],\n* lowestLevel: \"debug\",\n* },\n* {\n* category: \"logtape\",\n* sinks: [\"console\"],\n* lowestLevel: \"error\",\n* },\n* ],\n* });\n* ```\n*\n* @param config The configuration.\n*/\nasync function configure(config) {\n\tif (currentConfig != null && !config.reset) throw new ConfigError(\"Already configured; if you want to reset, turn on the reset flag.\");\n\tawait reset();\n\ttry {\n\t\tconfigureInternal(config, true);\n\t} catch (e) {\n\t\tif (e instanceof ConfigError) await reset();\n\t\tthrow e;\n\t}\n}\n/**\n* Configure sync loggers with the specified configuration.\n*\n* Note that if the given sinks or filters are disposable, they will be\n* disposed when the configuration is reset, or when the process exits.\n*\n* Also note that passing async sinks or filters will throw. If\n* necessary use {@link resetSync} or {@link disposeSync}.\n*\n* @example\n* ```typescript\n* configureSync({\n* sinks: {\n* console: getConsoleSink(),\n* },\n* loggers: [\n* {\n* category: \"my-app\",\n* sinks: [\"console\"],\n* lowestLevel: \"info\",\n* },\n* {\n* category: \"logtape\",\n* sinks: [\"console\"],\n* lowestLevel: \"error\",\n* },\n* ],\n* });\n* ```\n*\n* @param config The configuration.\n* @since 0.9.0\n*/\nfunction configureSync(config) {\n\tif (currentConfig != null && !config.reset) throw new ConfigError(\"Already configured; if you want to reset, turn on the reset flag.\");\n\tif (asyncDisposables.size > 0) throw new ConfigError(\"Previously configured async disposables are still active. Use configure() instead or explicitly dispose them using dispose().\");\n\tresetSync();\n\ttry {\n\t\tconfigureInternal(config, false);\n\t} catch (e) {\n\t\tif (e instanceof ConfigError) resetSync();\n\t\tthrow e;\n\t}\n}\nfunction configureInternal(config, allowAsync) {\n\tcurrentConfig = config;\n\tlet metaConfigured = false;\n\tconst configuredCategories = /* @__PURE__ */ new Set();\n\tfor (const cfg of config.loggers) {\n\t\tif (isLoggerConfigMeta(cfg)) metaConfigured = true;\n\t\tconst categoryKey = Array.isArray(cfg.category) ? JSON.stringify(cfg.category) : JSON.stringify([cfg.category]);\n\t\tif (configuredCategories.has(categoryKey)) throw new ConfigError(`Duplicate logger configuration for category: ${categoryKey}. Each category can only be configured once.`);\n\t\tconfiguredCategories.add(categoryKey);\n\t\tconst logger = LoggerImpl.getLogger(cfg.category);\n\t\tfor (const sinkId of cfg.sinks ?? []) {\n\t\t\tconst sink = config.sinks[sinkId];\n\t\t\tif (!sink) throw new ConfigError(`Sink not found: ${sinkId}.`);\n\t\t\tlogger.sinks.push(sink);\n\t\t}\n\t\tlogger.parentSinks = cfg.parentSinks ?? \"inherit\";\n\t\tif (cfg.lowestLevel !== void 0) logger.lowestLevel = cfg.lowestLevel;\n\t\tfor (const filterId of cfg.filters ?? []) {\n\t\t\tconst filter = config.filters?.[filterId];\n\t\t\tif (filter === void 0) throw new ConfigError(`Filter not found: ${filterId}.`);\n\t\t\tlogger.filters.push(toFilter(filter));\n\t\t}\n\t\tstrongRefs.add(logger);\n\t}\n\tLoggerImpl.getLogger().contextLocalStorage = config.contextLocalStorage;\n\tfor (const sink of Object.values(config.sinks)) {\n\t\tif (Symbol.asyncDispose in sink) if (allowAsync) asyncDisposables.add(sink);\n\t\telse throw new ConfigError(\"Async disposables cannot be used with configureSync().\");\n\t\tif (Symbol.dispose in sink) disposables.add(sink);\n\t}\n\tfor (const filter of Object.values(config.filters ?? {})) {\n\t\tif (filter == null || typeof filter === \"string\") continue;\n\t\tif (Symbol.asyncDispose in filter) if (allowAsync) asyncDisposables.add(filter);\n\t\telse throw new ConfigError(\"Async disposables cannot be used with configureSync().\");\n\t\tif (Symbol.dispose in filter) disposables.add(filter);\n\t}\n\tif (\"process\" in globalThis && !(\"Deno\" in globalThis)) {\n\t\tconst proc = globalThis.process;\n\t\tif (proc?.on) proc.on(\"exit\", allowAsync ? dispose : disposeSync);\n\t} else addEventListener(\"unload\", allowAsync ? dispose : disposeSync);\n\tconst meta = LoggerImpl.getLogger([\"logtape\", \"meta\"]);\n\tif (!metaConfigured) meta.sinks.push(getConsoleSink());\n\tmeta.info(\"LogTape loggers are configured. Note that LogTape itself uses the meta logger, which has category {metaLoggerCategory}. The meta logger purposes to log internal errors such as sink exceptions. If you are seeing this message, the meta logger is automatically configured. It's recommended to configure the meta logger with a separate sink so that you can easily notice if logging itself fails or is misconfigured. To turn off this message, configure the meta logger with higher log levels than {dismissLevel}. See also <https://logtape.org/manual/categories#meta-logger>.\", {\n\t\tmetaLoggerCategory: [\"logtape\", \"meta\"],\n\t\tdismissLevel: \"info\"\n\t});\n}\n/**\n* Get the current configuration, if any. Otherwise, `null`.\n* @returns The current configuration, if any. Otherwise, `null`.\n*/\nfunction getConfig() {\n\treturn currentConfig;\n}\n/**\n* Reset the configuration. Mostly for testing purposes.\n*/\nasync function reset() {\n\tawait dispose();\n\tresetInternal();\n}\n/**\n* Reset the configuration. Mostly for testing purposes. Will not clear async\n* sinks, only use with sync sinks. Use {@link reset} if you have async sinks.\n* @since 0.9.0\n*/\nfunction resetSync() {\n\tdisposeSync();\n\tresetInternal();\n}\nfunction resetInternal() {\n\tconst rootLogger = LoggerImpl.getLogger([]);\n\trootLogger.resetDescendants();\n\tdelete rootLogger.contextLocalStorage;\n\tstrongRefs.clear();\n\tcurrentConfig = null;\n}\n/**\n* Dispose of the disposables.\n*/\nasync function dispose() {\n\tdisposeSync();\n\tconst promises = [];\n\tfor (const disposable of asyncDisposables) {\n\t\tpromises.push(disposable[Symbol.asyncDispose]());\n\t\tasyncDisposables.delete(disposable);\n\t}\n\tawait Promise.all(promises);\n}\n/**\n* Dispose of the sync disposables. Async disposables will be untouched,\n* use {@link dispose} if you have async sinks.\n* @since 0.9.0\n*/\nfunction disposeSync() {\n\tfor (const disposable of disposables) disposable[Symbol.dispose]();\n\tdisposables.clear();\n}\n/**\n* A configuration error.\n*/\nvar ConfigError = class extends Error {\n\t/**\n\t* Constructs a new configuration error.\n\t* @param message The error message.\n\t*/\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ConfigureError\";\n\t}\n};\n\n//#endregion\nexport { ConfigError, configure, configureSync, dispose, disposeSync, getConfig, reset, resetSync };\n//# sourceMappingURL=config.js.map","import { configureSync, getConfig, getConsoleSink, getJsonLinesFormatter, getLogger, parseLogLevel } from \"@logtape/logtape\";\nimport { captureException, captureMessage, withScope } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\n\n//#region src/telem/logging.ts\nconst ROOT_LOG_CATEGORY = [\"sentry\", \"mcp\"];\nlet loggingConfigured = false;\nfunction resolveLowestLevel() {\n\tconst envLevel = typeof process !== \"undefined\" ? process.env.LOG_LEVEL : void 0;\n\tif (envLevel) try {\n\t\treturn parseLogLevel(envLevel);\n\t} catch (error) {}\n\treturn typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\" ? \"debug\" : \"info\";\n}\n/**\n* Creates a LogTape sink that sends logs to Sentry's Logs product using Sentry.logger.\n*\n* Unlike @logtape/sentry's getSentrySink which uses captureException/captureMessage\n* (creating Issues), this sink uses Sentry.logger.* methods to send data to the\n* Logs product.\n*\n* Note: This uses @sentry/node logger API. Cloudflare Workers will need a separate\n* implementation using @sentry/cloudflare logger API.\n*/\nfunction createSentryLogsSink() {\n\treturn (record) => {\n\t\tif (!Sentry.logger) return;\n\t\tlet message = \"\";\n\t\tfor (let i = 0; i < record.message.length; i++) if (i % 2 === 0) message += record.message[i];\n\t\telse {\n\t\t\tconst value = record.message[i];\n\t\t\tmessage += typeof value === \"string\" ? value : coerceMessage(value);\n\t\t}\n\t\tconst attributes = record.properties;\n\t\tswitch (record.level) {\n\t\t\tcase \"trace\":\n\t\t\t\tSentry.logger.trace(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"debug\":\n\t\t\t\tSentry.logger.debug(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"info\":\n\t\t\t\tSentry.logger.info(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"warning\":\n\t\t\t\tSentry.logger.warn(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tSentry.logger.error(message, attributes);\n\t\t\t\tbreak;\n\t\t\tcase \"fatal\":\n\t\t\t\tSentry.logger.fatal(message, attributes);\n\t\t\t\tbreak;\n\t\t\tdefault: Sentry.logger.info(message, attributes);\n\t\t}\n\t};\n}\nfunction ensureLoggingConfigured() {\n\tif (loggingConfigured) return;\n\tconst consoleSink = getConsoleSink({ formatter: getJsonLinesFormatter() });\n\tconst sentrySink = createSentryLogsSink();\n\tconfigureSync({\n\t\treset: getConfig() !== null,\n\t\tsinks: {\n\t\t\tconsole: consoleSink,\n\t\t\tsentry: sentrySink\n\t\t},\n\t\tloggers: [\n\t\t\t{\n\t\t\t\tcategory: [...ROOT_LOG_CATEGORY],\n\t\t\t\tsinks: [\"console\", \"sentry\"],\n\t\t\t\tlowestLevel: resolveLowestLevel()\n\t\t\t},\n\t\t\t{\n\t\t\t\tcategory: [\"logtape\", \"meta\"],\n\t\t\t\tsinks: [\"console\"],\n\t\t\t\tlowestLevel: \"warning\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tcategory: \"logtape\",\n\t\t\t\tsinks: [\"console\"],\n\t\t\t\tlowestLevel: \"error\"\n\t\t\t}\n\t\t]\n\t});\n\tloggingConfigured = true;\n}\nfunction getLogger$1(scope, defaults) {\n\tensureLoggingConfigured();\n\tconst category = Array.isArray(scope) ? scope : [scope];\n\tconst logger$1 = getLogger([...ROOT_LOG_CATEGORY, ...category]);\n\treturn defaults ? logger$1.with(defaults) : logger$1;\n}\nconst ISSUE_LOGGER_SCOPE = [\"runtime\", \"issues\"];\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isSentryContexts(value) {\n\tif (!isRecord(value)) return false;\n\treturn Object.values(value).every((entry) => isRecord(entry));\n}\nfunction isBaseLogOptionsCandidate(value) {\n\tif (!isRecord(value)) return false;\n\tif (\"extra\" in value || \"loggerScope\" in value) return true;\n\tif (\"contexts\" in value) {\n\t\tconst contexts = value.contexts;\n\t\treturn contexts === void 0 || isSentryContexts(contexts);\n\t}\n\treturn false;\n}\nfunction isLogIssueOptionsCandidate(value) {\n\treturn isBaseLogOptionsCandidate(value) || isRecord(value) && \"attachments\" in value;\n}\nfunction parseBaseOptions(contextsOrOptions) {\n\tif (isBaseLogOptionsCandidate(contextsOrOptions)) {\n\t\tconst { contexts, extra, loggerScope } = contextsOrOptions;\n\t\treturn {\n\t\t\tcontexts,\n\t\t\textra,\n\t\t\tloggerScope\n\t\t};\n\t}\n\tif (isSentryContexts(contextsOrOptions)) return { contexts: contextsOrOptions };\n\treturn {};\n}\nfunction parseLogIssueOptions(contextsOrOptions, attachmentsArg) {\n\tconst base = parseBaseOptions(contextsOrOptions);\n\tconst attachments = isLogIssueOptionsCandidate(contextsOrOptions) ? contextsOrOptions.attachments : void 0;\n\treturn {\n\t\t...base,\n\t\tattachments: attachments ?? attachmentsArg\n\t};\n}\nfunction parseLogOptions(contextsOrOptions) {\n\treturn parseBaseOptions(contextsOrOptions);\n}\nfunction safeJsonStringify(value) {\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch (error) {\n\t\treturn void 0;\n\t}\n}\nfunction truncate(text, maxLength = 1024) {\n\tif (text.length <= maxLength) return text;\n\treturn `${text.slice(0, maxLength - 1)}…`;\n}\nfunction coerceMessage(value) {\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\") return value.toString();\n\tif (value === null || value === void 0) return String(value);\n\tconst json = safeJsonStringify(value);\n\tif (json) return truncate(json);\n\treturn Object.prototype.toString.call(value);\n}\nfunction serializeError(value, depth = 0) {\n\tif (value instanceof Error) {\n\t\tconst serialized = { message: value.message };\n\t\tif (value.name && value.name !== \"Error\") serialized.name = value.name;\n\t\tif (typeof value.stack === \"string\") serialized.stack = value.stack;\n\t\tconst hasCause = \"cause\" in value && value.cause !== void 0;\n\t\tif (hasCause && depth < 3) {\n\t\t\tconst cause = value.cause;\n\t\t\tserialized.cause = serializeError(cause, depth + 1);\n\t\t}\n\t\treturn serialized;\n\t}\n\treturn { message: coerceMessage(value) };\n}\nconst logger = getLogger$1([]);\nconst DEFAULT_LOGGER_SCOPE = [];\nfunction buildLogProperties(level, options, serializedError) {\n\tconst properties = { severity: level };\n\tif (serializedError) properties.error = serializedError;\n\tif (options.extra) Object.assign(properties, options.extra);\n\tif (options.contexts) properties.sentryContexts = options.contexts;\n\treturn properties;\n}\nfunction logWithLevel(level, value, contextsOrOptions) {\n\tensureLoggingConfigured();\n\tconst options = parseLogOptions(contextsOrOptions);\n\tconst serializedError = value instanceof Error ? serializeError(value) : void 0;\n\tconst message = serializedError ? serializedError.message : coerceMessage(value);\n\tconst scope = options.loggerScope ?? DEFAULT_LOGGER_SCOPE;\n\tconst scopedLogger = getLogger$1(scope, { severity: level });\n\tconst properties = buildLogProperties(level, options, serializedError);\n\tswitch (level) {\n\t\tcase \"trace\":\n\t\t\tscopedLogger.trace(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"debug\":\n\t\t\tscopedLogger.debug(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"info\":\n\t\t\tscopedLogger.info(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"warning\":\n\t\t\tscopedLogger.warn(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"error\":\n\t\t\tscopedLogger.error(message, () => properties);\n\t\t\tbreak;\n\t\tcase \"fatal\":\n\t\t\tscopedLogger.fatal(message, () => properties);\n\t\t\tbreak;\n\t\tdefault: scopedLogger.info(message, () => properties);\n\t}\n}\nfunction logDebug(value, contextsOrOptions) {\n\tlogWithLevel(\"debug\", value, contextsOrOptions);\n}\nfunction logInfo(value, contextsOrOptions) {\n\tlogWithLevel(\"info\", value, contextsOrOptions);\n}\nfunction logWarn(value, contextsOrOptions) {\n\tlogWithLevel(\"warning\", value, contextsOrOptions);\n}\nfunction logError(value, contextsOrOptions) {\n\tlogWithLevel(\"error\", value, contextsOrOptions);\n}\nfunction logIssue(error, contextsOrOptions, attachmentsArg) {\n\tensureLoggingConfigured();\n\tconst options = parseLogIssueOptions(contextsOrOptions, attachmentsArg);\n\tconst eventId = withScope((scopeInstance) => {\n\t\tif (options.contexts) for (const [key, context] of Object.entries(options.contexts)) scopeInstance.setContext(key, context);\n\t\tif (options.extra) scopeInstance.setContext(\"log\", options.extra);\n\t\tif (options.attachments) for (const [key, data] of Object.entries(options.attachments)) scopeInstance.addAttachment({\n\t\t\tdata,\n\t\t\tfilename: key\n\t\t});\n\t\tconst captureLevel = \"error\";\n\t\treturn typeof error === \"string\" ? captureMessage(error, {\n\t\t\tcontexts: options.contexts,\n\t\t\tlevel: captureLevel\n\t\t}) : captureException(error, {\n\t\t\tcontexts: options.contexts,\n\t\t\tlevel: captureLevel\n\t\t});\n\t});\n\tconst { attachments,...baseOptions } = options;\n\tconst extra = {\n\t\t...baseOptions.extra ?? {},\n\t\t...attachments && Object.keys(attachments).length > 0 ? { attachments: Object.keys(attachments) } : {},\n\t\t...eventId ? { eventId } : {}\n\t};\n\tlogError(error, {\n\t\t...baseOptions,\n\t\textra,\n\t\tloggerScope: baseOptions.loggerScope ?? ISSUE_LOGGER_SCOPE\n\t});\n\treturn eventId;\n}\n\n//#endregion\nexport { getLogger$1 as getLogger, logDebug, logError, logInfo, logIssue, logWarn, logger };\n//# sourceMappingURL=logging-DipAE5VU.js.map","import { z } from \"zod\";\n\n//#region src/api-client/schema.ts\n/**\n* Schema for Sentry API error responses.\n*\n* Uses .passthrough() to allow additional fields that may be present\n* in different error scenarios.\n*/\nconst ApiErrorSchema = z.object({ detail: z.string() }).passthrough();\nconst UserSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string().nullable(),\n\temail: z.string()\n}).passthrough();\nconst UserRegionsSchema = z.object({ regions: z.array(z.object({\n\tname: z.string(),\n\turl: z.string().url()\n})) });\n/**\n* Schema for Sentry organization API responses.\n*\n* Handles organizations from both Sentry's Cloud Service and self-hosted installations.\n* The links object and regionUrl field are optional to support self-hosted Sentry\n* instances that may not include these fields or return empty values.\n*/\nconst OrganizationSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string(),\n\tlinks: z.object({\n\t\tregionUrl: z.string().refine((value) => !value || z.string().url().safeParse(value).success, { message: \"Must be a valid URL or empty string (for self-hosted Sentry)\" }).optional(),\n\t\torganizationUrl: z.string().url()\n\t}).optional()\n}).passthrough();\nconst OrganizationListSchema = z.array(OrganizationSchema);\nconst TeamSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string()\n}).passthrough();\nconst TeamListSchema = z.array(TeamSchema);\nconst ProjectSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tslug: z.string(),\n\tname: z.string(),\n\tplatform: z.string().nullable().optional()\n}).passthrough();\nconst ProjectListSchema = z.array(ProjectSchema);\nconst ClientKeySchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tname: z.string(),\n\tdsn: z.object({ public: z.string() }),\n\tisActive: z.boolean(),\n\tdateCreated: z.string().datetime()\n}).passthrough();\nconst ClientKeyListSchema = z.array(ClientKeySchema);\nconst ReleaseSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tversion: z.string(),\n\tshortVersion: z.string(),\n\tdateCreated: z.string().datetime(),\n\tdateReleased: z.string().datetime().nullable(),\n\tfirstEvent: z.string().datetime().nullable(),\n\tlastEvent: z.string().datetime().nullable(),\n\tnewGroups: z.number(),\n\tlastCommit: z.object({\n\t\tid: z.union([z.string(), z.number()]),\n\t\tmessage: z.string(),\n\t\tdateCreated: z.string().datetime(),\n\t\tauthor: z.object({\n\t\t\tname: z.string(),\n\t\t\temail: z.string()\n\t\t})\n\t}).nullable(),\n\tlastDeploy: z.object({\n\t\tid: z.union([z.string(), z.number()]),\n\t\tenvironment: z.string(),\n\t\tdateStarted: z.string().datetime().nullable(),\n\t\tdateFinished: z.string().datetime().nullable()\n\t}).nullable(),\n\tprojects: z.array(ProjectSchema)\n});\nconst ReleaseListSchema = z.array(ReleaseSchema);\nconst TagSchema = z.object({\n\tkey: z.string(),\n\tname: z.string(),\n\ttotalValues: z.number()\n});\nconst TagListSchema = z.array(TagSchema);\nconst AssignedToSchema = z.union([\n\tz.null(),\n\tz.string(),\n\tz.object({\n\t\ttype: z.enum([\"user\", \"team\"]),\n\t\tid: z.union([z.string(), z.number()]),\n\t\tname: z.string(),\n\t\temail: z.string().optional()\n\t}).passthrough()\n]);\nconst IssueSchema = z.object({\n\tid: z.union([z.string(), z.number()]),\n\tshortId: z.string(),\n\ttitle: z.string(),\n\tfirstSeen: z.string().datetime(),\n\tlastSeen: z.string().datetime(),\n\tcount: z.union([z.string(), z.number()]),\n\tuserCount: z.union([z.string(), z.number()]),\n\tpermalink: z.string().url(),\n\tproject: ProjectSchema,\n\tplatform: z.string().nullable().optional(),\n\tstatus: z.string(),\n\tsubstatus: z.string().nullable().optional(),\n\tculprit: z.string(),\n\ttype: z.union([\n\t\tz.literal(\"error\"),\n\t\tz.literal(\"transaction\"),\n\t\tz.literal(\"generic\"),\n\t\tz.unknown()\n\t]),\n\tassignedTo: AssignedToSchema.optional(),\n\tissueType: z.string().optional(),\n\tissueCategory: z.string().optional(),\n\tmetadata: z.object({\n\t\ttitle: z.string().nullable().optional(),\n\t\tlocation: z.string().nullable().optional(),\n\t\tvalue: z.string().nullable().optional()\n\t}).optional()\n}).passthrough();\nconst IssueListSchema = z.array(IssueSchema);\nconst FrameInterface = z.object({\n\tfilename: z.string().nullable(),\n\tfunction: z.string().nullable(),\n\tlineNo: z.number().nullable(),\n\tcolNo: z.number().nullable(),\n\tabsPath: z.string().nullable(),\n\tmodule: z.string().nullable(),\n\tcontext: z.array(z.tuple([z.number(), z.string()])),\n\tinApp: z.boolean().optional(),\n\tvars: z.record(z.string(), z.unknown()).optional()\n}).partial();\nconst ExceptionInterface = z.object({\n\tmechanism: z.object({\n\t\ttype: z.string().nullable(),\n\t\thandled: z.boolean().nullable()\n\t}).partial(),\n\ttype: z.string().nullable(),\n\tvalue: z.string().nullable(),\n\tstacktrace: z.object({ frames: z.array(FrameInterface) })\n}).partial();\nconst ErrorEntrySchema = z.object({\n\tvalues: z.array(ExceptionInterface.optional()),\n\tvalue: ExceptionInterface.nullable().optional()\n}).partial();\nconst RequestEntrySchema = z.object({\n\tmethod: z.string().nullable(),\n\turl: z.string().url().nullable()\n}).partial();\nconst MessageEntrySchema = z.object({\n\tformatted: z.string().nullable(),\n\tmessage: z.string().nullable(),\n\tparams: z.array(z.unknown()).optional()\n}).partial();\nconst ThreadEntrySchema = z.object({\n\tid: z.number().nullable(),\n\tname: z.string().nullable(),\n\tcurrent: z.boolean().nullable(),\n\tcrashed: z.boolean().nullable(),\n\tstate: z.string().nullable(),\n\tstacktrace: z.object({ frames: z.array(FrameInterface) }).nullable()\n}).partial();\nconst ThreadsEntrySchema = z.object({ values: z.array(ThreadEntrySchema) }).partial();\nconst BreadcrumbSchema = z.object({\n\ttimestamp: z.string().nullable(),\n\ttype: z.string().nullable(),\n\tcategory: z.string().nullable(),\n\tlevel: z.string().nullable(),\n\tmessage: z.string().nullable(),\n\tdata: z.record(z.unknown()).nullable()\n}).partial();\nconst BreadcrumbsEntrySchema = z.object({ values: z.array(BreadcrumbSchema) }).partial();\nconst BaseEventSchema = z.object({\n\tid: z.string(),\n\ttitle: z.string(),\n\tmessage: z.string().nullable(),\n\tplatform: z.string().nullable().optional(),\n\ttype: z.unknown(),\n\tentries: z.array(z.union([\n\t\tz.object({\n\t\t\ttype: z.literal(\"exception\"),\n\t\t\tdata: ErrorEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"message\"),\n\t\t\tdata: MessageEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"threads\"),\n\t\t\tdata: ThreadsEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"request\"),\n\t\t\tdata: RequestEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"breadcrumbs\"),\n\t\t\tdata: BreadcrumbsEntrySchema\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.literal(\"spans\"),\n\t\t\tdata: z.unknown()\n\t\t}),\n\t\tz.object({\n\t\t\ttype: z.string(),\n\t\t\tdata: z.unknown()\n\t\t})\n\t])),\n\tcontexts: z.record(z.string(), z.object({ type: z.union([\n\t\tz.literal(\"default\"),\n\t\tz.literal(\"runtime\"),\n\t\tz.literal(\"os\"),\n\t\tz.literal(\"trace\"),\n\t\tz.unknown()\n\t]) }).passthrough()).optional(),\n\tcontext: z.record(z.string(), z.unknown()).optional(),\n\ttags: z.array(z.object({\n\t\tkey: z.string(),\n\t\tvalue: z.string().nullable()\n\t})).optional(),\n\t_meta: z.unknown().optional(),\n\tdateReceived: z.string().datetime().optional()\n});\nconst ErrorEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"error\"),\n\tculprit: z.string().nullable(),\n\tdateCreated: z.string().datetime()\n});\nconst DefaultEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"default\"),\n\tculprit: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime()\n});\nconst TransactionEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"transaction\"),\n\toccurrence: z.object({\n\t\tid: z.string().optional(),\n\t\tprojectId: z.number().optional(),\n\t\teventId: z.string().optional(),\n\t\tfingerprint: z.array(z.string()).optional(),\n\t\tissueTitle: z.string(),\n\t\tsubtitle: z.string().optional(),\n\t\tresourceId: z.string().nullable().optional(),\n\t\tevidenceData: z.record(z.string(), z.any()).optional(),\n\t\tevidenceDisplay: z.array(z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string(),\n\t\t\timportant: z.boolean().optional()\n\t\t})).optional(),\n\t\ttype: z.number().optional(),\n\t\tdetectionTime: z.number().optional(),\n\t\tlevel: z.string().optional(),\n\t\tculprit: z.string().nullable(),\n\t\tpriority: z.number().optional(),\n\t\tassignee: z.string().nullable().optional()\n\t}).nullish()\n});\n/**\n* Schema for evidence display items in occurrence data.\n* These show regression details, metric changes, and other evidence.\n*/\nconst EvidenceDisplaySchema = z.object({\n\tname: z.string(),\n\tvalue: z.string(),\n\timportant: z.boolean()\n});\n/**\n* Schema for occurrence data in generic events.\n* Occurrences represent performance regressions and metric-based issues.\n*/\nconst OccurrenceSchema = z.object({\n\tid: z.string(),\n\tprojectId: z.number(),\n\teventId: z.string(),\n\tfingerprint: z.array(z.string()),\n\tissueTitle: z.string(),\n\tsubtitle: z.string().optional(),\n\tresourceId: z.string().nullable().optional(),\n\tevidenceData: z.record(z.string(), z.unknown()).optional(),\n\tevidenceDisplay: z.array(EvidenceDisplaySchema).optional(),\n\ttype: z.number(),\n\tdetectionTime: z.number().optional(),\n\tlevel: z.string().optional(),\n\tculprit: z.string().optional(),\n\tpriority: z.number().optional(),\n\tassignee: z.string().nullable().optional()\n}).passthrough();\nconst GenericEventSchema = BaseEventSchema.omit({ type: true }).extend({\n\ttype: z.literal(\"generic\"),\n\tculprit: z.string().nullable().optional(),\n\tdateCreated: z.string().datetime(),\n\toccurrence: OccurrenceSchema.optional()\n});\nconst UnknownEventSchema = BaseEventSchema.omit({ type: true }).extend({ type: z.unknown() });\nconst EventSchema = z.union([\n\tErrorEventSchema,\n\tDefaultEventSchema,\n\tTransactionEventSchema,\n\tGenericEventSchema,\n\tUnknownEventSchema\n]);\nconst EventsResponseSchema = z.object({\n\tdata: z.array(z.unknown()),\n\tmeta: z.object({ fields: z.record(z.string(), z.string()) }).passthrough()\n});\nconst ErrorsSearchResponseSchema = EventsResponseSchema.extend({ data: z.array(z.object({\n\tissue: z.string(),\n\t\"issue.id\": z.union([z.string(), z.number()]),\n\tproject: z.string(),\n\ttitle: z.string(),\n\t\"count()\": z.number(),\n\t\"last_seen()\": z.string()\n})) });\nconst SpansSearchResponseSchema = EventsResponseSchema.extend({ data: z.array(z.object({\n\tid: z.string(),\n\ttrace: z.string(),\n\t\"span.op\": z.string(),\n\t\"span.description\": z.string(),\n\t\"span.duration\": z.number(),\n\ttransaction: z.string(),\n\tproject: z.string(),\n\ttimestamp: z.string()\n})) });\nconst AutofixRunSchema = z.object({ run_id: z.union([z.string(), z.number()]) }).passthrough();\nconst AutofixStatusSchema = z.enum([\n\t\"PENDING\",\n\t\"PROCESSING\",\n\t\"IN_PROGRESS\",\n\t\"NEED_MORE_INFORMATION\",\n\t\"COMPLETED\",\n\t\"FAILED\",\n\t\"ERROR\",\n\t\"CANCELLED\",\n\t\"WAITING_FOR_USER_RESPONSE\"\n]);\nconst AutofixRunStepBaseSchema = z.object({\n\ttype: z.string(),\n\tkey: z.string(),\n\tindex: z.number(),\n\tstatus: AutofixStatusSchema,\n\ttitle: z.string(),\n\toutput_stream: z.string().nullable(),\n\tprogress: z.array(z.object({\n\t\tdata: z.unknown().nullable(),\n\t\tmessage: z.string(),\n\t\ttimestamp: z.string(),\n\t\ttype: z.enum([\n\t\t\t\"INFO\",\n\t\t\t\"WARNING\",\n\t\t\t\"ERROR\"\n\t\t])\n\t}))\n});\nconst AutofixRunStepDefaultSchema = AutofixRunStepBaseSchema.extend({\n\ttype: z.literal(\"default\"),\n\tinsights: z.array(z.object({\n\t\tchange_diff: z.unknown().nullable(),\n\t\tgenerated_at_memory_index: z.number(),\n\t\tinsight: z.string(),\n\t\tjustification: z.string(),\n\t\ttype: z.literal(\"insight\")\n\t})).nullable()\n}).passthrough();\nconst AutofixRunStepRootCauseAnalysisSchema = AutofixRunStepBaseSchema.extend({\n\ttype: z.literal(\"root_cause_analysis\"),\n\tcauses: z.array(z.object({\n\t\tdescription: z.string(),\n\t\tid: z.number(),\n\t\troot_cause_reproduction: z.array(z.object({\n\t\t\tcode_snippet_and_analysis: z.string(),\n\t\t\tis_most_important_event: z.boolean(),\n\t\t\trelevant_code_file: z.object({\n\t\t\t\tfile_path: z.string(),\n\t\t\t\trepo_name: z.string()\n\t\t\t}).nullable(),\n\t\t\ttimeline_item_type: z.string(),\n\t\t\ttitle: z.string()\n\t\t}))\n\t}))\n}).passthrough();\nconst AutofixRunStepSolutionSchema = AutofixRunStepBaseSchema.extend({\n\ttype: z.literal(\"solution\"),\n\tsolution: z.array(z.object({\n\t\tcode_snippet_and_analysis: z.string().nullable(),\n\t\tis_active: z.boolean(),\n\t\tis_most_important_event: z.boolean(),\n\t\trelevant_code_file: z.null(),\n\t\ttimeline_item_type: z.union([z.literal(\"internal_code\"), z.literal(\"repro_test\")]),\n\t\ttitle: z.string()\n\t}))\n}).passthrough();\nconst AutofixRunStepSchema = z.union([\n\tAutofixRunStepDefaultSchema,\n\tAutofixRunStepRootCauseAnalysisSchema,\n\tAutofixRunStepSolutionSchema,\n\tAutofixRunStepBaseSchema.passthrough()\n]);\nconst AutofixRunStateSchema = z.object({ autofix: z.object({\n\trun_id: z.number(),\n\trequest: z.unknown(),\n\tupdated_at: z.string(),\n\tstatus: AutofixStatusSchema,\n\tsteps: z.array(AutofixRunStepSchema)\n}).passthrough().nullable() });\nconst EventAttachmentSchema = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\ttype: z.string(),\n\tsize: z.number(),\n\tmimetype: z.string(),\n\tdateCreated: z.string().datetime(),\n\tsha1: z.string(),\n\theaders: z.record(z.string(), z.string()).optional()\n});\nconst EventAttachmentListSchema = z.array(EventAttachmentSchema);\n/**\n* Schema for Sentry trace metadata response.\n*\n* Contains high-level statistics about a trace including span counts,\n* transaction breakdown, and operation type distribution.\n*/\nconst TraceMetaSchema = z.object({\n\tlogs: z.number(),\n\terrors: z.number(),\n\tperformance_issues: z.number(),\n\tspan_count: z.number(),\n\ttransaction_child_count_map: z.array(z.object({\n\t\t\"transaction.event_id\": z.string().nullable(),\n\t\t\"count()\": z.number()\n\t})),\n\tspan_count_map: z.record(z.string(), z.number())\n});\n/**\n* Schema for individual spans within a trace.\n*\n* Represents the hierarchical structure of spans with timing information,\n* operation details, and nested children spans.\n*/\nconst TraceSpanSchema = z.lazy(() => z.object({\n\tchildren: z.array(TraceSpanSchema),\n\terrors: z.array(z.any()),\n\toccurrences: z.array(z.any()),\n\tevent_id: z.string(),\n\ttransaction_id: z.string(),\n\tproject_id: z.union([z.string(), z.number()]),\n\tproject_slug: z.string(),\n\tprofile_id: z.string(),\n\tprofiler_id: z.string(),\n\tparent_span_id: z.string().nullable(),\n\tstart_timestamp: z.number(),\n\tend_timestamp: z.number(),\n\tmeasurements: z.record(z.string(), z.number()).optional(),\n\tduration: z.number(),\n\ttransaction: z.string(),\n\tis_transaction: z.boolean(),\n\tdescription: z.string(),\n\tsdk_name: z.string(),\n\top: z.string(),\n\tname: z.string(),\n\tevent_type: z.string(),\n\tadditional_attributes: z.record(z.string(), z.any())\n}));\n/**\n* Schema for issue objects that can appear in trace responses.\n*\n* When Sentry's trace API returns standalone errors, they are returned as\n* SerializedIssue objects that lack the span-specific fields.\n*/\nconst TraceIssueSchema = z.object({\n\tid: z.union([z.string(), z.number()]).optional(),\n\tissue_id: z.union([z.string(), z.number()]).optional(),\n\tproject_id: z.union([z.string(), z.number()]).optional(),\n\tproject_slug: z.string().optional(),\n\ttitle: z.string().optional(),\n\tculprit: z.string().optional(),\n\ttype: z.string().optional(),\n\ttimestamp: z.union([z.string(), z.number()]).optional()\n}).passthrough();\n/**\n* Schema for Sentry trace response.\n*\n* Contains the complete trace tree starting from root spans.\n* The response is an array that can contain both root-level spans\n* and standalone issue objects. The Sentry API's query_trace_data\n* function returns a mixed list of SerializedSpan and SerializedIssue\n* objects when there are errors not directly associated with spans.\n*/\nconst TraceSchema = z.array(z.union([TraceSpanSchema, TraceIssueSchema]));\n\n//#endregion\nexport { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, EvidenceDisplaySchema, ExceptionInterface, FrameInterface, GenericEventSchema, IssueListSchema, IssueSchema, MessageEntrySchema, OccurrenceSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };\n//# sourceMappingURL=schema-COv2Mx9E.js.map","//#region src/api-client/errors.ts\n/**\n* API Error Class Hierarchy\n*\n* This module defines a hierarchical error system for the Sentry API client\n* that automatically categorizes errors based on HTTP status codes.\n*\n* Key principles:\n* - 4xx errors (ApiClientError) are user input errors, not reported to Sentry\n* - 5xx errors (ApiServerError) are system errors, reported to Sentry\n* - Specific error types provide additional context and helper methods\n* - The hierarchy enables type-safe error handling without manual status checks\n*/\n/**\n* Base class for all API errors.\n* Contains common properties for all API error types.\n* Status is optional since some errors (like client-side validation) don't have HTTP status codes.\n*/\nvar ApiError = class ApiError extends Error {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.detail = detail;\n\t\tthis.responseBody = responseBody;\n\t\tthis.name = \"ApiError\";\n\t\tObject.setPrototypeOf(this, ApiError.prototype);\n\t}\n};\n/**\n* Client errors (4xx) - User input errors that should NOT be reported to Sentry.\n* These typically indicate issues with the request that the user can fix.\n* Also includes client-side validation errors that don't have HTTP status codes.\n*/\nvar ApiClientError = class ApiClientError extends ApiError {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.name = \"ApiClientError\";\n\t\tObject.setPrototypeOf(this, ApiClientError.prototype);\n\t}\n\t/**\n\t* Convert to a user-friendly formatted message.\n\t* Returns the standard format: \"API error (status): message\" or just \"API error: message\" if no status.\n\t* For 404 errors, adds helpful context about checking parameters.\n\t*/\n\ttoUserMessage() {\n\t\tconst baseMessage = this.status ? `API error (${this.status}): ${this.message}` : `API error: ${this.message}`;\n\t\tif (this.status === 404) {\n\t\t\tconst genericMessages = [\n\t\t\t\t\"not found\",\n\t\t\t\t\"the requested resource does not exist\",\n\t\t\t\t\"resource does not exist\",\n\t\t\t\t\"resource not found\"\n\t\t\t];\n\t\t\tconst isGeneric = genericMessages.some((msg) => this.message.toLowerCase() === msg || this.message.toLowerCase().includes(\"requested resource\"));\n\t\t\tif (isGeneric) return `${baseMessage}. Please verify that the organization, project, or resource ID is correct and that you have access to it.`;\n\t\t\treturn `${baseMessage}. Please verify the parameters are correct.`;\n\t\t}\n\t\treturn baseMessage;\n\t}\n\t/**\n\t* Check if this is a permission/authorization error (403)\n\t*/\n\tisPermissionError() {\n\t\treturn this.status === 403;\n\t}\n\t/**\n\t* Check if this is a not found error (404)\n\t*/\n\tisNotFoundError() {\n\t\treturn this.status === 404;\n\t}\n\t/**\n\t* Check if this is a validation error (400 or 422)\n\t*/\n\tisValidationError() {\n\t\treturn this.status === 400 || this.status === 422;\n\t}\n\t/**\n\t* Check if this is an authentication error (401)\n\t*/\n\tisAuthenticationError() {\n\t\treturn this.status === 401;\n\t}\n\t/**\n\t* Check if this is a rate limit error (429)\n\t*/\n\tisRateLimitError() {\n\t\treturn this.status === 429;\n\t}\n};\n/**\n* Permission denied error (403).\n* Includes special handling for multi-project access errors.\n*/\nvar ApiPermissionError = class ApiPermissionError extends ApiClientError {\n\tconstructor(message, detail, responseBody) {\n\t\tsuper(message, 403, detail, responseBody);\n\t\tthis.name = \"ApiPermissionError\";\n\t\tObject.setPrototypeOf(this, ApiPermissionError.prototype);\n\t}\n\t/**\n\t* Check if this is the specific multi-project access error\n\t*/\n\tisMultiProjectAccessError() {\n\t\treturn this.message.includes(\"multiple projects\") || this.message.includes(\"multi project\") || this.message.includes(\"multi-project\") || this.message.includes(\"You do not have access to query across multiple projects\");\n\t}\n};\n/**\n* Resource not found error (404).\n* Can include additional context about what resource was not found.\n*/\nvar ApiNotFoundError = class ApiNotFoundError extends ApiClientError {\n\tconstructor(message, detail, responseBody, resourceType, resourceId) {\n\t\tsuper(message, 404, detail, responseBody);\n\t\tthis.resourceType = resourceType;\n\t\tthis.resourceId = resourceId;\n\t\tthis.name = \"ApiNotFoundError\";\n\t\tObject.setPrototypeOf(this, ApiNotFoundError.prototype);\n\t}\n};\n/**\n* Validation error (400 or 422 for API responses, or no status for client-side validation).\n* Indicates the request was malformed or contained invalid data.\n*/\nvar ApiValidationError = class ApiValidationError extends ApiClientError {\n\tconstructor(message, status, detail, responseBody, validationErrors) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.validationErrors = validationErrors;\n\t\tthis.name = \"ApiValidationError\";\n\t\tObject.setPrototypeOf(this, ApiValidationError.prototype);\n\t}\n};\n/**\n* Authentication error (401).\n* Indicates the request lacks valid authentication credentials.\n*/\nvar ApiAuthenticationError = class ApiAuthenticationError extends ApiClientError {\n\tconstructor(message, detail, responseBody) {\n\t\tsuper(message, 401, detail, responseBody);\n\t\tthis.name = \"ApiAuthenticationError\";\n\t\tObject.setPrototypeOf(this, ApiAuthenticationError.prototype);\n\t}\n};\n/**\n* Rate limit error (429).\n* Includes retry-after information when available.\n*/\nvar ApiRateLimitError = class ApiRateLimitError extends ApiClientError {\n\tconstructor(message, detail, responseBody, retryAfter) {\n\t\tsuper(message, 429, detail, responseBody);\n\t\tthis.retryAfter = retryAfter;\n\t\tthis.name = \"ApiRateLimitError\";\n\t\tObject.setPrototypeOf(this, ApiRateLimitError.prototype);\n\t}\n};\n/**\n* Server errors (5xx) - System errors that SHOULD be reported to Sentry.\n* These indicate problems with the server that are not the user's fault.\n*/\nvar ApiServerError = class ApiServerError extends ApiError {\n\tconstructor(message, status, detail, responseBody) {\n\t\tsuper(message, status, detail, responseBody);\n\t\tthis.name = \"ApiServerError\";\n\t\tObject.setPrototypeOf(this, ApiServerError.prototype);\n\t}\n\t/**\n\t* Check if this is a gateway/proxy error (502, 503, 504)\n\t*/\n\tisGatewayError() {\n\t\treturn this.status === 502 || this.status === 503 || this.status === 504;\n\t}\n\t/**\n\t* Check if this is an internal server error (500)\n\t*/\n\tisInternalError() {\n\t\treturn this.status === 500;\n\t}\n};\n/**\n* Factory function to create the appropriate error type based on HTTP status code.\n* This centralizes the logic for determining which error class to instantiate.\n* This is only used for actual API responses, so status is required.\n*/\nfunction createApiError(message, status, detail, responseBody) {\n\tlet improvedMessage = message;\n\tif (message.includes(\"You do not have the multi project stream feature enabled\") || message.includes(\"You cannot view events from multiple projects\")) {\n\t\timprovedMessage = \"You do not have access to query across multiple projects. Please select a project for your query.\";\n\t\treturn new ApiPermissionError(improvedMessage, detail, responseBody);\n\t}\n\tswitch (status) {\n\t\tcase 401: return new ApiAuthenticationError(message, detail, responseBody);\n\t\tcase 403: return new ApiPermissionError(message, detail, responseBody);\n\t\tcase 404: return new ApiNotFoundError(message, detail, responseBody);\n\t\tcase 400:\n\t\tcase 422: {\n\t\t\tlet validationErrors;\n\t\t\tif (responseBody && typeof responseBody === \"object\" && \"errors\" in responseBody) validationErrors = responseBody.errors;\n\t\t\treturn new ApiValidationError(message, status, detail, responseBody, validationErrors);\n\t\t}\n\t\tcase 429: {\n\t\t\tlet retryAfter;\n\t\t\tif (responseBody && typeof responseBody === \"object\") {\n\t\t\t\tif (\"retry_after\" in responseBody) retryAfter = Number(responseBody.retry_after);\n\t\t\t\telse if (\"retryAfter\" in responseBody) retryAfter = Number(responseBody.retryAfter);\n\t\t\t}\n\t\t\treturn new ApiRateLimitError(message, detail, responseBody, retryAfter);\n\t\t}\n\t\tdefault:\n\t\t\tif (status >= 400 && status < 500) return new ApiClientError(message, status, detail, responseBody);\n\t\t\tif (status >= 500 && status < 600) return new ApiServerError(message, status, detail, responseBody);\n\t\t\treturn new ApiError(message, status, detail, responseBody);\n\t}\n}\n\n//#endregion\nexport { ApiAuthenticationError, ApiClientError, ApiError, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, createApiError };\n//# sourceMappingURL=errors-h_Ebmo8b.js.map","import { ConfigurationError } from \"./errors-BXmNwD2K.js\";\nimport { getIssueUrl, getTraceUrl, isSentryHost } from \"./url-utils-DoqJlWab.js\";\nimport { logIssue, logWarn } from \"./logging-DipAE5VU.js\";\nimport { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema, TraceMetaSchema, TraceSchema, UserRegionsSchema, UserSchema } from \"./schema-COv2Mx9E.js\";\nimport { ApiNotFoundError, ApiValidationError, createApiError } from \"./errors-h_Ebmo8b.js\";\nimport { USER_AGENT } from \"./version-DmM5pPKz.js\";\n\n//#region src/api-client/client.ts\n/**\n* Mapping of common network error codes to user-friendly messages.\n* These help users understand and resolve connection issues.\n*/\nconst NETWORK_ERROR_MESSAGES = {\n\tEAI_AGAIN: \"DNS temporarily unavailable. Check your internet connection.\",\n\tENOTFOUND: \"Hostname not found. Verify the URL is correct.\",\n\tECONNREFUSED: \"Connection refused. Ensure the service is accessible.\",\n\tETIMEDOUT: \"Connection timed out. Check network connectivity.\",\n\tECONNRESET: \"Connection reset. Try again in a moment.\"\n};\n/**\n* Sentry API client service for interacting with Sentry's REST API.\n*\n* This service provides a comprehensive interface to Sentry's API endpoints,\n* handling authentication, error processing, multi-region support, and\n* response validation through Zod schemas.\n*\n* Key Features:\n* - Multi-region support for Sentry SaaS and self-hosted instances\n* - Automatic schema validation with Zod\n* - Enhanced error handling with LLM-friendly messages\n* - URL generation for Sentry resources (issues, traces)\n* - Bearer token authentication\n* - Always uses HTTPS for secure connections\n*\n* @example Basic Usage\n* ```typescript\n* const apiService = new SentryApiService({\n* accessToken: \"your-token\",\n* host: \"sentry.io\"\n* });\n*\n* const orgs = await apiService.listOrganizations();\n* const issues = await apiService.listIssues({\n* organizationSlug: \"my-org\",\n* query: \"is:unresolved\"\n* });\n* ```\n*\n* @example Multi-Region Support\n* ```typescript\n* // Self-hosted instance with hostname\n* const selfHosted = new SentryApiService({\n* accessToken: \"token\",\n* host: \"sentry.company.com\"\n* });\n*\n* // Regional endpoint override\n* const issues = await apiService.listIssues(\n* { organizationSlug: \"org\" },\n* { host: \"eu.sentry.io\" }\n* );\n* ```\n*/\nvar SentryApiService = class {\n\taccessToken;\n\thost;\n\tapiPrefix;\n\t/**\n\t* Creates a new Sentry API service instance.\n\t*\n\t* Always uses HTTPS for secure connections.\n\t*\n\t* @param config Configuration object\n\t* @param config.accessToken OAuth access token for authentication (optional for some endpoints)\n\t* @param config.host Sentry hostname (e.g. \"sentry.io\", \"sentry.example.com\")\n\t*/\n\tconstructor({ accessToken = null, host = \"sentry.io\" }) {\n\t\tthis.accessToken = accessToken;\n\t\tthis.host = host;\n\t\tthis.apiPrefix = `https://${host}/api/0`;\n\t}\n\t/**\n\t* Updates the host for API requests.\n\t*\n\t* Used for multi-region support or switching between Sentry instances.\n\t* Always uses HTTPS protocol.\n\t*\n\t* @param host New hostname to use for API requests\n\t*/\n\tsetHost(host) {\n\t\tthis.host = host;\n\t\tthis.apiPrefix = `https://${this.host}/api/0`;\n\t}\n\t/**\n\t* Checks if the current host is Sentry SaaS (sentry.io).\n\t*\n\t* Used to determine API endpoint availability and URL formats.\n\t* Self-hosted instances may not have all endpoints available.\n\t*\n\t* @returns True if using Sentry SaaS, false for self-hosted instances\n\t*/\n\tisSaas() {\n\t\treturn isSentryHost(this.host);\n\t}\n\t/**\n\t* Internal method for making authenticated requests to Sentry API.\n\t*\n\t* Handles:\n\t* - Bearer token authentication\n\t* - Error response parsing and enhancement\n\t* - Multi-region host overrides\n\t* - Fetch availability validation\n\t*\n\t* @param path API endpoint path (without /api/0 prefix)\n\t* @param options Fetch options\n\t* @param requestOptions Additional request configuration\n\t* @returns Promise resolving to Response object\n\t* @throws {ApiError} Enhanced API errors with user-friendly messages\n\t* @throws {Error} Network or parsing errors\n\t*/\n\tasync request(path, options = {}, { host } = {}) {\n\t\tconst url = host ? `https://${host}/api/0${path}` : `${this.apiPrefix}${path}`;\n\t\tconst headers = {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\"User-Agent\": USER_AGENT\n\t\t};\n\t\tif (this.accessToken) headers.Authorization = `Bearer ${this.accessToken}`;\n\t\tif (typeof globalThis.fetch === \"undefined\") throw new ConfigurationError(\"fetch is not available. Please use Node.js >= 18 or ensure fetch is available in your environment.\");\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await fetch(url, {\n\t\t\t\t...options,\n\t\t\t\theaders\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tlet rootCause = error;\n\t\t\twhile (rootCause instanceof Error && rootCause.cause) rootCause = rootCause.cause;\n\t\t\tconst errorMessage = rootCause instanceof Error ? rootCause.message : String(rootCause);\n\t\t\tlet friendlyMessage = `Unable to connect to ${url}`;\n\t\t\tconst errorCode = Object.keys(NETWORK_ERROR_MESSAGES).find((code) => errorMessage.includes(code));\n\t\t\tif (errorCode) friendlyMessage += ` - ${NETWORK_ERROR_MESSAGES[errorCode]}`;\n\t\t\telse friendlyMessage += ` - ${errorMessage}`;\n\t\t\tif (errorCode === \"ENOTFOUND\" || errorCode === \"EAI_AGAIN\" || errorCode === \"ECONNREFUSED\" || errorCode === \"ETIMEDOUT\" || errorMessage.includes(\"Connect Timeout Error\")) throw new ConfigurationError(friendlyMessage, { cause: error });\n\t\t\tthrow new Error(friendlyMessage, { cause: error });\n\t\t}\n\t\tif (!response.ok) {\n\t\t\tconst errorText = await response.text();\n\t\t\tlet parsed;\n\t\t\ttry {\n\t\t\t\tparsed = JSON.parse(errorText);\n\t\t\t} catch (error) {\n\t\t\t\tif (errorText.includes(\"<!DOCTYPE\") || errorText.includes(\"<html\")) {\n\t\t\t\t\tlogWarn(\"Received HTML error page instead of JSON\", {\n\t\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\t\textra: {\n\t\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tparseErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tthrow createApiError(`Server error: Received HTML instead of JSON (${response.status} ${response.statusText}). This may indicate an invalid URL or server issue.`, response.status, errorText, void 0);\n\t\t\t\t}\n\t\t\t\tlogWarn(\"Failed to parse JSON error response\", {\n\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\textra: {\n\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tbodyPreview: errorText.length > 256 ? `${errorText.slice(0, 253)}…` : errorText,\n\t\t\t\t\t\tparseErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (parsed) {\n\t\t\t\tconst { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\t\t\t\tif (success) throw createApiError(data.detail, response.status, data.detail, parsed);\n\t\t\t\tlogWarn(\"Failed to parse validated API error response\", {\n\t\t\t\t\tloggerScope: [\"api\", \"client\"],\n\t\t\t\t\textra: {\n\t\t\t\t\t\tstatus: response.status,\n\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\thost: this.host,\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tbodyPreview: errorText.length > 256 ? `${errorText.slice(0, 253)}…` : errorText,\n\t\t\t\t\t\tvalidationErrorMessage: error instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow createApiError(`API request failed: ${response.statusText}\\n${errorText}`, response.status, errorText, void 0);\n\t\t}\n\t\treturn response;\n\t}\n\t/**\n\t* Safely parses a JSON response, checking Content-Type header first.\n\t*\n\t* @param response The Response object from fetch\n\t* @returns Promise resolving to the parsed JSON object\n\t* @throws {Error} If response is not JSON or parsing fails\n\t*/\n\tasync parseJsonResponse(response) {\n\t\tif (!response.headers?.get) return response.json();\n\t\tconst contentType = response.headers.get(\"content-type\");\n\t\tif (!contentType || !contentType.includes(\"application/json\")) {\n\t\t\tconst responseText = await response.text();\n\t\t\tif (contentType?.includes(\"text/html\") || responseText.includes(\"<!DOCTYPE\") || responseText.includes(\"<html\")) throw new Error(`Expected JSON response but received HTML (${response.status} ${response.statusText}). This may indicate you're not authenticated, the URL is incorrect, or there's a server issue.`);\n\t\t\tthrow new Error(`Expected JSON response but received ${contentType || \"unknown content type\"} (${response.status} ${response.statusText})`);\n\t\t}\n\t\ttry {\n\t\t\treturn await response.json();\n\t\t} catch (error) {\n\t\t\tthrow new Error(`Failed to parse JSON response: ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\t/**\n\t* Makes a request to the Sentry API and parses the JSON response.\n\t*\n\t* This is the primary method for API calls that expect JSON responses.\n\t* It automatically validates Content-Type and provides helpful error messages\n\t* for common issues like authentication failures or server errors.\n\t*\n\t* @param path API endpoint path (without /api/0 prefix)\n\t* @param options Fetch options\n\t* @param requestOptions Additional request configuration\n\t* @returns Promise resolving to the parsed JSON response\n\t* @throws {ApiError} Enhanced API errors with user-friendly messages\n\t* @throws {Error} Network, parsing, or validation errors\n\t*/\n\tasync requestJSON(path, options = {}, requestOptions) {\n\t\tconst response = await this.request(path, options, requestOptions);\n\t\treturn this.parseJsonResponse(response);\n\t}\n\t/**\n\t* Generates a Sentry issue URL for browser navigation.\n\t*\n\t* Handles both SaaS (subdomain-based) and self-hosted URL formats.\n\t* Always uses HTTPS protocol.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param issueId Issue identifier (short ID or numeric ID)\n\t* @returns Full URL to the issue in Sentry UI\n\t*\n\t* @example\n\t* ```typescript\n\t* // SaaS: https://my-org.sentry.io/issues/PROJ-123\n\t* apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n\t*\n\t* // Self-hosted: https://sentry.company.com/organizations/my-org/issues/PROJ-123\n\t* apiService.getIssueUrl(\"my-org\", \"PROJ-123\")\n\t* ```\n\t*/\n\tgetIssueUrl(organizationSlug, issueId) {\n\t\treturn getIssueUrl(this.host, organizationSlug, issueId);\n\t}\n\t/**\n\t* Generates a Sentry trace URL for performance investigation.\n\t*\n\t* Always uses HTTPS protocol.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param traceId Trace identifier (hex string)\n\t* @returns Full HTTPS URL to the trace in Sentry UI\n\t*\n\t* @example\n\t* ```typescript\n\t* const traceUrl = apiService.getTraceUrl(\"my-org\", \"6a477f5b0f31ef7b6b9b5e1dea66c91d\");\n\t* // https://my-org.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\t* ```\n\t*/\n\tgetTraceUrl(organizationSlug, traceId) {\n\t\treturn getTraceUrl(this.host, organizationSlug, traceId);\n\t}\n\t/**\n\t* Builds a URL for the legacy Discover API (used by errors dataset).\n\t*\n\t* The Discover API is the older query interface that includes aggregate\n\t* functions directly in the field list.\n\t*\n\t* @example\n\t* // URL format: /explore/discover/homepage/?field=title&field=count_unique(user)\n\t* buildDiscoverUrl(\"my-org\", \"level:error\", \"123\", [\"title\", \"count_unique(user)\"], \"-timestamp\")\n\t*/\n\tbuildDiscoverUrl(params) {\n\t\tconst { organizationSlug, query, projectId, fields, sort, statsPeriod, start, end, aggregateFunctions, groupByFields } = params;\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"dataset\", \"errors\");\n\t\turlParams.set(\"queryDataset\", \"error-events\");\n\t\turlParams.set(\"query\", query);\n\t\tif (projectId) urlParams.set(\"project\", projectId);\n\t\tif (fields && fields.length > 0) for (const field of fields) urlParams.append(\"field\", field);\n\t\telse {\n\t\t\turlParams.append(\"field\", \"title\");\n\t\t\turlParams.append(\"field\", \"project\");\n\t\t\turlParams.append(\"field\", \"user.display\");\n\t\t\turlParams.append(\"field\", \"timestamp\");\n\t\t}\n\t\turlParams.set(\"sort\", sort || \"-timestamp\");\n\t\tif (start && end) {\n\t\t\turlParams.set(\"start\", start);\n\t\t\turlParams.set(\"end\", end);\n\t\t} else urlParams.set(\"statsPeriod\", statsPeriod || \"24h\");\n\t\tconst isAggregate = (aggregateFunctions?.length ?? 0) > 0;\n\t\tif (isAggregate) {\n\t\t\turlParams.set(\"mode\", \"aggregate\");\n\t\t\tif (aggregateFunctions && aggregateFunctions.length > 0) urlParams.set(\"yAxis\", aggregateFunctions[0]);\n\t\t} else urlParams.set(\"yAxis\", \"count()\");\n\t\tconst webHost = this.isSaas() ? \"sentry.io\" : this.host;\n\t\tconst path = this.isSaas() ? `https://${organizationSlug}.${webHost}/explore/discover/homepage/` : `https://${this.host}/organizations/${organizationSlug}/explore/discover/homepage/`;\n\t\treturn `${path}?${urlParams.toString()}`;\n\t}\n\t/**\n\t* Builds a URL for the modern EAP (Event Analytics Platform) API used by spans/logs.\n\t*\n\t* The EAP API uses structured aggregate queries with separate aggregateField\n\t* parameters containing JSON objects for groupBy and yAxes.\n\t*\n\t* @example\n\t* // URL format: /explore/traces/?aggregateField={\"groupBy\":\"span.op\"}&aggregateField={\"yAxes\":[\"count()\"]}\n\t* buildEapUrl(\"my-org\", \"span.op:db\", \"123\", [\"span.op\", \"count()\"], \"-count()\", [\"count()\"], [\"span.op\"])\n\t*/\n\tbuildEapUrl(params) {\n\t\tconst { organizationSlug, query, dataset, projectId, fields, sort, statsPeriod, start, end, aggregateFunctions, groupByFields } = params;\n\t\tconst urlParams = new URLSearchParams();\n\t\turlParams.set(\"query\", query);\n\t\tif (projectId) urlParams.set(\"project\", projectId);\n\t\tconst isAggregateQuery = (aggregateFunctions?.length ?? 0) > 0 || fields?.some((field) => field.includes(\"(\") && field.includes(\")\")) || false;\n\t\tif (isAggregateQuery) {\n\t\t\tif ((aggregateFunctions?.length ?? 0) > 0 || (groupByFields?.length ?? 0) > 0) {\n\t\t\t\tif (groupByFields && groupByFields.length > 0) for (const field of groupByFields) urlParams.append(\"aggregateField\", JSON.stringify({ groupBy: field }));\n\t\t\t\tif (aggregateFunctions && aggregateFunctions.length > 0) urlParams.append(\"aggregateField\", JSON.stringify({ yAxes: aggregateFunctions }));\n\t\t\t} else {\n\t\t\t\tconst parsedGroupByFields = fields?.filter((field) => !field.includes(\"(\") && !field.includes(\")\")) || [];\n\t\t\t\tconst parsedAggregateFunctions = fields?.filter((field) => field.includes(\"(\") && field.includes(\")\")) || [];\n\t\t\t\tfor (const field of parsedGroupByFields) urlParams.append(\"aggregateField\", JSON.stringify({ groupBy: field }));\n\t\t\t\tif (parsedAggregateFunctions.length > 0) urlParams.append(\"aggregateField\", JSON.stringify({ yAxes: parsedAggregateFunctions }));\n\t\t\t}\n\t\t\turlParams.set(\"mode\", \"aggregate\");\n\t\t} else if (fields && fields.length > 0) for (const field of fields) urlParams.append(\"field\", field);\n\t\tif (sort) urlParams.set(\"sort\", sort);\n\t\tif (start && end) {\n\t\t\turlParams.set(\"start\", start);\n\t\t\turlParams.set(\"end\", end);\n\t\t} else urlParams.set(\"statsPeriod\", statsPeriod || \"24h\");\n\t\tif (dataset === \"spans\") urlParams.set(\"table\", \"span\");\n\t\tconst basePath = dataset === \"logs\" ? \"logs\" : \"traces\";\n\t\tconst webHost = this.isSaas() ? \"sentry.io\" : this.host;\n\t\tconst path = this.isSaas() ? `https://${organizationSlug}.${webHost}/explore/${basePath}/` : `https://${this.host}/organizations/${organizationSlug}/explore/${basePath}/`;\n\t\treturn `${path}?${urlParams.toString()}`;\n\t}\n\t/**\n\t* Generates a Sentry events explorer URL for viewing search results.\n\t*\n\t* Routes to the appropriate API based on dataset:\n\t* - Errors: Uses legacy Discover API\n\t* - Spans/Logs: Uses modern EAP (Event Analytics Platform) API\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param query Sentry search query\n\t* @param projectId Optional project filter\n\t* @param dataset Dataset type (spans, errors, or logs)\n\t* @param fields Array of fields to include in results\n\t* @param sort Sort parameter (e.g., \"-timestamp\", \"-count()\")\n\t* @param aggregateFunctions Array of aggregate functions (only used for EAP datasets)\n\t* @param groupByFields Array of fields to group by (only used for EAP datasets)\n\t* @param statsPeriod Relative time period (e.g., \"24h\", \"7d\")\n\t* @param start Absolute start time (ISO 8601)\n\t* @param end Absolute end time (ISO 8601)\n\t* @returns Full HTTPS URL to the events explorer in Sentry UI\n\t*/\n\tgetEventsExplorerUrl(organizationSlug, query, projectId, dataset = \"spans\", fields, sort, aggregateFunctions, groupByFields, statsPeriod, start, end) {\n\t\tif (dataset === \"errors\") return this.buildDiscoverUrl({\n\t\t\torganizationSlug,\n\t\t\tquery,\n\t\t\tprojectId,\n\t\t\tfields,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields\n\t\t});\n\t\treturn this.buildEapUrl({\n\t\t\torganizationSlug,\n\t\t\tquery,\n\t\t\tdataset,\n\t\t\tprojectId,\n\t\t\tfields,\n\t\t\tsort,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\taggregateFunctions,\n\t\t\tgroupByFields\n\t\t});\n\t}\n\t/**\n\t* Retrieves the authenticated user's profile information.\n\t*\n\t* @param opts Request options including host override\n\t* @returns User profile data\n\t* @throws {ApiError} If authentication fails or user not found\n\t*/\n\tasync getAuthenticatedUser(opts) {\n\t\tlet authHost;\n\t\tif (this.isSaas()) authHost = \"sentry.io\";\n\t\tconst body = await this.requestJSON(\"/auth/\", void 0, {\n\t\t\t...opts,\n\t\t\thost: authHost\n\t\t});\n\t\treturn UserSchema.parse(body);\n\t}\n\t/**\n\t* Lists all organizations accessible to the authenticated user.\n\t*\n\t* Automatically handles multi-region queries by fetching from all\n\t* available regions and combining results.\n\t*\n\t* @param params Query parameters\n\t* @param params.query Search query to filter organizations by name/slug\n\t* @param opts Request options\n\t* @returns Array of organizations across all accessible regions (limited to 25 results)\n\t*\n\t* @example\n\t* ```typescript\n\t* const orgs = await apiService.listOrganizations();\n\t* orgs.forEach(org => {\n\t* // regionUrl present for Cloud Service, empty for self-hosted\n\t* console.log(`${org.name} (${org.slug}) - ${org.links?.regionUrl || 'No region URL'}`);\n\t* });\n\t* ```\n\t*/\n\tasync listOrganizations(params, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", \"25\");\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst path = `/organizations/?${queryString}`;\n\t\tif (!this.isSaas()) {\n\t\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\t\treturn OrganizationListSchema.parse(body);\n\t\t}\n\t\ttry {\n\t\t\tconst regionsBody = await this.requestJSON(\"/users/me/regions/\", void 0, {});\n\t\t\tconst regionData = UserRegionsSchema.parse(regionsBody);\n\t\t\tconst allOrganizations = (await Promise.all(regionData.regions.map(async (region) => this.requestJSON(path, void 0, {\n\t\t\t\t...opts,\n\t\t\t\thost: new URL(region.url).host\n\t\t\t})))).map((data) => OrganizationListSchema.parse(data)).reduce((acc, curr) => acc.concat(curr), []);\n\t\t\treturn allOrganizations.slice(0, 25);\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) {\n\t\t\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\t\t\treturn OrganizationListSchema.parse(body);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Gets a single organization by slug.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param opts Request options including host override\n\t* @returns Organization data\n\t*/\n\tasync getOrganization(organizationSlug, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/`, void 0, opts);\n\t\treturn OrganizationSchema.parse(body);\n\t}\n\t/**\n\t* Lists teams within an organization.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param params Query parameters\n\t* @param params.query Search query to filter teams by name/slug\n\t* @param opts Request options including host override\n\t* @returns Array of teams in the organization (limited to 25 results)\n\t*/\n\tasync listTeams(organizationSlug, params, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", \"25\");\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst path = `/organizations/${organizationSlug}/teams/?${queryString}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn TeamListSchema.parse(body);\n\t}\n\t/**\n\t* Creates a new team within an organization.\n\t*\n\t* @param params Team creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.name Team name\n\t* @param opts Request options\n\t* @returns Created team data\n\t* @throws {ApiError} If team creation fails (e.g., name conflicts)\n\t*/\n\tasync createTeam({ organizationSlug, name }, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/teams/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({ name })\n\t\t}, opts);\n\t\treturn TeamSchema.parse(body);\n\t}\n\t/**\n\t* Lists projects within an organization.\n\t*\n\t* @param organizationSlug Organization identifier\n\t* @param params Query parameters\n\t* @param params.query Search query to filter projects by name/slug\n\t* @param opts Request options\n\t* @returns Array of projects in the organization (limited to 25 results)\n\t*/\n\tasync listProjects(organizationSlug, params, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", \"25\");\n\t\tif (params?.query) queryParams.set(\"query\", params.query);\n\t\tconst queryString = queryParams.toString();\n\t\tconst path = `/organizations/${organizationSlug}/projects/?${queryString}`;\n\t\tconst body = await this.requestJSON(path, void 0, opts);\n\t\treturn ProjectListSchema.parse(body);\n\t}\n\t/**\n\t* Gets a single project by slug or ID.\n\t*\n\t* @param params Project fetch parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlugOrId Project slug or numeric ID\n\t* @param opts Request options\n\t* @returns Project data\n\t*/\n\tasync getProject({ organizationSlug, projectSlugOrId }, opts) {\n\t\tconst body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlugOrId}/`, void 0, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\t/**\n\t* Creates a new project within a team.\n\t*\n\t* @param params Project creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.teamSlug Team identifier\n\t* @param params.name Project name\n\t* @param params.platform Platform identifier (e.g., \"javascript\", \"python\")\n\t* @param opts Request options\n\t* @returns Created project data\n\t*/\n\tasync createProject({ organizationSlug, teamSlug, name, platform }, opts) {\n\t\tconst createData = { name };\n\t\tif (platform) createData.platform = platform;\n\t\tconst body = await this.requestJSON(`/teams/${organizationSlug}/${teamSlug}/projects/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(createData)\n\t\t}, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\t/**\n\t* Updates an existing project's configuration.\n\t*\n\t* @param params Project update parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Current project identifier\n\t* @param params.name New project name (optional)\n\t* @param params.slug New project slug (optional)\n\t* @param params.platform New platform identifier (optional)\n\t* @param opts Request options\n\t* @returns Updated project data\n\t*/\n\tasync updateProject({ organizationSlug, projectSlug, name, slug, platform }, opts) {\n\t\tconst updateData = {};\n\t\tif (name) updateData.name = name;\n\t\tif (slug) updateData.slug = slug;\n\t\tif (platform) updateData.platform = platform;\n\t\tconst body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(updateData)\n\t\t}, opts);\n\t\treturn ProjectSchema.parse(body);\n\t}\n\t/**\n\t* Assigns a team to a project.\n\t*\n\t* @param params Assignment parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.teamSlug Team identifier to assign\n\t* @param opts Request options\n\t*/\n\tasync addTeamToProject({ organizationSlug, projectSlug, teamSlug }, opts) {\n\t\tawait this.request(`/projects/${organizationSlug}/${projectSlug}/teams/${teamSlug}/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({})\n\t\t}, opts);\n\t}\n\t/**\n\t* Creates a new client key (DSN) for a project.\n\t*\n\t* Client keys are used to identify and authenticate SDK requests to Sentry.\n\t*\n\t* @param params Key creation parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param params.name Human-readable name for the key (optional)\n\t* @param opts Request options\n\t* @returns Created client key with DSN information\n\t*\n\t* @example\n\t* ```typescript\n\t* const key = await apiService.createClientKey({\n\t* organizationSlug: \"my-org\",\n\t* projectSlug: \"my-project\",\n\t* name: \"Production\"\n\t* });\n\t* console.log(`DSN: ${key.dsn.public}`);\n\t* ```\n\t*/\n\tasync createClientKey({ organizationSlug, projectSlug, name }, opts) {\n\t\tconst body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/keys/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({ name })\n\t\t}, opts);\n\t\treturn ClientKeySchema.parse(body);\n\t}\n\t/**\n\t* Lists all client keys (DSNs) for a project.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier\n\t* @param opts Request options\n\t* @returns Array of client keys with DSN information\n\t*/\n\tasync listClientKeys({ organizationSlug, projectSlug }, opts) {\n\t\tconst body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);\n\t\treturn ClientKeyListSchema.parse(body);\n\t}\n\t/**\n\t* Lists releases for an organization or specific project.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier (optional, scopes to specific project)\n\t* @param params.query Search query for filtering releases\n\t* @param opts Request options\n\t* @returns Array of releases with deployment and commit information\n\t*\n\t* @example\n\t* ```typescript\n\t* // All releases for organization\n\t* const releases = await apiService.listReleases({\n\t* organizationSlug: \"my-org\"\n\t* });\n\t*\n\t* // Search for specific version\n\t* const filtered = await apiService.listReleases({\n\t* organizationSlug: \"my-org\",\n\t* query: \"v1.2.3\"\n\t* });\n\t* ```\n\t*/\n\tasync listReleases({ organizationSlug, projectSlug, query }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (query) searchQuery.set(\"query\", query);\n\t\tconst path = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`;\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `${path}?${searchQuery.toString()}` : path, void 0, opts);\n\t\treturn ReleaseListSchema.parse(body);\n\t}\n\t/**\n\t* Lists available tags for search queries.\n\t*\n\t* Tags represent indexed fields that can be used in Sentry search queries.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.dataset Dataset to query tags for (\"events\", \"errors\" or \"search_issues\")\n\t* @param params.project Numeric project ID to filter tags\n\t* @param params.statsPeriod Time range for tag statistics (e.g., \"24h\", \"7d\")\n\t* @param params.useCache Whether to use cached results\n\t* @param params.useFlagsBackend Whether to use flags backend features\n\t* @param opts Request options\n\t* @returns Array of available tags with metadata\n\t*\n\t* @example\n\t* ```typescript\n\t* const tags = await apiService.listTags({\n\t* organizationSlug: \"my-org\",\n\t* dataset: \"events\",\n\t* project: \"123456\",\n\t* statsPeriod: \"24h\",\n\t* useCache: true\n\t* });\n\t* tags.forEach(tag => console.log(`${tag.key}: ${tag.name}`));\n\t* ```\n\t*/\n\tasync listTags({ organizationSlug, dataset, project, statsPeriod, start, end, useCache, useFlagsBackend }, opts) {\n\t\tconst searchQuery = new URLSearchParams();\n\t\tif (dataset) searchQuery.set(\"dataset\", dataset);\n\t\tif (project) searchQuery.set(\"project\", project);\n\t\tif (statsPeriod && (start || end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (start && !end || !start && end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tif (statsPeriod) searchQuery.set(\"statsPeriod\", statsPeriod);\n\t\telse if (start && end) {\n\t\t\tsearchQuery.set(\"start\", start);\n\t\t\tsearchQuery.set(\"end\", end);\n\t\t}\n\t\tif (useCache !== void 0) searchQuery.set(\"useCache\", useCache ? \"1\" : \"0\");\n\t\tif (useFlagsBackend !== void 0) searchQuery.set(\"useFlagsBackend\", useFlagsBackend ? \"1\" : \"0\");\n\t\tconst body = await this.requestJSON(searchQuery.toString() ? `/organizations/${organizationSlug}/tags/?${searchQuery.toString()}` : `/organizations/${organizationSlug}/tags/`, void 0, opts);\n\t\treturn TagListSchema.parse(body);\n\t}\n\t/**\n\t* Lists trace item attributes available for search queries.\n\t*\n\t* Returns all available fields/attributes that can be used in event searches,\n\t* including both built-in fields and custom tags.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.itemType Item type to query attributes for (\"spans\" or \"logs\")\n\t* @param params.project Numeric project ID to filter attributes\n\t* @param params.statsPeriod Time range for attribute statistics (e.g., \"24h\", \"7d\")\n\t* @param opts Request options\n\t* @returns Array of available attributes with metadata including type\n\t*/\n\tasync listTraceItemAttributes({ organizationSlug, itemType = \"spans\", project, statsPeriod, start, end }, opts) {\n\t\tconst [stringAttributes, numberAttributes] = await Promise.all([this.fetchTraceItemAttributesByType(organizationSlug, itemType, \"string\", project, statsPeriod, start, end, opts), this.fetchTraceItemAttributesByType(organizationSlug, itemType, \"number\", project, statsPeriod, start, end, opts)]);\n\t\tconst allAttributes = [];\n\t\tfor (const attr of stringAttributes) allAttributes.push({\n\t\t\tkey: attr.key,\n\t\t\tname: attr.name || attr.key,\n\t\t\ttype: \"string\"\n\t\t});\n\t\tfor (const attr of numberAttributes) allAttributes.push({\n\t\t\tkey: attr.key,\n\t\t\tname: attr.name || attr.key,\n\t\t\ttype: \"number\"\n\t\t});\n\t\treturn allAttributes;\n\t}\n\tasync fetchTraceItemAttributesByType(organizationSlug, itemType, attributeType, project, statsPeriod, start, end, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"itemType\", itemType);\n\t\tqueryParams.set(\"attributeType\", attributeType);\n\t\tif (project) queryParams.set(\"project\", project);\n\t\tif (statsPeriod && (start || end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (start && !end || !start && end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tif (statsPeriod) queryParams.set(\"statsPeriod\", statsPeriod);\n\t\telse if (start && end) {\n\t\t\tqueryParams.set(\"start\", start);\n\t\t\tqueryParams.set(\"end\", end);\n\t\t}\n\t\tconst url = `/organizations/${organizationSlug}/trace-items/attributes/?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(url, void 0, opts);\n\t\treturn Array.isArray(body) ? body : [];\n\t}\n\t/**\n\t* Lists issues within an organization or project.\n\t*\n\t* Issues represent groups of similar errors or problems in your application.\n\t* Supports Sentry's powerful query syntax for filtering and sorting.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.projectSlug Project identifier (optional, scopes to specific project)\n\t* @param params.query Sentry search query (e.g., \"is:unresolved browser:chrome\")\n\t* @param params.sortBy Sort order (\"user\", \"freq\", \"date\", \"new\")\n\t* @param opts Request options\n\t* @returns Array of issues with metadata and statistics\n\t*\n\t* @example\n\t* ```typescript\n\t* // Recent unresolved issues\n\t* const issues = await apiService.listIssues({\n\t* organizationSlug: \"my-org\",\n\t* query: \"is:unresolved\",\n\t* sortBy: \"date\"\n\t* });\n\t*\n\t* // High-frequency errors in specific project\n\t* const critical = await apiService.listIssues({\n\t* organizationSlug: \"my-org\",\n\t* projectSlug: \"backend\",\n\t* query: \"level:error\",\n\t* sortBy: \"freq\"\n\t* });\n\t* ```\n\t*/\n\tasync listIssues({ organizationSlug, projectSlug, query, sortBy, limit = 10 }, opts) {\n\t\tconst sentryQuery = [];\n\t\tif (query) sentryQuery.push(query);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", String(limit));\n\t\tif (sortBy) queryParams.set(\"sort\", sortBy);\n\t\tqueryParams.set(\"statsPeriod\", \"24h\");\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tqueryParams.append(\"collapse\", \"unhandled\");\n\t\tconst apiUrl = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}` : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn IssueListSchema.parse(body);\n\t}\n\tasync getIssue({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/`, void 0, opts);\n\t\treturn IssueSchema.parse(body);\n\t}\n\tasync getEventForIssue({ organizationSlug, issueId, eventId }, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);\n\t\tconst parseResult = EventSchema.safeParse(body);\n\t\tif (parseResult.success) {\n\t\t\tconst rawEvent = parseResult.data;\n\t\t\tif (rawEvent.type === \"error\" || rawEvent.type === \"default\") return rawEvent;\n\t\t\tif (rawEvent.type === \"transaction\") return rawEvent;\n\t\t\tif (rawEvent.type === \"generic\") return rawEvent;\n\t\t\tif (rawEvent.type === \"csp\") return rawEvent;\n\t\t\tconst eventType$1 = typeof rawEvent.type === \"string\" ? rawEvent.type : String(rawEvent.type);\n\t\t\tlogIssue(`Unsupported event type: ${eventType$1}`, { extra: {\n\t\t\t\teventType: eventType$1,\n\t\t\t\teventId: rawEvent.id\n\t\t\t} });\n\t\t\treturn rawEvent;\n\t\t}\n\t\tconst bodyObj = body;\n\t\tconst eventType = typeof bodyObj.type === \"string\" ? bodyObj.type : String(bodyObj.type);\n\t\tlogIssue(`Event failed schema validation: ${eventType}`, { extra: {\n\t\t\teventType,\n\t\t\teventId: bodyObj.id,\n\t\t\tvalidationError: parseResult.error.message,\n\t\t\tvalidationIssues: parseResult.error.errors\n\t\t} });\n\t\tthrow new ApiValidationError(`Event failed schema validation: ${parseResult.error.message}`, void 0, void 0, body);\n\t}\n\tasync getLatestEventForIssue({ organizationSlug, issueId }, opts) {\n\t\treturn this.getEventForIssue({\n\t\t\torganizationSlug,\n\t\t\tissueId,\n\t\t\teventId: \"latest\"\n\t\t}, opts);\n\t}\n\tasync listEventAttachments({ organizationSlug, projectSlug, eventId }, opts) {\n\t\tconst body = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);\n\t\treturn EventAttachmentListSchema.parse(body);\n\t}\n\tasync getEventAttachment({ organizationSlug, projectSlug, eventId, attachmentId }, opts) {\n\t\tconst attachmentsData = await this.requestJSON(`/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/`, void 0, opts);\n\t\tconst attachments = EventAttachmentListSchema.parse(attachmentsData);\n\t\tconst attachment = attachments.find((att) => att.id === attachmentId);\n\t\tif (!attachment) throw new ApiNotFoundError(`Attachment with ID ${attachmentId} not found for event ${eventId}`);\n\t\tconst downloadUrl = `/projects/${organizationSlug}/${projectSlug}/events/${eventId}/attachments/${attachmentId}/?download=1`;\n\t\tconst downloadResponse = await this.request(downloadUrl, {\n\t\t\tmethod: \"GET\",\n\t\t\theaders: { Accept: \"application/octet-stream\" }\n\t\t}, opts);\n\t\treturn {\n\t\t\tattachment,\n\t\t\tdownloadUrl: downloadResponse.url,\n\t\t\tfilename: attachment.name,\n\t\t\tblob: await downloadResponse.blob()\n\t\t};\n\t}\n\tasync updateIssue({ organizationSlug, issueId, status, assignedTo }, opts) {\n\t\tconst updateData = {};\n\t\tif (status !== void 0) updateData.status = status;\n\t\tif (assignedTo !== void 0) updateData.assignedTo = assignedTo;\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/`, {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: JSON.stringify(updateData)\n\t\t}, opts);\n\t\treturn IssueSchema.parse(body);\n\t}\n\tasync searchErrors({ organizationSlug, projectSlug, filename, transaction, query, sortBy = \"last_seen\" }, opts) {\n\t\tconst sentryQuery = [];\n\t\tif (filename) sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (transaction) sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (query) sentryQuery.push(query);\n\t\tif (projectSlug) sentryQuery.push(`project:${projectSlug}`);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"dataset\", \"errors\");\n\t\tqueryParams.set(\"per_page\", \"10\");\n\t\tqueryParams.set(\"sort\", `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`);\n\t\tqueryParams.set(\"statsPeriod\", \"24h\");\n\t\tqueryParams.append(\"field\", \"issue\");\n\t\tqueryParams.append(\"field\", \"title\");\n\t\tqueryParams.append(\"field\", \"project\");\n\t\tqueryParams.append(\"field\", \"last_seen()\");\n\t\tqueryParams.append(\"field\", \"count()\");\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tconst apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn ErrorsSearchResponseSchema.parse(body).data;\n\t}\n\tasync searchSpans({ organizationSlug, projectSlug, transaction, query, sortBy = \"timestamp\" }, opts) {\n\t\tconst sentryQuery = [\"is_transaction:true\"];\n\t\tif (transaction) sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, \"\\\\\\\"\")}\"`);\n\t\tif (query) sentryQuery.push(query);\n\t\tif (projectSlug) sentryQuery.push(`project:${projectSlug}`);\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"dataset\", \"spans\");\n\t\tqueryParams.set(\"per_page\", \"10\");\n\t\tqueryParams.set(\"sort\", `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`);\n\t\tqueryParams.set(\"allowAggregateConditions\", \"0\");\n\t\tqueryParams.set(\"useRpc\", \"1\");\n\t\tqueryParams.append(\"field\", \"id\");\n\t\tqueryParams.append(\"field\", \"trace\");\n\t\tqueryParams.append(\"field\", \"span.op\");\n\t\tqueryParams.append(\"field\", \"span.description\");\n\t\tqueryParams.append(\"field\", \"span.duration\");\n\t\tqueryParams.append(\"field\", \"transaction\");\n\t\tqueryParams.append(\"field\", \"project\");\n\t\tqueryParams.append(\"field\", \"timestamp\");\n\t\tqueryParams.set(\"query\", sentryQuery.join(\" \"));\n\t\tconst apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\t\tconst body = await this.requestJSON(apiUrl, void 0, opts);\n\t\treturn SpansSearchResponseSchema.parse(body).data;\n\t}\n\t/**\n\t* Builds query parameters for the legacy Discover API (primarily used by errors dataset).\n\t*\n\t* Note: While the API endpoint is the same for all datasets, we maintain separate\n\t* builders to make future divergence easier and to keep the code organized.\n\t*/\n\tbuildDiscoverApiQuery(params) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", params.limit.toString());\n\t\tqueryParams.set(\"query\", params.query);\n\t\tqueryParams.set(\"dataset\", \"errors\");\n\t\tif (params.statsPeriod && (params.start || params.end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (params.start && !params.end || !params.start && params.end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tif (params.statsPeriod) queryParams.set(\"statsPeriod\", params.statsPeriod);\n\t\telse if (params.start && params.end) {\n\t\t\tqueryParams.set(\"start\", params.start);\n\t\t\tqueryParams.set(\"end\", params.end);\n\t\t}\n\t\tif (params.projectId) queryParams.set(\"project\", params.projectId);\n\t\tlet apiSort = params.sort;\n\t\tif (params.sort?.includes(\"(\") && !params.sort?.includes(\"equation|\")) {\n\t\t\tconst parenStart = params.sort.indexOf(\"(\");\n\t\t\tconst parenEnd = params.sort.indexOf(\")\", parenStart);\n\t\t\tif (parenStart !== -1 && parenEnd !== -1) {\n\t\t\t\tconst beforeParen = params.sort.substring(0, parenStart);\n\t\t\t\tconst insideParen = params.sort.substring(parenStart + 1, parenEnd);\n\t\t\t\tconst afterParen = params.sort.substring(parenEnd + 1);\n\t\t\t\tconst transformedInside = insideParen ? `_${insideParen.replace(/\\./g, \"_\")}` : \"\";\n\t\t\t\tapiSort = beforeParen + transformedInside + afterParen;\n\t\t\t}\n\t\t}\n\t\tqueryParams.set(\"sort\", apiSort);\n\t\tfor (const field of params.fields) queryParams.append(\"field\", field);\n\t\treturn queryParams;\n\t}\n\t/**\n\t* Builds query parameters for the modern EAP API (used by spans/logs datasets).\n\t*\n\t* Includes dataset-specific parameters like sampling for spans.\n\t*/\n\tbuildEapApiQuery(params) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"per_page\", params.limit.toString());\n\t\tqueryParams.set(\"query\", params.query);\n\t\tqueryParams.set(\"dataset\", params.dataset);\n\t\tif (params.statsPeriod && (params.start || params.end)) throw new ApiValidationError(\"Cannot use both statsPeriod and start/end parameters. Use either statsPeriod for relative time or start/end for absolute time.\");\n\t\tif (params.start && !params.end || !params.start && params.end) throw new ApiValidationError(\"Both start and end parameters must be provided together for absolute time ranges.\");\n\t\tif (params.statsPeriod) queryParams.set(\"statsPeriod\", params.statsPeriod);\n\t\telse if (params.start && params.end) {\n\t\t\tqueryParams.set(\"start\", params.start);\n\t\t\tqueryParams.set(\"end\", params.end);\n\t\t}\n\t\tif (params.projectId) queryParams.set(\"project\", params.projectId);\n\t\tif (params.dataset === \"spans\") queryParams.set(\"sampling\", \"NORMAL\");\n\t\tlet apiSort = params.sort;\n\t\tif (params.sort?.includes(\"(\") && !params.sort?.includes(\"equation|\")) {\n\t\t\tconst parenStart = params.sort.indexOf(\"(\");\n\t\t\tconst parenEnd = params.sort.indexOf(\")\", parenStart);\n\t\t\tif (parenStart !== -1 && parenEnd !== -1) {\n\t\t\t\tconst beforeParen = params.sort.substring(0, parenStart);\n\t\t\t\tconst insideParen = params.sort.substring(parenStart + 1, parenEnd);\n\t\t\t\tconst afterParen = params.sort.substring(parenEnd + 1);\n\t\t\t\tconst transformedInside = insideParen ? `_${insideParen.replace(/\\./g, \"_\")}` : \"\";\n\t\t\t\tapiSort = beforeParen + transformedInside + afterParen;\n\t\t\t}\n\t\t}\n\t\tqueryParams.set(\"sort\", apiSort);\n\t\tfor (const field of params.fields) queryParams.append(\"field\", field);\n\t\treturn queryParams;\n\t}\n\t/**\n\t* Searches for events in Sentry using the unified events API.\n\t* This method is used by the search_events tool for semantic search.\n\t*\n\t* Routes to the appropriate query builder based on dataset, even though\n\t* the underlying API endpoint is the same. This separation makes the code\n\t* cleaner and allows for future API divergence.\n\t*/\n\tasync searchEvents({ organizationSlug, query, fields, limit = 10, projectId, dataset = \"spans\", statsPeriod, start, end, sort = \"-timestamp\" }, opts) {\n\t\tlet queryParams;\n\t\tif (dataset === \"errors\") queryParams = this.buildDiscoverApiQuery({\n\t\t\tquery,\n\t\t\tfields,\n\t\t\tlimit,\n\t\t\tprojectId,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tsort\n\t\t});\n\t\telse queryParams = this.buildEapApiQuery({\n\t\t\tquery,\n\t\t\tfields,\n\t\t\tlimit,\n\t\t\tprojectId,\n\t\t\tdataset,\n\t\t\tstatsPeriod,\n\t\t\tstart,\n\t\t\tend,\n\t\t\tsort\n\t\t});\n\t\tconst apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\t\treturn await this.requestJSON(apiUrl, void 0, opts);\n\t}\n\tasync startAutofix({ organizationSlug, issueId, eventId, instruction = \"\" }, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify({\n\t\t\t\tevent_id: eventId,\n\t\t\t\tinstruction\n\t\t\t})\n\t\t}, opts);\n\t\treturn AutofixRunSchema.parse(body);\n\t}\n\tasync getAutofixState({ organizationSlug, issueId }, opts) {\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/issues/${issueId}/autofix/`, void 0, opts);\n\t\treturn AutofixRunStateSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves high-level metadata about a trace.\n\t*\n\t* Returns statistics including span counts, error counts, transaction\n\t* breakdown, and operation type distribution for the specified trace.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.traceId Trace identifier (32-character hex string)\n\t* @param params.statsPeriod Optional stats period (e.g., \"14d\", \"7d\")\n\t* @param opts Request options\n\t* @returns Trace metadata with statistics\n\t*\n\t* @example\n\t* ```typescript\n\t* const traceMeta = await apiService.getTraceMeta({\n\t* organizationSlug: \"my-org\",\n\t* traceId: \"a4d1aae7216b47ff8117cf4e09ce9d0a\"\n\t* });\n\t* console.log(`Trace has ${traceMeta.span_count} spans`);\n\t* ```\n\t*/\n\tasync getTraceMeta({ organizationSlug, traceId, statsPeriod = \"14d\" }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod);\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/trace-meta/${traceId}/?${queryParams.toString()}`, void 0, opts);\n\t\treturn TraceMetaSchema.parse(body);\n\t}\n\t/**\n\t* Retrieves the complete trace structure with all spans.\n\t*\n\t* Returns the hierarchical trace data including all spans, their timing\n\t* information, operation details, and nested relationships.\n\t*\n\t* @param params Query parameters\n\t* @param params.organizationSlug Organization identifier\n\t* @param params.traceId Trace identifier (32-character hex string)\n\t* @param params.limit Maximum number of spans to return (default: 1000)\n\t* @param params.project Project filter (-1 for all projects)\n\t* @param params.statsPeriod Optional stats period (e.g., \"14d\", \"7d\")\n\t* @param opts Request options\n\t* @returns Complete trace tree structure\n\t*\n\t* @example\n\t* ```typescript\n\t* const trace = await apiService.getTrace({\n\t* organizationSlug: \"my-org\",\n\t* traceId: \"a4d1aae7216b47ff8117cf4e09ce9d0a\",\n\t* limit: 1000\n\t* });\n\t* console.log(`Root spans: ${trace.length}`);\n\t* ```\n\t*/\n\tasync getTrace({ organizationSlug, traceId, limit = 1e3, project = \"-1\", statsPeriod = \"14d\" }, opts) {\n\t\tconst queryParams = new URLSearchParams();\n\t\tqueryParams.set(\"limit\", String(limit));\n\t\tqueryParams.set(\"project\", project);\n\t\tqueryParams.set(\"statsPeriod\", statsPeriod);\n\t\tconst body = await this.requestJSON(`/organizations/${organizationSlug}/trace/${traceId}/?${queryParams.toString()}`, void 0, opts);\n\t\treturn TraceSchema.parse(body);\n\t}\n};\n\n//#endregion\nexport { SentryApiService };\n//# sourceMappingURL=client-B9APZB0N.js.map","import { SENTRY_ALLOWED_REGION_DOMAINS } from \"./constants-D8axTonA.js\";\nimport { UserInputError } from \"./errors-BXmNwD2K.js\";\n\n//#region src/internal/tool-helpers/validate-region-url.ts\n/**\n* Validates that a regionUrl is valid.\n* Prevents SSRF attacks by only allowing the base host itself or domains from an allowlist.\n*\n* Rules:\n* 1. By default, only the base host itself is allowed as regionUrl\n* 2. For other domains, they must be in SENTRY_ALLOWED_REGION_DOMAINS\n* 3. Protocol MUST be HTTPS for security\n*\n* @param regionUrl - The region URL to validate\n* @param baseHost - The base host to validate against\n* @returns The validated host if valid\n* @throws {UserInputError} If the regionUrl is invalid or not allowed\n*/\nfunction validateRegionUrl(regionUrl, baseHost) {\n\tlet parsedUrl;\n\ttry {\n\t\tparsedUrl = new URL(regionUrl);\n\t} catch {\n\t\tthrow new UserInputError(`Invalid regionUrl provided: ${regionUrl}. Must be a valid URL.`);\n\t}\n\tif (parsedUrl.protocol !== \"https:\") throw new UserInputError(`Invalid regionUrl provided: ${regionUrl}. Must use HTTPS protocol for security.`);\n\tif (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") throw new UserInputError(`Invalid regionUrl provided: ${regionUrl}. The host cannot be just a protocol name.`);\n\tconst regionHost = parsedUrl.host.toLowerCase();\n\tconst baseLower = baseHost.toLowerCase();\n\tif (regionHost === baseLower) return regionHost;\n\tif (!SENTRY_ALLOWED_REGION_DOMAINS.has(regionHost)) throw new UserInputError(`Invalid regionUrl: ${regionUrl}. The domain '${regionHost}' is not allowed. Allowed domains are: ${Array.from(SENTRY_ALLOWED_REGION_DOMAINS).join(\", \")}`);\n\treturn regionHost;\n}\n\n//#endregion\nexport { validateRegionUrl };\n//# sourceMappingURL=validate-region-url-DAFGgDb3.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ApiClientError, ApiNotFoundError } from \"./errors-h_Ebmo8b.js\";\nimport { SentryApiService } from \"./client-B9APZB0N.js\";\nimport { validateRegionUrl } from \"./validate-region-url-DAFGgDb3.js\";\n\n//#region src/internal/tool-helpers/api.ts\n/**\n* Create a Sentry API service from server context with optional region override\n* @param context - Server context containing host and access token\n* @param opts - Options object containing optional regionUrl override\n* @returns Configured SentryApiService instance (always uses HTTPS)\n* @throws {UserInputError} When regionUrl is provided but invalid\n*/\nfunction apiServiceFromContext(context, opts = {}) {\n\tlet host = context.sentryHost;\n\tif (opts.regionUrl?.trim()) {\n\t\tconst baseHost = context.sentryHost || \"sentry.io\";\n\t\thost = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n\t}\n\treturn new SentryApiService({\n\t\thost,\n\t\taccessToken: context.accessToken\n\t});\n}\n/**\n* Maps API errors to user-friendly errors based on context\n* @param error - The error to handle\n* @param params - The parameters that were used in the API call\n* @returns Never - always throws an error\n* @throws {UserInputError} For 4xx errors that are likely user input issues\n* @throws {Error} For other errors\n*/\nfunction handleApiError(error, params) {\n\tif (error instanceof ApiClientError) {\n\t\tlet message = `API error (${error.status}): ${error.message}`;\n\t\tif (error instanceof ApiNotFoundError && params) {\n\t\t\tconst paramsList = [];\n\t\t\tfor (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== \"\") paramsList.push(`${key}: '${value}'`);\n\t\t\tif (paramsList.length > 0) message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n\t\t}\n\t\tthrow new UserInputError(message, { cause: error });\n\t}\n\tthrow error;\n}\n/**\n* Wraps an async API call with automatic error handling\n* @param fn - The async function to execute\n* @param params - The parameters that were used in the API call\n* @returns The result of the function\n* @throws {UserInputError} For user input errors\n* @throws {Error} For other errors\n*/\nasync function withApiErrorHandling(fn, params) {\n\ttry {\n\t\treturn await fn();\n\t} catch (error) {\n\t\thandleApiError(error, params);\n\t}\n}\n\n//#endregion\nexport { apiServiceFromContext, handleApiError, withApiErrorHandling };\n//# sourceMappingURL=api-C49LlEqH.js.map","import { ALL_SKILLS } from \"./skills-BmFl7P6V.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\n\n//#region src/tools/whoami.ts\nvar whoami_default = defineTool({\n\tname: \"whoami\",\n\tdescription: [\n\t\t\"Identify the authenticated user in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Get the user's name and email address.\"\n\t].join(\"\\n\"),\n\tinputSchema: {},\n\trequiredSkills: ALL_SKILLS,\n\trequiredScopes: [],\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context);\n\t\tconst user = await apiService.getAuthenticatedUser();\n\t\tlet output = `You are authenticated as ${user.name} (${user.email}).\\n\\nYour Sentry User ID is ${user.id}.`;\n\t\tconst constraints = context.constraints;\n\t\tif (constraints.organizationSlug || constraints.projectSlug || constraints.regionUrl) {\n\t\t\toutput += \"\\n\\n## Session Constraints\\n\\n\";\n\t\t\tif (constraints.organizationSlug) output += `- **Organization**: ${constraints.organizationSlug}\\n`;\n\t\t\tif (constraints.projectSlug) output += `- **Project**: ${constraints.projectSlug}\\n`;\n\t\t\tif (constraints.regionUrl) output += `- **Region URL**: ${constraints.regionUrl}\\n`;\n\t\t\toutput += \"\\nThese constraints limit the scope of this MCP session.\";\n\t\t}\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { whoami_default };\n//# sourceMappingURL=whoami-BoraVlxR.js.map","import { ALL_SKILLS } from \"./skills-BmFl7P6V.js\";\nimport { ParamSearchQuery } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\n\n//#region src/tools/find-organizations.ts\nconst RESULT_LIMIT = 25;\nvar find_organizations_default = defineTool({\n\tname: \"find_organizations\",\n\trequiredSkills: ALL_SKILLS,\n\trequiredScopes: [\"org:read\"],\n\tdescription: [\n\t\t\"Find organizations that the user has access to in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View organizations in Sentry\",\n\t\t\"- Find an organization's slug to aid other tool requests\",\n\t\t\"- Search for specific organizations by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. If you hit this limit, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: { query: ParamSearchQuery.nullable().default(null) },\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context);\n\t\tconst organizations = await apiService.listOrganizations({ query: params.query ?? void 0 });\n\t\tlet output = \"# Organizations\\n\\n\";\n\t\tif (params.query) output += `**Search query:** \"${params.query}\"\\n\\n`;\n\t\tif (organizations.length === 0) {\n\t\t\toutput += params.query ? `No organizations found matching \"${params.query}\".\\n` : \"You don't appear to be a member of any organizations.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += organizations.map((org) => [\n\t\t\t`## **${org.slug}**`,\n\t\t\t\"\",\n\t\t\t`**Web URL:** ${org.links?.organizationUrl || \"Not available\"}`,\n\t\t\t`**Region URL:** ${org.links?.regionUrl || \"\"}`\n\t\t].join(\"\\n\")).join(\"\\n\\n\");\n\t\tif (organizations.length === RESULT_LIMIT) output += `\\n\\n---\\n\\n**Note:** Showing ${RESULT_LIMIT} results (maximum). There may be more organizations available. Use the \\`query\\` parameter to search for specific organizations.`;\n\t\toutput += \"\\n\\n# Using this information\\n\\n\";\n\t\toutput += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n\t\tconst hasValidRegionUrls = organizations.some((org) => org.links?.regionUrl?.trim());\n\t\tif (hasValidRegionUrls) {\n\t\t\toutput += `- If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value shown above for each organization.\\n`;\n\t\t\toutput += `- For Sentry's Cloud Service (sentry.io), always use the regionUrl to ensure requests go to the correct region.\\n`;\n\t\t} else {\n\t\t\toutput += `- This appears to be a self-hosted Sentry installation. You can omit the \\`regionUrl\\` parameter when using other tools.\\n`;\n\t\t\toutput += `- For self-hosted Sentry, the regionUrl is typically empty and not needed for API calls.\\n`;\n\t\t}\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { find_organizations_default };\n//# sourceMappingURL=find-organizations-Df_7XcZh.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamSearchQuery } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/find-teams.ts\nconst RESULT_LIMIT = 25;\nvar find_teams_default = defineTool({\n\tname: \"find_teams\",\n\trequiredSkills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"project-management\"\n\t],\n\trequiredScopes: [\"team:read\"],\n\tdescription: [\n\t\t\"Find teams in an organization in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View teams in a Sentry organization\",\n\t\t\"- Find a team's slug to aid other tool requests\",\n\t\t\"- Search for specific teams by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. If you hit this limit, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tquery: ParamSearchQuery.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required. Please provide an organizationSlug parameter.\");\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst teams = await apiService.listTeams(organizationSlug, { query: params.query ?? void 0 });\n\t\tlet output = `# Teams in **${organizationSlug}**\\n\\n`;\n\t\tif (params.query) output += `**Search query:** \"${params.query}\"\\n\\n`;\n\t\tif (teams.length === 0) {\n\t\t\toutput += params.query ? `No teams found matching \"${params.query}\".\\n` : \"No teams found.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n\t\tif (teams.length === RESULT_LIMIT) output += `\\n---\\n\\n**Note:** Showing ${RESULT_LIMIT} results (maximum). There may be more teams available. Use the \\`query\\` parameter to search for specific teams.`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { find_teams_default };\n//# sourceMappingURL=find-teams-Ci9--JWk.js.map","import { ALL_SKILLS } from \"./skills-BmFl7P6V.js\";\nimport { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamSearchQuery } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/find-projects.ts\nconst RESULT_LIMIT = 25;\nvar find_projects_default = defineTool({\n\tname: \"find_projects\",\n\trequiredSkills: ALL_SKILLS,\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Find projects in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- View projects in a Sentry organization\",\n\t\t\"- Find a project's slug to aid other tool requests\",\n\t\t\"- Search for specific projects by name or slug\",\n\t\t\"\",\n\t\t`Returns up to ${RESULT_LIMIT} results. If you hit this limit, use the query parameter to narrow down results.`\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tquery: ParamSearchQuery.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required. Please provide an organizationSlug parameter.\");\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst projects = await apiService.listProjects(organizationSlug, { query: params.query ?? void 0 });\n\t\tlet output = `# Projects in **${organizationSlug}**\\n\\n`;\n\t\tif (params.query) output += `**Search query:** \"${params.query}\"\\n\\n`;\n\t\tif (projects.length === 0) {\n\t\t\toutput += params.query ? `No projects found matching \"${params.query}\".\\n` : \"No projects found.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += projects.map((project) => `- **${project.slug}**\\n`).join(\"\");\n\t\tif (projects.length === RESULT_LIMIT) output += `\\n---\\n\\n**Note:** Showing ${RESULT_LIMIT} results (maximum). There may be more projects available. Use the \\`query\\` parameter to search for specific projects.`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { find_projects_default };\n//# sourceMappingURL=find-projects-_xE0VUHG.js.map","import { ParamOrganizationSlug, ParamProjectSlugOrAll, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/find-releases.ts\nvar find_releases_default = defineTool({\n\tname: \"find_releases\",\n\trequiredSkills: [\"inspect\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"Find releases in Sentry.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Find recent releases in a Sentry organization\",\n\t\t\"- Find the most recent version released of a specific project\",\n\t\t\"- Determine when a release was deployed to an environment\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Find the most recent releases in the 'my-organization' organization\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"find_releases(organizationSlug='my-organization')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Find releases matching '2ce6a27' in the 'my-organization' organization\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"find_releases(organizationSlug='my-organization', query='2ce6a27')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlugOrAll.nullable().default(null),\n\t\tquery: z.string().trim().describe(\"Search for versions which contain the provided string.\").nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst releases = await apiService.listReleases({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug ?? void 0,\n\t\t\tquery: params.query ?? void 0\n\t\t});\n\t\tlet output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n\t\tif (releases.length === 0) {\n\t\t\toutput += \"No releases found.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += releases.map((release) => {\n\t\t\tconst releaseInfo = [\n\t\t\t\t`## ${release.shortVersion}`,\n\t\t\t\t\"\",\n\t\t\t\t`**Created**: ${new Date(release.dateCreated).toISOString()}`\n\t\t\t];\n\t\t\tif (release.dateReleased) releaseInfo.push(`**Released**: ${new Date(release.dateReleased).toISOString()}`);\n\t\t\tif (release.firstEvent) releaseInfo.push(`**First Event**: ${new Date(release.firstEvent).toISOString()}`);\n\t\t\tif (release.lastEvent) releaseInfo.push(`**Last Event**: ${new Date(release.lastEvent).toISOString()}`);\n\t\t\tif (release.newGroups !== void 0) releaseInfo.push(`**New Issues**: ${release.newGroups}`);\n\t\t\tif (release.projects && release.projects.length > 0) releaseInfo.push(`**Projects**: ${release.projects.map((p) => p.name).join(\", \")}`);\n\t\t\tif (release.lastCommit) {\n\t\t\t\treleaseInfo.push(\"\", `### Last Commit`, \"\");\n\t\t\t\treleaseInfo.push(`**Commit ID**: ${release.lastCommit.id}`);\n\t\t\t\treleaseInfo.push(`**Commit Message**: ${release.lastCommit.message}`);\n\t\t\t\treleaseInfo.push(`**Commit Author**: ${release.lastCommit.author.name}`);\n\t\t\t\treleaseInfo.push(`**Commit Date**: ${new Date(release.lastCommit.dateCreated).toISOString()}`);\n\t\t\t}\n\t\t\tif (release.lastDeploy) {\n\t\t\t\treleaseInfo.push(\"\", `### Last Deploy`, \"\");\n\t\t\t\treleaseInfo.push(`**Deploy ID**: ${release.lastDeploy.id}`);\n\t\t\t\treleaseInfo.push(`**Environment**: ${release.lastDeploy.environment}`);\n\t\t\t\tif (release.lastDeploy.dateStarted) releaseInfo.push(`**Deploy Started**: ${new Date(release.lastDeploy.dateStarted).toISOString()}`);\n\t\t\t\tif (release.lastDeploy.dateFinished) releaseInfo.push(`**Deploy Finished**: ${new Date(release.lastDeploy.dateFinished).toISOString()}`);\n\t\t\t}\n\t\t\treturn releaseInfo.join(\"\\n\");\n\t\t}).join(\"\\n\\n\");\n\t\toutput += \"\\n\\n\";\n\t\toutput += \"# Using this information\\n\\n\";\n\t\toutput += `- You can reference the Release version in commit messages or documentation.\\n`;\n\t\toutput += `- You can search for issues in a specific release using the \\`find_errors()\\` tool with the query \\`release:${releases.length ? releases[0].shortVersion : \"VERSION\"}\\`.\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { find_releases_default };\n//# sourceMappingURL=find-releases-B-2KNnj4.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\n\n//#region src/internal/issue-helpers.ts\n/**\n* Extracts the Sentry issue ID and organization slug from a full URL\n*\n* @param url - A full Sentry issue URL\n* @returns Object containing the numeric issue ID and organization slug (if found)\n* @throws Error if the input is invalid\n*/\nfunction extractIssueId(url) {\n\tif (!url || typeof url !== \"string\") throw new UserInputError(\"Invalid Sentry issue URL. URL must be a non-empty string.\");\n\tif (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) throw new UserInputError(\"Invalid Sentry issue URL. Must start with http:// or https://\");\n\tlet parsedUrl;\n\ttry {\n\t\tparsedUrl = new URL(url);\n\t} catch (error) {\n\t\tthrow new UserInputError(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n\t}\n\tconst pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n\tif (pathParts.length < 2 || !pathParts.includes(\"issues\")) throw new UserInputError(\"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\");\n\tconst issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n\tif (!issueId) throw new UserInputError(\"Unable to determine issue ID from URL.\");\n\tlet organizationSlug;\n\tif (pathParts.includes(\"organizations\")) organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n\telse if (pathParts.length > 1 && pathParts[0] !== \"issues\") organizationSlug = pathParts[0];\n\telse {\n\t\tconst hostParts = parsedUrl.hostname.split(\".\");\n\t\tif (hostParts.length > 2 && hostParts[0] !== \"www\") organizationSlug = hostParts[0];\n\t}\n\tif (!organizationSlug) throw new UserInputError(\"Invalid Sentry issue URL. Could not determine organization.\");\n\treturn {\n\t\tissueId,\n\t\torganizationSlug\n\t};\n}\n/**\n* Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n* in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n* fix common issues.\n*\n* @param issueId - The issue ID to parse\n* @returns The parsed issue ID\n*/\nfunction parseIssueId(issueId) {\n\tif (!issueId.trim()) throw new UserInputError(\"Issue ID cannot be empty\");\n\tlet finalIssueId = issueId;\n\tfinalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\tif (!finalIssueId) throw new UserInputError(\"Issue ID cannot be empty after removing special characters\");\n\tconst validFormatRegex = /^(\\d+|[A-Za-z0-9][\\w-]*-[A-Za-z0-9]+)$/;\n\tif (!validFormatRegex.test(finalIssueId)) throw new UserInputError(`Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`);\n\treturn finalIssueId;\n}\n/**\n* Parses issue parameters from a variety of formats.\n*\n* @param params - Object containing issue URL, issue ID, and organization slug\n* @returns Object containing the parsed organization slug and issue ID\n* @throws Error if the input is invalid\n*/\nfunction parseIssueParams({ issueUrl, issueId, organizationSlug }) {\n\tif (issueUrl) {\n\t\tconst resolved = extractIssueId(issueUrl);\n\t\tif (!resolved) throw new Error(\"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\");\n\t\treturn {\n\t\t\t...resolved,\n\t\t\tissueId: parseIssueId(resolved.issueId)\n\t\t};\n\t}\n\tif (!organizationSlug) throw new UserInputError(\"Organization slug is required\");\n\tif (issueId) return {\n\t\torganizationSlug,\n\t\tissueId: parseIssueId(issueId)\n\t};\n\tthrow new UserInputError(\"Either issueId or issueUrl must be provided\");\n}\n\n//#endregion\nexport { extractIssueId, parseIssueId, parseIssueParams };\n//# sourceMappingURL=issue-helpers-CW_FS0Jn.js.map","//#region src/internal/tool-helpers/seer.ts\nconst SEER_POLLING_INTERVAL = 5e3;\nconst SEER_TIMEOUT = 5 * 60 * 1e3;\nconst SEER_MAX_RETRIES = 3;\nconst SEER_INITIAL_RETRY_DELAY = 1e3;\nfunction getStatusDisplayName(status) {\n\tswitch (status) {\n\t\tcase \"COMPLETED\": return \"Complete\";\n\t\tcase \"FAILED\":\n\t\tcase \"ERROR\": return \"Failed\";\n\t\tcase \"CANCELLED\": return \"Cancelled\";\n\t\tcase \"NEED_MORE_INFORMATION\": return \"Needs More Information\";\n\t\tcase \"WAITING_FOR_USER_RESPONSE\": return \"Waiting for Response\";\n\t\tcase \"PROCESSING\": return \"Processing\";\n\t\tcase \"IN_PROGRESS\": return \"In Progress\";\n\t\tdefault: return status;\n\t}\n}\n/**\n* Check if an autofix status is terminal (no more updates expected)\n*/\nfunction isTerminalStatus(status) {\n\treturn [\n\t\t\"COMPLETED\",\n\t\t\"FAILED\",\n\t\t\"ERROR\",\n\t\t\"CANCELLED\",\n\t\t\"NEED_MORE_INFORMATION\",\n\t\t\"WAITING_FOR_USER_RESPONSE\"\n\t].includes(status);\n}\n/**\n* Check if an autofix status requires human intervention\n*/\nfunction isHumanInterventionStatus(status) {\n\treturn status === \"NEED_MORE_INFORMATION\" || status === \"WAITING_FOR_USER_RESPONSE\";\n}\n/**\n* Get guidance message for human intervention states\n*/\nfunction getHumanInterventionGuidance(status) {\n\tif (status === \"NEED_MORE_INFORMATION\") return \"\\nSeer needs additional information to continue the analysis. Please review the insights above and consider providing more context.\\n\";\n\tif (status === \"WAITING_FOR_USER_RESPONSE\") return \"\\nSeer is waiting for your response to proceed. Please review the analysis and provide feedback.\\n\";\n\treturn \"\";\n}\nfunction getOutputForAutofixStep(step) {\n\tlet output = `## ${step.title}\\n\\n`;\n\tif (step.status === \"FAILED\") {\n\t\toutput += `**Sentry hit an error completing this step.\\n\\n`;\n\t\treturn output;\n\t}\n\tif (step.status !== \"COMPLETED\") {\n\t\toutput += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n\t\treturn output;\n\t}\n\tif (step.type === \"root_cause_analysis\") {\n\t\tconst typedStep$1 = step;\n\t\tfor (const cause of typedStep$1.causes) {\n\t\t\tif (cause.description) output += `${cause.description}\\n\\n`;\n\t\t\tfor (const entry of cause.root_cause_reproduction) {\n\t\t\t\toutput += `**${entry.title}**\\n\\n`;\n\t\t\t\toutput += `${entry.code_snippet_and_analysis}\\n\\n`;\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\tif (step.type === \"solution\") {\n\t\tconst typedStep$1 = step;\n\t\toutput += `${typedStep$1.description}\\n\\n`;\n\t\tfor (const entry of typedStep$1.solution) {\n\t\t\toutput += `**${entry.title}**\\n`;\n\t\t\toutput += `${entry.code_snippet_and_analysis}\\n\\n`;\n\t\t}\n\t\tif (typedStep$1.status === \"FAILED\") output += `**Sentry hit an error completing this step.\\n\\n`;\n\t\telse if (typedStep$1.status !== \"COMPLETED\") output += `**Sentry is still working on this step.**\\n\\n`;\n\t\treturn output;\n\t}\n\tconst typedStep = step;\n\tif (typedStep.insights && typedStep.insights.length > 0) for (const entry of typedStep.insights) {\n\t\toutput += `**${entry.insight}**\\n`;\n\t\toutput += `${entry.justification}\\n\\n`;\n\t}\n\telse if (step.output_stream) output += `${step.output_stream}\\n`;\n\treturn output;\n}\n\n//#endregion\nexport { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getHumanInterventionGuidance, getOutputForAutofixStep, getStatusDisplayName, isHumanInterventionStatus, isTerminalStatus };\n//# sourceMappingURL=seer-D6i7nmhd.js.map","import { logIssue } from \"./logging-DipAE5VU.js\";\nimport { getOutputForAutofixStep, getStatusDisplayName, isTerminalStatus } from \"./seer-D6i7nmhd.js\";\n\n//#region src/internal/formatting.ts\nconst LANGUAGE_EXTENSIONS = {\n\t\".java\": \"java\",\n\t\".py\": \"python\",\n\t\".js\": \"javascript\",\n\t\".jsx\": \"javascript\",\n\t\".ts\": \"javascript\",\n\t\".tsx\": \"javascript\",\n\t\".rb\": \"ruby\",\n\t\".php\": \"php\"\n};\nconst LANGUAGE_MODULE_PATTERNS = [[/^(java\\.|com\\.|org\\.)/, \"java\"]];\n/**\n* Detects the programming language of a stack frame based on the file extension.\n* Falls back to the platform parameter if no filename is available or extension is unrecognized.\n*\n* @param frame - The stack frame containing file and location information\n* @param platform - Optional platform hint to use as fallback\n* @returns The detected language or platform fallback or \"unknown\"\n*/\nfunction detectLanguage(frame, platform) {\n\tif (frame.filename) {\n\t\tconst ext = frame.filename.toLowerCase().match(/\\.[^.]+$/)?.[0];\n\t\tif (ext && LANGUAGE_EXTENSIONS[ext]) return LANGUAGE_EXTENSIONS[ext];\n\t}\n\tif (frame.module) {\n\t\tfor (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) if (pattern.test(frame.module)) return language;\n\t}\n\treturn platform || \"unknown\";\n}\n/**\n* Formats a stack frame into a language-specific string representation.\n* Different languages have different conventions for displaying stack traces.\n*\n* @param frame - The stack frame to format\n* @param frameIndex - Optional frame index for languages that display frame numbers\n* @param platform - Optional platform hint for language detection fallback\n* @returns Formatted stack frame string\n*/\nfunction formatFrameHeader(frame, frameIndex, platform) {\n\tconst language = detectLanguage(frame, platform);\n\tswitch (language) {\n\t\tcase \"java\": {\n\t\t\tconst className = frame.module || \"UnknownClass\";\n\t\t\tconst method = frame.function || \"<unknown>\";\n\t\t\tconst source = frame.filename || \"Unknown Source\";\n\t\t\tconst location = frame.lineNo ? `:${frame.lineNo}` : \"\";\n\t\t\treturn `at ${className}.${method}(${source}${location})`;\n\t\t}\n\t\tcase \"python\": {\n\t\t\tconst file = frame.filename || frame.absPath || frame.module || \"<unknown>\";\n\t\t\tconst func = frame.function || \"<module>\";\n\t\t\tconst line = frame.lineNo ? `, line ${frame.lineNo}` : \"\";\n\t\t\treturn ` File \"${file}\"${line}, in ${func}`;\n\t\t}\n\t\tcase \"javascript\": return `${[\n\t\t\tframe.filename,\n\t\t\tframe.lineNo,\n\t\t\tframe.colNo\n\t\t].filter((i) => !!i).join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n\t\tcase \"ruby\": {\n\t\t\tconst file = frame.filename || frame.module || \"<unknown>\";\n\t\t\tconst func = frame.function ? ` \\`${frame.function}\\`` : \"\";\n\t\t\tconst line = frame.lineNo ? `:${frame.lineNo}:in` : \"\";\n\t\t\treturn ` from ${file}${line}${func}`;\n\t\t}\n\t\tcase \"php\": {\n\t\t\tconst file = frame.filename || \"<unknown>\";\n\t\t\tconst line = frame.lineNo ? `(${frame.lineNo})` : \"\";\n\t\t\tconst func = frame.function || \"<unknown>\";\n\t\t\tconst prefix = frameIndex !== void 0 ? `#${frameIndex} ` : \"\";\n\t\t\treturn `${prefix}${file}${line}: ${func}()`;\n\t\t}\n\t\tdefault: {\n\t\t\tconst func = frame.function || \"<unknown>\";\n\t\t\tconst location = frame.filename || frame.module || \"<unknown>\";\n\t\t\tconst line = frame.lineNo ? `:${frame.lineNo}` : \"\";\n\t\t\tconst col = frame.colNo != null ? `:${frame.colNo}` : \"\";\n\t\t\treturn ` at ${func} (${location}${line}${col})`;\n\t\t}\n\t}\n}\n/**\n* Formats a Sentry event into a structured markdown output.\n* Includes error messages, stack traces, request info, and contextual data.\n*\n* @param event - The Sentry event to format\n* @param options - Additional formatting context\n* @returns Formatted markdown string\n*/\nfunction formatEventOutput(event, options) {\n\tlet output = \"\";\n\tif (!event.entries || !Array.isArray(event.entries)) {\n\t\toutput += formatTags(event.tags);\n\t\toutput += formatContext(event.context);\n\t\toutput += formatContexts(event.contexts);\n\t\treturn output;\n\t}\n\tconst messageEntry = event.entries.find((e) => e.type === \"message\");\n\tconst exceptionEntry = event.entries.find((e) => e.type === \"exception\");\n\tconst threadsEntry = event.entries.find((e) => e.type === \"threads\");\n\tconst requestEntry = event.entries.find((e) => e.type === \"request\");\n\tconst spansEntry = event.entries.find((e) => e.type === \"spans\");\n\tconst cspEntry = event.entries.find((e) => e.type === \"csp\");\n\tif (messageEntry) output += formatMessageInterfaceOutput(event, messageEntry.data);\n\tif (exceptionEntry) output += formatExceptionInterfaceOutput(event, exceptionEntry.data);\n\telse if (threadsEntry) output += formatThreadsInterfaceOutput(event, threadsEntry.data);\n\tif (requestEntry) output += formatRequestInterfaceOutput(event, requestEntry.data);\n\tif (cspEntry) output += formatCspInterfaceOutput(event, cspEntry.data);\n\tif (event.type === \"transaction\") output += formatPerformanceIssueOutput(event, spansEntry?.data, options);\n\tif (event.type === \"generic\") output += formatGenericEventOutput(event);\n\toutput += formatTags(event.tags);\n\toutput += formatContext(event.context);\n\toutput += formatContexts(event.contexts);\n\treturn output;\n}\n/**\n* Extracts the context line matching the frame's line number for inline display.\n* This is used in the full stacktrace view to show the actual line of code\n* that caused the error inline with the stack frame.\n*\n* @param frame - The stack frame containing context lines\n* @returns The line of code at the frame's line number, or empty string if not available\n*/\nfunction renderInlineContext(frame) {\n\tif (!frame.context?.length || !frame.lineNo) return \"\";\n\tconst contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);\n\treturn contextLine ? `\\n${contextLine[1]}` : \"\";\n}\n/**\n* Renders an enhanced view of a stack frame with context lines and variables.\n* Used for the \"Most Relevant Frame\" section to provide detailed information\n* about the most relevant application frame where the error occurred.\n*\n* @param frame - The stack frame to render with enhanced information\n* @param event - The Sentry event containing platform information for language detection\n* @returns Formatted string with frame header, context lines, and variables table\n*/\nfunction renderEnhancedFrame(frame, event) {\n\tconst parts = [];\n\tparts.push(\"**Most Relevant Frame:**\");\n\tparts.push(\"─────────────────────\");\n\tparts.push(formatFrameHeader(frame, void 0, event.platform));\n\tif (frame.context?.length) {\n\t\tconst contextLines = renderContextLines(frame);\n\t\tif (contextLines) {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(contextLines);\n\t\t}\n\t}\n\tif (frame.vars && Object.keys(frame.vars).length > 0) {\n\t\tparts.push(\"\");\n\t\tparts.push(renderVariablesTable(frame.vars));\n\t}\n\treturn parts.join(\"\\n\");\n}\nfunction formatExceptionInterfaceOutput(event, data) {\n\tconst parts = [];\n\tconst exceptions = data.values || (data.value ? [data.value] : []);\n\tif (exceptions.length === 0) return \"\";\n\tconst isChained = exceptions.length > 1;\n\t[...exceptions].reverse().forEach((exception, index) => {\n\t\tif (!exception) return;\n\t\tif (isChained && index > 0) {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(getExceptionChainMessage(event.platform || null, index, exceptions.length));\n\t\t\tparts.push(\"\");\n\t\t}\n\t\tconst exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : \"\"}`;\n\t\tparts.push(index === 0 ? \"### Error\" : `### ${exceptionTitle}`);\n\t\tparts.push(\"\");\n\t\tif (index === 0) {\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(exceptionTitle);\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t}\n\t\tif (!exception.stacktrace || !exception.stacktrace.frames) {\n\t\t\tparts.push(\"**Stacktrace:**\");\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"No stacktrace available\");\n\t\t\tparts.push(\"```\");\n\t\t\treturn;\n\t\t}\n\t\tconst frames = exception.stacktrace.frames;\n\t\tif (index === 0) {\n\t\t\tconst firstInAppFrame = findFirstInAppFrame(frames);\n\t\t\tif (firstInAppFrame && (firstInAppFrame.context?.length || firstInAppFrame.vars)) {\n\t\t\t\tparts.push(renderEnhancedFrame(firstInAppFrame, event));\n\t\t\t\tparts.push(\"\");\n\t\t\t\tparts.push(\"**Full Stacktrace:**\");\n\t\t\t\tparts.push(\"────────────────\");\n\t\t\t} else parts.push(\"**Stacktrace:**\");\n\t\t} else parts.push(\"**Stacktrace:**\");\n\t\tparts.push(\"```\");\n\t\tparts.push(frames.map((frame) => {\n\t\t\tconst header = formatFrameHeader(frame, void 0, event.platform);\n\t\t\tconst context = renderInlineContext(frame);\n\t\t\treturn `${header}${context}`;\n\t\t}).join(\"\\n\"));\n\t\tparts.push(\"```\");\n\t});\n\tparts.push(\"\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\n/**\n* Get the appropriate exception chain message based on the platform\n*/\nfunction getExceptionChainMessage(platform, index, totalExceptions) {\n\tconst defaultMessage = \"**During handling of the above exception, another exception occurred:**\";\n\tif (!platform) return defaultMessage;\n\tswitch (platform.toLowerCase()) {\n\t\tcase \"python\": return \"**During handling of the above exception, another exception occurred:**\";\n\t\tcase \"java\": return \"**Caused by:**\";\n\t\tcase \"csharp\":\n\t\tcase \"dotnet\": return \"**---> Inner Exception:**\";\n\t\tcase \"ruby\": return \"**Caused by:**\";\n\t\tcase \"go\": return \"**Wrapped error:**\";\n\t\tcase \"rust\": return `**Caused by (${index}):**`;\n\t\tdefault: return defaultMessage;\n\t}\n}\nfunction formatCspInterfaceOutput(event, data) {\n\tif (!data) return \"\";\n\tconst parts = [];\n\tparts.push(\"### CSP Violation\");\n\tparts.push(\"\");\n\tif (data.blocked_uri) parts.push(`**Blocked URI**: ${data.blocked_uri}`);\n\tif (data.violated_directive) parts.push(`**Violated Directive**: ${data.violated_directive}`);\n\tif (data.effective_directive) parts.push(`**Effective Directive**: ${data.effective_directive}`);\n\tif (data.document_uri) parts.push(`**Document URI**: ${data.document_uri}`);\n\tif (data.source_file) {\n\t\tparts.push(`**Source File**: ${data.source_file}`);\n\t\tif (data.line_number) parts.push(`**Line Number**: ${data.line_number}`);\n\t}\n\tif (data.disposition) parts.push(`**Disposition**: ${data.disposition}`);\n\tif (data.original_policy) {\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Original Policy:**\");\n\t\tparts.push(\"```\");\n\t\tparts.push(data.original_policy);\n\t\tparts.push(\"```\");\n\t}\n\tparts.push(\"\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\nfunction formatRequestInterfaceOutput(event, data) {\n\tif (!data.method || !data.url) return \"\";\n\treturn `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\nfunction formatMessageInterfaceOutput(event, data) {\n\tif (!data.formatted && !data.message) return \"\";\n\tconst message = data.formatted || data.message || \"\";\n\treturn `### Error\\n\\n\\`\\`\\`\\n${message}\\n\\`\\`\\`\\n\\n`;\n}\nfunction formatThreadsInterfaceOutput(event, data) {\n\tif (!data.values || data.values.length === 0) return \"\";\n\tconst crashedThread = data.values.find((t) => t.crashed);\n\tif (!crashedThread?.stacktrace?.frames) return \"\";\n\tconst parts = [];\n\tif (crashedThread.name) {\n\t\tparts.push(`**Thread** (${crashedThread.name})`);\n\t\tparts.push(\"\");\n\t}\n\tconst frames = crashedThread.stacktrace.frames;\n\tconst firstInAppFrame = findFirstInAppFrame(frames);\n\tif (firstInAppFrame && (firstInAppFrame.context?.length || firstInAppFrame.vars)) {\n\t\tparts.push(renderEnhancedFrame(firstInAppFrame, event));\n\t\tparts.push(\"\");\n\t\tparts.push(\"**Full Stacktrace:**\");\n\t\tparts.push(\"────────────────\");\n\t} else parts.push(\"**Stacktrace:**\");\n\tparts.push(\"```\");\n\tparts.push(frames.map((frame) => {\n\t\tconst header = formatFrameHeader(frame, void 0, event.platform);\n\t\tconst context = renderInlineContext(frame);\n\t\treturn `${header}${context}`;\n\t}).join(\"\\n\"));\n\tparts.push(\"```\");\n\tparts.push(\"\");\n\treturn parts.join(\"\\n\");\n}\n/**\n* Renders surrounding source code context for a stack frame.\n* Shows a window of code lines around the error line with visual indicators.\n*\n* @param frame - The stack frame containing context lines\n* @param contextSize - Number of lines to show before and after the error line (default: 3)\n* @returns Formatted context lines with line numbers and arrow indicator for the error line\n*/\nfunction renderContextLines(frame, contextSize = 3) {\n\tif (!frame.context || frame.context.length === 0 || !frame.lineNo) return \"\";\n\tconst lines = [];\n\tconst errorLine = frame.lineNo;\n\tconst maxLineNoWidth = Math.max(...frame.context.map(([lineNo]) => lineNo.toString().length));\n\tfor (const [lineNo, code] of frame.context) {\n\t\tconst isErrorLine = lineNo === errorLine;\n\t\tconst lineNoStr = lineNo.toString().padStart(maxLineNoWidth, \" \");\n\t\tif (Math.abs(lineNo - errorLine) <= contextSize) if (isErrorLine) lines.push(` → ${lineNoStr} │ ${code}`);\n\t\telse lines.push(` ${lineNoStr} │ ${code}`);\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* Formats a variable value for display in the variables table.\n* Handles different types appropriately and safely, converting complex objects\n* to readable representations and handling edge cases like circular references.\n*\n* @param value - The variable value to format (can be any type)\n* @param maxLength - Maximum length for stringified objects/arrays (default: 80)\n* @returns Human-readable string representation of the value\n*/\nfunction formatVariableValue(value, maxLength = 80) {\n\ttry {\n\t\tif (typeof value === \"string\") return `\"${value}\"`;\n\t\tif (value === null) return \"null\";\n\t\tif (value === void 0) return \"undefined\";\n\t\tif (typeof value === \"object\") {\n\t\t\tconst stringified = JSON.stringify(value);\n\t\t\tif (stringified.length > maxLength) {\n\t\t\t\tconst truncateAt = maxLength - 6;\n\t\t\t\tlet truncated = stringified.substring(0, truncateAt);\n\t\t\t\tconst lastComma = truncated.lastIndexOf(\",\");\n\t\t\t\tif (lastComma > 0) truncated = truncated.substring(0, lastComma);\n\t\t\t\tif (Array.isArray(value)) return `${truncated}, ...]`;\n\t\t\t\treturn `${truncated}, ...}`;\n\t\t\t}\n\t\t\treturn stringified;\n\t\t}\n\t\treturn String(value);\n\t} catch {\n\t\treturn `<${typeof value}>`;\n\t}\n}\n/**\n* Renders a table of local variables in a tree-like format.\n* Uses box-drawing characters to create a visual hierarchy of variables\n* and their values at the point where the error occurred.\n*\n* @param vars - Object containing variable names as keys and their values\n* @returns Formatted variables table with tree-style prefix characters\n*/\nfunction renderVariablesTable(vars) {\n\tconst entries = Object.entries(vars);\n\tif (entries.length === 0) return \"\";\n\tconst lines = [\"Local Variables:\"];\n\tconst lastIndex = entries.length - 1;\n\tentries.forEach(([key, value], index) => {\n\t\tconst prefix = index === lastIndex ? \"└─\" : \"├─\";\n\t\tconst valueStr = formatVariableValue(value);\n\t\tlines.push(`${prefix} ${key}: ${valueStr}`);\n\t});\n\treturn lines.join(\"\\n\");\n}\n/**\n* Finds the first application frame (in_app) in a stack trace.\n* Searches from the bottom of the stack (oldest frame) to find the first\n* frame that belongs to the user's application code rather than libraries.\n*\n* @param frames - Array of stack frames, typically in reverse chronological order\n* @returns The first in-app frame found, or undefined if none exist\n*/\nfunction findFirstInAppFrame(frames) {\n\tfor (let i = frames.length - 1; i >= 0; i--) if (frames[i].inApp === true) return frames[i];\n\treturn void 0;\n}\n/**\n* Constants for performance issue formatting\n*/\nconst MAX_SPANS_IN_TREE = 10;\n/**\n* Safely parse a number from a string, returning a default if invalid\n*/\nfunction safeParseInt(value, defaultValue) {\n\tif (typeof value === \"number\") return value;\n\tif (typeof value === \"string\") {\n\t\tconst parsed = Number.parseInt(value, 10);\n\t\treturn Number.isNaN(parsed) ? defaultValue : parsed;\n\t}\n\treturn defaultValue;\n}\nfunction normalizeSpanId(value) {\n\tif (typeof value === \"string\" && value) return value;\n\treturn void 0;\n}\nfunction getSpanIdentifier(span) {\n\tif (span.span_id !== void 0) return normalizeSpanId(span.span_id);\n\tif (span.id !== void 0) return normalizeSpanId(span.id);\n\treturn void 0;\n}\nfunction getSpanDurationMs(span) {\n\tif (typeof span.timestamp === \"number\" && typeof span.start_timestamp === \"number\") {\n\t\tconst deltaSeconds = span.timestamp - span.start_timestamp;\n\t\tif (Number.isFinite(deltaSeconds) && deltaSeconds >= 0) return deltaSeconds * 1e3;\n\t}\n\tif (typeof span.duration === \"number\" && Number.isFinite(span.duration)) return span.duration >= 0 ? span.duration : 0;\n\treturn 0;\n}\nfunction normalizeIdArray(values) {\n\tif (!Array.isArray(values)) return [];\n\treturn values.map((value) => normalizeSpanId(value)).filter((value) => value !== void 0);\n}\nfunction isValidSpanArray(value) {\n\treturn Array.isArray(value);\n}\n/**\n* Get the repeating span descriptions from evidence data.\n* Prefers repeatingSpansCompact (more concise) over repeatingSpans (verbose).\n*/\nfunction getRepeatingSpanLines(evidenceData) {\n\tif (Array.isArray(evidenceData.repeatingSpansCompact) && evidenceData.repeatingSpansCompact.length > 0) return evidenceData.repeatingSpansCompact.map((s) => typeof s === \"string\" ? s.trim() : \"\").filter((s) => s.length > 0);\n\tif (Array.isArray(evidenceData.repeatingSpans) && evidenceData.repeatingSpans.length > 0) return evidenceData.repeatingSpans.map((s) => typeof s === \"string\" ? s.trim() : \"\").filter((s) => s.length > 0);\n\treturn [];\n}\nfunction isTraceSpan(node) {\n\tif (node === null || typeof node !== \"object\") return false;\n\tconst candidate = node;\n\treturn candidate.event_type === \"span\" && typeof candidate.event_id === \"string\";\n}\nfunction buildTraceSpanTree(trace, parentSpanIds, offenderSpanIds, maxSpans) {\n\tconst offenderSet = new Set(offenderSpanIds);\n\tconst spanMap = /* @__PURE__ */ new Map();\n\tfunction indexSpan(span) {\n\t\tconst spanId = normalizeSpanId(span.additional_attributes?.span_id) || span.event_id;\n\t\tif (spanId && spanId.length > 0) spanMap.set(spanId, span);\n\t\tfor (const child of span.children ?? []) if (isTraceSpan(child)) indexSpan(child);\n\t}\n\tfor (const node of trace) if (isTraceSpan(node)) indexSpan(node);\n\tconst roots = [];\n\tconst budget = {\n\t\tcount: 0,\n\t\tlimit: maxSpans\n\t};\n\tfor (const parentId of parentSpanIds) {\n\t\tconst span = spanMap.get(parentId);\n\t\tif (!span) continue;\n\t\tconst perfSpan = convertTraceSpanToPerformanceSpan(span, offenderSet, budget, 0);\n\t\tif (perfSpan) roots.push(perfSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\tif (roots.length === 0 && offenderSpanIds.length > 0) for (const offenderId of offenderSpanIds) {\n\t\tconst span = spanMap.get(offenderId);\n\t\tif (!span) continue;\n\t\tconst perfSpan = convertTraceSpanToPerformanceSpan(span, offenderSet, budget, 0);\n\t\tif (perfSpan) roots.push(perfSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\tif (roots.length === 0) return [];\n\treturn renderPerformanceSpanTree(roots);\n}\nfunction convertTraceSpanToPerformanceSpan(span, offenderSet, budget, level) {\n\tif (budget.count >= budget.limit) return null;\n\tbudget.count += 1;\n\tconst spanId = normalizeSpanId(span.additional_attributes?.span_id) || span.event_id;\n\tconst performanceSpan = {\n\t\tspan_id: spanId,\n\t\top: span.op || \"unknown\",\n\t\tdescription: formatTraceSpanDescription(span),\n\t\tduration: getTraceSpanDurationMs(span),\n\t\tis_n1_query: offenderSet.has(spanId),\n\t\tchildren: [],\n\t\tlevel\n\t};\n\tfor (const child of span.children ?? []) {\n\t\tif (!isTraceSpan(child)) continue;\n\t\tif (budget.count >= budget.limit) break;\n\t\tconst childSpan = convertTraceSpanToPerformanceSpan(child, offenderSet, budget, level + 1);\n\t\tif (childSpan) performanceSpan.children.push(childSpan);\n\t\tif (budget.count >= budget.limit) break;\n\t}\n\treturn performanceSpan;\n}\nfunction formatTraceSpanDescription(span) {\n\tif (span.name && span.name.trim().length > 0) return span.name.trim();\n\tif (span.description && span.description.trim().length > 0) return span.description.trim();\n\tif (span.op && span.op.trim().length > 0) return span.op.trim();\n\treturn \"unnamed\";\n}\nfunction getTraceSpanDurationMs(span) {\n\tif (typeof span.duration === \"number\" && span.duration >= 0) return span.duration;\n\tif (typeof span.end_timestamp === \"number\" && typeof span.start_timestamp === \"number\") {\n\t\tconst deltaSeconds = span.end_timestamp - span.start_timestamp;\n\t\tif (Number.isFinite(deltaSeconds) && deltaSeconds >= 0) return deltaSeconds * 1e3;\n\t}\n\treturn 0;\n}\nfunction buildOffenderSummaries(spans, offenderSpanIds) {\n\tif (offenderSpanIds.length === 0) return [];\n\tconst spanMap = /* @__PURE__ */ new Map();\n\tfor (const span of spans) {\n\t\tconst identifier = getSpanIdentifier(span);\n\t\tif (identifier) spanMap.set(identifier, span);\n\t}\n\tconst summaries = [];\n\tfor (const offenderId of offenderSpanIds) {\n\t\tconst span = spanMap.get(offenderId);\n\t\tif (span) {\n\t\t\tconst description = span.description || span.op || `Span ${offenderId}`;\n\t\t\tconst duration = getSpanDurationMs(span);\n\t\t\tconst durationLabel = duration > 0 ? ` (${Math.round(duration)}ms)` : \"\";\n\t\t\tsummaries.push(`${description}${durationLabel} [${offenderId}] [N+1]`);\n\t\t} else summaries.push(`Span ${offenderId} [N+1]`);\n\t}\n\treturn summaries;\n}\n/**\n* Renders a hierarchical tree of performance spans using box-drawing characters.\n* Highlights N+1 queries with a special indicator.\n*\n* @param spans - Array of selected performance spans\n* @returns Array of formatted strings representing the tree\n*/\nfunction renderPerformanceSpanTree(spans) {\n\tconst lines = [];\n\tfunction renderSpan(span, prefix = \"\", isLast = true) {\n\t\tconst connector = prefix === \"\" ? \"\" : isLast ? \"└─ \" : \"├─ \";\n\t\tconst displayName = span.description?.trim() || span.op || \"unnamed\";\n\t\tconst shortId = span.span_id ? span.span_id.substring(0, 8) : \"unknown\";\n\t\tconst durationDisplay = span.duration > 0 ? `${Math.round(span.duration)}ms` : \"unknown\";\n\t\tconst metadataParts = [shortId];\n\t\tif (span.op && span.op !== \"default\") metadataParts.push(span.op);\n\t\tmetadataParts.push(durationDisplay);\n\t\tconst line = `${prefix}${connector}${displayName} [${metadataParts.join(\" · \")}]${span.is_n1_query ? \" [N+1]\" : \"\"}`;\n\t\tlines.push(line);\n\t\tfor (let i = 0; i < span.children.length; i++) {\n\t\t\tconst child = span.children[i];\n\t\t\tconst isLastChild = i === span.children.length - 1;\n\t\t\tconst childPrefix = prefix + (isLast ? \" \" : \"│ \");\n\t\t\trenderSpan(child, childPrefix, isLastChild);\n\t\t}\n\t}\n\tfor (let i = 0; i < spans.length; i++) {\n\t\tconst span = spans[i];\n\t\tconst isLastRoot = i === spans.length - 1;\n\t\trenderSpan(span, \"\", isLastRoot);\n\t}\n\treturn lines;\n}\nfunction selectN1QuerySpans(spans, evidence, maxSpans = MAX_SPANS_IN_TREE) {\n\tconst selected = [];\n\tlet spanCount = 0;\n\tconst offenderSpanIds = normalizeIdArray(evidence.offenderSpanIds);\n\tconst parentSpanIds = normalizeIdArray(evidence.parentSpanIds);\n\tlet parentSpan = null;\n\tif (parentSpanIds.length > 0) {\n\t\tconst parent = spans.find((span) => {\n\t\t\tconst identifier = getSpanIdentifier(span);\n\t\t\treturn identifier ? parentSpanIds.includes(identifier) : false;\n\t\t});\n\t\tif (parent) {\n\t\t\tparentSpan = {\n\t\t\t\tspan_id: getSpanIdentifier(parent) ?? \"unknown\",\n\t\t\t\top: parent.op || \"unknown\",\n\t\t\t\tdescription: parent.description || evidence.parentSpan || \"Parent Operation\",\n\t\t\t\tduration: getSpanDurationMs(parent),\n\t\t\t\tis_n1_query: false,\n\t\t\t\tchildren: [],\n\t\t\t\tlevel: 0\n\t\t\t};\n\t\t\tselected.push(parentSpan);\n\t\t\tspanCount += 1;\n\t\t}\n\t}\n\tif (offenderSpanIds.length > 0) {\n\t\tconst offenderSet = new Set(offenderSpanIds);\n\t\tconst offenderSpans = spans.filter((span) => {\n\t\t\tconst identifier = getSpanIdentifier(span);\n\t\t\treturn identifier ? offenderSet.has(identifier) : false;\n\t\t}).slice(0, Math.max(0, maxSpans - spanCount));\n\t\tfor (const span of offenderSpans) {\n\t\t\tconst perfSpan = {\n\t\t\t\tspan_id: getSpanIdentifier(span) ?? \"unknown\",\n\t\t\t\top: span.op || \"db.query\",\n\t\t\t\tdescription: span.description || \"Database Query\",\n\t\t\t\tduration: getSpanDurationMs(span),\n\t\t\t\tis_n1_query: true,\n\t\t\t\tchildren: [],\n\t\t\t\tlevel: parentSpan ? 1 : 0\n\t\t\t};\n\t\t\tif (parentSpan) parentSpan.children.push(perfSpan);\n\t\t\telse selected.push(perfSpan);\n\t\t\tspanCount += 1;\n\t\t\tif (spanCount >= maxSpans) break;\n\t\t}\n\t}\n\treturn selected;\n}\n/**\n* Known Sentry performance issue types that we handle.\n*\n* NOTE: We intentionally only implement formatters for high-value performance issues\n* that provide complex insights. Not all issue types need custom formatting - many\n* can rely on the generic evidenceDisplay fields that Sentry provides.\n*\n* Currently fully implemented:\n* - N+1 query detection (DB and API)\n*\n* Partially implemented:\n* - Slow DB queries (shows parent span only)\n*\n* Not implemented (lower priority):\n* - Asset-related issues (render blocking, uncompressed, large payloads)\n* - File I/O issues\n* - Consecutive queries\n*/\nconst KNOWN_PERFORMANCE_ISSUE_TYPES = {\n\tN_PLUS_ONE_DB_QUERIES: \"performance_n_plus_one_db_queries\",\n\tN_PLUS_ONE_API_CALLS: \"performance_n_plus_one_api_calls\",\n\tSLOW_DB_QUERY: \"performance_slow_db_query\",\n\tRENDER_BLOCKING_ASSET: \"performance_render_blocking_asset\",\n\tCONSECUTIVE_DB_QUERIES: \"performance_consecutive_db_queries\",\n\tFILE_IO_MAIN_THREAD: \"performance_file_io_main_thread\",\n\tM_N_PLUS_ONE_DB_QUERIES: \"performance_m_n_plus_one_db_queries\",\n\tUNCOMPRESSED_ASSET: \"performance_uncompressed_asset\",\n\tLARGE_HTTP_PAYLOAD: \"performance_large_http_payload\"\n};\n/**\n* Map numeric occurrence types to issue types (from Sentry's codebase).\n*\n* Sentry uses numeric type IDs internally in the occurrence data structure,\n* but string issue types in the UI and other APIs. This mapping converts\n* between them.\n*\n* Source: sentry/static/app/types/group.tsx in Sentry's codebase\n* Range: 1xxx = transaction-based performance issues\n* 2xxx = profile-based performance issues\n*/\nconst OCCURRENCE_TYPE_TO_ISSUE_TYPE = {\n\t1001: KNOWN_PERFORMANCE_ISSUE_TYPES.SLOW_DB_QUERY,\n\t1004: KNOWN_PERFORMANCE_ISSUE_TYPES.RENDER_BLOCKING_ASSET,\n\t1006: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES,\n\t1906: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES,\n\t1007: KNOWN_PERFORMANCE_ISSUE_TYPES.CONSECUTIVE_DB_QUERIES,\n\t1008: KNOWN_PERFORMANCE_ISSUE_TYPES.FILE_IO_MAIN_THREAD,\n\t1009: \"performance_consecutive_http\",\n\t1010: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS,\n\t1910: KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS,\n\t1012: KNOWN_PERFORMANCE_ISSUE_TYPES.UNCOMPRESSED_ASSET,\n\t1013: \"performance_db_main_thread\",\n\t1015: KNOWN_PERFORMANCE_ISSUE_TYPES.LARGE_HTTP_PAYLOAD,\n\t1016: \"performance_http_overhead\"\n};\n/**\n* Formats N+1 query issue evidence data.\n*\n* N+1 queries are a common performance anti-pattern where code executes\n* 1 query to get a list of items, then N additional queries (one per item)\n* instead of using a single JOIN or batch query.\n*\n* Evidence fields we use:\n* - parentSpan: The operation that triggered the N+1 queries\n* - repeatingSpansCompact/repeatingSpans: The query pattern being repeated\n* - numberRepeatingSpans: How many times the query was executed\n* - offenderSpanIds: IDs of the actual span instances\n* - parentSpanIds: IDs of parent spans for tree visualization\n*/\nfunction formatN1QueryEvidence(evidenceData, spansData, performanceTrace) {\n\tconst parts = [];\n\tif (evidenceData.parentSpan) {\n\t\tparts.push(\"**Parent Operation:**\");\n\t\tparts.push(`${evidenceData.parentSpan}`);\n\t\tparts.push(\"\");\n\t}\n\tconst repeatingLines = getRepeatingSpanLines(evidenceData);\n\tif (repeatingLines.length > 0) {\n\t\tparts.push(\"### Repeated Database Queries\");\n\t\tparts.push(\"\");\n\t\tconst queryCount = evidenceData.numberRepeatingSpans ? safeParseInt(evidenceData.numberRepeatingSpans, 0) : evidenceData.numPatternRepetitions || evidenceData.offenderSpanIds?.length || 0;\n\t\tif (queryCount > 0) parts.push(`**Query executed ${queryCount} times:**`);\n\t\tif (repeatingLines.length === 1) {\n\t\t\tparts.push(\"```sql\");\n\t\t\tparts.push(repeatingLines[0]);\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t} else {\n\t\t\tparts.push(\"**Repeated operations:**\");\n\t\t\tfor (const line of repeatingLines) parts.push(`- ${line}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\tconst parentSpanIds = normalizeIdArray(evidenceData.parentSpanIds);\n\tconst offenderSpanIds = normalizeIdArray(evidenceData.offenderSpanIds);\n\tconst traceLines = performanceTrace ? buildTraceSpanTree(performanceTrace, parentSpanIds, offenderSpanIds, MAX_SPANS_IN_TREE) : [];\n\tif (traceLines.length > 0) {\n\t\tparts.push(`### Span Tree (Limited to ${MAX_SPANS_IN_TREE} spans)`);\n\t\tparts.push(\"\");\n\t\tparts.push(\"```\");\n\t\tparts.push(...traceLines);\n\t\tparts.push(\"```\");\n\t\tparts.push(\"\");\n\t} else {\n\t\tconst spanTree = isValidSpanArray(spansData) ? selectN1QuerySpans(spansData, evidenceData, MAX_SPANS_IN_TREE) : [];\n\t\tif (spanTree.length > 0) {\n\t\t\tparts.push(`### Span Tree (Limited to ${MAX_SPANS_IN_TREE} spans)`);\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(...renderPerformanceSpanTree(spanTree));\n\t\t\tparts.push(\"```\");\n\t\t\tparts.push(\"\");\n\t\t} else if (isValidSpanArray(spansData)) {\n\t\t\tconst offenderSummaries = buildOffenderSummaries(spansData, offenderSpanIds);\n\t\t\tif (offenderSummaries.length > 0) {\n\t\t\t\tparts.push(\"### Offending Spans\");\n\t\t\t\tparts.push(\"\");\n\t\t\t\tfor (const summary of offenderSummaries) parts.push(`- ${summary}`);\n\t\t\t}\n\t\t}\n\t}\n\treturn parts.join(\"\\n\");\n}\n/**\n* Formats slow DB query issue evidence data.\n*\n* Currently only partially implemented - shows parent span information.\n* Full implementation would show query duration, explain plan, etc.\n*\n* This is lower priority as the generic evidenceDisplay fields usually\n* provide sufficient information for slow query issues.\n*/\nfunction formatSlowDbQueryEvidence(evidenceData, spansData) {\n\tconst parts = [];\n\tif (evidenceData.parentSpan) {\n\t\tparts.push(\"**Parent Operation:**\");\n\t\tparts.push(`${evidenceData.parentSpan}`);\n\t\tparts.push(\"\");\n\t}\n\tconsole.warn(\"[formatSlowDbQueryEvidence] Evidence data rendering not yet fully implemented\");\n\treturn parts.join(\"\\n\");\n}\n/**\n* Formats performance issue details from transaction events based on the issue type.\n*\n* This is the main dispatcher for performance issue formatting. It:\n* 1. Detects the issue type from occurrence data (numeric or string)\n* 2. Calls the appropriate type-specific formatter if implemented\n* 3. Falls back to generic evidenceDisplay fields for unimplemented types\n* 4. Provides span analysis fallback for events without occurrence data\n*\n* The occurrence data structure comes from Sentry's performance issue detection\n* and contains evidence about what triggered the issue.\n*\n* @param event - The transaction event containing performance issue data\n* @param spansData - The spans data from the event entries\n* @returns Formatted markdown string with performance issue details\n*/\nfunction formatPerformanceIssueOutput(event, spansData, options) {\n\tconst parts = [];\n\tconst occurrence = event.occurrence;\n\tif (!occurrence) return \"\";\n\tlet issueType;\n\tif (typeof occurrence.type === \"number\") issueType = OCCURRENCE_TYPE_TO_ISSUE_TYPE[occurrence.type];\n\telse issueType = occurrence.issueType || occurrence.type;\n\tconst evidenceData = occurrence.evidenceData;\n\tif (evidenceData) switch (issueType) {\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_DB_QUERIES:\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.N_PLUS_ONE_API_CALLS:\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.M_N_PLUS_ONE_DB_QUERIES: {\n\t\t\tconst result = formatN1QueryEvidence(evidenceData, spansData, options?.performanceTrace);\n\t\t\tif (result) parts.push(result);\n\t\t\tbreak;\n\t\t}\n\t\tcase KNOWN_PERFORMANCE_ISSUE_TYPES.SLOW_DB_QUERY: {\n\t\t\tconst result = formatSlowDbQueryEvidence(evidenceData, spansData);\n\t\t\tif (result) parts.push(result);\n\t\t\tbreak;\n\t\t}\n\t\tdefault: if (issueType) console.warn(`[formatPerformanceIssueOutput] No custom formatter for issue type: ${issueType}`);\n\t}\n\tif (evidenceData?.transactionName) {\n\t\tparts.push(\"**Transaction:**\");\n\t\tparts.push(`${evidenceData.transactionName}`);\n\t\tparts.push(\"\");\n\t}\n\tif (occurrence.evidenceDisplay?.length > 0) {\n\t\tfor (const display of occurrence.evidenceDisplay) if (display.important) {\n\t\t\tparts.push(`**${display.name}:**`);\n\t\t\tparts.push(`${display.value}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\treturn parts.length > 0 ? `${parts.join(\"\\n\")}\\n` : \"\";\n}\n/**\n* Formats generic event output (performance regressions, metric-based issues).\n* Generic events don't have traditional error entries, but have occurrence data\n* with evidenceDisplay showing regression details, metric changes, etc.\n*/\nfunction formatGenericEventOutput(event) {\n\tconst parts = [];\n\tif (event.type !== \"generic\") return \"\";\n\tconst genericEvent = event;\n\tconst occurrence = genericEvent.occurrence;\n\tif (!occurrence) return \"\";\n\tconst evidenceData = occurrence.evidenceData;\n\tif (evidenceData) {\n\t\tparts.push(\"### Performance Regression Details\");\n\t\tparts.push(\"\");\n\t}\n\tif (occurrence.evidenceDisplay && occurrence.evidenceDisplay.length > 0) {\n\t\tfor (const display of occurrence.evidenceDisplay) if (display.important) {\n\t\t\tparts.push(`**${display.name}:**`);\n\t\t\tparts.push(`${display.value}`);\n\t\t\tparts.push(\"\");\n\t\t}\n\t}\n\treturn parts.length > 0 ? `${parts.join(\"\\n\")}\\n` : \"\";\n}\nfunction formatTags(tags) {\n\tif (!tags || tags.length === 0) return \"\";\n\treturn `### Tags\\n\\n${tags.map((tag) => `**${tag.key}**: ${tag.value}`).join(\"\\n\")}\\n\\n`;\n}\nfunction formatContext(context) {\n\tif (!context || Object.keys(context).length === 0) return \"\";\n\treturn `### Extra Data\\n\\nAdditional data attached to this event.\\n\\n${Object.entries(context).map(([key, value]) => {\n\t\treturn `**${key}**: ${JSON.stringify(value, void 0, 2)}`;\n\t}).join(\"\\n\")}\\n\\n`;\n}\nfunction formatContexts(contexts) {\n\tif (!contexts || Object.keys(contexts).length === 0) return \"\";\n\treturn `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(contexts).map(([name, data]) => `**${name}**\\n${Object.entries(data).filter(([key, _]) => key !== \"type\").map(([key, value]) => {\n\t\treturn `${key}: ${JSON.stringify(value, void 0, 2)}`;\n\t}).join(\"\\n\")}`).join(\"\\n\\n\")}\\n\\n`;\n}\n/**\n* Formats a brief Seer analysis summary for inclusion in issue details.\n* Shows current status and high-level insights, prompting to use analyze_issue_with_seer for full details.\n*\n* @param autofixState - The autofix state containing Seer analysis data\n* @param organizationSlug - The organization slug for the issue\n* @param issueId - The issue ID (shortId)\n* @returns Formatted markdown string with Seer summary, or empty string if no analysis exists\n*/\nfunction formatSeerSummary(autofixState, organizationSlug, issueId) {\n\tif (!autofixState || !autofixState.autofix) return \"\";\n\tconst { autofix } = autofixState;\n\tconst parts = [];\n\tparts.push(\"## Seer Analysis\");\n\tparts.push(\"\");\n\tconst statusDisplay = getStatusDisplayName(autofix.status);\n\tif (!isTerminalStatus(autofix.status)) {\n\t\tparts.push(`**Status:** ${statusDisplay}`);\n\t\tparts.push(\"\");\n\t}\n\tif (autofix.steps.length > 0) {\n\t\tconst completedSteps = autofix.steps.filter((step) => step.status === \"COMPLETED\");\n\t\tconst solutionStep = completedSteps.find((step) => step.type === \"solution\");\n\t\tif (solutionStep) {\n\t\t\tconst solutionDescription = solutionStep.description;\n\t\t\tif (solutionDescription && typeof solutionDescription === \"string\" && solutionDescription.trim()) {\n\t\t\t\tparts.push(\"**Summary:**\");\n\t\t\t\tparts.push(solutionDescription.trim());\n\t\t\t} else {\n\t\t\t\tconst solutionOutput = getOutputForAutofixStep(solutionStep);\n\t\t\t\tconst lines = solutionOutput.split(\"\\n\");\n\t\t\t\tconst firstParagraph = lines.find((line) => line.trim().length > 50 && !line.startsWith(\"#\") && !line.startsWith(\"*\"));\n\t\t\t\tif (firstParagraph) {\n\t\t\t\t\tparts.push(\"**Summary:**\");\n\t\t\t\t\tparts.push(firstParagraph.trim());\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (completedSteps.length > 0) {\n\t\t\tconst rootCauseStep = completedSteps.find((step) => step.type === \"root_cause_analysis\");\n\t\t\tif (rootCauseStep) {\n\t\t\t\tconst typedStep = rootCauseStep;\n\t\t\t\tif (typedStep.causes && typedStep.causes.length > 0 && typedStep.causes[0].description) {\n\t\t\t\t\tparts.push(\"**Root Cause Identified:**\");\n\t\t\t\t\tparts.push(typedStep.causes[0].description.trim());\n\t\t\t\t}\n\t\t\t} else parts.push(`**Progress:** ${completedSteps.length} of ${autofix.steps.length} steps completed`);\n\t\t}\n\t} else if (isTerminalStatus(autofix.status)) {\n\t\tif (autofix.status === \"FAILED\" || autofix.status === \"ERROR\") parts.push(\"**Status:** Analysis failed.\");\n\t\telse if (autofix.status === \"CANCELLED\") parts.push(\"**Status:** Analysis was cancelled.\");\n\t\telse if (autofix.status === \"NEED_MORE_INFORMATION\" || autofix.status === \"WAITING_FOR_USER_RESPONSE\") parts.push(\"**Status:** Analysis paused - additional information needed.\");\n\t} else parts.push(\"Analysis has started but no results yet.\");\n\tif (autofix.steps.length > 0 && isTerminalStatus(autofix.status)) {\n\t\tif (autofix.status === \"FAILED\" || autofix.status === \"ERROR\") {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(\"**Status:** Analysis failed.\");\n\t\t} else if (autofix.status === \"CANCELLED\") {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(\"**Status:** Analysis was cancelled.\");\n\t\t} else if (autofix.status === \"NEED_MORE_INFORMATION\" || autofix.status === \"WAITING_FOR_USER_RESPONSE\") {\n\t\t\tparts.push(\"\");\n\t\t\tparts.push(\"**Status:** Analysis paused - additional information needed.\");\n\t\t}\n\t}\n\tparts.push(\"\");\n\tparts.push(`**Note:** For detailed root cause analysis and solutions, call \\`analyze_issue_with_seer(organizationSlug='${organizationSlug}', issueId='${issueId}')\\``);\n\treturn `${parts.join(\"\\n\")}\\n\\n`;\n}\n/**\n* Formats a Sentry issue with its latest event into comprehensive markdown output.\n* Includes issue metadata, event details, and usage instructions.\n*\n* @param params - Object containing organization slug, issue, event, and API service\n* @returns Formatted markdown string with complete issue information\n*/\nfunction formatIssueOutput({ organizationSlug, issue, event, apiService, autofixState, performanceTrace }) {\n\tlet output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n\tconst isPerformanceIssue = issue.issueType?.startsWith(\"performance_\") || issue.issueCategory === \"performance\";\n\tif (isPerformanceIssue && issue.metadata) {\n\t\tconst issueTitle = issue.metadata.title || issue.title;\n\t\toutput += `**Description**: ${issueTitle}\\n`;\n\t\tif (issue.metadata.location) output += `**Location**: ${issue.metadata.location}\\n`;\n\t\tif (issue.metadata.value) output += `**Query Pattern**: \\`${issue.metadata.value}\\`\\n`;\n\t} else {\n\t\toutput += `**Description**: ${issue.title}\\n`;\n\t\toutput += `**Culprit**: ${issue.culprit}\\n`;\n\t}\n\toutput += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n\toutput += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n\toutput += `**Occurrences**: ${issue.count}\\n`;\n\toutput += `**Users Impacted**: ${issue.userCount}\\n`;\n\toutput += `**Status**: ${issue.status}\\n`;\n\tif (issue.substatus) output += `**Substatus**: ${issue.substatus}\\n`;\n\tif (issue.assignedTo) if (typeof issue.assignedTo === \"string\") output += `**Assigned To**: ${issue.assignedTo}\\n`;\n\telse {\n\t\tconst assignee = issue.assignedTo;\n\t\tconst type = assignee.type === \"team\" ? \"Team\" : \"User\";\n\t\toutput += `**Assigned To**: ${assignee.name} (${type})\\n`;\n\t}\n\tif (issue.issueType) output += `**Issue Type**: ${issue.issueType}\\n`;\n\tif (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\\n`;\n\toutput += `**Platform**: ${issue.platform}\\n`;\n\toutput += `**Project**: ${issue.project.name}\\n`;\n\toutput += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n\toutput += \"\\n\";\n\toutput += \"## Event Details\\n\\n\";\n\tconst eventType = event.type;\n\tconst isUnsupportedType = eventType !== \"error\" && eventType !== \"default\" && eventType !== \"transaction\" && eventType !== \"generic\" && eventType !== \"csp\";\n\tif (isUnsupportedType) {\n\t\tconst sentryEventId = logIssue(`Unsupported event type encountered: ${String(eventType)}`, { contexts: { event: {\n\t\t\tevent_id: event.id,\n\t\t\tevent_type: eventType,\n\t\t\tissue_id: issue.id,\n\t\t\tissue_short_id: issue.shortId,\n\t\t\torganization_slug: organizationSlug,\n\t\t\tproject_slug: issue.project.slug\n\t\t} } });\n\t\toutput += `⚠️ **Warning**: Unsupported event type \"${String(eventType)}\"\\n\\n`;\n\t\toutput += \"This event type is not yet fully supported by the MCP server. \";\n\t\toutput += \"Only basic issue information is shown above.\\n\\n\";\n\t\toutput += \"**Please report this**: Open a GitHub issue at https://github.com/getsentry/sentry-mcp/issues/new \";\n\t\toutput += `and include Event ID **${event.id}**`;\n\t\tif (sentryEventId) output += ` and Sentry Event ID **${sentryEventId}**`;\n\t\toutput += \" to help us add support for this event type.\\n\";\n\t\treturn output;\n\t}\n\toutput += `**Event ID**: ${event.id}\\n`;\n\toutput += `**Type**: ${event.type}\\n`;\n\tif (event.type === \"error\" || event.type === \"default\" || event.type === \"generic\" || event.type === \"csp\") {\n\t\tconst typedEvent = event;\n\t\tif (typedEvent.dateCreated) output += `**Occurred At**: ${new Date(typedEvent.dateCreated).toISOString()}\\n`;\n\t}\n\tif (event.message) output += `**Message**:\\n${event.message}\\n`;\n\toutput += \"\\n\";\n\toutput += formatEventOutput(event, { performanceTrace });\n\tif (autofixState) output += formatSeerSummary(autofixState, organizationSlug, issue.shortId);\n\toutput += \"# Using this information\\n\\n\";\n\toutput += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n\toutput += \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n\treturn output;\n}\n\n//#endregion\nexport { formatEventOutput, formatFrameHeader, formatIssueOutput };\n//# sourceMappingURL=formatting-CGRFosDy.js.map","import { ApiNotFoundError } from \"./errors-h_Ebmo8b.js\";\n\n//#region src/internal/tool-helpers/enhance-error.ts\n/**\n* Enhances a 404 error with parameter context to help users understand what went wrong.\n* This is optional - tools can use this when they want to provide extra context.\n*\n* @example\n* ```typescript\n* try {\n* const issue = await apiService.getIssue({ organizationSlug, issueId });\n* } catch (error) {\n* if (error instanceof ApiNotFoundError) {\n* throw enhanceNotFoundError(error, { organizationSlug, issueId });\n* }\n* throw error;\n* }\n* ```\n*/\nfunction enhanceNotFoundError(error, params) {\n\tconst paramsList = [];\n\tfor (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== \"\") paramsList.push(`${key}: '${value}'`);\n\tif (paramsList.length > 0) {\n\t\tconst enhancedMessage = `${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n\t\treturn new ApiNotFoundError(enhancedMessage, error.detail, error.responseBody);\n\t}\n\treturn error;\n}\n\n//#endregion\nexport { enhanceNotFoundError };\n//# sourceMappingURL=enhance-error-oY19n4bn.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { logError } from \"./logging-DipAE5VU.js\";\nimport { ApiNotFoundError } from \"./errors-h_Ebmo8b.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { parseIssueParams } from \"./issue-helpers-CW_FS0Jn.js\";\nimport { formatIssueOutput } from \"./formatting-CGRFosDy.js\";\nimport { enhanceNotFoundError } from \"./enhance-error-oY19n4bn.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/get-issue-details.ts\nvar get_issue_details_default = defineTool({\n\tname: \"get_issue_details\",\n\trequiredSkills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific Sentry issue by ID.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS:\",\n\t\t\"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')\",\n\t\t\"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'\",\n\t\t\"- Want details/stacktrace/analysis for a known issue\",\n\t\t\"- Provide a Sentry issue URL\",\n\t\t\"\",\n\t\t\"DO NOT USE for:\",\n\t\t\"- General searching or listing issues (use search_issues)\",\n\t\t\"- Root cause analysis (use analyze_issue_with_seer)\",\n\t\t\"\",\n\t\t\"TRIGGER PATTERNS:\",\n\t\t\"- 'Explain ISSUE-123' → use get_issue_details\",\n\t\t\"- 'Tell me about PROJECT-456' → use get_issue_details\",\n\t\t\"- 'What happened in [issue URL]' → use get_issue_details\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### With Sentry URL (recommended - simplest approach)\",\n\t\t\"```\",\n\t\t\"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### With issue ID and organization\",\n\t\t\"```\",\n\t\t\"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### With event ID and organization\",\n\t\t\"```\",\n\t\t\"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged\",\n\t\t\"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately\",\n\t\t\"- If using issueId (not URL), then organizationSlug is required\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\teventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n\t\tissueUrl: ParamIssueUrl.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tif (params.eventId) {\n\t\t\tconst orgSlug$1 = params.organizationSlug;\n\t\t\tconst eventId = params.eventId;\n\t\t\tif (!orgSlug$1) throw new UserInputError(\"`organizationSlug` is required when providing `eventId`\");\n\t\t\tsetTag(\"organization.slug\", orgSlug$1);\n\t\t\tconst [issue$1] = await apiService.listIssues({\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tquery: eventId\n\t\t\t});\n\t\t\tif (!issue$1) return `# Event Not Found\\n\\nNo issue found for Event ID: ${eventId}`;\n\t\t\tlet event$1;\n\t\t\ttry {\n\t\t\t\tevent$1 = await apiService.getEventForIssue({\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tissueId: issue$1.shortId,\n\t\t\t\t\teventId\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tissueId: issue$1.shortId,\n\t\t\t\t\teventId\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tlet autofixState$1;\n\t\t\ttry {\n\t\t\t\tautofixState$1 = await apiService.getAutofixState({\n\t\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\t\tissueId: issue$1.shortId\n\t\t\t\t});\n\t\t\t} catch (error) {}\n\t\t\tconst performanceTrace$1 = await maybeFetchPerformanceTrace({\n\t\t\t\tapiService,\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tevent: event$1\n\t\t\t});\n\t\t\treturn formatIssueOutput({\n\t\t\t\torganizationSlug: orgSlug$1,\n\t\t\t\tissue: issue$1,\n\t\t\t\tevent: event$1,\n\t\t\t\tapiService,\n\t\t\t\tautofixState: autofixState$1,\n\t\t\t\tperformanceTrace: performanceTrace$1\n\t\t\t});\n\t\t}\n\t\tif (!params.issueUrl && !params.issueId) throw new UserInputError(\"Either `issueId` or `issueUrl` must be provided\");\n\t\tif (!params.issueUrl && !params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when providing `issueId`\");\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tlet issue;\n\t\ttry {\n\t\t\tissue = await apiService.getIssue({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t\tconst event = await apiService.getLatestEventForIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: issue.shortId\n\t\t});\n\t\tlet autofixState;\n\t\ttry {\n\t\t\tautofixState = await apiService.getAutofixState({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: issue.shortId\n\t\t\t});\n\t\t} catch (error) {}\n\t\tconst performanceTrace = await maybeFetchPerformanceTrace({\n\t\t\tapiService,\n\t\t\torganizationSlug: orgSlug,\n\t\t\tevent\n\t\t});\n\t\treturn formatIssueOutput({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissue,\n\t\t\tevent,\n\t\t\tapiService,\n\t\t\tautofixState,\n\t\t\tperformanceTrace\n\t\t});\n\t}\n});\nasync function maybeFetchPerformanceTrace({ apiService, organizationSlug, event }) {\n\tconst context = shouldFetchTraceForEvent(event);\n\tif (!context) return void 0;\n\ttry {\n\t\treturn await apiService.getTrace({\n\t\t\torganizationSlug,\n\t\t\ttraceId: context.traceId,\n\t\t\tlimit: 1e4\n\t\t});\n\t} catch (error) {\n\t\tlogError(error);\n\t\treturn void 0;\n\t}\n}\nfunction isErrorEvent(event) {\n\treturn event.type === \"error\" || event.type === \"default\";\n}\nfunction shouldFetchTraceForEvent(event) {\n\tif (isErrorEvent(event)) return null;\n\tconst traceId = event.contexts?.trace?.trace_id;\n\tif (typeof traceId !== \"string\" || traceId.length === 0) return null;\n\treturn { traceId };\n}\n\n//#endregion\nexport { get_issue_details_default };\n//# sourceMappingURL=get-issue-details-Dkx3WdXu.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl, ParamTraceId } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/get-trace-details.ts\nconst MAX_DEPTH = 2;\nconst MINIMUM_DURATION_THRESHOLD_MS = 10;\nconst MIN_MEANINGFUL_CHILD_DURATION = 5;\nconst MIN_AVG_DURATION_MS = 5;\nvar get_trace_details_default = defineTool({\n\tname: \"get_trace_details\",\n\trequiredSkills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Get detailed information about a specific Sentry trace by ID.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS:\",\n\t\t\"- Provide a specific trace ID (e.g., 'a4d1aae7216b47ff8117cf4e09ce9d0a')\",\n\t\t\"- Ask to 'show me trace [TRACE-ID]', 'explain trace [TRACE-ID]'\",\n\t\t\"- Want high-level overview and link to view trace details in Sentry\",\n\t\t\"- Need trace statistics and span breakdown\",\n\t\t\"\",\n\t\t\"DO NOT USE for:\",\n\t\t\"- General searching for traces (use search_events with trace queries)\",\n\t\t\"- Individual span details (this shows trace overview)\",\n\t\t\"\",\n\t\t\"TRIGGER PATTERNS:\",\n\t\t\"- 'Show me trace abc123' → use get_trace_details\",\n\t\t\"- 'Explain trace a4d1aae7216b47ff8117cf4e09ce9d0a' → use get_trace_details\",\n\t\t\"- 'What is trace [trace-id]' → use get_trace_details\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get trace overview\",\n\t\t\"```\",\n\t\t\"get_trace_details(organizationSlug='my-organization', traceId='a4d1aae7216b47ff8117cf4e09ce9d0a')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Trace IDs are 32-character hexadecimal strings\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\ttraceId: ParamTraceId\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tif (!/^[0-9a-fA-F]{32}$/.test(params.traceId)) throw new UserInputError(\"Trace ID must be a 32-character hexadecimal string\");\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tsetTag(\"trace.id\", params.traceId);\n\t\tconst traceMeta = await apiService.getTraceMeta({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\tstatsPeriod: \"14d\"\n\t\t});\n\t\tconst trace = await apiService.getTrace({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\tlimit: 10,\n\t\t\tstatsPeriod: \"14d\"\n\t\t});\n\t\treturn formatTraceOutput({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\ttraceId: params.traceId,\n\t\t\ttraceMeta,\n\t\t\ttrace,\n\t\t\tapiService\n\t\t});\n\t}\n});\n/**\n* Selects a subset of \"interesting\" spans from a trace for display in the overview.\n*\n* Creates a fake root span representing the entire trace, with selected interesting\n* spans as children. This provides a unified tree view of the trace.\n*\n* The goal is to provide a meaningful sample of the trace that highlights the most\n* important operations while staying within display limits. Selection prioritizes:\n*\n* 1. **Transactions** - Top-level operations that represent complete user requests\n* 2. **Error spans** - Any spans that contain errors (critical for debugging)\n* 3. **Long-running spans** - Operations >= 10ms duration (performance bottlenecks)\n* 4. **Hierarchical context** - Maintains parent-child relationships for understanding\n*\n* Span inclusion rules:\n* - All transactions are included (they're typically root-level operations)\n* - Spans with errors are always included (debugging importance)\n* - Spans with duration >= 10ms are included (performance relevance)\n* - Children are recursively added up to 2 levels deep:\n* - Transactions can have up to 2 children each\n* - Regular spans can have up to 1 child each\n* - Total output is capped at maxSpans to prevent overwhelming display\n*\n* @param spans - Complete array of trace spans with nested children\n* @param traceId - Trace ID to display in the fake root span\n* @param maxSpans - Maximum number of spans to include in output (default: 20)\n* @returns Single-element array containing fake root span with selected spans as children\n*/\nfunction selectInterestingSpans(spans, traceId, maxSpans = 20) {\n\tconst selected = [];\n\tlet spanCount = 0;\n\tconst actualSpans = spans.filter((item) => item && typeof item === \"object\" && \"children\" in item && Array.isArray(item.children) && \"duration\" in item);\n\tfunction addSpan(span, level) {\n\t\tif (spanCount >= maxSpans || level > MAX_DEPTH) return false;\n\t\tconst duration = span.duration || 0;\n\t\tconst isTransaction = span.is_transaction;\n\t\tconst hasErrors = span.errors?.length > 0;\n\t\tconst shouldInclude = isTransaction || hasErrors || level === 0 || duration >= MINIMUM_DURATION_THRESHOLD_MS;\n\t\tif (!shouldInclude) return false;\n\t\tconst selectedSpan = {\n\t\t\tevent_id: span.event_id,\n\t\t\top: span.op || \"unknown\",\n\t\t\tname: span.name || null,\n\t\t\tdescription: span.description || span.transaction || \"unnamed\",\n\t\t\tduration,\n\t\t\tis_transaction: isTransaction,\n\t\t\tchildren: [],\n\t\t\tlevel\n\t\t};\n\t\tspanCount++;\n\t\tif (level < MAX_DEPTH && span.children?.length > 0) {\n\t\t\tconst sortedChildren = span.children.filter((child) => child.duration > MIN_MEANINGFUL_CHILD_DURATION).sort((a, b) => (b.duration || 0) - (a.duration || 0));\n\t\t\tconst maxChildren = isTransaction ? 2 : 1;\n\t\t\tlet addedChildren = 0;\n\t\t\tfor (const child of sortedChildren) {\n\t\t\t\tif (addedChildren >= maxChildren || spanCount >= maxSpans) break;\n\t\t\t\tif (addSpan(child, level + 1)) {\n\t\t\t\t\tconst childSpan = selected[selected.length - 1];\n\t\t\t\t\tselectedSpan.children.push(childSpan);\n\t\t\t\t\taddedChildren++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tselected.push(selectedSpan);\n\t\treturn true;\n\t}\n\tconst sortedRoots = actualSpans.sort((a, b) => (b.duration || 0) - (a.duration || 0)).slice(0, 5);\n\tfor (const root of sortedRoots) {\n\t\tif (spanCount >= maxSpans) break;\n\t\taddSpan(root, 0);\n\t}\n\tconst rootSpans = selected.filter((span) => span.level === 0);\n\tconst fakeRoot = {\n\t\tevent_id: traceId,\n\t\top: \"trace\",\n\t\tname: null,\n\t\tdescription: `Trace ${traceId.substring(0, 8)}`,\n\t\tduration: 0,\n\t\tis_transaction: false,\n\t\tchildren: rootSpans,\n\t\tlevel: -1\n\t};\n\treturn [fakeRoot];\n}\n/**\n* Formats a span display name for the tree view.\n*\n* Uses span.name if available (OTEL-native), otherwise falls back to span.description.\n*\n* @param span - The span to format\n* @returns A formatted display name for the span\n*/\nfunction formatSpanDisplayName(span) {\n\tif (span.op === \"trace\") return \"trace\";\n\treturn span.name?.trim() || span.description || \"unnamed\";\n}\n/**\n* Renders a hierarchical tree structure of spans using Unicode box-drawing characters.\n*\n* Creates a visual tree representation showing parent-child relationships between spans,\n* with proper indentation and connecting lines. Each span shows its operation, short ID,\n* description, duration, and type (transaction vs span).\n*\n* Tree format:\n* - Root spans have no prefix\n* - Child spans use ├─ for intermediate children, └─ for last child\n* - Continuation lines use │ for vertical connections\n* - Proper spacing maintains visual alignment\n*\n* @param spans - Array of selected spans with their nested children structure\n* @returns Array of formatted markdown strings representing the tree structure\n*/\nfunction renderSpanTree(spans) {\n\tconst lines = [];\n\tfunction renderSpan(span, prefix = \"\", isLast = true) {\n\t\tconst shortId = span.event_id.substring(0, 8);\n\t\tconst connector = prefix === \"\" ? \"\" : isLast ? \"└─ \" : \"├─ \";\n\t\tconst displayName = formatSpanDisplayName(span);\n\t\tif (span.op === \"trace\") lines.push(`${prefix}${connector}${displayName} [${shortId}]`);\n\t\telse {\n\t\t\tconst duration = span.duration ? `${Math.round(span.duration)}ms` : \"unknown\";\n\t\t\tconst opDisplay = span.op === \"default\" ? \"\" : ` · ${span.op}`;\n\t\t\tlines.push(`${prefix}${connector}${displayName} [${shortId}${opDisplay} · ${duration}]`);\n\t\t}\n\t\tfor (let i = 0; i < span.children.length; i++) {\n\t\t\tconst child = span.children[i];\n\t\t\tconst isLastChild = i === span.children.length - 1;\n\t\t\tconst childPrefix = prefix + (isLast ? \" \" : \"│ \");\n\t\t\trenderSpan(child, childPrefix, isLastChild);\n\t\t}\n\t}\n\tfor (let i = 0; i < spans.length; i++) {\n\t\tconst span = spans[i];\n\t\tconst isLastRoot = i === spans.length - 1;\n\t\trenderSpan(span, \"\", isLastRoot);\n\t}\n\treturn lines;\n}\nfunction calculateOperationStats(spans) {\n\tconst allSpans = getAllSpansFlattened(spans);\n\tconst operationSpans = {};\n\tfor (const span of allSpans) if (!span.children || span.children.length === 0) {\n\t\tconst op = span.op || (span.name ? span.name.split(\" \")[0] : \"unknown\");\n\t\tif (!operationSpans[op]) operationSpans[op] = [];\n\t\toperationSpans[op].push(span);\n\t}\n\tconst stats = {};\n\tfor (const [op, opSpans] of Object.entries(operationSpans)) {\n\t\tconst durations = opSpans.map((span) => span.duration || 0).filter((duration) => duration > 0).sort((a, b) => a - b);\n\t\tconst count = opSpans.length;\n\t\tconst avgDuration = durations.length > 0 ? durations.reduce((sum, duration) => sum + duration, 0) / durations.length : 0;\n\t\tconst p95Index = Math.floor(durations.length * .95);\n\t\tconst p95Duration = durations.length > 0 ? durations[p95Index] || 0 : 0;\n\t\tstats[op] = {\n\t\t\tcount,\n\t\t\tavgDuration,\n\t\t\tp95Duration\n\t\t};\n\t}\n\treturn stats;\n}\nfunction getAllSpansFlattened(spans) {\n\tconst result = [];\n\tconst actualSpans = spans.filter((item) => item && typeof item === \"object\" && \"children\" in item && Array.isArray(item.children) && \"duration\" in item);\n\tfunction collectSpans(spanList) {\n\t\tfor (const span of spanList) {\n\t\t\tresult.push(span);\n\t\t\tif (span.children && span.children.length > 0) collectSpans(span.children);\n\t\t}\n\t}\n\tcollectSpans(actualSpans);\n\treturn result;\n}\nfunction formatTraceOutput({ organizationSlug, traceId, traceMeta, trace, apiService }) {\n\tconst sections = [];\n\tsections.push(`# Trace \\`${traceId}\\` in **${organizationSlug}**`);\n\tsections.push(\"\");\n\tsections.push(\"## Summary\");\n\tsections.push(\"\");\n\tsections.push(`**Total Spans**: ${traceMeta.span_count}`);\n\tsections.push(`**Errors**: ${traceMeta.errors}`);\n\tsections.push(`**Performance Issues**: ${traceMeta.performance_issues}`);\n\tsections.push(`**Logs**: ${traceMeta.logs}`);\n\tif (trace.length > 0) {\n\t\tconst operationStats = calculateOperationStats(trace);\n\t\tconst sortedOps = Object.entries(operationStats).filter(([, stats]) => stats.avgDuration >= MIN_AVG_DURATION_MS).sort(([, a], [, b]) => b.count - a.count).slice(0, 10);\n\t\tif (sortedOps.length > 0) {\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(\"## Operation Breakdown\");\n\t\t\tsections.push(\"\");\n\t\t\tfor (const [op, stats] of sortedOps) {\n\t\t\t\tconst avgDuration = Math.round(stats.avgDuration);\n\t\t\t\tconst p95Duration = Math.round(stats.p95Duration);\n\t\t\t\tsections.push(`- **${op}**: ${stats.count} spans (avg: ${avgDuration}ms, p95: ${p95Duration}ms)`);\n\t\t\t}\n\t\t\tsections.push(\"\");\n\t\t}\n\t}\n\tif (trace.length > 0) {\n\t\tconst selectedSpans = selectInterestingSpans(trace, traceId);\n\t\tif (selectedSpans.length > 0) {\n\t\t\tsections.push(\"## Overview\");\n\t\t\tsections.push(\"\");\n\t\t\tconst treeLines = renderSpanTree(selectedSpans);\n\t\t\tsections.push(...treeLines);\n\t\t\tsections.push(\"\");\n\t\t\tsections.push(\"*Note: This shows a subset of spans. View the full trace for complete details.*\");\n\t\t\tsections.push(\"\");\n\t\t}\n\t}\n\tconst traceUrl = apiService.getTraceUrl(organizationSlug, traceId);\n\tsections.push(\"## View Full Trace\");\n\tsections.push(\"\");\n\tsections.push(`**Sentry URL**: ${traceUrl}`);\n\tsections.push(\"\");\n\tsections.push(\"## Find Related Events\");\n\tsections.push(\"\");\n\tsections.push(`Use this search query to find all events in this trace:`);\n\tsections.push(\"```\");\n\tsections.push(`trace:${traceId}`);\n\tsections.push(\"```\");\n\tsections.push(\"\");\n\tsections.push(\"You can use this query with the `search_events` tool to get detailed event data from this trace.\");\n\treturn sections.join(\"\\n\");\n}\n\n//#endregion\nexport { get_trace_details_default };\n//# sourceMappingURL=get-trace-details-f5XoKmIu.js.map","import { ParamAttachmentId, ParamEventId, ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/get-event-attachment.ts\nvar get_event_attachment_default = defineTool({\n\tname: \"get_event_attachment\",\n\trequiredSkills: [\"inspect\"],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Download attachments from a Sentry event.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Download files attached to a specific event\",\n\t\t\"- Access screenshots, log files, or other attachments uploaded with an error report\",\n\t\t\"- Retrieve attachment metadata and download URLs\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Download a specific attachment by ID\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### List all attachments for an event\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n\t\t\"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n\t\t\"- The `projectSlug` is required to identify which project the event belongs to\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tprojectSlug: ParamProjectSlug,\n\t\teventId: ParamEventId,\n\t\tattachmentId: ParamAttachmentId.nullable().default(null),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tif (params.attachmentId) {\n\t\t\tconst attachment = await apiService.getEventAttachment({\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\teventId: params.eventId,\n\t\t\t\tattachmentId: params.attachmentId\n\t\t\t});\n\t\t\tconst contentParts = [];\n\t\t\tconst isBinary = !attachment.attachment.mimetype?.startsWith(\"text/\");\n\t\t\tif (isBinary) {\n\t\t\t\tconst isImage = attachment.attachment.mimetype?.startsWith(\"image/\");\n\t\t\t\tconst uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());\n\t\t\t\tlet binary = \"\";\n\t\t\t\tfor (let i = 0; i < uint8Array.byteLength; i++) binary += String.fromCharCode(uint8Array[i]);\n\t\t\t\tif (isImage) {\n\t\t\t\t\tconst image = {\n\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\tmimeType: attachment.attachment.mimetype,\n\t\t\t\t\t\tdata: btoa(binary)\n\t\t\t\t\t};\n\t\t\t\t\tcontentParts.push(image);\n\t\t\t\t} else {\n\t\t\t\t\tconst resource = {\n\t\t\t\t\t\ttype: \"resource\",\n\t\t\t\t\t\tresource: {\n\t\t\t\t\t\t\turi: `file://${attachment.filename}`,\n\t\t\t\t\t\t\tmimeType: attachment.attachment.mimetype,\n\t\t\t\t\t\t\tblob: btoa(binary)\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tcontentParts.push(resource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet output$1 = `# Event Attachment Download\\n\\n`;\n\t\t\toutput$1 += `**Event ID:** ${params.eventId}\\n`;\n\t\t\toutput$1 += `**Attachment ID:** ${params.attachmentId}\\n`;\n\t\t\toutput$1 += `**Filename:** ${attachment.filename}\\n`;\n\t\t\toutput$1 += `**Type:** ${attachment.attachment.type}\\n`;\n\t\t\toutput$1 += `**Size:** ${attachment.attachment.size} bytes\\n`;\n\t\t\toutput$1 += `**MIME Type:** ${attachment.attachment.mimetype}\\n`;\n\t\t\toutput$1 += `**Created:** ${attachment.attachment.dateCreated}\\n`;\n\t\t\toutput$1 += `**SHA1:** ${attachment.attachment.sha1}\\n\\n`;\n\t\t\toutput$1 += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\t\t\tif (isBinary) {\n\t\t\t\toutput$1 += `## Binary Content\\n\\n`;\n\t\t\t\toutput$1 += `The attachment is included as a resource and accessible through your client.\\n`;\n\t\t\t} else {\n\t\t\t\tconst textContent = await attachment.blob.text();\n\t\t\t\toutput$1 += `## File Content\\n\\n`;\n\t\t\t\toutput$1 += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n\t\t\t}\n\t\t\tconst text = {\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: output$1\n\t\t\t};\n\t\t\tcontentParts.push(text);\n\t\t\treturn contentParts;\n\t\t}\n\t\tconst attachments = await apiService.listEventAttachments({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\teventId: params.eventId\n\t\t});\n\t\tlet output = `# Event Attachments\\n\\n`;\n\t\toutput += `**Event ID:** ${params.eventId}\\n`;\n\t\toutput += `**Project:** ${params.projectSlug}\\n\\n`;\n\t\tif (attachments.length === 0) {\n\t\t\toutput += \"No attachments found for this event.\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += `Found ${attachments.length} attachment(s):\\n\\n`;\n\t\tattachments.forEach((attachment, index) => {\n\t\t\toutput += `## Attachment ${index + 1}\\n\\n`;\n\t\t\toutput += `**ID:** ${attachment.id}\\n`;\n\t\t\toutput += `**Name:** ${attachment.name}\\n`;\n\t\t\toutput += `**Type:** ${attachment.type}\\n`;\n\t\t\toutput += `**Size:** ${attachment.size} bytes\\n`;\n\t\t\toutput += `**MIME Type:** ${attachment.mimetype}\\n`;\n\t\t\toutput += `**Created:** ${attachment.dateCreated}\\n`;\n\t\t\toutput += `**SHA1:** ${attachment.sha1}\\n\\n`;\n\t\t\toutput += `To download this attachment, use the \"get_event_attachment\" tool with the attachmentId provided:\\n`;\n\t\t\toutput += `\\`get_event_attachment(organizationSlug=\"${params.organizationSlug}\", projectSlug=\"${params.projectSlug}\", eventId=\"${params.eventId}\", attachmentId=\"${attachment.id}\")\\`\\n\\n`;\n\t\t});\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { get_event_attachment_default };\n//# sourceMappingURL=get-event-attachment-B5GR2cWj.js.map","//#region src/internal/tool-helpers/formatting.ts\n/**\n* Helper function to format assignedTo field for display\n*/\nfunction formatAssignedTo(assignedTo) {\n\tif (!assignedTo) return \"Unassigned\";\n\tif (typeof assignedTo === \"string\") return assignedTo;\n\tif (typeof assignedTo === \"object\" && assignedTo.name) return assignedTo.name;\n\treturn \"Unknown\";\n}\n\n//#endregion\nexport { formatAssignedTo };\n//# sourceMappingURL=formatting-CIwRyNGU.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamAssignedTo, ParamIssueShortId, ParamIssueStatus, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { parseIssueParams } from \"./issue-helpers-CW_FS0Jn.js\";\nimport { formatAssignedTo } from \"./formatting-CIwRyNGU.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/update-issue.ts\nvar update_issue_default = defineTool({\n\tname: \"update_issue\",\n\trequiredSkills: [\"triage\"],\n\trequiredScopes: [\"event:write\"],\n\tdescription: [\n\t\t\"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Resolve an issue that has been fixed\",\n\t\t\"- Assign an issue to a team member or team for investigation\",\n\t\t\"- Mark an issue as ignored to reduce noise\",\n\t\t\"- Reopen a resolved issue by setting status to 'unresolved'\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Resolve an issue\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Assign an issue to a user (use whoami to get your user ID)\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='user:123456')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Assign an issue to a team\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='team:789')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Mark an issue as ignored\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n\t\t\"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n\t\t\"- assignedTo format: Use 'user:ID' for users (e.g., 'user:123456') or 'team:ID' for teams (e.g., 'team:789')\",\n\t\t\"- To find your user ID, first use the whoami tool which returns your numeric user ID\",\n\t\t\"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tstatus: ParamIssueStatus.optional(),\n\t\tassignedTo: ParamAssignedTo.optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tif (!params.issueUrl && !params.issueId) throw new UserInputError(\"Either `issueId` or `issueUrl` must be provided\");\n\t\tif (!params.issueUrl && !params.organizationSlug) throw new UserInputError(\"`organizationSlug` is required when providing `issueId`\");\n\t\tif (!params.status && !params.assignedTo) throw new UserInputError(\"At least one of `status` or `assignedTo` must be provided to update the issue\");\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tconst currentIssue = await apiService.getIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId\n\t\t});\n\t\tconst updatedIssue = await apiService.updateIssue({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId,\n\t\t\tstatus: params.status,\n\t\t\tassignedTo: params.assignedTo\n\t\t});\n\t\tlet output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n\t\toutput += `**Issue**: ${updatedIssue.title}\\n`;\n\t\toutput += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\t\toutput += \"## Changes Made\\n\\n\";\n\t\tif (params.status && currentIssue.status !== params.status) output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n\t\tif (params.assignedTo) {\n\t\t\tconst oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n\t\t\tconst newAssignee = params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n\t\t\toutput += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n\t\t}\n\t\toutput += \"\\n## Current Status\\n\\n\";\n\t\toutput += `**Status**: ${updatedIssue.status}\\n`;\n\t\tconst currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n\t\toutput += `**Assigned To**: ${currentAssignee}\\n`;\n\t\toutput += \"\\n# Using this information\\n\\n\";\n\t\toutput += `- The issue has been successfully updated in Sentry\\n`;\n\t\toutput += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\t\tif (params.status === \"resolved\") output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n\t\telse if (params.status === \"ignored\") output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { update_issue_default };\n//# sourceMappingURL=update-issue-BKnQHYYL.js.map","// src/errors/ai-sdk-error.ts\nvar marker = \"vercel.ai.error\";\nvar symbol = Symbol.for(marker);\nvar _a;\nvar _AISDKError = class _AISDKError extends Error {\n /**\n * Creates an AI SDK Error.\n *\n * @param {Object} params - The parameters for creating the error.\n * @param {string} params.name - The name of the error.\n * @param {string} params.message - The error message.\n * @param {unknown} [params.cause] - The underlying cause of the error.\n */\n constructor({\n name: name14,\n message,\n cause\n }) {\n super(message);\n this[_a] = true;\n this.name = name14;\n this.cause = cause;\n }\n /**\n * Checks if the given error is an AI SDK Error.\n * @param {unknown} error - The error to check.\n * @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n */\n static isInstance(error) {\n return _AISDKError.hasMarker(error, marker);\n }\n static hasMarker(error, marker15) {\n const markerSymbol = Symbol.for(marker15);\n return error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n }\n};\n_a = symbol;\nvar AISDKError = _AISDKError;\n\n// src/errors/api-call-error.ts\nvar name = \"AI_APICallError\";\nvar marker2 = `vercel.ai.error.${name}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2;\nvar APICallError = class extends AISDKError {\n constructor({\n message,\n url,\n requestBodyValues,\n statusCode,\n responseHeaders,\n responseBody,\n cause,\n isRetryable = statusCode != null && (statusCode === 408 || // request timeout\n statusCode === 409 || // conflict\n statusCode === 429 || // too many requests\n statusCode >= 500),\n // server error\n data\n }) {\n super({ name, message, cause });\n this[_a2] = true;\n this.url = url;\n this.requestBodyValues = requestBodyValues;\n this.statusCode = statusCode;\n this.responseHeaders = responseHeaders;\n this.responseBody = responseBody;\n this.isRetryable = isRetryable;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker2);\n }\n};\n_a2 = symbol2;\n\n// src/errors/empty-response-body-error.ts\nvar name2 = \"AI_EmptyResponseBodyError\";\nvar marker3 = `vercel.ai.error.${name2}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3;\nvar EmptyResponseBodyError = class extends AISDKError {\n // used in isInstance\n constructor({ message = \"Empty response body\" } = {}) {\n super({ name: name2, message });\n this[_a3] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker3);\n }\n};\n_a3 = symbol3;\n\n// src/errors/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/errors/invalid-argument-error.ts\nvar name3 = \"AI_InvalidArgumentError\";\nvar marker4 = `vercel.ai.error.${name3}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4;\nvar InvalidArgumentError = class extends AISDKError {\n constructor({\n message,\n cause,\n argument\n }) {\n super({ name: name3, message, cause });\n this[_a4] = true;\n this.argument = argument;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker4);\n }\n};\n_a4 = symbol4;\n\n// src/errors/invalid-prompt-error.ts\nvar name4 = \"AI_InvalidPromptError\";\nvar marker5 = `vercel.ai.error.${name4}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5;\nvar InvalidPromptError = class extends AISDKError {\n constructor({\n prompt,\n message,\n cause\n }) {\n super({ name: name4, message: `Invalid prompt: ${message}`, cause });\n this[_a5] = true;\n this.prompt = prompt;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker5);\n }\n};\n_a5 = symbol5;\n\n// src/errors/invalid-response-data-error.ts\nvar name5 = \"AI_InvalidResponseDataError\";\nvar marker6 = `vercel.ai.error.${name5}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6;\nvar InvalidResponseDataError = class extends AISDKError {\n constructor({\n data,\n message = `Invalid response data: ${JSON.stringify(data)}.`\n }) {\n super({ name: name5, message });\n this[_a6] = true;\n this.data = data;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker6);\n }\n};\n_a6 = symbol6;\n\n// src/errors/json-parse-error.ts\nvar name6 = \"AI_JSONParseError\";\nvar marker7 = `vercel.ai.error.${name6}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7;\nvar JSONParseError = class extends AISDKError {\n constructor({ text, cause }) {\n super({\n name: name6,\n message: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a7] = true;\n this.text = text;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker7);\n }\n};\n_a7 = symbol7;\n\n// src/errors/load-api-key-error.ts\nvar name7 = \"AI_LoadAPIKeyError\";\nvar marker8 = `vercel.ai.error.${name7}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8;\nvar LoadAPIKeyError = class extends AISDKError {\n // used in isInstance\n constructor({ message }) {\n super({ name: name7, message });\n this[_a8] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker8);\n }\n};\n_a8 = symbol8;\n\n// src/errors/load-setting-error.ts\nvar name8 = \"AI_LoadSettingError\";\nvar marker9 = `vercel.ai.error.${name8}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9;\nvar LoadSettingError = class extends AISDKError {\n // used in isInstance\n constructor({ message }) {\n super({ name: name8, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker9);\n }\n};\n_a9 = symbol9;\n\n// src/errors/no-content-generated-error.ts\nvar name9 = \"AI_NoContentGeneratedError\";\nvar marker10 = `vercel.ai.error.${name9}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10;\nvar NoContentGeneratedError = class extends AISDKError {\n // used in isInstance\n constructor({\n message = \"No content generated.\"\n } = {}) {\n super({ name: name9, message });\n this[_a10] = true;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker10);\n }\n};\n_a10 = symbol10;\n\n// src/errors/no-such-model-error.ts\nvar name10 = \"AI_NoSuchModelError\";\nvar marker11 = `vercel.ai.error.${name10}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11;\nvar NoSuchModelError = class extends AISDKError {\n constructor({\n errorName = name10,\n modelId,\n modelType,\n message = `No such ${modelType}: ${modelId}`\n }) {\n super({ name: errorName, message });\n this[_a11] = true;\n this.modelId = modelId;\n this.modelType = modelType;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker11);\n }\n};\n_a11 = symbol11;\n\n// src/errors/too-many-embedding-values-for-call-error.ts\nvar name11 = \"AI_TooManyEmbeddingValuesForCallError\";\nvar marker12 = `vercel.ai.error.${name11}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12;\nvar TooManyEmbeddingValuesForCallError = class extends AISDKError {\n constructor(options) {\n super({\n name: name11,\n message: `Too many values for a single embedding call. The ${options.provider} model \"${options.modelId}\" can only embed up to ${options.maxEmbeddingsPerCall} values per call, but ${options.values.length} values were provided.`\n });\n this[_a12] = true;\n this.provider = options.provider;\n this.modelId = options.modelId;\n this.maxEmbeddingsPerCall = options.maxEmbeddingsPerCall;\n this.values = options.values;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker12);\n }\n};\n_a12 = symbol12;\n\n// src/errors/type-validation-error.ts\nvar name12 = \"AI_TypeValidationError\";\nvar marker13 = `vercel.ai.error.${name12}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13;\nvar _TypeValidationError = class _TypeValidationError extends AISDKError {\n constructor({ value, cause }) {\n super({\n name: name12,\n message: `Type validation failed: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n cause\n });\n this[_a13] = true;\n this.value = value;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker13);\n }\n /**\n * Wraps an error into a TypeValidationError.\n * If the cause is already a TypeValidationError with the same value, it returns the cause.\n * Otherwise, it creates a new TypeValidationError.\n *\n * @param {Object} params - The parameters for wrapping the error.\n * @param {unknown} params.value - The value that failed validation.\n * @param {unknown} params.cause - The original error or cause of the validation failure.\n * @returns {TypeValidationError} A TypeValidationError instance.\n */\n static wrap({\n value,\n cause\n }) {\n return _TypeValidationError.isInstance(cause) && cause.value === value ? cause : new _TypeValidationError({ value, cause });\n }\n};\n_a13 = symbol13;\nvar TypeValidationError = _TypeValidationError;\n\n// src/errors/unsupported-functionality-error.ts\nvar name13 = \"AI_UnsupportedFunctionalityError\";\nvar marker14 = `vercel.ai.error.${name13}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14;\nvar UnsupportedFunctionalityError = class extends AISDKError {\n constructor({\n functionality,\n message = `'${functionality}' functionality not supported.`\n }) {\n super({ name: name13, message });\n this[_a14] = true;\n this.functionality = functionality;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker14);\n }\n};\n_a14 = symbol14;\n\n// src/json-value/is-json.ts\nfunction isJSONValue(value) {\n if (value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n return true;\n }\n if (Array.isArray(value)) {\n return value.every(isJSONValue);\n }\n if (typeof value === \"object\") {\n return Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && isJSONValue(val)\n );\n }\n return false;\n}\nfunction isJSONArray(value) {\n return Array.isArray(value) && value.every(isJSONValue);\n}\nfunction isJSONObject(value) {\n return value != null && typeof value === \"object\" && Object.entries(value).every(\n ([key, val]) => typeof key === \"string\" && isJSONValue(val)\n );\n}\nexport {\n AISDKError,\n APICallError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidPromptError,\n InvalidResponseDataError,\n JSONParseError,\n LoadAPIKeyError,\n LoadSettingError,\n NoContentGeneratedError,\n NoSuchModelError,\n TooManyEmbeddingValuesForCallError,\n TypeValidationError,\n UnsupportedFunctionalityError,\n getErrorMessage,\n isJSONArray,\n isJSONObject,\n isJSONValue\n};\n//# sourceMappingURL=index.mjs.map","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n let i = size | 0\n while (i--) {\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\nlet nanoid = (size = 21) => {\n let id = ''\n let i = size | 0\n while (i--) {\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\nexport { nanoid, customAlphabet }\n","'use strict'\n\nconst hasBuffer = typeof Buffer !== 'undefined'\nconst suspectProtoRx = /\"(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])(?:p|\\\\u0070)(?:r|\\\\u0072)(?:o|\\\\u006[Ff])(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])\"\\s*:/\nconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/\n\nfunction _parse (text, reviver, options) {\n // Normalize arguments\n if (options == null) {\n if (reviver !== null && typeof reviver === 'object') {\n options = reviver\n reviver = undefined\n }\n }\n\n if (hasBuffer && Buffer.isBuffer(text)) {\n text = text.toString()\n }\n\n // BOM checker\n if (text && text.charCodeAt(0) === 0xFEFF) {\n text = text.slice(1)\n }\n\n // Parse normally, allowing exceptions\n const obj = JSON.parse(text, reviver)\n\n // Ignore null and non-objects\n if (obj === null || typeof obj !== 'object') {\n return obj\n }\n\n const protoAction = (options && options.protoAction) || 'error'\n const constructorAction = (options && options.constructorAction) || 'error'\n\n // options: 'error' (default) / 'remove' / 'ignore'\n if (protoAction === 'ignore' && constructorAction === 'ignore') {\n return obj\n }\n\n if (protoAction !== 'ignore' && constructorAction !== 'ignore') {\n if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {\n return obj\n }\n } else if (protoAction !== 'ignore' && constructorAction === 'ignore') {\n if (suspectProtoRx.test(text) === false) {\n return obj\n }\n } else {\n if (suspectConstructorRx.test(text) === false) {\n return obj\n }\n }\n\n // Scan result for proto keys\n return filter(obj, { protoAction, constructorAction, safe: options && options.safe })\n}\n\nfunction filter (obj, { protoAction = 'error', constructorAction = 'error', safe } = {}) {\n let next = [obj]\n\n while (next.length) {\n const nodes = next\n next = []\n\n for (const node of nodes) {\n if (protoAction !== 'ignore' && Object.prototype.hasOwnProperty.call(node, '__proto__')) { // Avoid calling node.hasOwnProperty directly\n if (safe === true) {\n return null\n } else if (protoAction === 'error') {\n throw new SyntaxError('Object contains forbidden prototype property')\n }\n\n delete node.__proto__ // eslint-disable-line no-proto\n }\n\n if (constructorAction !== 'ignore' &&\n Object.prototype.hasOwnProperty.call(node, 'constructor') &&\n Object.prototype.hasOwnProperty.call(node.constructor, 'prototype')) { // Avoid calling node.hasOwnProperty directly\n if (safe === true) {\n return null\n } else if (constructorAction === 'error') {\n throw new SyntaxError('Object contains forbidden prototype property')\n }\n\n delete node.constructor\n }\n\n for (const key in node) {\n const value = node[key]\n if (value && typeof value === 'object') {\n next.push(value)\n }\n }\n }\n }\n return obj\n}\n\nfunction parse (text, reviver, options) {\n const stackTraceLimit = Error.stackTraceLimit\n Error.stackTraceLimit = 0\n try {\n return _parse(text, reviver, options)\n } finally {\n Error.stackTraceLimit = stackTraceLimit\n }\n}\n\nfunction safeParse (text, reviver) {\n const stackTraceLimit = Error.stackTraceLimit\n Error.stackTraceLimit = 0\n try {\n return _parse(text, reviver, { safe: true })\n } catch (_e) {\n return null\n } finally {\n Error.stackTraceLimit = stackTraceLimit\n }\n}\n\nmodule.exports = parse\nmodule.exports.default = parse\nmodule.exports.parse = parse\nmodule.exports.safeParse = safeParse\nmodule.exports.scan = filter\n","// src/combine-headers.ts\nfunction combineHeaders(...headers) {\n return headers.reduce(\n (combinedHeaders, currentHeaders) => ({\n ...combinedHeaders,\n ...currentHeaders != null ? currentHeaders : {}\n }),\n {}\n );\n}\n\n// src/convert-async-iterator-to-readable-stream.ts\nfunction convertAsyncIteratorToReadableStream(iterator) {\n return new ReadableStream({\n /**\n * Called when the consumer wants to pull more data from the stream.\n *\n * @param {ReadableStreamDefaultController<T>} controller - The controller to enqueue data into the stream.\n * @returns {Promise<void>}\n */\n async pull(controller) {\n try {\n const { value, done } = await iterator.next();\n if (done) {\n controller.close();\n } else {\n controller.enqueue(value);\n }\n } catch (error) {\n controller.error(error);\n }\n },\n /**\n * Called when the consumer cancels the stream.\n */\n cancel() {\n }\n });\n}\n\n// src/delay.ts\nasync function delay(delayInMs) {\n return delayInMs == null ? Promise.resolve() : new Promise((resolve2) => setTimeout(resolve2, delayInMs));\n}\n\n// src/event-source-parser-stream.ts\nfunction createEventSourceParserStream() {\n let buffer = \"\";\n let event = void 0;\n let data = [];\n let lastEventId = void 0;\n let retry = void 0;\n function parseLine(line, controller) {\n if (line === \"\") {\n dispatchEvent(controller);\n return;\n }\n if (line.startsWith(\":\")) {\n return;\n }\n const colonIndex = line.indexOf(\":\");\n if (colonIndex === -1) {\n handleField(line, \"\");\n return;\n }\n const field = line.slice(0, colonIndex);\n const valueStart = colonIndex + 1;\n const value = valueStart < line.length && line[valueStart] === \" \" ? line.slice(valueStart + 1) : line.slice(valueStart);\n handleField(field, value);\n }\n function dispatchEvent(controller) {\n if (data.length > 0) {\n controller.enqueue({\n event,\n data: data.join(\"\\n\"),\n id: lastEventId,\n retry\n });\n data = [];\n event = void 0;\n retry = void 0;\n }\n }\n function handleField(field, value) {\n switch (field) {\n case \"event\":\n event = value;\n break;\n case \"data\":\n data.push(value);\n break;\n case \"id\":\n lastEventId = value;\n break;\n case \"retry\":\n const parsedRetry = parseInt(value, 10);\n if (!isNaN(parsedRetry)) {\n retry = parsedRetry;\n }\n break;\n }\n }\n return new TransformStream({\n transform(chunk, controller) {\n const { lines, incompleteLine } = splitLines(buffer, chunk);\n buffer = incompleteLine;\n for (let i = 0; i < lines.length; i++) {\n parseLine(lines[i], controller);\n }\n },\n flush(controller) {\n parseLine(buffer, controller);\n dispatchEvent(controller);\n }\n });\n}\nfunction splitLines(buffer, chunk) {\n const lines = [];\n let currentLine = buffer;\n for (let i = 0; i < chunk.length; ) {\n const char = chunk[i++];\n if (char === \"\\n\") {\n lines.push(currentLine);\n currentLine = \"\";\n } else if (char === \"\\r\") {\n lines.push(currentLine);\n currentLine = \"\";\n if (chunk[i] === \"\\n\") {\n i++;\n }\n } else {\n currentLine += char;\n }\n }\n return { lines, incompleteLine: currentLine };\n}\n\n// src/extract-response-headers.ts\nfunction extractResponseHeaders(response) {\n const headers = {};\n response.headers.forEach((value, key) => {\n headers[key] = value;\n });\n return headers;\n}\n\n// src/generate-id.ts\nimport { InvalidArgumentError } from \"@ai-sdk/provider\";\nimport { customAlphabet } from \"nanoid/non-secure\";\nvar createIdGenerator = ({\n prefix,\n size: defaultSize = 16,\n alphabet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\",\n separator = \"-\"\n} = {}) => {\n const generator = customAlphabet(alphabet, defaultSize);\n if (prefix == null) {\n return generator;\n }\n if (alphabet.includes(separator)) {\n throw new InvalidArgumentError({\n argument: \"separator\",\n message: `The separator \"${separator}\" must not be part of the alphabet \"${alphabet}\".`\n });\n }\n return (size) => `${prefix}${separator}${generator(size)}`;\n};\nvar generateId = createIdGenerator();\n\n// src/get-error-message.ts\nfunction getErrorMessage(error) {\n if (error == null) {\n return \"unknown error\";\n }\n if (typeof error === \"string\") {\n return error;\n }\n if (error instanceof Error) {\n return error.message;\n }\n return JSON.stringify(error);\n}\n\n// src/get-from-api.ts\nimport { APICallError } from \"@ai-sdk/provider\";\n\n// src/remove-undefined-entries.ts\nfunction removeUndefinedEntries(record) {\n return Object.fromEntries(\n Object.entries(record).filter(([_key, value]) => value != null)\n );\n}\n\n// src/is-abort-error.ts\nfunction isAbortError(error) {\n return error instanceof Error && (error.name === \"AbortError\" || error.name === \"TimeoutError\");\n}\n\n// src/get-from-api.ts\nvar getOriginalFetch = () => globalThis.fetch;\nvar getFromApi = async ({\n url,\n headers = {},\n successfulResponseHandler,\n failedResponseHandler,\n abortSignal,\n fetch = getOriginalFetch()\n}) => {\n try {\n const response = await fetch(url, {\n method: \"GET\",\n headers: removeUndefinedEntries(headers),\n signal: abortSignal\n });\n const responseHeaders = extractResponseHeaders(response);\n if (!response.ok) {\n let errorInformation;\n try {\n errorInformation = await failedResponseHandler({\n response,\n url,\n requestBodyValues: {}\n });\n } catch (error) {\n if (isAbortError(error) || APICallError.isInstance(error)) {\n throw error;\n }\n throw new APICallError({\n message: \"Failed to process error response\",\n cause: error,\n statusCode: response.status,\n url,\n responseHeaders,\n requestBodyValues: {}\n });\n }\n throw errorInformation.value;\n }\n try {\n return await successfulResponseHandler({\n response,\n url,\n requestBodyValues: {}\n });\n } catch (error) {\n if (error instanceof Error) {\n if (isAbortError(error) || APICallError.isInstance(error)) {\n throw error;\n }\n }\n throw new APICallError({\n message: \"Failed to process successful response\",\n cause: error,\n statusCode: response.status,\n url,\n responseHeaders,\n requestBodyValues: {}\n });\n }\n } catch (error) {\n if (isAbortError(error)) {\n throw error;\n }\n if (error instanceof TypeError && error.message === \"fetch failed\") {\n const cause = error.cause;\n if (cause != null) {\n throw new APICallError({\n message: `Cannot connect to API: ${cause.message}`,\n cause,\n url,\n isRetryable: true,\n requestBodyValues: {}\n });\n }\n }\n throw error;\n }\n};\n\n// src/load-api-key.ts\nimport { LoadAPIKeyError } from \"@ai-sdk/provider\";\nfunction loadApiKey({\n apiKey,\n environmentVariableName,\n apiKeyParameterName = \"apiKey\",\n description\n}) {\n if (typeof apiKey === \"string\") {\n return apiKey;\n }\n if (apiKey != null) {\n throw new LoadAPIKeyError({\n message: `${description} API key must be a string.`\n });\n }\n if (typeof process === \"undefined\") {\n throw new LoadAPIKeyError({\n message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables is not supported in this environment.`\n });\n }\n apiKey = process.env[environmentVariableName];\n if (apiKey == null) {\n throw new LoadAPIKeyError({\n message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter or the ${environmentVariableName} environment variable.`\n });\n }\n if (typeof apiKey !== \"string\") {\n throw new LoadAPIKeyError({\n message: `${description} API key must be a string. The value of the ${environmentVariableName} environment variable is not a string.`\n });\n }\n return apiKey;\n}\n\n// src/load-optional-setting.ts\nfunction loadOptionalSetting({\n settingValue,\n environmentVariableName\n}) {\n if (typeof settingValue === \"string\") {\n return settingValue;\n }\n if (settingValue != null || typeof process === \"undefined\") {\n return void 0;\n }\n settingValue = process.env[environmentVariableName];\n if (settingValue == null || typeof settingValue !== \"string\") {\n return void 0;\n }\n return settingValue;\n}\n\n// src/load-setting.ts\nimport { LoadSettingError } from \"@ai-sdk/provider\";\nfunction loadSetting({\n settingValue,\n environmentVariableName,\n settingName,\n description\n}) {\n if (typeof settingValue === \"string\") {\n return settingValue;\n }\n if (settingValue != null) {\n throw new LoadSettingError({\n message: `${description} setting must be a string.`\n });\n }\n if (typeof process === \"undefined\") {\n throw new LoadSettingError({\n message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables is not supported in this environment.`\n });\n }\n settingValue = process.env[environmentVariableName];\n if (settingValue == null) {\n throw new LoadSettingError({\n message: `${description} setting is missing. Pass it using the '${settingName}' parameter or the ${environmentVariableName} environment variable.`\n });\n }\n if (typeof settingValue !== \"string\") {\n throw new LoadSettingError({\n message: `${description} setting must be a string. The value of the ${environmentVariableName} environment variable is not a string.`\n });\n }\n return settingValue;\n}\n\n// src/parse-json.ts\nimport {\n JSONParseError,\n TypeValidationError as TypeValidationError2\n} from \"@ai-sdk/provider\";\nimport SecureJSON from \"secure-json-parse\";\n\n// src/validate-types.ts\nimport { TypeValidationError } from \"@ai-sdk/provider\";\n\n// src/validator.ts\nvar validatorSymbol = Symbol.for(\"vercel.ai.validator\");\nfunction validator(validate) {\n return { [validatorSymbol]: true, validate };\n}\nfunction isValidator(value) {\n return typeof value === \"object\" && value !== null && validatorSymbol in value && value[validatorSymbol] === true && \"validate\" in value;\n}\nfunction asValidator(value) {\n return isValidator(value) ? value : zodValidator(value);\n}\nfunction zodValidator(zodSchema) {\n return validator((value) => {\n const result = zodSchema.safeParse(value);\n return result.success ? { success: true, value: result.data } : { success: false, error: result.error };\n });\n}\n\n// src/validate-types.ts\nfunction validateTypes({\n value,\n schema: inputSchema\n}) {\n const result = safeValidateTypes({ value, schema: inputSchema });\n if (!result.success) {\n throw TypeValidationError.wrap({ value, cause: result.error });\n }\n return result.value;\n}\nfunction safeValidateTypes({\n value,\n schema\n}) {\n const validator2 = asValidator(schema);\n try {\n if (validator2.validate == null) {\n return { success: true, value };\n }\n const result = validator2.validate(value);\n if (result.success) {\n return result;\n }\n return {\n success: false,\n error: TypeValidationError.wrap({ value, cause: result.error })\n };\n } catch (error) {\n return {\n success: false,\n error: TypeValidationError.wrap({ value, cause: error })\n };\n }\n}\n\n// src/parse-json.ts\nfunction parseJSON({\n text,\n schema\n}) {\n try {\n const value = SecureJSON.parse(text);\n if (schema == null) {\n return value;\n }\n return validateTypes({ value, schema });\n } catch (error) {\n if (JSONParseError.isInstance(error) || TypeValidationError2.isInstance(error)) {\n throw error;\n }\n throw new JSONParseError({ text, cause: error });\n }\n}\nfunction safeParseJSON({\n text,\n schema\n}) {\n try {\n const value = SecureJSON.parse(text);\n if (schema == null) {\n return { success: true, value, rawValue: value };\n }\n const validationResult = safeValidateTypes({ value, schema });\n return validationResult.success ? { ...validationResult, rawValue: value } : validationResult;\n } catch (error) {\n return {\n success: false,\n error: JSONParseError.isInstance(error) ? error : new JSONParseError({ text, cause: error })\n };\n }\n}\nfunction isParsableJson(input) {\n try {\n SecureJSON.parse(input);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// src/parse-provider-options.ts\nimport { InvalidArgumentError as InvalidArgumentError2 } from \"@ai-sdk/provider\";\nfunction parseProviderOptions({\n provider,\n providerOptions,\n schema\n}) {\n if ((providerOptions == null ? void 0 : providerOptions[provider]) == null) {\n return void 0;\n }\n const parsedProviderOptions = safeValidateTypes({\n value: providerOptions[provider],\n schema\n });\n if (!parsedProviderOptions.success) {\n throw new InvalidArgumentError2({\n argument: \"providerOptions\",\n message: `invalid ${provider} provider options`,\n cause: parsedProviderOptions.error\n });\n }\n return parsedProviderOptions.value;\n}\n\n// src/post-to-api.ts\nimport { APICallError as APICallError2 } from \"@ai-sdk/provider\";\nvar getOriginalFetch2 = () => globalThis.fetch;\nvar postJsonToApi = async ({\n url,\n headers,\n body,\n failedResponseHandler,\n successfulResponseHandler,\n abortSignal,\n fetch\n}) => postToApi({\n url,\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n body: {\n content: JSON.stringify(body),\n values: body\n },\n failedResponseHandler,\n successfulResponseHandler,\n abortSignal,\n fetch\n});\nvar postFormDataToApi = async ({\n url,\n headers,\n formData,\n failedResponseHandler,\n successfulResponseHandler,\n abortSignal,\n fetch\n}) => postToApi({\n url,\n headers,\n body: {\n content: formData,\n values: Object.fromEntries(formData.entries())\n },\n failedResponseHandler,\n successfulResponseHandler,\n abortSignal,\n fetch\n});\nvar postToApi = async ({\n url,\n headers = {},\n body,\n successfulResponseHandler,\n failedResponseHandler,\n abortSignal,\n fetch = getOriginalFetch2()\n}) => {\n try {\n const response = await fetch(url, {\n method: \"POST\",\n headers: removeUndefinedEntries(headers),\n body: body.content,\n signal: abortSignal\n });\n const responseHeaders = extractResponseHeaders(response);\n if (!response.ok) {\n let errorInformation;\n try {\n errorInformation = await failedResponseHandler({\n response,\n url,\n requestBodyValues: body.values\n });\n } catch (error) {\n if (isAbortError(error) || APICallError2.isInstance(error)) {\n throw error;\n }\n throw new APICallError2({\n message: \"Failed to process error response\",\n cause: error,\n statusCode: response.status,\n url,\n responseHeaders,\n requestBodyValues: body.values\n });\n }\n throw errorInformation.value;\n }\n try {\n return await successfulResponseHandler({\n response,\n url,\n requestBodyValues: body.values\n });\n } catch (error) {\n if (error instanceof Error) {\n if (isAbortError(error) || APICallError2.isInstance(error)) {\n throw error;\n }\n }\n throw new APICallError2({\n message: \"Failed to process successful response\",\n cause: error,\n statusCode: response.status,\n url,\n responseHeaders,\n requestBodyValues: body.values\n });\n }\n } catch (error) {\n if (isAbortError(error)) {\n throw error;\n }\n if (error instanceof TypeError && error.message === \"fetch failed\") {\n const cause = error.cause;\n if (cause != null) {\n throw new APICallError2({\n message: `Cannot connect to API: ${cause.message}`,\n cause,\n url,\n requestBodyValues: body.values,\n isRetryable: true\n // retry when network error\n });\n }\n }\n throw error;\n }\n};\n\n// src/resolve.ts\nasync function resolve(value) {\n if (typeof value === \"function\") {\n value = value();\n }\n return Promise.resolve(value);\n}\n\n// src/response-handler.ts\nimport { APICallError as APICallError3, EmptyResponseBodyError } from \"@ai-sdk/provider\";\nvar createJsonErrorResponseHandler = ({\n errorSchema,\n errorToMessage,\n isRetryable\n}) => async ({ response, url, requestBodyValues }) => {\n const responseBody = await response.text();\n const responseHeaders = extractResponseHeaders(response);\n if (responseBody.trim() === \"\") {\n return {\n responseHeaders,\n value: new APICallError3({\n message: response.statusText,\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody,\n isRetryable: isRetryable == null ? void 0 : isRetryable(response)\n })\n };\n }\n try {\n const parsedError = parseJSON({\n text: responseBody,\n schema: errorSchema\n });\n return {\n responseHeaders,\n value: new APICallError3({\n message: errorToMessage(parsedError),\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody,\n data: parsedError,\n isRetryable: isRetryable == null ? void 0 : isRetryable(response, parsedError)\n })\n };\n } catch (parseError) {\n return {\n responseHeaders,\n value: new APICallError3({\n message: response.statusText,\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody,\n isRetryable: isRetryable == null ? void 0 : isRetryable(response)\n })\n };\n }\n};\nvar createEventSourceResponseHandler = (chunkSchema) => async ({ response }) => {\n const responseHeaders = extractResponseHeaders(response);\n if (response.body == null) {\n throw new EmptyResponseBodyError({});\n }\n return {\n responseHeaders,\n value: response.body.pipeThrough(new TextDecoderStream()).pipeThrough(createEventSourceParserStream()).pipeThrough(\n new TransformStream({\n transform({ data }, controller) {\n if (data === \"[DONE]\") {\n return;\n }\n controller.enqueue(\n safeParseJSON({\n text: data,\n schema: chunkSchema\n })\n );\n }\n })\n )\n };\n};\nvar createJsonStreamResponseHandler = (chunkSchema) => async ({ response }) => {\n const responseHeaders = extractResponseHeaders(response);\n if (response.body == null) {\n throw new EmptyResponseBodyError({});\n }\n let buffer = \"\";\n return {\n responseHeaders,\n value: response.body.pipeThrough(new TextDecoderStream()).pipeThrough(\n new TransformStream({\n transform(chunkText, controller) {\n if (chunkText.endsWith(\"\\n\")) {\n controller.enqueue(\n safeParseJSON({\n text: buffer + chunkText,\n schema: chunkSchema\n })\n );\n buffer = \"\";\n } else {\n buffer += chunkText;\n }\n }\n })\n )\n };\n};\nvar createJsonResponseHandler = (responseSchema) => async ({ response, url, requestBodyValues }) => {\n const responseBody = await response.text();\n const parsedResult = safeParseJSON({\n text: responseBody,\n schema: responseSchema\n });\n const responseHeaders = extractResponseHeaders(response);\n if (!parsedResult.success) {\n throw new APICallError3({\n message: \"Invalid JSON response\",\n cause: parsedResult.error,\n statusCode: response.status,\n responseHeaders,\n responseBody,\n url,\n requestBodyValues\n });\n }\n return {\n responseHeaders,\n value: parsedResult.value,\n rawValue: parsedResult.rawValue\n };\n};\nvar createBinaryResponseHandler = () => async ({ response, url, requestBodyValues }) => {\n const responseHeaders = extractResponseHeaders(response);\n if (!response.body) {\n throw new APICallError3({\n message: \"Response body is empty\",\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody: void 0\n });\n }\n try {\n const buffer = await response.arrayBuffer();\n return {\n responseHeaders,\n value: new Uint8Array(buffer)\n };\n } catch (error) {\n throw new APICallError3({\n message: \"Failed to read response as array buffer\",\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody: void 0,\n cause: error\n });\n }\n};\nvar createStatusCodeErrorResponseHandler = () => async ({ response, url, requestBodyValues }) => {\n const responseHeaders = extractResponseHeaders(response);\n const responseBody = await response.text();\n return {\n responseHeaders,\n value: new APICallError3({\n message: response.statusText,\n url,\n requestBodyValues,\n statusCode: response.status,\n responseHeaders,\n responseBody\n })\n };\n};\n\n// src/uint8-utils.ts\nvar { btoa, atob } = globalThis;\nfunction convertBase64ToUint8Array(base64String) {\n const base64Url = base64String.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const latin1string = atob(base64Url);\n return Uint8Array.from(latin1string, (byte) => byte.codePointAt(0));\n}\nfunction convertUint8ArrayToBase64(array) {\n let latin1string = \"\";\n for (let i = 0; i < array.length; i++) {\n latin1string += String.fromCodePoint(array[i]);\n }\n return btoa(latin1string);\n}\n\n// src/without-trailing-slash.ts\nfunction withoutTrailingSlash(url) {\n return url == null ? void 0 : url.replace(/\\/$/, \"\");\n}\nexport {\n asValidator,\n combineHeaders,\n convertAsyncIteratorToReadableStream,\n convertBase64ToUint8Array,\n convertUint8ArrayToBase64,\n createBinaryResponseHandler,\n createEventSourceParserStream,\n createEventSourceResponseHandler,\n createIdGenerator,\n createJsonErrorResponseHandler,\n createJsonResponseHandler,\n createJsonStreamResponseHandler,\n createStatusCodeErrorResponseHandler,\n delay,\n extractResponseHeaders,\n generateId,\n getErrorMessage,\n getFromApi,\n isAbortError,\n isParsableJson,\n isValidator,\n loadApiKey,\n loadOptionalSetting,\n loadSetting,\n parseJSON,\n parseProviderOptions,\n postFormDataToApi,\n postJsonToApi,\n postToApi,\n removeUndefinedEntries,\n resolve,\n safeParseJSON,\n safeValidateTypes,\n validateTypes,\n validator,\n validatorSymbol,\n withoutTrailingSlash,\n zodValidator\n};\n//# sourceMappingURL=index.mjs.map","// src/openai-provider.ts\nimport {\n loadApiKey,\n withoutTrailingSlash\n} from \"@ai-sdk/provider-utils\";\n\n// src/openai-chat-language-model.ts\nimport {\n InvalidResponseDataError,\n UnsupportedFunctionalityError as UnsupportedFunctionalityError3\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders,\n createEventSourceResponseHandler,\n createJsonResponseHandler,\n generateId,\n isParsableJson,\n postJsonToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z2 } from \"zod\";\n\n// src/convert-to-openai-chat-messages.ts\nimport {\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 } from \"@ai-sdk/provider-utils\";\nfunction convertToOpenAIChatMessages({\n prompt,\n useLegacyFunctionCalling = false,\n systemMessageMode = \"system\"\n}) {\n const messages = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n switch (systemMessageMode) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"developer\": {\n messages.push({ role: \"developer\", content });\n break;\n }\n case \"remove\": {\n warnings.push({\n type: \"other\",\n message: \"system messages are removed for this model\"\n });\n break;\n }\n default: {\n const _exhaustiveCheck = systemMessageMode;\n throw new Error(\n `Unsupported system message mode: ${_exhaustiveCheck}`\n );\n }\n }\n break;\n }\n case \"user\": {\n if (content.length === 1 && content[0].type === \"text\") {\n messages.push({ role: \"user\", content: content[0].text });\n break;\n }\n messages.push({\n role: \"user\",\n content: content.map((part, index) => {\n var _a, _b, _c, _d;\n switch (part.type) {\n case \"text\": {\n return { type: \"text\", text: part.text };\n }\n case \"image\": {\n return {\n type: \"image_url\",\n image_url: {\n url: part.image instanceof URL ? part.image.toString() : `data:${(_a = part.mimeType) != null ? _a : \"image/jpeg\"};base64,${convertUint8ArrayToBase64(part.image)}`,\n // OpenAI specific extension: image detail\n detail: (_c = (_b = part.providerMetadata) == null ? void 0 : _b.openai) == null ? void 0 : _c.imageDetail\n }\n };\n }\n case \"file\": {\n if (part.data instanceof URL) {\n throw new UnsupportedFunctionalityError({\n functionality: \"'File content parts with URL data' functionality not supported.\"\n });\n }\n switch (part.mimeType) {\n case \"audio/wav\": {\n return {\n type: \"input_audio\",\n input_audio: { data: part.data, format: \"wav\" }\n };\n }\n case \"audio/mp3\":\n case \"audio/mpeg\": {\n return {\n type: \"input_audio\",\n input_audio: { data: part.data, format: \"mp3\" }\n };\n }\n case \"application/pdf\": {\n return {\n type: \"file\",\n file: {\n filename: (_d = part.filename) != null ? _d : `part-${index}.pdf`,\n file_data: `data:application/pdf;base64,${part.data}`\n }\n };\n }\n default: {\n throw new UnsupportedFunctionalityError({\n functionality: `File content part type ${part.mimeType} in user messages`\n });\n }\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n let text = \"\";\n const toolCalls = [];\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n text += part.text;\n break;\n }\n case \"tool-call\": {\n toolCalls.push({\n id: part.toolCallId,\n type: \"function\",\n function: {\n name: part.toolName,\n arguments: JSON.stringify(part.args)\n }\n });\n break;\n }\n }\n }\n if (useLegacyFunctionCalling) {\n if (toolCalls.length > 1) {\n throw new UnsupportedFunctionalityError({\n functionality: \"useLegacyFunctionCalling with multiple tool calls in one message\"\n });\n }\n messages.push({\n role: \"assistant\",\n content: text,\n function_call: toolCalls.length > 0 ? toolCalls[0].function : void 0\n });\n } else {\n messages.push({\n role: \"assistant\",\n content: text,\n tool_calls: toolCalls.length > 0 ? toolCalls : void 0\n });\n }\n break;\n }\n case \"tool\": {\n for (const toolResponse of content) {\n if (useLegacyFunctionCalling) {\n messages.push({\n role: \"function\",\n name: toolResponse.toolName,\n content: JSON.stringify(toolResponse.result)\n });\n } else {\n messages.push({\n role: \"tool\",\n tool_call_id: toolResponse.toolCallId,\n content: JSON.stringify(toolResponse.result)\n });\n }\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, warnings };\n}\n\n// src/map-openai-chat-logprobs.ts\nfunction mapOpenAIChatLogProbsOutput(logprobs) {\n var _a, _b;\n return (_b = (_a = logprobs == null ? void 0 : logprobs.content) == null ? void 0 : _a.map(({ token, logprob, top_logprobs }) => ({\n token,\n logprob,\n topLogprobs: top_logprobs ? top_logprobs.map(({ token: token2, logprob: logprob2 }) => ({\n token: token2,\n logprob: logprob2\n })) : []\n }))) != null ? _b : void 0;\n}\n\n// src/map-openai-finish-reason.ts\nfunction mapOpenAIFinishReason(finishReason) {\n switch (finishReason) {\n case \"stop\":\n return \"stop\";\n case \"length\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n case \"function_call\":\n case \"tool_calls\":\n return \"tool-calls\";\n default:\n return \"unknown\";\n }\n}\n\n// src/openai-error.ts\nimport { z } from \"zod\";\nimport { createJsonErrorResponseHandler } from \"@ai-sdk/provider-utils\";\nvar openaiErrorDataSchema = z.object({\n error: z.object({\n message: z.string(),\n // The additional information below is handled loosely to support\n // OpenAI-compatible providers that have slightly different error\n // responses:\n type: z.string().nullish(),\n param: z.any().nullish(),\n code: z.union([z.string(), z.number()]).nullish()\n })\n});\nvar openaiFailedResponseHandler = createJsonErrorResponseHandler({\n errorSchema: openaiErrorDataSchema,\n errorToMessage: (data) => data.error.message\n});\n\n// src/get-response-metadata.ts\nfunction getResponseMetadata({\n id,\n model,\n created\n}) {\n return {\n id: id != null ? id : void 0,\n modelId: model != null ? model : void 0,\n timestamp: created != null ? new Date(created * 1e3) : void 0\n };\n}\n\n// src/openai-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\nfunction prepareTools({\n mode,\n useLegacyFunctionCalling = false,\n structuredOutputs\n}) {\n var _a;\n const tools = ((_a = mode.tools) == null ? void 0 : _a.length) ? mode.tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, tool_choice: void 0, toolWarnings };\n }\n const toolChoice = mode.toolChoice;\n if (useLegacyFunctionCalling) {\n const openaiFunctions = [];\n for (const tool of tools) {\n if (tool.type === \"provider-defined\") {\n toolWarnings.push({ type: \"unsupported-tool\", tool });\n } else {\n openaiFunctions.push({\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters\n });\n }\n }\n if (toolChoice == null) {\n return {\n functions: openaiFunctions,\n function_call: void 0,\n toolWarnings\n };\n }\n const type2 = toolChoice.type;\n switch (type2) {\n case \"auto\":\n case \"none\":\n case void 0:\n return {\n functions: openaiFunctions,\n function_call: void 0,\n toolWarnings\n };\n case \"required\":\n throw new UnsupportedFunctionalityError2({\n functionality: \"useLegacyFunctionCalling and toolChoice: required\"\n });\n default:\n return {\n functions: openaiFunctions,\n function_call: { name: toolChoice.toolName },\n toolWarnings\n };\n }\n }\n const openaiTools2 = [];\n for (const tool of tools) {\n if (tool.type === \"provider-defined\") {\n toolWarnings.push({ type: \"unsupported-tool\", tool });\n } else {\n openaiTools2.push({\n type: \"function\",\n function: {\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n strict: structuredOutputs ? true : void 0\n }\n });\n }\n }\n if (toolChoice == null) {\n return { tools: openaiTools2, tool_choice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: openaiTools2, tool_choice: type, toolWarnings };\n case \"tool\":\n return {\n tools: openaiTools2,\n tool_choice: {\n type: \"function\",\n function: {\n name: toolChoice.toolName\n }\n },\n toolWarnings\n };\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError2({\n functionality: `Unsupported tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/openai-chat-language-model.ts\nvar OpenAIChatLanguageModel = class {\n constructor(modelId, settings, config) {\n this.specificationVersion = \"v1\";\n this.modelId = modelId;\n this.settings = settings;\n this.config = config;\n }\n get supportsStructuredOutputs() {\n var _a;\n return (_a = this.settings.structuredOutputs) != null ? _a : isReasoningModel(this.modelId);\n }\n get defaultObjectGenerationMode() {\n if (isAudioModel(this.modelId)) {\n return \"tool\";\n }\n return this.supportsStructuredOutputs ? \"json\" : \"tool\";\n }\n get provider() {\n return this.config.provider;\n }\n get supportsImageUrls() {\n return !this.settings.downloadImages;\n }\n getArgs({\n mode,\n prompt,\n maxTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences,\n responseFormat,\n seed,\n providerMetadata\n }) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const type = mode.type;\n const warnings = [];\n if (topK != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"topK\"\n });\n }\n if ((responseFormat == null ? void 0 : responseFormat.type) === \"json\" && responseFormat.schema != null && !this.supportsStructuredOutputs) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"responseFormat\",\n details: \"JSON response format schema is only supported with structuredOutputs\"\n });\n }\n const useLegacyFunctionCalling = this.settings.useLegacyFunctionCalling;\n if (useLegacyFunctionCalling && this.settings.parallelToolCalls === true) {\n throw new UnsupportedFunctionalityError3({\n functionality: \"useLegacyFunctionCalling with parallelToolCalls\"\n });\n }\n if (useLegacyFunctionCalling && this.supportsStructuredOutputs) {\n throw new UnsupportedFunctionalityError3({\n functionality: \"structuredOutputs with useLegacyFunctionCalling\"\n });\n }\n const { messages, warnings: messageWarnings } = convertToOpenAIChatMessages(\n {\n prompt,\n useLegacyFunctionCalling,\n systemMessageMode: getSystemMessageMode(this.modelId)\n }\n );\n warnings.push(...messageWarnings);\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n logit_bias: this.settings.logitBias,\n logprobs: this.settings.logprobs === true || typeof this.settings.logprobs === \"number\" ? true : void 0,\n top_logprobs: typeof this.settings.logprobs === \"number\" ? this.settings.logprobs : typeof this.settings.logprobs === \"boolean\" ? this.settings.logprobs ? 0 : void 0 : void 0,\n user: this.settings.user,\n parallel_tool_calls: this.settings.parallelToolCalls,\n // standardized settings:\n max_tokens: maxTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n response_format: (responseFormat == null ? void 0 : responseFormat.type) === \"json\" ? this.supportsStructuredOutputs && responseFormat.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: responseFormat.schema,\n strict: true,\n name: (_a = responseFormat.name) != null ? _a : \"response\",\n description: responseFormat.description\n }\n } : { type: \"json_object\" } : void 0,\n stop: stopSequences,\n seed,\n // openai specific settings:\n // TODO remove in next major version; we auto-map maxTokens now\n max_completion_tokens: (_b = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _b.maxCompletionTokens,\n store: (_c = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _c.store,\n metadata: (_d = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _d.metadata,\n prediction: (_e = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _e.prediction,\n reasoning_effort: (_g = (_f = providerMetadata == null ? void 0 : providerMetadata.openai) == null ? void 0 : _f.reasoningEffort) != null ? _g : this.settings.reasoningEffort,\n // messages:\n messages\n };\n if (isReasoningModel(this.modelId)) {\n if (baseArgs.temperature != null) {\n baseArgs.temperature = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"temperature\",\n details: \"temperature is not supported for reasoning models\"\n });\n }\n if (baseArgs.top_p != null) {\n baseArgs.top_p = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"topP\",\n details: \"topP is not supported for reasoning models\"\n });\n }\n if (baseArgs.frequency_penalty != null) {\n baseArgs.frequency_penalty = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"frequencyPenalty\",\n details: \"frequencyPenalty is not supported for reasoning models\"\n });\n }\n if (baseArgs.presence_penalty != null) {\n baseArgs.presence_penalty = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"presencePenalty\",\n details: \"presencePenalty is not supported for reasoning models\"\n });\n }\n if (baseArgs.logit_bias != null) {\n baseArgs.logit_bias = void 0;\n warnings.push({\n type: \"other\",\n message: \"logitBias is not supported for reasoning models\"\n });\n }\n if (baseArgs.logprobs != null) {\n baseArgs.logprobs = void 0;\n warnings.push({\n type: \"other\",\n message: \"logprobs is not supported for reasoning models\"\n });\n }\n if (baseArgs.top_logprobs != null) {\n baseArgs.top_logprobs = void 0;\n warnings.push({\n type: \"other\",\n message: \"topLogprobs is not supported for reasoning models\"\n });\n }\n if (baseArgs.max_tokens != null) {\n if (baseArgs.max_completion_tokens == null) {\n baseArgs.max_completion_tokens = baseArgs.max_tokens;\n }\n baseArgs.max_tokens = void 0;\n }\n } else if (this.modelId.startsWith(\"gpt-4o-search-preview\") || this.modelId.startsWith(\"gpt-4o-mini-search-preview\")) {\n if (baseArgs.temperature != null) {\n baseArgs.temperature = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"temperature\",\n details: \"temperature is not supported for the search preview models and has been removed.\"\n });\n }\n }\n switch (type) {\n case \"regular\": {\n const { tools, tool_choice, functions, function_call, toolWarnings } = prepareTools({\n mode,\n useLegacyFunctionCalling,\n structuredOutputs: this.supportsStructuredOutputs\n });\n return {\n args: {\n ...baseArgs,\n tools,\n tool_choice,\n functions,\n function_call\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n case \"object-json\": {\n return {\n args: {\n ...baseArgs,\n response_format: this.supportsStructuredOutputs && mode.schema != null ? {\n type: \"json_schema\",\n json_schema: {\n schema: mode.schema,\n strict: true,\n name: (_h = mode.name) != null ? _h : \"response\",\n description: mode.description\n }\n } : { type: \"json_object\" }\n },\n warnings\n };\n }\n case \"object-tool\": {\n return {\n args: useLegacyFunctionCalling ? {\n ...baseArgs,\n function_call: {\n name: mode.tool.name\n },\n functions: [\n {\n name: mode.tool.name,\n description: mode.tool.description,\n parameters: mode.tool.parameters\n }\n ]\n } : {\n ...baseArgs,\n tool_choice: {\n type: \"function\",\n function: { name: mode.tool.name }\n },\n tools: [\n {\n type: \"function\",\n function: {\n name: mode.tool.name,\n description: mode.tool.description,\n parameters: mode.tool.parameters,\n strict: this.supportsStructuredOutputs ? true : void 0\n }\n }\n ]\n },\n warnings\n };\n }\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler(\n openaiChatResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const { messages: rawPrompt, ...rawSettings } = body;\n const choice = response.choices[0];\n const completionTokenDetails = (_a = response.usage) == null ? void 0 : _a.completion_tokens_details;\n const promptTokenDetails = (_b = response.usage) == null ? void 0 : _b.prompt_tokens_details;\n const providerMetadata = { openai: {} };\n if ((completionTokenDetails == null ? void 0 : completionTokenDetails.reasoning_tokens) != null) {\n providerMetadata.openai.reasoningTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.reasoning_tokens;\n }\n if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {\n providerMetadata.openai.acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;\n }\n if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {\n providerMetadata.openai.rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;\n }\n if ((promptTokenDetails == null ? void 0 : promptTokenDetails.cached_tokens) != null) {\n providerMetadata.openai.cachedPromptTokens = promptTokenDetails == null ? void 0 : promptTokenDetails.cached_tokens;\n }\n return {\n text: (_c = choice.message.content) != null ? _c : void 0,\n toolCalls: this.settings.useLegacyFunctionCalling && choice.message.function_call ? [\n {\n toolCallType: \"function\",\n toolCallId: generateId(),\n toolName: choice.message.function_call.name,\n args: choice.message.function_call.arguments\n }\n ] : (_d = choice.message.tool_calls) == null ? void 0 : _d.map((toolCall) => {\n var _a2;\n return {\n toolCallType: \"function\",\n toolCallId: (_a2 = toolCall.id) != null ? _a2 : generateId(),\n toolName: toolCall.function.name,\n args: toolCall.function.arguments\n };\n }),\n finishReason: mapOpenAIFinishReason(choice.finish_reason),\n usage: {\n promptTokens: (_f = (_e = response.usage) == null ? void 0 : _e.prompt_tokens) != null ? _f : NaN,\n completionTokens: (_h = (_g = response.usage) == null ? void 0 : _g.completion_tokens) != null ? _h : NaN\n },\n rawCall: { rawPrompt, rawSettings },\n rawResponse: { headers: responseHeaders, body: rawResponse },\n request: { body: JSON.stringify(body) },\n response: getResponseMetadata(response),\n warnings,\n logprobs: mapOpenAIChatLogProbsOutput(choice.logprobs),\n providerMetadata\n };\n }\n async doStream(options) {\n if (this.settings.simulateStreaming) {\n const result = await this.doGenerate(options);\n const simulatedStream = new ReadableStream({\n start(controller) {\n controller.enqueue({ type: \"response-metadata\", ...result.response });\n if (result.text) {\n controller.enqueue({\n type: \"text-delta\",\n textDelta: result.text\n });\n }\n if (result.toolCalls) {\n for (const toolCall of result.toolCalls) {\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: toolCall.toolCallId,\n toolName: toolCall.toolName,\n argsTextDelta: toolCall.args\n });\n controller.enqueue({\n type: \"tool-call\",\n ...toolCall\n });\n }\n }\n controller.enqueue({\n type: \"finish\",\n finishReason: result.finishReason,\n usage: result.usage,\n logprobs: result.logprobs,\n providerMetadata: result.providerMetadata\n });\n controller.close();\n }\n });\n return {\n stream: simulatedStream,\n rawCall: result.rawCall,\n rawResponse: result.rawResponse,\n warnings: result.warnings\n };\n }\n const { args, warnings } = this.getArgs(options);\n const body = {\n ...args,\n stream: true,\n // only include stream_options when in strict compatibility mode:\n stream_options: this.config.compatibility === \"strict\" ? { include_usage: true } : void 0\n };\n const { responseHeaders, value: response } = await postJsonToApi({\n url: this.config.url({\n path: \"/chat/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders(this.config.headers(), options.headers),\n body,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler(\n openaiChatChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const { messages: rawPrompt, ...rawSettings } = args;\n const toolCalls = [];\n let finishReason = \"unknown\";\n let usage = {\n promptTokens: void 0,\n completionTokens: void 0\n };\n let logprobs;\n let isFirstChunk = true;\n const { useLegacyFunctionCalling } = this.settings;\n const providerMetadata = { openai: {} };\n return {\n stream: response.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;\n if (!chunk.success) {\n finishReason = \"error\";\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = \"error\";\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n const {\n prompt_tokens,\n completion_tokens,\n prompt_tokens_details,\n completion_tokens_details\n } = value.usage;\n usage = {\n promptTokens: prompt_tokens != null ? prompt_tokens : void 0,\n completionTokens: completion_tokens != null ? completion_tokens : void 0\n };\n if ((completion_tokens_details == null ? void 0 : completion_tokens_details.reasoning_tokens) != null) {\n providerMetadata.openai.reasoningTokens = completion_tokens_details == null ? void 0 : completion_tokens_details.reasoning_tokens;\n }\n if ((completion_tokens_details == null ? void 0 : completion_tokens_details.accepted_prediction_tokens) != null) {\n providerMetadata.openai.acceptedPredictionTokens = completion_tokens_details == null ? void 0 : completion_tokens_details.accepted_prediction_tokens;\n }\n if ((completion_tokens_details == null ? void 0 : completion_tokens_details.rejected_prediction_tokens) != null) {\n providerMetadata.openai.rejectedPredictionTokens = completion_tokens_details == null ? void 0 : completion_tokens_details.rejected_prediction_tokens;\n }\n if ((prompt_tokens_details == null ? void 0 : prompt_tokens_details.cached_tokens) != null) {\n providerMetadata.openai.cachedPromptTokens = prompt_tokens_details == null ? void 0 : prompt_tokens_details.cached_tokens;\n }\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = mapOpenAIFinishReason(choice.finish_reason);\n }\n if ((choice == null ? void 0 : choice.delta) == null) {\n return;\n }\n const delta = choice.delta;\n if (delta.content != null) {\n controller.enqueue({\n type: \"text-delta\",\n textDelta: delta.content\n });\n }\n const mappedLogprobs = mapOpenAIChatLogProbsOutput(\n choice == null ? void 0 : choice.logprobs\n );\n if (mappedLogprobs == null ? void 0 : mappedLogprobs.length) {\n if (logprobs === void 0) logprobs = [];\n logprobs.push(...mappedLogprobs);\n }\n const mappedToolCalls = useLegacyFunctionCalling && delta.function_call != null ? [\n {\n type: \"function\",\n id: generateId(),\n function: delta.function_call,\n index: 0\n }\n ] : delta.tool_calls;\n if (mappedToolCalls != null) {\n for (const toolCallDelta of mappedToolCalls) {\n const index = toolCallDelta.index;\n if (toolCalls[index] == null) {\n if (toolCallDelta.type !== \"function\") {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function' type.`\n });\n }\n if (toolCallDelta.id == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'id' to be a string.`\n });\n }\n if (((_a = toolCallDelta.function) == null ? void 0 : _a.name) == null) {\n throw new InvalidResponseDataError({\n data: toolCallDelta,\n message: `Expected 'function.name' to be a string.`\n });\n }\n toolCalls[index] = {\n id: toolCallDelta.id,\n type: \"function\",\n function: {\n name: toolCallDelta.function.name,\n arguments: (_b = toolCallDelta.function.arguments) != null ? _b : \"\"\n },\n hasFinished: false\n };\n const toolCall2 = toolCalls[index];\n if (((_c = toolCall2.function) == null ? void 0 : _c.name) != null && ((_d = toolCall2.function) == null ? void 0 : _d.arguments) != null) {\n if (toolCall2.function.arguments.length > 0) {\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: toolCall2.id,\n toolName: toolCall2.function.name,\n argsTextDelta: toolCall2.function.arguments\n });\n }\n if (isParsableJson(toolCall2.function.arguments)) {\n controller.enqueue({\n type: \"tool-call\",\n toolCallType: \"function\",\n toolCallId: (_e = toolCall2.id) != null ? _e : generateId(),\n toolName: toolCall2.function.name,\n args: toolCall2.function.arguments\n });\n toolCall2.hasFinished = true;\n }\n }\n continue;\n }\n const toolCall = toolCalls[index];\n if (toolCall.hasFinished) {\n continue;\n }\n if (((_f = toolCallDelta.function) == null ? void 0 : _f.arguments) != null) {\n toolCall.function.arguments += (_h = (_g = toolCallDelta.function) == null ? void 0 : _g.arguments) != null ? _h : \"\";\n }\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: toolCall.id,\n toolName: toolCall.function.name,\n argsTextDelta: (_i = toolCallDelta.function.arguments) != null ? _i : \"\"\n });\n if (((_j = toolCall.function) == null ? void 0 : _j.name) != null && ((_k = toolCall.function) == null ? void 0 : _k.arguments) != null && isParsableJson(toolCall.function.arguments)) {\n controller.enqueue({\n type: \"tool-call\",\n toolCallType: \"function\",\n toolCallId: (_l = toolCall.id) != null ? _l : generateId(),\n toolName: toolCall.function.name,\n args: toolCall.function.arguments\n });\n toolCall.hasFinished = true;\n }\n }\n }\n },\n flush(controller) {\n var _a, _b;\n controller.enqueue({\n type: \"finish\",\n finishReason,\n logprobs,\n usage: {\n promptTokens: (_a = usage.promptTokens) != null ? _a : NaN,\n completionTokens: (_b = usage.completionTokens) != null ? _b : NaN\n },\n ...providerMetadata != null ? { providerMetadata } : {}\n });\n }\n })\n ),\n rawCall: { rawPrompt, rawSettings },\n rawResponse: { headers: responseHeaders },\n request: { body: JSON.stringify(body) },\n warnings\n };\n }\n};\nvar openaiTokenUsageSchema = z2.object({\n prompt_tokens: z2.number().nullish(),\n completion_tokens: z2.number().nullish(),\n prompt_tokens_details: z2.object({\n cached_tokens: z2.number().nullish()\n }).nullish(),\n completion_tokens_details: z2.object({\n reasoning_tokens: z2.number().nullish(),\n accepted_prediction_tokens: z2.number().nullish(),\n rejected_prediction_tokens: z2.number().nullish()\n }).nullish()\n}).nullish();\nvar openaiChatResponseSchema = z2.object({\n id: z2.string().nullish(),\n created: z2.number().nullish(),\n model: z2.string().nullish(),\n choices: z2.array(\n z2.object({\n message: z2.object({\n role: z2.literal(\"assistant\").nullish(),\n content: z2.string().nullish(),\n function_call: z2.object({\n arguments: z2.string(),\n name: z2.string()\n }).nullish(),\n tool_calls: z2.array(\n z2.object({\n id: z2.string().nullish(),\n type: z2.literal(\"function\"),\n function: z2.object({\n name: z2.string(),\n arguments: z2.string()\n })\n })\n ).nullish()\n }),\n index: z2.number(),\n logprobs: z2.object({\n content: z2.array(\n z2.object({\n token: z2.string(),\n logprob: z2.number(),\n top_logprobs: z2.array(\n z2.object({\n token: z2.string(),\n logprob: z2.number()\n })\n )\n })\n ).nullable()\n }).nullish(),\n finish_reason: z2.string().nullish()\n })\n ),\n usage: openaiTokenUsageSchema\n});\nvar openaiChatChunkSchema = z2.union([\n z2.object({\n id: z2.string().nullish(),\n created: z2.number().nullish(),\n model: z2.string().nullish(),\n choices: z2.array(\n z2.object({\n delta: z2.object({\n role: z2.enum([\"assistant\"]).nullish(),\n content: z2.string().nullish(),\n function_call: z2.object({\n name: z2.string().optional(),\n arguments: z2.string().optional()\n }).nullish(),\n tool_calls: z2.array(\n z2.object({\n index: z2.number(),\n id: z2.string().nullish(),\n type: z2.literal(\"function\").nullish(),\n function: z2.object({\n name: z2.string().nullish(),\n arguments: z2.string().nullish()\n })\n })\n ).nullish()\n }).nullish(),\n logprobs: z2.object({\n content: z2.array(\n z2.object({\n token: z2.string(),\n logprob: z2.number(),\n top_logprobs: z2.array(\n z2.object({\n token: z2.string(),\n logprob: z2.number()\n })\n )\n })\n ).nullable()\n }).nullish(),\n finish_reason: z2.string().nullish(),\n index: z2.number()\n })\n ),\n usage: openaiTokenUsageSchema\n }),\n openaiErrorDataSchema\n]);\nfunction isReasoningModel(modelId) {\n return modelId.startsWith(\"o\");\n}\nfunction isAudioModel(modelId) {\n return modelId.startsWith(\"gpt-4o-audio-preview\");\n}\nfunction getSystemMessageMode(modelId) {\n var _a, _b;\n if (!isReasoningModel(modelId)) {\n return \"system\";\n }\n return (_b = (_a = reasoningModels[modelId]) == null ? void 0 : _a.systemMessageMode) != null ? _b : \"developer\";\n}\nvar reasoningModels = {\n \"o1-mini\": {\n systemMessageMode: \"remove\"\n },\n \"o1-mini-2024-09-12\": {\n systemMessageMode: \"remove\"\n },\n \"o1-preview\": {\n systemMessageMode: \"remove\"\n },\n \"o1-preview-2024-09-12\": {\n systemMessageMode: \"remove\"\n },\n o3: {\n systemMessageMode: \"developer\"\n },\n \"o3-2025-04-16\": {\n systemMessageMode: \"developer\"\n },\n \"o3-mini\": {\n systemMessageMode: \"developer\"\n },\n \"o3-mini-2025-01-31\": {\n systemMessageMode: \"developer\"\n },\n \"o4-mini\": {\n systemMessageMode: \"developer\"\n },\n \"o4-mini-2025-04-16\": {\n systemMessageMode: \"developer\"\n }\n};\n\n// src/openai-completion-language-model.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError5\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders2,\n createEventSourceResponseHandler as createEventSourceResponseHandler2,\n createJsonResponseHandler as createJsonResponseHandler2,\n postJsonToApi as postJsonToApi2\n} from \"@ai-sdk/provider-utils\";\nimport { z as z3 } from \"zod\";\n\n// src/convert-to-openai-completion-prompt.ts\nimport {\n InvalidPromptError,\n UnsupportedFunctionalityError as UnsupportedFunctionalityError4\n} from \"@ai-sdk/provider\";\nfunction convertToOpenAICompletionPrompt({\n prompt,\n inputFormat,\n user = \"user\",\n assistant = \"assistant\"\n}) {\n if (inputFormat === \"prompt\" && prompt.length === 1 && prompt[0].role === \"user\" && prompt[0].content.length === 1 && prompt[0].content[0].type === \"text\") {\n return { prompt: prompt[0].content[0].text };\n }\n let text = \"\";\n if (prompt[0].role === \"system\") {\n text += `${prompt[0].content}\n\n`;\n prompt = prompt.slice(1);\n }\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n throw new InvalidPromptError({\n message: \"Unexpected system message in prompt: ${content}\",\n prompt\n });\n }\n case \"user\": {\n const userMessage = content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"image\": {\n throw new UnsupportedFunctionalityError4({\n functionality: \"images\"\n });\n }\n }\n }).join(\"\");\n text += `${user}:\n${userMessage}\n\n`;\n break;\n }\n case \"assistant\": {\n const assistantMessage = content.map((part) => {\n switch (part.type) {\n case \"text\": {\n return part.text;\n }\n case \"tool-call\": {\n throw new UnsupportedFunctionalityError4({\n functionality: \"tool-call messages\"\n });\n }\n }\n }).join(\"\");\n text += `${assistant}:\n${assistantMessage}\n\n`;\n break;\n }\n case \"tool\": {\n throw new UnsupportedFunctionalityError4({\n functionality: \"tool messages\"\n });\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n text += `${assistant}:\n`;\n return {\n prompt: text,\n stopSequences: [`\n${user}:`]\n };\n}\n\n// src/map-openai-completion-logprobs.ts\nfunction mapOpenAICompletionLogProbs(logprobs) {\n return logprobs == null ? void 0 : logprobs.tokens.map((token, index) => ({\n token,\n logprob: logprobs.token_logprobs[index],\n topLogprobs: logprobs.top_logprobs ? Object.entries(logprobs.top_logprobs[index]).map(\n ([token2, logprob]) => ({\n token: token2,\n logprob\n })\n ) : []\n }));\n}\n\n// src/openai-completion-language-model.ts\nvar OpenAICompletionLanguageModel = class {\n constructor(modelId, settings, config) {\n this.specificationVersion = \"v1\";\n this.defaultObjectGenerationMode = void 0;\n this.modelId = modelId;\n this.settings = settings;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n getArgs({\n mode,\n inputFormat,\n prompt,\n maxTokens,\n temperature,\n topP,\n topK,\n frequencyPenalty,\n presencePenalty,\n stopSequences: userStopSequences,\n responseFormat,\n seed\n }) {\n var _a;\n const type = mode.type;\n const warnings = [];\n if (topK != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"topK\"\n });\n }\n if (responseFormat != null && responseFormat.type !== \"text\") {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"responseFormat\",\n details: \"JSON response format is not supported.\"\n });\n }\n const { prompt: completionPrompt, stopSequences } = convertToOpenAICompletionPrompt({ prompt, inputFormat });\n const stop = [...stopSequences != null ? stopSequences : [], ...userStopSequences != null ? userStopSequences : []];\n const baseArgs = {\n // model id:\n model: this.modelId,\n // model specific settings:\n echo: this.settings.echo,\n logit_bias: this.settings.logitBias,\n logprobs: typeof this.settings.logprobs === \"number\" ? this.settings.logprobs : typeof this.settings.logprobs === \"boolean\" ? this.settings.logprobs ? 0 : void 0 : void 0,\n suffix: this.settings.suffix,\n user: this.settings.user,\n // standardized settings:\n max_tokens: maxTokens,\n temperature,\n top_p: topP,\n frequency_penalty: frequencyPenalty,\n presence_penalty: presencePenalty,\n seed,\n // prompt:\n prompt: completionPrompt,\n // stop sequences:\n stop: stop.length > 0 ? stop : void 0\n };\n switch (type) {\n case \"regular\": {\n if ((_a = mode.tools) == null ? void 0 : _a.length) {\n throw new UnsupportedFunctionalityError5({\n functionality: \"tools\"\n });\n }\n if (mode.toolChoice) {\n throw new UnsupportedFunctionalityError5({\n functionality: \"toolChoice\"\n });\n }\n return { args: baseArgs, warnings };\n }\n case \"object-json\": {\n throw new UnsupportedFunctionalityError5({\n functionality: \"object-json mode\"\n });\n }\n case \"object-tool\": {\n throw new UnsupportedFunctionalityError5({\n functionality: \"object-tool mode\"\n });\n }\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n async doGenerate(options) {\n const { args, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi2({\n url: this.config.url({\n path: \"/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n body: args,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler2(\n openaiCompletionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const { prompt: rawPrompt, ...rawSettings } = args;\n const choice = response.choices[0];\n return {\n text: choice.text,\n usage: {\n promptTokens: response.usage.prompt_tokens,\n completionTokens: response.usage.completion_tokens\n },\n finishReason: mapOpenAIFinishReason(choice.finish_reason),\n logprobs: mapOpenAICompletionLogProbs(choice.logprobs),\n rawCall: { rawPrompt, rawSettings },\n rawResponse: { headers: responseHeaders, body: rawResponse },\n response: getResponseMetadata(response),\n warnings,\n request: { body: JSON.stringify(args) }\n };\n }\n async doStream(options) {\n const { args, warnings } = this.getArgs(options);\n const body = {\n ...args,\n stream: true,\n // only include stream_options when in strict compatibility mode:\n stream_options: this.config.compatibility === \"strict\" ? { include_usage: true } : void 0\n };\n const { responseHeaders, value: response } = await postJsonToApi2({\n url: this.config.url({\n path: \"/completions\",\n modelId: this.modelId\n }),\n headers: combineHeaders2(this.config.headers(), options.headers),\n body,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler2(\n openaiCompletionChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const { prompt: rawPrompt, ...rawSettings } = args;\n let finishReason = \"unknown\";\n let usage = {\n promptTokens: Number.NaN,\n completionTokens: Number.NaN\n };\n let logprobs;\n let isFirstChunk = true;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n if (!chunk.success) {\n finishReason = \"error\";\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (\"error\" in value) {\n finishReason = \"error\";\n controller.enqueue({ type: \"error\", error: value.error });\n return;\n }\n if (isFirstChunk) {\n isFirstChunk = false;\n controller.enqueue({\n type: \"response-metadata\",\n ...getResponseMetadata(value)\n });\n }\n if (value.usage != null) {\n usage = {\n promptTokens: value.usage.prompt_tokens,\n completionTokens: value.usage.completion_tokens\n };\n }\n const choice = value.choices[0];\n if ((choice == null ? void 0 : choice.finish_reason) != null) {\n finishReason = mapOpenAIFinishReason(choice.finish_reason);\n }\n if ((choice == null ? void 0 : choice.text) != null) {\n controller.enqueue({\n type: \"text-delta\",\n textDelta: choice.text\n });\n }\n const mappedLogprobs = mapOpenAICompletionLogProbs(\n choice == null ? void 0 : choice.logprobs\n );\n if (mappedLogprobs == null ? void 0 : mappedLogprobs.length) {\n if (logprobs === void 0) logprobs = [];\n logprobs.push(...mappedLogprobs);\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n logprobs,\n usage\n });\n }\n })\n ),\n rawCall: { rawPrompt, rawSettings },\n rawResponse: { headers: responseHeaders },\n warnings,\n request: { body: JSON.stringify(body) }\n };\n }\n};\nvar openaiCompletionResponseSchema = z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n text: z3.string(),\n finish_reason: z3.string(),\n logprobs: z3.object({\n tokens: z3.array(z3.string()),\n token_logprobs: z3.array(z3.number()),\n top_logprobs: z3.array(z3.record(z3.string(), z3.number())).nullable()\n }).nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number()\n })\n});\nvar openaiCompletionChunkSchema = z3.union([\n z3.object({\n id: z3.string().nullish(),\n created: z3.number().nullish(),\n model: z3.string().nullish(),\n choices: z3.array(\n z3.object({\n text: z3.string(),\n finish_reason: z3.string().nullish(),\n index: z3.number(),\n logprobs: z3.object({\n tokens: z3.array(z3.string()),\n token_logprobs: z3.array(z3.number()),\n top_logprobs: z3.array(z3.record(z3.string(), z3.number())).nullable()\n }).nullish()\n })\n ),\n usage: z3.object({\n prompt_tokens: z3.number(),\n completion_tokens: z3.number()\n }).nullish()\n }),\n openaiErrorDataSchema\n]);\n\n// src/openai-embedding-model.ts\nimport {\n TooManyEmbeddingValuesForCallError\n} from \"@ai-sdk/provider\";\nimport {\n combineHeaders as combineHeaders3,\n createJsonResponseHandler as createJsonResponseHandler3,\n postJsonToApi as postJsonToApi3\n} from \"@ai-sdk/provider-utils\";\nimport { z as z4 } from \"zod\";\nvar OpenAIEmbeddingModel = class {\n constructor(modelId, settings, config) {\n this.specificationVersion = \"v1\";\n this.modelId = modelId;\n this.settings = settings;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n get maxEmbeddingsPerCall() {\n var _a;\n return (_a = this.settings.maxEmbeddingsPerCall) != null ? _a : 2048;\n }\n get supportsParallelCalls() {\n var _a;\n return (_a = this.settings.supportsParallelCalls) != null ? _a : true;\n }\n async doEmbed({\n values,\n headers,\n abortSignal\n }) {\n if (values.length > this.maxEmbeddingsPerCall) {\n throw new TooManyEmbeddingValuesForCallError({\n provider: this.provider,\n modelId: this.modelId,\n maxEmbeddingsPerCall: this.maxEmbeddingsPerCall,\n values\n });\n }\n const { responseHeaders, value: response } = await postJsonToApi3({\n url: this.config.url({\n path: \"/embeddings\",\n modelId: this.modelId\n }),\n headers: combineHeaders3(this.config.headers(), headers),\n body: {\n model: this.modelId,\n input: values,\n encoding_format: \"float\",\n dimensions: this.settings.dimensions,\n user: this.settings.user\n },\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler3(\n openaiTextEmbeddingResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n embeddings: response.data.map((item) => item.embedding),\n usage: response.usage ? { tokens: response.usage.prompt_tokens } : void 0,\n rawResponse: { headers: responseHeaders }\n };\n }\n};\nvar openaiTextEmbeddingResponseSchema = z4.object({\n data: z4.array(z4.object({ embedding: z4.array(z4.number()) })),\n usage: z4.object({ prompt_tokens: z4.number() }).nullish()\n});\n\n// src/openai-image-model.ts\nimport {\n combineHeaders as combineHeaders4,\n createJsonResponseHandler as createJsonResponseHandler4,\n postJsonToApi as postJsonToApi4\n} from \"@ai-sdk/provider-utils\";\nimport { z as z5 } from \"zod\";\n\n// src/openai-image-settings.ts\nvar modelMaxImagesPerCall = {\n \"dall-e-3\": 1,\n \"dall-e-2\": 10,\n \"gpt-image-1\": 10\n};\nvar hasDefaultResponseFormat = /* @__PURE__ */ new Set([\"gpt-image-1\"]);\n\n// src/openai-image-model.ts\nvar OpenAIImageModel = class {\n constructor(modelId, settings, config) {\n this.modelId = modelId;\n this.settings = settings;\n this.config = config;\n this.specificationVersion = \"v1\";\n }\n get maxImagesPerCall() {\n var _a, _b;\n return (_b = (_a = this.settings.maxImagesPerCall) != null ? _a : modelMaxImagesPerCall[this.modelId]) != null ? _b : 1;\n }\n get provider() {\n return this.config.provider;\n }\n async doGenerate({\n prompt,\n n,\n size,\n aspectRatio,\n seed,\n providerOptions,\n headers,\n abortSignal\n }) {\n var _a, _b, _c, _d;\n const warnings = [];\n if (aspectRatio != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"aspectRatio\",\n details: \"This model does not support aspect ratio. Use `size` instead.\"\n });\n }\n if (seed != null) {\n warnings.push({ type: \"unsupported-setting\", setting: \"seed\" });\n }\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { value: response, responseHeaders } = await postJsonToApi4({\n url: this.config.url({\n path: \"/images/generations\",\n modelId: this.modelId\n }),\n headers: combineHeaders4(this.config.headers(), headers),\n body: {\n model: this.modelId,\n prompt,\n n,\n size,\n ...(_d = providerOptions.openai) != null ? _d : {},\n ...!hasDefaultResponseFormat.has(this.modelId) ? { response_format: \"b64_json\" } : {}\n },\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler4(\n openaiImageResponseSchema\n ),\n abortSignal,\n fetch: this.config.fetch\n });\n return {\n images: response.data.map((item) => item.b64_json),\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders\n }\n };\n }\n};\nvar openaiImageResponseSchema = z5.object({\n data: z5.array(z5.object({ b64_json: z5.string() }))\n});\n\n// src/openai-transcription-model.ts\nimport {\n combineHeaders as combineHeaders5,\n convertBase64ToUint8Array,\n createJsonResponseHandler as createJsonResponseHandler5,\n parseProviderOptions,\n postFormDataToApi\n} from \"@ai-sdk/provider-utils\";\nimport { z as z6 } from \"zod\";\nvar openAIProviderOptionsSchema = z6.object({\n include: z6.array(z6.string()).nullish(),\n language: z6.string().nullish(),\n prompt: z6.string().nullish(),\n temperature: z6.number().min(0).max(1).nullish().default(0),\n timestampGranularities: z6.array(z6.enum([\"word\", \"segment\"])).nullish().default([\"segment\"])\n});\nvar languageMap = {\n afrikaans: \"af\",\n arabic: \"ar\",\n armenian: \"hy\",\n azerbaijani: \"az\",\n belarusian: \"be\",\n bosnian: \"bs\",\n bulgarian: \"bg\",\n catalan: \"ca\",\n chinese: \"zh\",\n croatian: \"hr\",\n czech: \"cs\",\n danish: \"da\",\n dutch: \"nl\",\n english: \"en\",\n estonian: \"et\",\n finnish: \"fi\",\n french: \"fr\",\n galician: \"gl\",\n german: \"de\",\n greek: \"el\",\n hebrew: \"he\",\n hindi: \"hi\",\n hungarian: \"hu\",\n icelandic: \"is\",\n indonesian: \"id\",\n italian: \"it\",\n japanese: \"ja\",\n kannada: \"kn\",\n kazakh: \"kk\",\n korean: \"ko\",\n latvian: \"lv\",\n lithuanian: \"lt\",\n macedonian: \"mk\",\n malay: \"ms\",\n marathi: \"mr\",\n maori: \"mi\",\n nepali: \"ne\",\n norwegian: \"no\",\n persian: \"fa\",\n polish: \"pl\",\n portuguese: \"pt\",\n romanian: \"ro\",\n russian: \"ru\",\n serbian: \"sr\",\n slovak: \"sk\",\n slovenian: \"sl\",\n spanish: \"es\",\n swahili: \"sw\",\n swedish: \"sv\",\n tagalog: \"tl\",\n tamil: \"ta\",\n thai: \"th\",\n turkish: \"tr\",\n ukrainian: \"uk\",\n urdu: \"ur\",\n vietnamese: \"vi\",\n welsh: \"cy\"\n};\nvar OpenAITranscriptionModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v1\";\n }\n get provider() {\n return this.config.provider;\n }\n getArgs({\n audio,\n mediaType,\n providerOptions\n }) {\n var _a, _b, _c, _d, _e;\n const warnings = [];\n const openAIOptions = parseProviderOptions({\n provider: \"openai\",\n providerOptions,\n schema: openAIProviderOptionsSchema\n });\n const formData = new FormData();\n const blob = audio instanceof Uint8Array ? new Blob([audio]) : new Blob([convertBase64ToUint8Array(audio)]);\n formData.append(\"model\", this.modelId);\n formData.append(\"file\", new File([blob], \"audio\", { type: mediaType }));\n if (openAIOptions) {\n const transcriptionModelOptions = {\n include: (_a = openAIOptions.include) != null ? _a : void 0,\n language: (_b = openAIOptions.language) != null ? _b : void 0,\n prompt: (_c = openAIOptions.prompt) != null ? _c : void 0,\n temperature: (_d = openAIOptions.temperature) != null ? _d : void 0,\n timestamp_granularities: (_e = openAIOptions.timestampGranularities) != null ? _e : void 0\n };\n for (const key in transcriptionModelOptions) {\n const value = transcriptionModelOptions[key];\n if (value !== void 0) {\n formData.append(key, String(value));\n }\n }\n }\n return {\n formData,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { formData, warnings } = this.getArgs(options);\n const {\n value: response,\n responseHeaders,\n rawValue: rawResponse\n } = await postFormDataToApi({\n url: this.config.url({\n path: \"/audio/transcriptions\",\n modelId: this.modelId\n }),\n headers: combineHeaders5(this.config.headers(), options.headers),\n formData,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler5(\n openaiTranscriptionResponseSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const language = response.language != null && response.language in languageMap ? languageMap[response.language] : void 0;\n return {\n text: response.text,\n segments: (_e = (_d = response.words) == null ? void 0 : _d.map((word) => ({\n text: word.word,\n startSecond: word.start,\n endSecond: word.end\n }))) != null ? _e : [],\n language,\n durationInSeconds: (_f = response.duration) != null ? _f : void 0,\n warnings,\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\nvar openaiTranscriptionResponseSchema = z6.object({\n text: z6.string(),\n language: z6.string().nullish(),\n duration: z6.number().nullish(),\n words: z6.array(\n z6.object({\n word: z6.string(),\n start: z6.number(),\n end: z6.number()\n })\n ).nullish()\n});\n\n// src/responses/openai-responses-language-model.ts\nimport {\n combineHeaders as combineHeaders6,\n createEventSourceResponseHandler as createEventSourceResponseHandler3,\n createJsonResponseHandler as createJsonResponseHandler6,\n generateId as generateId2,\n parseProviderOptions as parseProviderOptions2,\n postJsonToApi as postJsonToApi5\n} from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod\";\n\n// src/responses/convert-to-openai-responses-messages.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError6\n} from \"@ai-sdk/provider\";\nimport { convertUint8ArrayToBase64 as convertUint8ArrayToBase642 } from \"@ai-sdk/provider-utils\";\nfunction convertToOpenAIResponsesMessages({\n prompt,\n systemMessageMode\n}) {\n const messages = [];\n const warnings = [];\n for (const { role, content } of prompt) {\n switch (role) {\n case \"system\": {\n switch (systemMessageMode) {\n case \"system\": {\n messages.push({ role: \"system\", content });\n break;\n }\n case \"developer\": {\n messages.push({ role: \"developer\", content });\n break;\n }\n case \"remove\": {\n warnings.push({\n type: \"other\",\n message: \"system messages are removed for this model\"\n });\n break;\n }\n default: {\n const _exhaustiveCheck = systemMessageMode;\n throw new Error(\n `Unsupported system message mode: ${_exhaustiveCheck}`\n );\n }\n }\n break;\n }\n case \"user\": {\n messages.push({\n role: \"user\",\n content: content.map((part, index) => {\n var _a, _b, _c, _d;\n switch (part.type) {\n case \"text\": {\n return { type: \"input_text\", text: part.text };\n }\n case \"image\": {\n return {\n type: \"input_image\",\n image_url: part.image instanceof URL ? part.image.toString() : `data:${(_a = part.mimeType) != null ? _a : \"image/jpeg\"};base64,${convertUint8ArrayToBase642(part.image)}`,\n // OpenAI specific extension: image detail\n detail: (_c = (_b = part.providerMetadata) == null ? void 0 : _b.openai) == null ? void 0 : _c.imageDetail\n };\n }\n case \"file\": {\n if (part.data instanceof URL) {\n throw new UnsupportedFunctionalityError6({\n functionality: \"File URLs in user messages\"\n });\n }\n switch (part.mimeType) {\n case \"application/pdf\": {\n return {\n type: \"input_file\",\n filename: (_d = part.filename) != null ? _d : `part-${index}.pdf`,\n file_data: `data:application/pdf;base64,${part.data}`\n };\n }\n default: {\n throw new UnsupportedFunctionalityError6({\n functionality: \"Only PDF files are supported in user messages\"\n });\n }\n }\n }\n }\n })\n });\n break;\n }\n case \"assistant\": {\n for (const part of content) {\n switch (part.type) {\n case \"text\": {\n messages.push({\n role: \"assistant\",\n content: [{ type: \"output_text\", text: part.text }]\n });\n break;\n }\n case \"tool-call\": {\n messages.push({\n type: \"function_call\",\n call_id: part.toolCallId,\n name: part.toolName,\n arguments: JSON.stringify(part.args)\n });\n break;\n }\n }\n }\n break;\n }\n case \"tool\": {\n for (const part of content) {\n messages.push({\n type: \"function_call_output\",\n call_id: part.toolCallId,\n output: JSON.stringify(part.result)\n });\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported role: ${_exhaustiveCheck}`);\n }\n }\n }\n return { messages, warnings };\n}\n\n// src/responses/map-openai-responses-finish-reason.ts\nfunction mapOpenAIResponseFinishReason({\n finishReason,\n hasToolCalls\n}) {\n switch (finishReason) {\n case void 0:\n case null:\n return hasToolCalls ? \"tool-calls\" : \"stop\";\n case \"max_output_tokens\":\n return \"length\";\n case \"content_filter\":\n return \"content-filter\";\n default:\n return hasToolCalls ? \"tool-calls\" : \"unknown\";\n }\n}\n\n// src/responses/openai-responses-prepare-tools.ts\nimport {\n UnsupportedFunctionalityError as UnsupportedFunctionalityError7\n} from \"@ai-sdk/provider\";\nfunction prepareResponsesTools({\n mode,\n strict\n}) {\n var _a;\n const tools = ((_a = mode.tools) == null ? void 0 : _a.length) ? mode.tools : void 0;\n const toolWarnings = [];\n if (tools == null) {\n return { tools: void 0, tool_choice: void 0, toolWarnings };\n }\n const toolChoice = mode.toolChoice;\n const openaiTools2 = [];\n for (const tool of tools) {\n switch (tool.type) {\n case \"function\":\n openaiTools2.push({\n type: \"function\",\n name: tool.name,\n description: tool.description,\n parameters: tool.parameters,\n strict: strict ? true : void 0\n });\n break;\n case \"provider-defined\":\n switch (tool.id) {\n case \"openai.web_search_preview\":\n openaiTools2.push({\n type: \"web_search_preview\",\n search_context_size: tool.args.searchContextSize,\n user_location: tool.args.userLocation\n });\n break;\n default:\n toolWarnings.push({ type: \"unsupported-tool\", tool });\n break;\n }\n break;\n default:\n toolWarnings.push({ type: \"unsupported-tool\", tool });\n break;\n }\n }\n if (toolChoice == null) {\n return { tools: openaiTools2, tool_choice: void 0, toolWarnings };\n }\n const type = toolChoice.type;\n switch (type) {\n case \"auto\":\n case \"none\":\n case \"required\":\n return { tools: openaiTools2, tool_choice: type, toolWarnings };\n case \"tool\": {\n if (toolChoice.toolName === \"web_search_preview\") {\n return {\n tools: openaiTools2,\n tool_choice: {\n type: \"web_search_preview\"\n },\n toolWarnings\n };\n }\n return {\n tools: openaiTools2,\n tool_choice: {\n type: \"function\",\n name: toolChoice.toolName\n },\n toolWarnings\n };\n }\n default: {\n const _exhaustiveCheck = type;\n throw new UnsupportedFunctionalityError7({\n functionality: `Unsupported tool choice type: ${_exhaustiveCheck}`\n });\n }\n }\n}\n\n// src/responses/openai-responses-language-model.ts\nvar OpenAIResponsesLanguageModel = class {\n constructor(modelId, config) {\n this.specificationVersion = \"v1\";\n this.defaultObjectGenerationMode = \"json\";\n this.supportsStructuredOutputs = true;\n this.modelId = modelId;\n this.config = config;\n }\n get provider() {\n return this.config.provider;\n }\n getArgs({\n mode,\n maxTokens,\n temperature,\n stopSequences,\n topP,\n topK,\n presencePenalty,\n frequencyPenalty,\n seed,\n prompt,\n providerMetadata,\n responseFormat\n }) {\n var _a, _b, _c;\n const warnings = [];\n const modelConfig = getResponsesModelConfig(this.modelId);\n const type = mode.type;\n if (topK != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"topK\"\n });\n }\n if (seed != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"seed\"\n });\n }\n if (presencePenalty != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"presencePenalty\"\n });\n }\n if (frequencyPenalty != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"frequencyPenalty\"\n });\n }\n if (stopSequences != null) {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"stopSequences\"\n });\n }\n const { messages, warnings: messageWarnings } = convertToOpenAIResponsesMessages({\n prompt,\n systemMessageMode: modelConfig.systemMessageMode\n });\n warnings.push(...messageWarnings);\n const openaiOptions = parseProviderOptions2({\n provider: \"openai\",\n providerOptions: providerMetadata,\n schema: openaiResponsesProviderOptionsSchema\n });\n const isStrict = (_a = openaiOptions == null ? void 0 : openaiOptions.strictSchemas) != null ? _a : true;\n const baseArgs = {\n model: this.modelId,\n input: messages,\n temperature,\n top_p: topP,\n max_output_tokens: maxTokens,\n ...(responseFormat == null ? void 0 : responseFormat.type) === \"json\" && {\n text: {\n format: responseFormat.schema != null ? {\n type: \"json_schema\",\n strict: isStrict,\n name: (_b = responseFormat.name) != null ? _b : \"response\",\n description: responseFormat.description,\n schema: responseFormat.schema\n } : { type: \"json_object\" }\n }\n },\n // provider options:\n metadata: openaiOptions == null ? void 0 : openaiOptions.metadata,\n parallel_tool_calls: openaiOptions == null ? void 0 : openaiOptions.parallelToolCalls,\n previous_response_id: openaiOptions == null ? void 0 : openaiOptions.previousResponseId,\n store: openaiOptions == null ? void 0 : openaiOptions.store,\n user: openaiOptions == null ? void 0 : openaiOptions.user,\n instructions: openaiOptions == null ? void 0 : openaiOptions.instructions,\n // model-specific settings:\n ...modelConfig.isReasoningModel && ((openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null || (openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null) && {\n reasoning: {\n ...(openaiOptions == null ? void 0 : openaiOptions.reasoningEffort) != null && {\n effort: openaiOptions.reasoningEffort\n },\n ...(openaiOptions == null ? void 0 : openaiOptions.reasoningSummary) != null && {\n summary: openaiOptions.reasoningSummary\n }\n }\n },\n ...modelConfig.requiredAutoTruncation && {\n truncation: \"auto\"\n }\n };\n if (modelConfig.isReasoningModel) {\n if (baseArgs.temperature != null) {\n baseArgs.temperature = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"temperature\",\n details: \"temperature is not supported for reasoning models\"\n });\n }\n if (baseArgs.top_p != null) {\n baseArgs.top_p = void 0;\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"topP\",\n details: \"topP is not supported for reasoning models\"\n });\n }\n }\n switch (type) {\n case \"regular\": {\n const { tools, tool_choice, toolWarnings } = prepareResponsesTools({\n mode,\n strict: isStrict\n // TODO support provider options on tools\n });\n return {\n args: {\n ...baseArgs,\n tools,\n tool_choice\n },\n warnings: [...warnings, ...toolWarnings]\n };\n }\n case \"object-json\": {\n return {\n args: {\n ...baseArgs,\n text: {\n format: mode.schema != null ? {\n type: \"json_schema\",\n strict: isStrict,\n name: (_c = mode.name) != null ? _c : \"response\",\n description: mode.description,\n schema: mode.schema\n } : { type: \"json_object\" }\n }\n },\n warnings\n };\n }\n case \"object-tool\": {\n return {\n args: {\n ...baseArgs,\n tool_choice: { type: \"function\", name: mode.tool.name },\n tools: [\n {\n type: \"function\",\n name: mode.tool.name,\n description: mode.tool.description,\n parameters: mode.tool.parameters,\n strict: isStrict\n }\n ]\n },\n warnings\n };\n }\n default: {\n const _exhaustiveCheck = type;\n throw new Error(`Unsupported type: ${_exhaustiveCheck}`);\n }\n }\n }\n async doGenerate(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n const { args: body, warnings } = this.getArgs(options);\n const {\n responseHeaders,\n value: response,\n rawValue: rawResponse\n } = await postJsonToApi5({\n url: this.config.url({\n path: \"/responses\",\n modelId: this.modelId\n }),\n headers: combineHeaders6(this.config.headers(), options.headers),\n body,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createJsonResponseHandler6(\n z7.object({\n id: z7.string(),\n created_at: z7.number(),\n model: z7.string(),\n output: z7.array(\n z7.discriminatedUnion(\"type\", [\n z7.object({\n type: z7.literal(\"message\"),\n role: z7.literal(\"assistant\"),\n content: z7.array(\n z7.object({\n type: z7.literal(\"output_text\"),\n text: z7.string(),\n annotations: z7.array(\n z7.object({\n type: z7.literal(\"url_citation\"),\n start_index: z7.number(),\n end_index: z7.number(),\n url: z7.string(),\n title: z7.string()\n })\n )\n })\n )\n }),\n z7.object({\n type: z7.literal(\"function_call\"),\n call_id: z7.string(),\n name: z7.string(),\n arguments: z7.string()\n }),\n z7.object({\n type: z7.literal(\"web_search_call\")\n }),\n z7.object({\n type: z7.literal(\"computer_call\")\n }),\n z7.object({\n type: z7.literal(\"reasoning\"),\n summary: z7.array(\n z7.object({\n type: z7.literal(\"summary_text\"),\n text: z7.string()\n })\n )\n })\n ])\n ),\n incomplete_details: z7.object({ reason: z7.string() }).nullable(),\n usage: usageSchema\n })\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const outputTextElements = response.output.filter((output) => output.type === \"message\").flatMap((output) => output.content).filter((content) => content.type === \"output_text\");\n const toolCalls = response.output.filter((output) => output.type === \"function_call\").map((output) => ({\n toolCallType: \"function\",\n toolCallId: output.call_id,\n toolName: output.name,\n args: output.arguments\n }));\n const reasoningSummary = (_b = (_a = response.output.find((item) => item.type === \"reasoning\")) == null ? void 0 : _a.summary) != null ? _b : null;\n return {\n text: outputTextElements.map((content) => content.text).join(\"\\n\"),\n sources: outputTextElements.flatMap(\n (content) => content.annotations.map((annotation) => {\n var _a2, _b2, _c2;\n return {\n sourceType: \"url\",\n id: (_c2 = (_b2 = (_a2 = this.config).generateId) == null ? void 0 : _b2.call(_a2)) != null ? _c2 : generateId2(),\n url: annotation.url,\n title: annotation.title\n };\n })\n ),\n finishReason: mapOpenAIResponseFinishReason({\n finishReason: (_c = response.incomplete_details) == null ? void 0 : _c.reason,\n hasToolCalls: toolCalls.length > 0\n }),\n toolCalls: toolCalls.length > 0 ? toolCalls : void 0,\n reasoning: reasoningSummary ? reasoningSummary.map((summary) => ({\n type: \"text\",\n text: summary.text\n })) : void 0,\n usage: {\n promptTokens: response.usage.input_tokens,\n completionTokens: response.usage.output_tokens\n },\n rawCall: {\n rawPrompt: void 0,\n rawSettings: {}\n },\n rawResponse: {\n headers: responseHeaders,\n body: rawResponse\n },\n request: {\n body: JSON.stringify(body)\n },\n response: {\n id: response.id,\n timestamp: new Date(response.created_at * 1e3),\n modelId: response.model\n },\n providerMetadata: {\n openai: {\n responseId: response.id,\n cachedPromptTokens: (_e = (_d = response.usage.input_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : null,\n reasoningTokens: (_g = (_f = response.usage.output_tokens_details) == null ? void 0 : _f.reasoning_tokens) != null ? _g : null\n }\n },\n warnings\n };\n }\n async doStream(options) {\n const { args: body, warnings } = this.getArgs(options);\n const { responseHeaders, value: response } = await postJsonToApi5({\n url: this.config.url({\n path: \"/responses\",\n modelId: this.modelId\n }),\n headers: combineHeaders6(this.config.headers(), options.headers),\n body: {\n ...body,\n stream: true\n },\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createEventSourceResponseHandler3(\n openaiResponsesChunkSchema\n ),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n const self = this;\n let finishReason = \"unknown\";\n let promptTokens = NaN;\n let completionTokens = NaN;\n let cachedPromptTokens = null;\n let reasoningTokens = null;\n let responseId = null;\n const ongoingToolCalls = {};\n let hasToolCalls = false;\n return {\n stream: response.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (!chunk.success) {\n finishReason = \"error\";\n controller.enqueue({ type: \"error\", error: chunk.error });\n return;\n }\n const value = chunk.value;\n if (isResponseOutputItemAddedChunk(value)) {\n if (value.item.type === \"function_call\") {\n ongoingToolCalls[value.output_index] = {\n toolName: value.item.name,\n toolCallId: value.item.call_id\n };\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: value.item.call_id,\n toolName: value.item.name,\n argsTextDelta: value.item.arguments\n });\n }\n } else if (isResponseFunctionCallArgumentsDeltaChunk(value)) {\n const toolCall = ongoingToolCalls[value.output_index];\n if (toolCall != null) {\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: toolCall.toolCallId,\n toolName: toolCall.toolName,\n argsTextDelta: value.delta\n });\n }\n } else if (isResponseCreatedChunk(value)) {\n responseId = value.response.id;\n controller.enqueue({\n type: \"response-metadata\",\n id: value.response.id,\n timestamp: new Date(value.response.created_at * 1e3),\n modelId: value.response.model\n });\n } else if (isTextDeltaChunk(value)) {\n controller.enqueue({\n type: \"text-delta\",\n textDelta: value.delta\n });\n } else if (isResponseReasoningSummaryTextDeltaChunk(value)) {\n controller.enqueue({\n type: \"reasoning\",\n textDelta: value.delta\n });\n } else if (isResponseOutputItemDoneChunk(value) && value.item.type === \"function_call\") {\n ongoingToolCalls[value.output_index] = void 0;\n hasToolCalls = true;\n controller.enqueue({\n type: \"tool-call\",\n toolCallType: \"function\",\n toolCallId: value.item.call_id,\n toolName: value.item.name,\n args: value.item.arguments\n });\n } else if (isResponseFinishedChunk(value)) {\n finishReason = mapOpenAIResponseFinishReason({\n finishReason: (_a = value.response.incomplete_details) == null ? void 0 : _a.reason,\n hasToolCalls\n });\n promptTokens = value.response.usage.input_tokens;\n completionTokens = value.response.usage.output_tokens;\n cachedPromptTokens = (_c = (_b = value.response.usage.input_tokens_details) == null ? void 0 : _b.cached_tokens) != null ? _c : cachedPromptTokens;\n reasoningTokens = (_e = (_d = value.response.usage.output_tokens_details) == null ? void 0 : _d.reasoning_tokens) != null ? _e : reasoningTokens;\n } else if (isResponseAnnotationAddedChunk(value)) {\n controller.enqueue({\n type: \"source\",\n source: {\n sourceType: \"url\",\n id: (_h = (_g = (_f = self.config).generateId) == null ? void 0 : _g.call(_f)) != null ? _h : generateId2(),\n url: value.annotation.url,\n title: value.annotation.title\n }\n });\n }\n },\n flush(controller) {\n controller.enqueue({\n type: \"finish\",\n finishReason,\n usage: { promptTokens, completionTokens },\n ...(cachedPromptTokens != null || reasoningTokens != null) && {\n providerMetadata: {\n openai: {\n responseId,\n cachedPromptTokens,\n reasoningTokens\n }\n }\n }\n });\n }\n })\n ),\n rawCall: {\n rawPrompt: void 0,\n rawSettings: {}\n },\n rawResponse: { headers: responseHeaders },\n request: { body: JSON.stringify(body) },\n warnings\n };\n }\n};\nvar usageSchema = z7.object({\n input_tokens: z7.number(),\n input_tokens_details: z7.object({ cached_tokens: z7.number().nullish() }).nullish(),\n output_tokens: z7.number(),\n output_tokens_details: z7.object({ reasoning_tokens: z7.number().nullish() }).nullish()\n});\nvar textDeltaChunkSchema = z7.object({\n type: z7.literal(\"response.output_text.delta\"),\n delta: z7.string()\n});\nvar responseFinishedChunkSchema = z7.object({\n type: z7.enum([\"response.completed\", \"response.incomplete\"]),\n response: z7.object({\n incomplete_details: z7.object({ reason: z7.string() }).nullish(),\n usage: usageSchema\n })\n});\nvar responseCreatedChunkSchema = z7.object({\n type: z7.literal(\"response.created\"),\n response: z7.object({\n id: z7.string(),\n created_at: z7.number(),\n model: z7.string()\n })\n});\nvar responseOutputItemDoneSchema = z7.object({\n type: z7.literal(\"response.output_item.done\"),\n output_index: z7.number(),\n item: z7.discriminatedUnion(\"type\", [\n z7.object({\n type: z7.literal(\"message\")\n }),\n z7.object({\n type: z7.literal(\"function_call\"),\n id: z7.string(),\n call_id: z7.string(),\n name: z7.string(),\n arguments: z7.string(),\n status: z7.literal(\"completed\")\n })\n ])\n});\nvar responseFunctionCallArgumentsDeltaSchema = z7.object({\n type: z7.literal(\"response.function_call_arguments.delta\"),\n item_id: z7.string(),\n output_index: z7.number(),\n delta: z7.string()\n});\nvar responseOutputItemAddedSchema = z7.object({\n type: z7.literal(\"response.output_item.added\"),\n output_index: z7.number(),\n item: z7.discriminatedUnion(\"type\", [\n z7.object({\n type: z7.literal(\"message\")\n }),\n z7.object({\n type: z7.literal(\"function_call\"),\n id: z7.string(),\n call_id: z7.string(),\n name: z7.string(),\n arguments: z7.string()\n })\n ])\n});\nvar responseAnnotationAddedSchema = z7.object({\n type: z7.literal(\"response.output_text.annotation.added\"),\n annotation: z7.object({\n type: z7.literal(\"url_citation\"),\n url: z7.string(),\n title: z7.string()\n })\n});\nvar responseReasoningSummaryTextDeltaSchema = z7.object({\n type: z7.literal(\"response.reasoning_summary_text.delta\"),\n item_id: z7.string(),\n output_index: z7.number(),\n summary_index: z7.number(),\n delta: z7.string()\n});\nvar openaiResponsesChunkSchema = z7.union([\n textDeltaChunkSchema,\n responseFinishedChunkSchema,\n responseCreatedChunkSchema,\n responseOutputItemDoneSchema,\n responseFunctionCallArgumentsDeltaSchema,\n responseOutputItemAddedSchema,\n responseAnnotationAddedSchema,\n responseReasoningSummaryTextDeltaSchema,\n z7.object({ type: z7.string() }).passthrough()\n // fallback for unknown chunks\n]);\nfunction isTextDeltaChunk(chunk) {\n return chunk.type === \"response.output_text.delta\";\n}\nfunction isResponseOutputItemDoneChunk(chunk) {\n return chunk.type === \"response.output_item.done\";\n}\nfunction isResponseFinishedChunk(chunk) {\n return chunk.type === \"response.completed\" || chunk.type === \"response.incomplete\";\n}\nfunction isResponseCreatedChunk(chunk) {\n return chunk.type === \"response.created\";\n}\nfunction isResponseFunctionCallArgumentsDeltaChunk(chunk) {\n return chunk.type === \"response.function_call_arguments.delta\";\n}\nfunction isResponseOutputItemAddedChunk(chunk) {\n return chunk.type === \"response.output_item.added\";\n}\nfunction isResponseAnnotationAddedChunk(chunk) {\n return chunk.type === \"response.output_text.annotation.added\";\n}\nfunction isResponseReasoningSummaryTextDeltaChunk(chunk) {\n return chunk.type === \"response.reasoning_summary_text.delta\";\n}\nfunction getResponsesModelConfig(modelId) {\n if (modelId.startsWith(\"o\")) {\n if (modelId.startsWith(\"o1-mini\") || modelId.startsWith(\"o1-preview\")) {\n return {\n isReasoningModel: true,\n systemMessageMode: \"remove\",\n requiredAutoTruncation: false\n };\n }\n return {\n isReasoningModel: true,\n systemMessageMode: \"developer\",\n requiredAutoTruncation: false\n };\n }\n return {\n isReasoningModel: false,\n systemMessageMode: \"system\",\n requiredAutoTruncation: false\n };\n}\nvar openaiResponsesProviderOptionsSchema = z7.object({\n metadata: z7.any().nullish(),\n parallelToolCalls: z7.boolean().nullish(),\n previousResponseId: z7.string().nullish(),\n store: z7.boolean().nullish(),\n user: z7.string().nullish(),\n reasoningEffort: z7.string().nullish(),\n strictSchemas: z7.boolean().nullish(),\n instructions: z7.string().nullish(),\n reasoningSummary: z7.string().nullish()\n});\n\n// src/openai-tools.ts\nimport { z as z8 } from \"zod\";\nvar WebSearchPreviewParameters = z8.object({});\nfunction webSearchPreviewTool({\n searchContextSize,\n userLocation\n} = {}) {\n return {\n type: \"provider-defined\",\n id: \"openai.web_search_preview\",\n args: {\n searchContextSize,\n userLocation\n },\n parameters: WebSearchPreviewParameters\n };\n}\nvar openaiTools = {\n webSearchPreview: webSearchPreviewTool\n};\n\n// src/openai-speech-model.ts\nimport {\n combineHeaders as combineHeaders7,\n createBinaryResponseHandler,\n parseProviderOptions as parseProviderOptions3,\n postJsonToApi as postJsonToApi6\n} from \"@ai-sdk/provider-utils\";\nimport { z as z9 } from \"zod\";\nvar OpenAIProviderOptionsSchema = z9.object({\n instructions: z9.string().nullish(),\n speed: z9.number().min(0.25).max(4).default(1).nullish()\n});\nvar OpenAISpeechModel = class {\n constructor(modelId, config) {\n this.modelId = modelId;\n this.config = config;\n this.specificationVersion = \"v1\";\n }\n get provider() {\n return this.config.provider;\n }\n getArgs({\n text,\n voice = \"alloy\",\n outputFormat = \"mp3\",\n speed,\n instructions,\n providerOptions\n }) {\n const warnings = [];\n const openAIOptions = parseProviderOptions3({\n provider: \"openai\",\n providerOptions,\n schema: OpenAIProviderOptionsSchema\n });\n const requestBody = {\n model: this.modelId,\n input: text,\n voice,\n response_format: \"mp3\",\n speed,\n instructions\n };\n if (outputFormat) {\n if ([\"mp3\", \"opus\", \"aac\", \"flac\", \"wav\", \"pcm\"].includes(outputFormat)) {\n requestBody.response_format = outputFormat;\n } else {\n warnings.push({\n type: \"unsupported-setting\",\n setting: \"outputFormat\",\n details: `Unsupported output format: ${outputFormat}. Using mp3 instead.`\n });\n }\n }\n if (openAIOptions) {\n const speechModelOptions = {};\n for (const key in speechModelOptions) {\n const value = speechModelOptions[key];\n if (value !== void 0) {\n requestBody[key] = value;\n }\n }\n }\n return {\n requestBody,\n warnings\n };\n }\n async doGenerate(options) {\n var _a, _b, _c;\n const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();\n const { requestBody, warnings } = this.getArgs(options);\n const {\n value: audio,\n responseHeaders,\n rawValue: rawResponse\n } = await postJsonToApi6({\n url: this.config.url({\n path: \"/audio/speech\",\n modelId: this.modelId\n }),\n headers: combineHeaders7(this.config.headers(), options.headers),\n body: requestBody,\n failedResponseHandler: openaiFailedResponseHandler,\n successfulResponseHandler: createBinaryResponseHandler(),\n abortSignal: options.abortSignal,\n fetch: this.config.fetch\n });\n return {\n audio,\n warnings,\n request: {\n body: JSON.stringify(requestBody)\n },\n response: {\n timestamp: currentDate,\n modelId: this.modelId,\n headers: responseHeaders,\n body: rawResponse\n }\n };\n }\n};\n\n// src/openai-provider.ts\nfunction createOpenAI(options = {}) {\n var _a, _b, _c;\n const baseURL = (_a = withoutTrailingSlash(options.baseURL)) != null ? _a : \"https://api.openai.com/v1\";\n const compatibility = (_b = options.compatibility) != null ? _b : \"compatible\";\n const providerName = (_c = options.name) != null ? _c : \"openai\";\n const getHeaders = () => ({\n Authorization: `Bearer ${loadApiKey({\n apiKey: options.apiKey,\n environmentVariableName: \"OPENAI_API_KEY\",\n description: \"OpenAI\"\n })}`,\n \"OpenAI-Organization\": options.organization,\n \"OpenAI-Project\": options.project,\n ...options.headers\n });\n const createChatModel = (modelId, settings = {}) => new OpenAIChatLanguageModel(modelId, settings, {\n provider: `${providerName}.chat`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n compatibility,\n fetch: options.fetch\n });\n const createCompletionModel = (modelId, settings = {}) => new OpenAICompletionLanguageModel(modelId, settings, {\n provider: `${providerName}.completion`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n compatibility,\n fetch: options.fetch\n });\n const createEmbeddingModel = (modelId, settings = {}) => new OpenAIEmbeddingModel(modelId, settings, {\n provider: `${providerName}.embedding`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createImageModel = (modelId, settings = {}) => new OpenAIImageModel(modelId, settings, {\n provider: `${providerName}.image`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createTranscriptionModel = (modelId) => new OpenAITranscriptionModel(modelId, {\n provider: `${providerName}.transcription`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createSpeechModel = (modelId) => new OpenAISpeechModel(modelId, {\n provider: `${providerName}.speech`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n const createLanguageModel = (modelId, settings) => {\n if (new.target) {\n throw new Error(\n \"The OpenAI model function cannot be called with the new keyword.\"\n );\n }\n if (modelId === \"gpt-3.5-turbo-instruct\") {\n return createCompletionModel(\n modelId,\n settings\n );\n }\n return createChatModel(modelId, settings);\n };\n const createResponsesModel = (modelId) => {\n return new OpenAIResponsesLanguageModel(modelId, {\n provider: `${providerName}.responses`,\n url: ({ path }) => `${baseURL}${path}`,\n headers: getHeaders,\n fetch: options.fetch\n });\n };\n const provider = function(modelId, settings) {\n return createLanguageModel(modelId, settings);\n };\n provider.languageModel = createLanguageModel;\n provider.chat = createChatModel;\n provider.completion = createCompletionModel;\n provider.responses = createResponsesModel;\n provider.embedding = createEmbeddingModel;\n provider.textEmbedding = createEmbeddingModel;\n provider.textEmbeddingModel = createEmbeddingModel;\n provider.image = createImageModel;\n provider.imageModel = createImageModel;\n provider.transcription = createTranscriptionModel;\n provider.transcriptionModel = createTranscriptionModel;\n provider.speech = createSpeechModel;\n provider.speechModel = createSpeechModel;\n provider.tools = openaiTools;\n return provider;\n}\nvar openai = createOpenAI({\n compatibility: \"strict\"\n // strict for OpenAI API\n});\nexport {\n createOpenAI,\n openai\n};\n//# sourceMappingURL=index.mjs.map","import { USER_AGENT } from \"./version-DmM5pPKz.js\";\nimport { createOpenAI } from \"@ai-sdk/openai\";\n\n//#region src/internal/agents/openai-provider.ts\nconst DEFAULT_OPENAI_MODEL = \"gpt-5\";\nconst VALID_REASONING_EFFORTS = [\n\t\"low\",\n\t\"medium\",\n\t\"high\"\n];\nconst DEFAULT_REASONING_EFFORT = \"low\";\nlet configuredBaseUrl;\n/**\n* Configure the OpenAI base URL (CLI flag only, not environment variable).\n* This must be called explicitly - it cannot be set via environment variables for security.\n*/\nfunction setOpenAIBaseUrl(baseUrl) {\n\tconfiguredBaseUrl = baseUrl;\n}\n/**\n* Retrieve an OpenAI language model configured from environment variables and explicit config.\n*\n* Configuration:\n* - OPENAI_MODEL: Model to use (default: \"gpt-5\") - env var OK\n* - OPENAI_REASONING_EFFORT: Reasoning effort for o1 models: \"low\", \"medium\", \"high\", or \"\" to disable (default: \"low\") - env var OK\n* - Base URL: Must be set via setOpenAIBaseUrl() - NOT from env vars (security risk)\n*/\nfunction getOpenAIModel(model) {\n\tconst defaultModel = process.env.OPENAI_MODEL || DEFAULT_OPENAI_MODEL;\n\tconst envReasoningEffort = process.env.OPENAI_REASONING_EFFORT;\n\tlet reasoningEffort;\n\tif (envReasoningEffort === \"\") reasoningEffort = void 0;\n\telse if (envReasoningEffort === void 0) reasoningEffort = DEFAULT_REASONING_EFFORT;\n\telse if (VALID_REASONING_EFFORTS.includes(envReasoningEffort)) reasoningEffort = envReasoningEffort;\n\telse {\n\t\tconst validValues = VALID_REASONING_EFFORTS.map((v) => `\"${v}\"`).join(\", \");\n\t\tthrow new Error(`Invalid OPENAI_REASONING_EFFORT value: \"${envReasoningEffort}\". Must be one of: ${validValues}, or \"\" (empty string to disable). Default is \"${DEFAULT_REASONING_EFFORT}\".`);\n\t}\n\tconst factory = createOpenAI({\n\t\t...configuredBaseUrl && { baseURL: configuredBaseUrl },\n\t\theaders: { \"User-Agent\": USER_AGENT }\n\t});\n\treturn factory(model ?? defaultModel, { ...reasoningEffort && { reasoningEffort } });\n}\n\n//#endregion\nexport { getOpenAIModel, setOpenAIBaseUrl };\n//# sourceMappingURL=openai-provider-C18ibzKZ.js.map","export const ignoreOverride = Symbol(\"Let zodToJsonSchema decide on which parser to use\");\nexport const jsonDescription = (jsonSchema, def) => {\n if (def.description) {\n try {\n return {\n ...jsonSchema,\n ...JSON.parse(def.description),\n };\n }\n catch { }\n }\n return jsonSchema;\n};\nexport const defaultOptions = {\n name: undefined,\n $refStrategy: \"root\",\n basePath: [\"#\"],\n effectStrategy: \"input\",\n pipeStrategy: \"all\",\n dateStrategy: \"format:date-time\",\n mapStrategy: \"entries\",\n removeAdditionalStrategy: \"passthrough\",\n allowedAdditionalProperties: true,\n rejectedAdditionalProperties: false,\n definitionPath: \"definitions\",\n target: \"jsonSchema7\",\n strictUnions: false,\n definitions: {},\n errorMessages: false,\n markdownDescription: false,\n patternStrategy: \"escape\",\n applyRegexFlags: false,\n emailStrategy: \"format:email\",\n base64Strategy: \"contentEncoding:base64\",\n nameStrategy: \"ref\",\n openAiAnyTypeName: \"OpenAiAnyType\"\n};\nexport const getDefaultOptions = (options) => (typeof options === \"string\"\n ? {\n ...defaultOptions,\n name: options,\n }\n : {\n ...defaultOptions,\n ...options,\n });\n","import { getDefaultOptions } from \"./Options.js\";\nexport const getRefs = (options) => {\n const _options = getDefaultOptions(options);\n const currentPath = _options.name !== undefined\n ? [..._options.basePath, _options.definitionPath, _options.name]\n : _options.basePath;\n return {\n ..._options,\n flags: { hasReferencedOpenAiAnyType: false },\n currentPath: currentPath,\n propertyPath: undefined,\n seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [\n def._def,\n {\n def: def._def,\n path: [..._options.basePath, _options.definitionPath, name],\n // Resolution of references will be forced even though seen, so it's ok that the schema is undefined here for now.\n jsonSchema: undefined,\n },\n ])),\n };\n};\n","export function addErrorMessage(res, key, errorMessage, refs) {\n if (!refs?.errorMessages)\n return;\n if (errorMessage) {\n res.errorMessage = {\n ...res.errorMessage,\n [key]: errorMessage,\n };\n }\n}\nexport function setResponseValueAndErrors(res, key, value, errorMessage, refs) {\n res[key] = value;\n addErrorMessage(res, key, errorMessage, refs);\n}\n","export const getRelativePath = (pathA, pathB) => {\n let i = 0;\n for (; i < pathA.length && i < pathB.length; i++) {\n if (pathA[i] !== pathB[i])\n break;\n }\n return [(pathA.length - i).toString(), ...pathB.slice(i)].join(\"/\");\n};\n","import { getRelativePath } from \"../getRelativePath.js\";\nexport function parseAnyDef(refs) {\n if (refs.target !== \"openAi\") {\n return {};\n }\n const anyDefinitionPath = [\n ...refs.basePath,\n refs.definitionPath,\n refs.openAiAnyTypeName,\n ];\n refs.flags.hasReferencedOpenAiAnyType = true;\n return {\n $ref: refs.$refStrategy === \"relative\"\n ? getRelativePath(anyDefinitionPath, refs.currentPath)\n : anyDefinitionPath.join(\"/\"),\n };\n}\n","import { ZodFirstPartyTypeKind } from \"zod/v3\";\nimport { setResponseValueAndErrors } from \"../errorMessages.js\";\nimport { parseDef } from \"../parseDef.js\";\nexport function parseArrayDef(def, refs) {\n const res = {\n type: \"array\",\n };\n if (def.type?._def &&\n def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {\n res.items = parseDef(def.type._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\"],\n });\n }\n if (def.minLength) {\n setResponseValueAndErrors(res, \"minItems\", def.minLength.value, def.minLength.message, refs);\n }\n if (def.maxLength) {\n setResponseValueAndErrors(res, \"maxItems\", def.maxLength.value, def.maxLength.message, refs);\n }\n if (def.exactLength) {\n setResponseValueAndErrors(res, \"minItems\", def.exactLength.value, def.exactLength.message, refs);\n setResponseValueAndErrors(res, \"maxItems\", def.exactLength.value, def.exactLength.message, refs);\n }\n return res;\n}\n","import { setResponseValueAndErrors } from \"../errorMessages.js\";\nexport function parseBigintDef(def, refs) {\n const res = {\n type: \"integer\",\n format: \"int64\",\n };\n if (!def.checks)\n return res;\n for (const check of def.checks) {\n switch (check.kind) {\n case \"min\":\n if (refs.target === \"jsonSchema7\") {\n if (check.inclusive) {\n setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n }\n else {\n setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n }\n }\n else {\n if (!check.inclusive) {\n res.exclusiveMinimum = true;\n }\n setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n }\n break;\n case \"max\":\n if (refs.target === \"jsonSchema7\") {\n if (check.inclusive) {\n setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n }\n else {\n setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n }\n }\n else {\n if (!check.inclusive) {\n res.exclusiveMaximum = true;\n }\n setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n }\n break;\n case \"multipleOf\":\n setResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n break;\n }\n }\n return res;\n}\n","export function parseBooleanDef() {\n return {\n type: \"boolean\",\n };\n}\n","import { parseDef } from \"../parseDef.js\";\nexport function parseBrandedDef(_def, refs) {\n return parseDef(_def.type._def, refs);\n}\n","import { parseDef } from \"../parseDef.js\";\nexport const parseCatchDef = (def, refs) => {\n return parseDef(def.innerType._def, refs);\n};\n","import { setResponseValueAndErrors } from \"../errorMessages.js\";\nexport function parseDateDef(def, refs, overrideDateStrategy) {\n const strategy = overrideDateStrategy ?? refs.dateStrategy;\n if (Array.isArray(strategy)) {\n return {\n anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)),\n };\n }\n switch (strategy) {\n case \"string\":\n case \"format:date-time\":\n return {\n type: \"string\",\n format: \"date-time\",\n };\n case \"format:date\":\n return {\n type: \"string\",\n format: \"date\",\n };\n case \"integer\":\n return integerDateParser(def, refs);\n }\n}\nconst integerDateParser = (def, refs) => {\n const res = {\n type: \"integer\",\n format: \"unix-time\",\n };\n if (refs.target === \"openApi3\") {\n return res;\n }\n for (const check of def.checks) {\n switch (check.kind) {\n case \"min\":\n setResponseValueAndErrors(res, \"minimum\", check.value, // This is in milliseconds\n check.message, refs);\n break;\n case \"max\":\n setResponseValueAndErrors(res, \"maximum\", check.value, // This is in milliseconds\n check.message, refs);\n break;\n }\n }\n return res;\n};\n","import { parseDef } from \"../parseDef.js\";\nexport function parseDefaultDef(_def, refs) {\n return {\n ...parseDef(_def.innerType._def, refs),\n default: _def.defaultValue(),\n };\n}\n","import { parseDef } from \"../parseDef.js\";\nimport { parseAnyDef } from \"./any.js\";\nexport function parseEffectsDef(_def, refs) {\n return refs.effectStrategy === \"input\"\n ? parseDef(_def.schema._def, refs)\n : parseAnyDef(refs);\n}\n","export function parseEnumDef(def) {\n return {\n type: \"string\",\n enum: Array.from(def.values),\n };\n}\n","import { parseDef } from \"../parseDef.js\";\nconst isJsonSchema7AllOfType = (type) => {\n if (\"type\" in type && type.type === \"string\")\n return false;\n return \"allOf\" in type;\n};\nexport function parseIntersectionDef(def, refs) {\n const allOf = [\n parseDef(def.left._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"allOf\", \"0\"],\n }),\n parseDef(def.right._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"allOf\", \"1\"],\n }),\n ].filter((x) => !!x);\n let unevaluatedProperties = refs.target === \"jsonSchema2019-09\"\n ? { unevaluatedProperties: false }\n : undefined;\n const mergedAllOf = [];\n // If either of the schemas is an allOf, merge them into a single allOf\n allOf.forEach((schema) => {\n if (isJsonSchema7AllOfType(schema)) {\n mergedAllOf.push(...schema.allOf);\n if (schema.unevaluatedProperties === undefined) {\n // If one of the schemas has no unevaluatedProperties set,\n // the merged schema should also have no unevaluatedProperties set\n unevaluatedProperties = undefined;\n }\n }\n else {\n let nestedSchema = schema;\n if (\"additionalProperties\" in schema &&\n schema.additionalProperties === false) {\n const { additionalProperties, ...rest } = schema;\n nestedSchema = rest;\n }\n else {\n // As soon as one of the schemas has additionalProperties set not to false, we allow unevaluatedProperties\n unevaluatedProperties = undefined;\n }\n mergedAllOf.push(nestedSchema);\n }\n });\n return mergedAllOf.length\n ? {\n allOf: mergedAllOf,\n ...unevaluatedProperties,\n }\n : undefined;\n}\n","export function parseLiteralDef(def, refs) {\n const parsedType = typeof def.value;\n if (parsedType !== \"bigint\" &&\n parsedType !== \"number\" &&\n parsedType !== \"boolean\" &&\n parsedType !== \"string\") {\n return {\n type: Array.isArray(def.value) ? \"array\" : \"object\",\n };\n }\n if (refs.target === \"openApi3\") {\n return {\n type: parsedType === \"bigint\" ? \"integer\" : parsedType,\n enum: [def.value],\n };\n }\n return {\n type: parsedType === \"bigint\" ? \"integer\" : parsedType,\n const: def.value,\n };\n}\n","import { setResponseValueAndErrors } from \"../errorMessages.js\";\nlet emojiRegex = undefined;\n/**\n * Generated from the regular expressions found here as of 2024-05-22:\n * https://github.com/colinhacks/zod/blob/master/src/types.ts.\n *\n * Expressions with /i flag have been changed accordingly.\n */\nexport const zodPatterns = {\n /**\n * `c` was changed to `[cC]` to replicate /i flag\n */\n cuid: /^[cC][^\\s-]{8,}$/,\n cuid2: /^[0-9a-z]+$/,\n ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,\n /**\n * `a-z` was added to replicate /i flag\n */\n email: /^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_'+\\-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$/,\n /**\n * Constructed a valid Unicode RegExp\n *\n * Lazily instantiate since this type of regex isn't supported\n * in all envs (e.g. React Native).\n *\n * See:\n * https://github.com/colinhacks/zod/issues/2433\n * Fix in Zod:\n * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b\n */\n emoji: () => {\n if (emojiRegex === undefined) {\n emojiRegex = RegExp(\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\", \"u\");\n }\n return emojiRegex;\n },\n /**\n * Unused\n */\n uuid: /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/,\n /**\n * Unused\n */\n ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,\n ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/,\n /**\n * Unused\n */\n ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,\n ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,\n base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,\n base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,\n nanoid: /^[a-zA-Z0-9_-]{21}$/,\n jwt: /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/,\n};\nexport function parseStringDef(def, refs) {\n const res = {\n type: \"string\",\n };\n if (def.checks) {\n for (const check of def.checks) {\n switch (check.kind) {\n case \"min\":\n setResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\"\n ? Math.max(res.minLength, check.value)\n : check.value, check.message, refs);\n break;\n case \"max\":\n setResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\"\n ? Math.min(res.maxLength, check.value)\n : check.value, check.message, refs);\n break;\n case \"email\":\n switch (refs.emailStrategy) {\n case \"format:email\":\n addFormat(res, \"email\", check.message, refs);\n break;\n case \"format:idn-email\":\n addFormat(res, \"idn-email\", check.message, refs);\n break;\n case \"pattern:zod\":\n addPattern(res, zodPatterns.email, check.message, refs);\n break;\n }\n break;\n case \"url\":\n addFormat(res, \"uri\", check.message, refs);\n break;\n case \"uuid\":\n addFormat(res, \"uuid\", check.message, refs);\n break;\n case \"regex\":\n addPattern(res, check.regex, check.message, refs);\n break;\n case \"cuid\":\n addPattern(res, zodPatterns.cuid, check.message, refs);\n break;\n case \"cuid2\":\n addPattern(res, zodPatterns.cuid2, check.message, refs);\n break;\n case \"startsWith\":\n addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs);\n break;\n case \"endsWith\":\n addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs);\n break;\n case \"datetime\":\n addFormat(res, \"date-time\", check.message, refs);\n break;\n case \"date\":\n addFormat(res, \"date\", check.message, refs);\n break;\n case \"time\":\n addFormat(res, \"time\", check.message, refs);\n break;\n case \"duration\":\n addFormat(res, \"duration\", check.message, refs);\n break;\n case \"length\":\n setResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\"\n ? Math.max(res.minLength, check.value)\n : check.value, check.message, refs);\n setResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\"\n ? Math.min(res.maxLength, check.value)\n : check.value, check.message, refs);\n break;\n case \"includes\": {\n addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs);\n break;\n }\n case \"ip\": {\n if (check.version !== \"v6\") {\n addFormat(res, \"ipv4\", check.message, refs);\n }\n if (check.version !== \"v4\") {\n addFormat(res, \"ipv6\", check.message, refs);\n }\n break;\n }\n case \"base64url\":\n addPattern(res, zodPatterns.base64url, check.message, refs);\n break;\n case \"jwt\":\n addPattern(res, zodPatterns.jwt, check.message, refs);\n break;\n case \"cidr\": {\n if (check.version !== \"v6\") {\n addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);\n }\n if (check.version !== \"v4\") {\n addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);\n }\n break;\n }\n case \"emoji\":\n addPattern(res, zodPatterns.emoji(), check.message, refs);\n break;\n case \"ulid\": {\n addPattern(res, zodPatterns.ulid, check.message, refs);\n break;\n }\n case \"base64\": {\n switch (refs.base64Strategy) {\n case \"format:binary\": {\n addFormat(res, \"binary\", check.message, refs);\n break;\n }\n case \"contentEncoding:base64\": {\n setResponseValueAndErrors(res, \"contentEncoding\", \"base64\", check.message, refs);\n break;\n }\n case \"pattern:zod\": {\n addPattern(res, zodPatterns.base64, check.message, refs);\n break;\n }\n }\n break;\n }\n case \"nanoid\": {\n addPattern(res, zodPatterns.nanoid, check.message, refs);\n }\n case \"toLowerCase\":\n case \"toUpperCase\":\n case \"trim\":\n break;\n default:\n ((_) => { })(check);\n }\n }\n }\n return res;\n}\nfunction escapeLiteralCheckValue(literal, refs) {\n return refs.patternStrategy === \"escape\"\n ? escapeNonAlphaNumeric(literal)\n : literal;\n}\nconst ALPHA_NUMERIC = new Set(\"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789\");\nfunction escapeNonAlphaNumeric(source) {\n let result = \"\";\n for (let i = 0; i < source.length; i++) {\n if (!ALPHA_NUMERIC.has(source[i])) {\n result += \"\\\\\";\n }\n result += source[i];\n }\n return result;\n}\n// Adds a \"format\" keyword to the schema. If a format exists, both formats will be joined in an allOf-node, along with subsequent ones.\nfunction addFormat(schema, value, message, refs) {\n if (schema.format || schema.anyOf?.some((x) => x.format)) {\n if (!schema.anyOf) {\n schema.anyOf = [];\n }\n if (schema.format) {\n schema.anyOf.push({\n format: schema.format,\n ...(schema.errorMessage &&\n refs.errorMessages && {\n errorMessage: { format: schema.errorMessage.format },\n }),\n });\n delete schema.format;\n if (schema.errorMessage) {\n delete schema.errorMessage.format;\n if (Object.keys(schema.errorMessage).length === 0) {\n delete schema.errorMessage;\n }\n }\n }\n schema.anyOf.push({\n format: value,\n ...(message &&\n refs.errorMessages && { errorMessage: { format: message } }),\n });\n }\n else {\n setResponseValueAndErrors(schema, \"format\", value, message, refs);\n }\n}\n// Adds a \"pattern\" keyword to the schema. If a pattern exists, both patterns will be joined in an allOf-node, along with subsequent ones.\nfunction addPattern(schema, regex, message, refs) {\n if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {\n if (!schema.allOf) {\n schema.allOf = [];\n }\n if (schema.pattern) {\n schema.allOf.push({\n pattern: schema.pattern,\n ...(schema.errorMessage &&\n refs.errorMessages && {\n errorMessage: { pattern: schema.errorMessage.pattern },\n }),\n });\n delete schema.pattern;\n if (schema.errorMessage) {\n delete schema.errorMessage.pattern;\n if (Object.keys(schema.errorMessage).length === 0) {\n delete schema.errorMessage;\n }\n }\n }\n schema.allOf.push({\n pattern: stringifyRegExpWithFlags(regex, refs),\n ...(message &&\n refs.errorMessages && { errorMessage: { pattern: message } }),\n });\n }\n else {\n setResponseValueAndErrors(schema, \"pattern\", stringifyRegExpWithFlags(regex, refs), message, refs);\n }\n}\n// Mutate z.string.regex() in a best attempt to accommodate for regex flags when applyRegexFlags is true\nfunction stringifyRegExpWithFlags(regex, refs) {\n if (!refs.applyRegexFlags || !regex.flags) {\n return regex.source;\n }\n // Currently handled flags\n const flags = {\n i: regex.flags.includes(\"i\"),\n m: regex.flags.includes(\"m\"),\n s: regex.flags.includes(\"s\"), // `.` matches newlines\n };\n // The general principle here is to step through each character, one at a time, applying mutations as flags require. We keep track when the current character is escaped, and when it's inside a group /like [this]/ or (also) a range like /[a-z]/. The following is fairly brittle imperative code; edit at your peril!\n const source = flags.i ? regex.source.toLowerCase() : regex.source;\n let pattern = \"\";\n let isEscaped = false;\n let inCharGroup = false;\n let inCharRange = false;\n for (let i = 0; i < source.length; i++) {\n if (isEscaped) {\n pattern += source[i];\n isEscaped = false;\n continue;\n }\n if (flags.i) {\n if (inCharGroup) {\n if (source[i].match(/[a-z]/)) {\n if (inCharRange) {\n pattern += source[i];\n pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();\n inCharRange = false;\n }\n else if (source[i + 1] === \"-\" && source[i + 2]?.match(/[a-z]/)) {\n pattern += source[i];\n inCharRange = true;\n }\n else {\n pattern += `${source[i]}${source[i].toUpperCase()}`;\n }\n continue;\n }\n }\n else if (source[i].match(/[a-z]/)) {\n pattern += `[${source[i]}${source[i].toUpperCase()}]`;\n continue;\n }\n }\n if (flags.m) {\n if (source[i] === \"^\") {\n pattern += `(^|(?<=[\\r\\n]))`;\n continue;\n }\n else if (source[i] === \"$\") {\n pattern += `($|(?=[\\r\\n]))`;\n continue;\n }\n }\n if (flags.s && source[i] === \".\") {\n pattern += inCharGroup ? `${source[i]}\\r\\n` : `[${source[i]}\\r\\n]`;\n continue;\n }\n pattern += source[i];\n if (source[i] === \"\\\\\") {\n isEscaped = true;\n }\n else if (inCharGroup && source[i] === \"]\") {\n inCharGroup = false;\n }\n else if (!inCharGroup && source[i] === \"[\") {\n inCharGroup = true;\n }\n }\n try {\n new RegExp(pattern);\n }\n catch {\n console.warn(`Could not convert regex pattern at ${refs.currentPath.join(\"/\")} to a flag-independent form! Falling back to the flag-ignorant source`);\n return regex.source;\n }\n return pattern;\n}\n","import { ZodFirstPartyTypeKind, } from \"zod/v3\";\nimport { parseDef } from \"../parseDef.js\";\nimport { parseStringDef } from \"./string.js\";\nimport { parseBrandedDef } from \"./branded.js\";\nimport { parseAnyDef } from \"./any.js\";\nexport function parseRecordDef(def, refs) {\n if (refs.target === \"openAi\") {\n console.warn(\"Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.\");\n }\n if (refs.target === \"openApi3\" &&\n def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {\n return {\n type: \"object\",\n required: def.keyType._def.values,\n properties: def.keyType._def.values.reduce((acc, key) => ({\n ...acc,\n [key]: parseDef(def.valueType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"properties\", key],\n }) ?? parseAnyDef(refs),\n }), {}),\n additionalProperties: refs.rejectedAdditionalProperties,\n };\n }\n const schema = {\n type: \"object\",\n additionalProperties: parseDef(def.valueType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"additionalProperties\"],\n }) ?? refs.allowedAdditionalProperties,\n };\n if (refs.target === \"openApi3\") {\n return schema;\n }\n if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString &&\n def.keyType._def.checks?.length) {\n const { type, ...keyType } = parseStringDef(def.keyType._def, refs);\n return {\n ...schema,\n propertyNames: keyType,\n };\n }\n else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {\n return {\n ...schema,\n propertyNames: {\n enum: def.keyType._def.values,\n },\n };\n }\n else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded &&\n def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString &&\n def.keyType._def.type._def.checks?.length) {\n const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);\n return {\n ...schema,\n propertyNames: keyType,\n };\n }\n return schema;\n}\n","import { parseDef } from \"../parseDef.js\";\nimport { parseRecordDef } from \"./record.js\";\nimport { parseAnyDef } from \"./any.js\";\nexport function parseMapDef(def, refs) {\n if (refs.mapStrategy === \"record\") {\n return parseRecordDef(def, refs);\n }\n const keys = parseDef(def.keyType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\", \"items\", \"0\"],\n }) || parseAnyDef(refs);\n const values = parseDef(def.valueType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\", \"items\", \"1\"],\n }) || parseAnyDef(refs);\n return {\n type: \"array\",\n maxItems: 125,\n items: {\n type: \"array\",\n items: [keys, values],\n minItems: 2,\n maxItems: 2,\n },\n };\n}\n","export function parseNativeEnumDef(def) {\n const object = def.values;\n const actualKeys = Object.keys(def.values).filter((key) => {\n return typeof object[object[key]] !== \"number\";\n });\n const actualValues = actualKeys.map((key) => object[key]);\n const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));\n return {\n type: parsedTypes.length === 1\n ? parsedTypes[0] === \"string\"\n ? \"string\"\n : \"number\"\n : [\"string\", \"number\"],\n enum: actualValues,\n };\n}\n","import { parseAnyDef } from \"./any.js\";\nexport function parseNeverDef(refs) {\n return refs.target === \"openAi\"\n ? undefined\n : {\n not: parseAnyDef({\n ...refs,\n currentPath: [...refs.currentPath, \"not\"],\n }),\n };\n}\n","export function parseNullDef(refs) {\n return refs.target === \"openApi3\"\n ? {\n enum: [\"null\"],\n nullable: true,\n }\n : {\n type: \"null\",\n };\n}\n","import { parseDef } from \"../parseDef.js\";\nexport const primitiveMappings = {\n ZodString: \"string\",\n ZodNumber: \"number\",\n ZodBigInt: \"integer\",\n ZodBoolean: \"boolean\",\n ZodNull: \"null\",\n};\nexport function parseUnionDef(def, refs) {\n if (refs.target === \"openApi3\")\n return asAnyOf(def, refs);\n const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;\n // This blocks tries to look ahead a bit to produce nicer looking schemas with type array instead of anyOf.\n if (options.every((x) => x._def.typeName in primitiveMappings &&\n (!x._def.checks || !x._def.checks.length))) {\n // all types in union are primitive and lack checks, so might as well squash into {type: [...]}\n const types = options.reduce((types, x) => {\n const type = primitiveMappings[x._def.typeName]; //Can be safely casted due to row 43\n return type && !types.includes(type) ? [...types, type] : types;\n }, []);\n return {\n type: types.length > 1 ? types : types[0],\n };\n }\n else if (options.every((x) => x._def.typeName === \"ZodLiteral\" && !x.description)) {\n // all options literals\n const types = options.reduce((acc, x) => {\n const type = typeof x._def.value;\n switch (type) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n return [...acc, type];\n case \"bigint\":\n return [...acc, \"integer\"];\n case \"object\":\n if (x._def.value === null)\n return [...acc, \"null\"];\n case \"symbol\":\n case \"undefined\":\n case \"function\":\n default:\n return acc;\n }\n }, []);\n if (types.length === options.length) {\n // all the literals are primitive, as far as null can be considered primitive\n const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);\n return {\n type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],\n enum: options.reduce((acc, x) => {\n return acc.includes(x._def.value) ? acc : [...acc, x._def.value];\n }, []),\n };\n }\n }\n else if (options.every((x) => x._def.typeName === \"ZodEnum\")) {\n return {\n type: \"string\",\n enum: options.reduce((acc, x) => [\n ...acc,\n ...x._def.values.filter((x) => !acc.includes(x)),\n ], []),\n };\n }\n return asAnyOf(def, refs);\n}\nconst asAnyOf = (def, refs) => {\n const anyOf = (def.options instanceof Map\n ? Array.from(def.options.values())\n : def.options)\n .map((x, i) => parseDef(x._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"anyOf\", `${i}`],\n }))\n .filter((x) => !!x &&\n (!refs.strictUnions ||\n (typeof x === \"object\" && Object.keys(x).length > 0)));\n return anyOf.length ? { anyOf } : undefined;\n};\n","import { parseDef } from \"../parseDef.js\";\nimport { primitiveMappings } from \"./union.js\";\nexport function parseNullableDef(def, refs) {\n if ([\"ZodString\", \"ZodNumber\", \"ZodBigInt\", \"ZodBoolean\", \"ZodNull\"].includes(def.innerType._def.typeName) &&\n (!def.innerType._def.checks || !def.innerType._def.checks.length)) {\n if (refs.target === \"openApi3\") {\n return {\n type: primitiveMappings[def.innerType._def.typeName],\n nullable: true,\n };\n }\n return {\n type: [\n primitiveMappings[def.innerType._def.typeName],\n \"null\",\n ],\n };\n }\n if (refs.target === \"openApi3\") {\n const base = parseDef(def.innerType._def, {\n ...refs,\n currentPath: [...refs.currentPath],\n });\n if (base && \"$ref\" in base)\n return { allOf: [base], nullable: true };\n return base && { ...base, nullable: true };\n }\n const base = parseDef(def.innerType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"anyOf\", \"0\"],\n });\n return base && { anyOf: [base, { type: \"null\" }] };\n}\n","import { addErrorMessage, setResponseValueAndErrors, } from \"../errorMessages.js\";\nexport function parseNumberDef(def, refs) {\n const res = {\n type: \"number\",\n };\n if (!def.checks)\n return res;\n for (const check of def.checks) {\n switch (check.kind) {\n case \"int\":\n res.type = \"integer\";\n addErrorMessage(res, \"type\", check.message, refs);\n break;\n case \"min\":\n if (refs.target === \"jsonSchema7\") {\n if (check.inclusive) {\n setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n }\n else {\n setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n }\n }\n else {\n if (!check.inclusive) {\n res.exclusiveMinimum = true;\n }\n setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n }\n break;\n case \"max\":\n if (refs.target === \"jsonSchema7\") {\n if (check.inclusive) {\n setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n }\n else {\n setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n }\n }\n else {\n if (!check.inclusive) {\n res.exclusiveMaximum = true;\n }\n setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n }\n break;\n case \"multipleOf\":\n setResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n break;\n }\n }\n return res;\n}\n","import { parseDef } from \"../parseDef.js\";\nexport function parseObjectDef(def, refs) {\n const forceOptionalIntoNullable = refs.target === \"openAi\";\n const result = {\n type: \"object\",\n properties: {},\n };\n const required = [];\n const shape = def.shape();\n for (const propName in shape) {\n let propDef = shape[propName];\n if (propDef === undefined || propDef._def === undefined) {\n continue;\n }\n let propOptional = safeIsOptional(propDef);\n if (propOptional && forceOptionalIntoNullable) {\n if (propDef._def.typeName === \"ZodOptional\") {\n propDef = propDef._def.innerType;\n }\n if (!propDef.isNullable()) {\n propDef = propDef.nullable();\n }\n propOptional = false;\n }\n const parsedDef = parseDef(propDef._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"properties\", propName],\n propertyPath: [...refs.currentPath, \"properties\", propName],\n });\n if (parsedDef === undefined) {\n continue;\n }\n result.properties[propName] = parsedDef;\n if (!propOptional) {\n required.push(propName);\n }\n }\n if (required.length) {\n result.required = required;\n }\n const additionalProperties = decideAdditionalProperties(def, refs);\n if (additionalProperties !== undefined) {\n result.additionalProperties = additionalProperties;\n }\n return result;\n}\nfunction decideAdditionalProperties(def, refs) {\n if (def.catchall._def.typeName !== \"ZodNever\") {\n return parseDef(def.catchall._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"additionalProperties\"],\n });\n }\n switch (def.unknownKeys) {\n case \"passthrough\":\n return refs.allowedAdditionalProperties;\n case \"strict\":\n return refs.rejectedAdditionalProperties;\n case \"strip\":\n return refs.removeAdditionalStrategy === \"strict\"\n ? refs.allowedAdditionalProperties\n : refs.rejectedAdditionalProperties;\n }\n}\nfunction safeIsOptional(schema) {\n try {\n return schema.isOptional();\n }\n catch {\n return true;\n }\n}\n","import { parseDef } from \"../parseDef.js\";\nimport { parseAnyDef } from \"./any.js\";\nexport const parseOptionalDef = (def, refs) => {\n if (refs.currentPath.toString() === refs.propertyPath?.toString()) {\n return parseDef(def.innerType._def, refs);\n }\n const innerSchema = parseDef(def.innerType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"anyOf\", \"1\"],\n });\n return innerSchema\n ? {\n anyOf: [\n {\n not: parseAnyDef(refs),\n },\n innerSchema,\n ],\n }\n : parseAnyDef(refs);\n};\n","import { parseDef } from \"../parseDef.js\";\nexport const parsePipelineDef = (def, refs) => {\n if (refs.pipeStrategy === \"input\") {\n return parseDef(def.in._def, refs);\n }\n else if (refs.pipeStrategy === \"output\") {\n return parseDef(def.out._def, refs);\n }\n const a = parseDef(def.in._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"allOf\", \"0\"],\n });\n const b = parseDef(def.out._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"allOf\", a ? \"1\" : \"0\"],\n });\n return {\n allOf: [a, b].filter((x) => x !== undefined),\n };\n};\n","import { parseDef } from \"../parseDef.js\";\nexport function parsePromiseDef(def, refs) {\n return parseDef(def.type._def, refs);\n}\n","import { setResponseValueAndErrors } from \"../errorMessages.js\";\nimport { parseDef } from \"../parseDef.js\";\nexport function parseSetDef(def, refs) {\n const items = parseDef(def.valueType._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\"],\n });\n const schema = {\n type: \"array\",\n uniqueItems: true,\n items,\n };\n if (def.minSize) {\n setResponseValueAndErrors(schema, \"minItems\", def.minSize.value, def.minSize.message, refs);\n }\n if (def.maxSize) {\n setResponseValueAndErrors(schema, \"maxItems\", def.maxSize.value, def.maxSize.message, refs);\n }\n return schema;\n}\n","import { parseDef } from \"../parseDef.js\";\nexport function parseTupleDef(def, refs) {\n if (def.rest) {\n return {\n type: \"array\",\n minItems: def.items.length,\n items: def.items\n .map((x, i) => parseDef(x._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\", `${i}`],\n }))\n .reduce((acc, x) => (x === undefined ? acc : [...acc, x]), []),\n additionalItems: parseDef(def.rest._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"additionalItems\"],\n }),\n };\n }\n else {\n return {\n type: \"array\",\n minItems: def.items.length,\n maxItems: def.items.length,\n items: def.items\n .map((x, i) => parseDef(x._def, {\n ...refs,\n currentPath: [...refs.currentPath, \"items\", `${i}`],\n }))\n .reduce((acc, x) => (x === undefined ? acc : [...acc, x]), []),\n };\n }\n}\n","import { parseAnyDef } from \"./any.js\";\nexport function parseUndefinedDef(refs) {\n return {\n not: parseAnyDef(refs),\n };\n}\n","import { parseAnyDef } from \"./any.js\";\nexport function parseUnknownDef(refs) {\n return parseAnyDef(refs);\n}\n","import { parseDef } from \"../parseDef.js\";\nexport const parseReadonlyDef = (def, refs) => {\n return parseDef(def.innerType._def, refs);\n};\n","import { ZodFirstPartyTypeKind } from \"zod/v3\";\nimport { parseAnyDef } from \"./parsers/any.js\";\nimport { parseArrayDef } from \"./parsers/array.js\";\nimport { parseBigintDef } from \"./parsers/bigint.js\";\nimport { parseBooleanDef } from \"./parsers/boolean.js\";\nimport { parseBrandedDef } from \"./parsers/branded.js\";\nimport { parseCatchDef } from \"./parsers/catch.js\";\nimport { parseDateDef } from \"./parsers/date.js\";\nimport { parseDefaultDef } from \"./parsers/default.js\";\nimport { parseEffectsDef } from \"./parsers/effects.js\";\nimport { parseEnumDef } from \"./parsers/enum.js\";\nimport { parseIntersectionDef } from \"./parsers/intersection.js\";\nimport { parseLiteralDef } from \"./parsers/literal.js\";\nimport { parseMapDef } from \"./parsers/map.js\";\nimport { parseNativeEnumDef } from \"./parsers/nativeEnum.js\";\nimport { parseNeverDef } from \"./parsers/never.js\";\nimport { parseNullDef } from \"./parsers/null.js\";\nimport { parseNullableDef } from \"./parsers/nullable.js\";\nimport { parseNumberDef } from \"./parsers/number.js\";\nimport { parseObjectDef } from \"./parsers/object.js\";\nimport { parseOptionalDef } from \"./parsers/optional.js\";\nimport { parsePipelineDef } from \"./parsers/pipeline.js\";\nimport { parsePromiseDef } from \"./parsers/promise.js\";\nimport { parseRecordDef } from \"./parsers/record.js\";\nimport { parseSetDef } from \"./parsers/set.js\";\nimport { parseStringDef } from \"./parsers/string.js\";\nimport { parseTupleDef } from \"./parsers/tuple.js\";\nimport { parseUndefinedDef } from \"./parsers/undefined.js\";\nimport { parseUnionDef } from \"./parsers/union.js\";\nimport { parseUnknownDef } from \"./parsers/unknown.js\";\nimport { parseReadonlyDef } from \"./parsers/readonly.js\";\nexport const selectParser = (def, typeName, refs) => {\n switch (typeName) {\n case ZodFirstPartyTypeKind.ZodString:\n return parseStringDef(def, refs);\n case ZodFirstPartyTypeKind.ZodNumber:\n return parseNumberDef(def, refs);\n case ZodFirstPartyTypeKind.ZodObject:\n return parseObjectDef(def, refs);\n case ZodFirstPartyTypeKind.ZodBigInt:\n return parseBigintDef(def, refs);\n case ZodFirstPartyTypeKind.ZodBoolean:\n return parseBooleanDef();\n case ZodFirstPartyTypeKind.ZodDate:\n return parseDateDef(def, refs);\n case ZodFirstPartyTypeKind.ZodUndefined:\n return parseUndefinedDef(refs);\n case ZodFirstPartyTypeKind.ZodNull:\n return parseNullDef(refs);\n case ZodFirstPartyTypeKind.ZodArray:\n return parseArrayDef(def, refs);\n case ZodFirstPartyTypeKind.ZodUnion:\n case ZodFirstPartyTypeKind.ZodDiscriminatedUnion:\n return parseUnionDef(def, refs);\n case ZodFirstPartyTypeKind.ZodIntersection:\n return parseIntersectionDef(def, refs);\n case ZodFirstPartyTypeKind.ZodTuple:\n return parseTupleDef(def, refs);\n case ZodFirstPartyTypeKind.ZodRecord:\n return parseRecordDef(def, refs);\n case ZodFirstPartyTypeKind.ZodLiteral:\n return parseLiteralDef(def, refs);\n case ZodFirstPartyTypeKind.ZodEnum:\n return parseEnumDef(def);\n case ZodFirstPartyTypeKind.ZodNativeEnum:\n return parseNativeEnumDef(def);\n case ZodFirstPartyTypeKind.ZodNullable:\n return parseNullableDef(def, refs);\n case ZodFirstPartyTypeKind.ZodOptional:\n return parseOptionalDef(def, refs);\n case ZodFirstPartyTypeKind.ZodMap:\n return parseMapDef(def, refs);\n case ZodFirstPartyTypeKind.ZodSet:\n return parseSetDef(def, refs);\n case ZodFirstPartyTypeKind.ZodLazy:\n return () => def.getter()._def;\n case ZodFirstPartyTypeKind.ZodPromise:\n return parsePromiseDef(def, refs);\n case ZodFirstPartyTypeKind.ZodNaN:\n case ZodFirstPartyTypeKind.ZodNever:\n return parseNeverDef(refs);\n case ZodFirstPartyTypeKind.ZodEffects:\n return parseEffectsDef(def, refs);\n case ZodFirstPartyTypeKind.ZodAny:\n return parseAnyDef(refs);\n case ZodFirstPartyTypeKind.ZodUnknown:\n return parseUnknownDef(refs);\n case ZodFirstPartyTypeKind.ZodDefault:\n return parseDefaultDef(def, refs);\n case ZodFirstPartyTypeKind.ZodBranded:\n return parseBrandedDef(def, refs);\n case ZodFirstPartyTypeKind.ZodReadonly:\n return parseReadonlyDef(def, refs);\n case ZodFirstPartyTypeKind.ZodCatch:\n return parseCatchDef(def, refs);\n case ZodFirstPartyTypeKind.ZodPipeline:\n return parsePipelineDef(def, refs);\n case ZodFirstPartyTypeKind.ZodFunction:\n case ZodFirstPartyTypeKind.ZodVoid:\n case ZodFirstPartyTypeKind.ZodSymbol:\n return undefined;\n default:\n return ((_) => undefined)(typeName);\n }\n};\n","import { ignoreOverride } from \"./Options.js\";\nimport { selectParser } from \"./selectParser.js\";\nimport { getRelativePath } from \"./getRelativePath.js\";\nimport { parseAnyDef } from \"./parsers/any.js\";\nexport function parseDef(def, refs, forceResolution = false) {\n const seenItem = refs.seen.get(def);\n if (refs.override) {\n const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);\n if (overrideResult !== ignoreOverride) {\n return overrideResult;\n }\n }\n if (seenItem && !forceResolution) {\n const seenSchema = get$ref(seenItem, refs);\n if (seenSchema !== undefined) {\n return seenSchema;\n }\n }\n const newItem = { def, path: refs.currentPath, jsonSchema: undefined };\n refs.seen.set(def, newItem);\n const jsonSchemaOrGetter = selectParser(def, def.typeName, refs);\n // If the return was a function, then the inner definition needs to be extracted before a call to parseDef (recursive)\n const jsonSchema = typeof jsonSchemaOrGetter === \"function\"\n ? parseDef(jsonSchemaOrGetter(), refs)\n : jsonSchemaOrGetter;\n if (jsonSchema) {\n addMeta(def, refs, jsonSchema);\n }\n if (refs.postProcess) {\n const postProcessResult = refs.postProcess(jsonSchema, def, refs);\n newItem.jsonSchema = jsonSchema;\n return postProcessResult;\n }\n newItem.jsonSchema = jsonSchema;\n return jsonSchema;\n}\nconst get$ref = (item, refs) => {\n switch (refs.$refStrategy) {\n case \"root\":\n return { $ref: item.path.join(\"/\") };\n case \"relative\":\n return { $ref: getRelativePath(refs.currentPath, item.path) };\n case \"none\":\n case \"seen\": {\n if (item.path.length < refs.currentPath.length &&\n item.path.every((value, index) => refs.currentPath[index] === value)) {\n console.warn(`Recursive reference detected at ${refs.currentPath.join(\"/\")}! Defaulting to any`);\n return parseAnyDef(refs);\n }\n return refs.$refStrategy === \"seen\" ? parseAnyDef(refs) : undefined;\n }\n }\n};\nconst addMeta = (def, refs, jsonSchema) => {\n if (def.description) {\n jsonSchema.description = def.description;\n if (refs.markdownDescription) {\n jsonSchema.markdownDescription = def.description;\n }\n }\n return jsonSchema;\n};\n","import { parseDef } from \"./parseDef.js\";\nimport { getRefs } from \"./Refs.js\";\nimport { parseAnyDef } from \"./parsers/any.js\";\nconst zodToJsonSchema = (schema, options) => {\n const refs = getRefs(options);\n let definitions = typeof options === \"object\" && options.definitions\n ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({\n ...acc,\n [name]: parseDef(schema._def, {\n ...refs,\n currentPath: [...refs.basePath, refs.definitionPath, name],\n }, true) ?? parseAnyDef(refs),\n }), {})\n : undefined;\n const name = typeof options === \"string\"\n ? options\n : options?.nameStrategy === \"title\"\n ? undefined\n : options?.name;\n const main = parseDef(schema._def, name === undefined\n ? refs\n : {\n ...refs,\n currentPath: [...refs.basePath, refs.definitionPath, name],\n }, false) ?? parseAnyDef(refs);\n const title = typeof options === \"object\" &&\n options.name !== undefined &&\n options.nameStrategy === \"title\"\n ? options.name\n : undefined;\n if (title !== undefined) {\n main.title = title;\n }\n if (refs.flags.hasReferencedOpenAiAnyType) {\n if (!definitions) {\n definitions = {};\n }\n if (!definitions[refs.openAiAnyTypeName]) {\n definitions[refs.openAiAnyTypeName] = {\n // Skipping \"object\" as no properties can be defined and additionalProperties must be \"false\"\n type: [\"string\", \"number\", \"integer\", \"boolean\", \"array\", \"null\"],\n items: {\n $ref: refs.$refStrategy === \"relative\"\n ? \"1\"\n : [\n ...refs.basePath,\n refs.definitionPath,\n refs.openAiAnyTypeName,\n ].join(\"/\"),\n },\n };\n }\n }\n const combined = name === undefined\n ? definitions\n ? {\n ...main,\n [refs.definitionPath]: definitions,\n }\n : main\n : {\n $ref: [\n ...(refs.$refStrategy === \"relative\" ? [] : refs.basePath),\n refs.definitionPath,\n name,\n ].join(\"/\"),\n [refs.definitionPath]: {\n ...definitions,\n [name]: main,\n },\n };\n if (refs.target === \"jsonSchema7\") {\n combined.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (refs.target === \"jsonSchema2019-09\" || refs.target === \"openAi\") {\n combined.$schema = \"https://json-schema.org/draft/2019-09/schema#\";\n }\n if (refs.target === \"openAi\" &&\n (\"anyOf\" in combined ||\n \"oneOf\" in combined ||\n \"allOf\" in combined ||\n (\"type\" in combined && Array.isArray(combined.type)))) {\n console.warn(\"Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.\");\n }\n return combined;\n};\nexport { zodToJsonSchema };\n","export * from \"./Options.js\";\nexport * from \"./Refs.js\";\nexport * from \"./errorMessages.js\";\nexport * from \"./getRelativePath.js\";\nexport * from \"./parseDef.js\";\nexport * from \"./parseTypes.js\";\nexport * from \"./parsers/any.js\";\nexport * from \"./parsers/array.js\";\nexport * from \"./parsers/bigint.js\";\nexport * from \"./parsers/boolean.js\";\nexport * from \"./parsers/branded.js\";\nexport * from \"./parsers/catch.js\";\nexport * from \"./parsers/date.js\";\nexport * from \"./parsers/default.js\";\nexport * from \"./parsers/effects.js\";\nexport * from \"./parsers/enum.js\";\nexport * from \"./parsers/intersection.js\";\nexport * from \"./parsers/literal.js\";\nexport * from \"./parsers/map.js\";\nexport * from \"./parsers/nativeEnum.js\";\nexport * from \"./parsers/never.js\";\nexport * from \"./parsers/null.js\";\nexport * from \"./parsers/nullable.js\";\nexport * from \"./parsers/number.js\";\nexport * from \"./parsers/object.js\";\nexport * from \"./parsers/optional.js\";\nexport * from \"./parsers/pipeline.js\";\nexport * from \"./parsers/promise.js\";\nexport * from \"./parsers/readonly.js\";\nexport * from \"./parsers/record.js\";\nexport * from \"./parsers/set.js\";\nexport * from \"./parsers/string.js\";\nexport * from \"./parsers/tuple.js\";\nexport * from \"./parsers/undefined.js\";\nexport * from \"./parsers/union.js\";\nexport * from \"./parsers/unknown.js\";\nexport * from \"./selectParser.js\";\nexport * from \"./zodToJsonSchema.js\";\nimport { zodToJsonSchema } from \"./zodToJsonSchema.js\";\nexport default zodToJsonSchema;\n","// src/index.ts\nimport { generateId } from \"@ai-sdk/provider-utils\";\n\n// src/assistant-stream-parts.ts\nvar textStreamPart = {\n code: \"0\",\n name: \"text\",\n parse: (value) => {\n if (typeof value !== \"string\") {\n throw new Error('\"text\" parts expect a string value.');\n }\n return { type: \"text\", value };\n }\n};\nvar errorStreamPart = {\n code: \"3\",\n name: \"error\",\n parse: (value) => {\n if (typeof value !== \"string\") {\n throw new Error('\"error\" parts expect a string value.');\n }\n return { type: \"error\", value };\n }\n};\nvar assistantMessageStreamPart = {\n code: \"4\",\n name: \"assistant_message\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"id\" in value) || !(\"role\" in value) || !(\"content\" in value) || typeof value.id !== \"string\" || typeof value.role !== \"string\" || value.role !== \"assistant\" || !Array.isArray(value.content) || !value.content.every(\n (item) => item != null && typeof item === \"object\" && \"type\" in item && item.type === \"text\" && \"text\" in item && item.text != null && typeof item.text === \"object\" && \"value\" in item.text && typeof item.text.value === \"string\"\n )) {\n throw new Error(\n '\"assistant_message\" parts expect an object with an \"id\", \"role\", and \"content\" property.'\n );\n }\n return {\n type: \"assistant_message\",\n value\n };\n }\n};\nvar assistantControlDataStreamPart = {\n code: \"5\",\n name: \"assistant_control_data\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"threadId\" in value) || !(\"messageId\" in value) || typeof value.threadId !== \"string\" || typeof value.messageId !== \"string\") {\n throw new Error(\n '\"assistant_control_data\" parts expect an object with a \"threadId\" and \"messageId\" property.'\n );\n }\n return {\n type: \"assistant_control_data\",\n value: {\n threadId: value.threadId,\n messageId: value.messageId\n }\n };\n }\n};\nvar dataMessageStreamPart = {\n code: \"6\",\n name: \"data_message\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"role\" in value) || !(\"data\" in value) || typeof value.role !== \"string\" || value.role !== \"data\") {\n throw new Error(\n '\"data_message\" parts expect an object with a \"role\" and \"data\" property.'\n );\n }\n return {\n type: \"data_message\",\n value\n };\n }\n};\nvar assistantStreamParts = [\n textStreamPart,\n errorStreamPart,\n assistantMessageStreamPart,\n assistantControlDataStreamPart,\n dataMessageStreamPart\n];\nvar assistantStreamPartsByCode = {\n [textStreamPart.code]: textStreamPart,\n [errorStreamPart.code]: errorStreamPart,\n [assistantMessageStreamPart.code]: assistantMessageStreamPart,\n [assistantControlDataStreamPart.code]: assistantControlDataStreamPart,\n [dataMessageStreamPart.code]: dataMessageStreamPart\n};\nvar StreamStringPrefixes = {\n [textStreamPart.name]: textStreamPart.code,\n [errorStreamPart.name]: errorStreamPart.code,\n [assistantMessageStreamPart.name]: assistantMessageStreamPart.code,\n [assistantControlDataStreamPart.name]: assistantControlDataStreamPart.code,\n [dataMessageStreamPart.name]: dataMessageStreamPart.code\n};\nvar validCodes = assistantStreamParts.map((part) => part.code);\nvar parseAssistantStreamPart = (line) => {\n const firstSeparatorIndex = line.indexOf(\":\");\n if (firstSeparatorIndex === -1) {\n throw new Error(\"Failed to parse stream string. No separator found.\");\n }\n const prefix = line.slice(0, firstSeparatorIndex);\n if (!validCodes.includes(prefix)) {\n throw new Error(`Failed to parse stream string. Invalid code ${prefix}.`);\n }\n const code = prefix;\n const textValue = line.slice(firstSeparatorIndex + 1);\n const jsonValue = JSON.parse(textValue);\n return assistantStreamPartsByCode[code].parse(jsonValue);\n};\nfunction formatAssistantStreamPart(type, value) {\n const streamPart = assistantStreamParts.find((part) => part.name === type);\n if (!streamPart) {\n throw new Error(`Invalid stream part type: ${type}`);\n }\n return `${streamPart.code}:${JSON.stringify(value)}\n`;\n}\n\n// src/process-chat-response.ts\nimport { generateId as generateIdFunction } from \"@ai-sdk/provider-utils\";\n\n// src/duplicated/usage.ts\nfunction calculateLanguageModelUsage({\n promptTokens,\n completionTokens\n}) {\n return {\n promptTokens,\n completionTokens,\n totalTokens: promptTokens + completionTokens\n };\n}\n\n// src/parse-partial-json.ts\nimport { safeParseJSON } from \"@ai-sdk/provider-utils\";\n\n// src/fix-json.ts\nfunction fixJson(input) {\n const stack = [\"ROOT\"];\n let lastValidIndex = -1;\n let literalStart = null;\n function processValueStart(char, i, swapState) {\n {\n switch (char) {\n case '\"': {\n lastValidIndex = i;\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_STRING\");\n break;\n }\n case \"f\":\n case \"t\":\n case \"n\": {\n lastValidIndex = i;\n literalStart = i;\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_LITERAL\");\n break;\n }\n case \"-\": {\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_NUMBER\");\n break;\n }\n case \"0\":\n case \"1\":\n case \"2\":\n case \"3\":\n case \"4\":\n case \"5\":\n case \"6\":\n case \"7\":\n case \"8\":\n case \"9\": {\n lastValidIndex = i;\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_NUMBER\");\n break;\n }\n case \"{\": {\n lastValidIndex = i;\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_OBJECT_START\");\n break;\n }\n case \"[\": {\n lastValidIndex = i;\n stack.pop();\n stack.push(swapState);\n stack.push(\"INSIDE_ARRAY_START\");\n break;\n }\n }\n }\n }\n function processAfterObjectValue(char, i) {\n switch (char) {\n case \",\": {\n stack.pop();\n stack.push(\"INSIDE_OBJECT_AFTER_COMMA\");\n break;\n }\n case \"}\": {\n lastValidIndex = i;\n stack.pop();\n break;\n }\n }\n }\n function processAfterArrayValue(char, i) {\n switch (char) {\n case \",\": {\n stack.pop();\n stack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n break;\n }\n case \"]\": {\n lastValidIndex = i;\n stack.pop();\n break;\n }\n }\n }\n for (let i = 0; i < input.length; i++) {\n const char = input[i];\n const currentState = stack[stack.length - 1];\n switch (currentState) {\n case \"ROOT\":\n processValueStart(char, i, \"FINISH\");\n break;\n case \"INSIDE_OBJECT_START\": {\n switch (char) {\n case '\"': {\n stack.pop();\n stack.push(\"INSIDE_OBJECT_KEY\");\n break;\n }\n case \"}\": {\n lastValidIndex = i;\n stack.pop();\n break;\n }\n }\n break;\n }\n case \"INSIDE_OBJECT_AFTER_COMMA\": {\n switch (char) {\n case '\"': {\n stack.pop();\n stack.push(\"INSIDE_OBJECT_KEY\");\n break;\n }\n }\n break;\n }\n case \"INSIDE_OBJECT_KEY\": {\n switch (char) {\n case '\"': {\n stack.pop();\n stack.push(\"INSIDE_OBJECT_AFTER_KEY\");\n break;\n }\n }\n break;\n }\n case \"INSIDE_OBJECT_AFTER_KEY\": {\n switch (char) {\n case \":\": {\n stack.pop();\n stack.push(\"INSIDE_OBJECT_BEFORE_VALUE\");\n break;\n }\n }\n break;\n }\n case \"INSIDE_OBJECT_BEFORE_VALUE\": {\n processValueStart(char, i, \"INSIDE_OBJECT_AFTER_VALUE\");\n break;\n }\n case \"INSIDE_OBJECT_AFTER_VALUE\": {\n processAfterObjectValue(char, i);\n break;\n }\n case \"INSIDE_STRING\": {\n switch (char) {\n case '\"': {\n stack.pop();\n lastValidIndex = i;\n break;\n }\n case \"\\\\\": {\n stack.push(\"INSIDE_STRING_ESCAPE\");\n break;\n }\n default: {\n lastValidIndex = i;\n }\n }\n break;\n }\n case \"INSIDE_ARRAY_START\": {\n switch (char) {\n case \"]\": {\n lastValidIndex = i;\n stack.pop();\n break;\n }\n default: {\n lastValidIndex = i;\n processValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n break;\n }\n }\n break;\n }\n case \"INSIDE_ARRAY_AFTER_VALUE\": {\n switch (char) {\n case \",\": {\n stack.pop();\n stack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n break;\n }\n case \"]\": {\n lastValidIndex = i;\n stack.pop();\n break;\n }\n default: {\n lastValidIndex = i;\n break;\n }\n }\n break;\n }\n case \"INSIDE_ARRAY_AFTER_COMMA\": {\n processValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n break;\n }\n case \"INSIDE_STRING_ESCAPE\": {\n stack.pop();\n lastValidIndex = i;\n break;\n }\n case \"INSIDE_NUMBER\": {\n switch (char) {\n case \"0\":\n case \"1\":\n case \"2\":\n case \"3\":\n case \"4\":\n case \"5\":\n case \"6\":\n case \"7\":\n case \"8\":\n case \"9\": {\n lastValidIndex = i;\n break;\n }\n case \"e\":\n case \"E\":\n case \"-\":\n case \".\": {\n break;\n }\n case \",\": {\n stack.pop();\n if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n processAfterArrayValue(char, i);\n }\n if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n processAfterObjectValue(char, i);\n }\n break;\n }\n case \"}\": {\n stack.pop();\n if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n processAfterObjectValue(char, i);\n }\n break;\n }\n case \"]\": {\n stack.pop();\n if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n processAfterArrayValue(char, i);\n }\n break;\n }\n default: {\n stack.pop();\n break;\n }\n }\n break;\n }\n case \"INSIDE_LITERAL\": {\n const partialLiteral = input.substring(literalStart, i + 1);\n if (!\"false\".startsWith(partialLiteral) && !\"true\".startsWith(partialLiteral) && !\"null\".startsWith(partialLiteral)) {\n stack.pop();\n if (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") {\n processAfterObjectValue(char, i);\n } else if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") {\n processAfterArrayValue(char, i);\n }\n } else {\n lastValidIndex = i;\n }\n break;\n }\n }\n }\n let result = input.slice(0, lastValidIndex + 1);\n for (let i = stack.length - 1; i >= 0; i--) {\n const state = stack[i];\n switch (state) {\n case \"INSIDE_STRING\": {\n result += '\"';\n break;\n }\n case \"INSIDE_OBJECT_KEY\":\n case \"INSIDE_OBJECT_AFTER_KEY\":\n case \"INSIDE_OBJECT_AFTER_COMMA\":\n case \"INSIDE_OBJECT_START\":\n case \"INSIDE_OBJECT_BEFORE_VALUE\":\n case \"INSIDE_OBJECT_AFTER_VALUE\": {\n result += \"}\";\n break;\n }\n case \"INSIDE_ARRAY_START\":\n case \"INSIDE_ARRAY_AFTER_COMMA\":\n case \"INSIDE_ARRAY_AFTER_VALUE\": {\n result += \"]\";\n break;\n }\n case \"INSIDE_LITERAL\": {\n const partialLiteral = input.substring(literalStart, input.length);\n if (\"true\".startsWith(partialLiteral)) {\n result += \"true\".slice(partialLiteral.length);\n } else if (\"false\".startsWith(partialLiteral)) {\n result += \"false\".slice(partialLiteral.length);\n } else if (\"null\".startsWith(partialLiteral)) {\n result += \"null\".slice(partialLiteral.length);\n }\n }\n }\n }\n return result;\n}\n\n// src/parse-partial-json.ts\nfunction parsePartialJson(jsonText) {\n if (jsonText === void 0) {\n return { value: void 0, state: \"undefined-input\" };\n }\n let result = safeParseJSON({ text: jsonText });\n if (result.success) {\n return { value: result.value, state: \"successful-parse\" };\n }\n result = safeParseJSON({ text: fixJson(jsonText) });\n if (result.success) {\n return { value: result.value, state: \"repaired-parse\" };\n }\n return { value: void 0, state: \"failed-parse\" };\n}\n\n// src/data-stream-parts.ts\nvar textStreamPart2 = {\n code: \"0\",\n name: \"text\",\n parse: (value) => {\n if (typeof value !== \"string\") {\n throw new Error('\"text\" parts expect a string value.');\n }\n return { type: \"text\", value };\n }\n};\nvar dataStreamPart = {\n code: \"2\",\n name: \"data\",\n parse: (value) => {\n if (!Array.isArray(value)) {\n throw new Error('\"data\" parts expect an array value.');\n }\n return { type: \"data\", value };\n }\n};\nvar errorStreamPart2 = {\n code: \"3\",\n name: \"error\",\n parse: (value) => {\n if (typeof value !== \"string\") {\n throw new Error('\"error\" parts expect a string value.');\n }\n return { type: \"error\", value };\n }\n};\nvar messageAnnotationsStreamPart = {\n code: \"8\",\n name: \"message_annotations\",\n parse: (value) => {\n if (!Array.isArray(value)) {\n throw new Error('\"message_annotations\" parts expect an array value.');\n }\n return { type: \"message_annotations\", value };\n }\n};\nvar toolCallStreamPart = {\n code: \"9\",\n name: \"tool_call\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"toolName\" in value) || typeof value.toolName !== \"string\" || !(\"args\" in value) || typeof value.args !== \"object\") {\n throw new Error(\n '\"tool_call\" parts expect an object with a \"toolCallId\", \"toolName\", and \"args\" property.'\n );\n }\n return {\n type: \"tool_call\",\n value\n };\n }\n};\nvar toolResultStreamPart = {\n code: \"a\",\n name: \"tool_result\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"result\" in value)) {\n throw new Error(\n '\"tool_result\" parts expect an object with a \"toolCallId\" and a \"result\" property.'\n );\n }\n return {\n type: \"tool_result\",\n value\n };\n }\n};\nvar toolCallStreamingStartStreamPart = {\n code: \"b\",\n name: \"tool_call_streaming_start\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"toolName\" in value) || typeof value.toolName !== \"string\") {\n throw new Error(\n '\"tool_call_streaming_start\" parts expect an object with a \"toolCallId\" and \"toolName\" property.'\n );\n }\n return {\n type: \"tool_call_streaming_start\",\n value\n };\n }\n};\nvar toolCallDeltaStreamPart = {\n code: \"c\",\n name: \"tool_call_delta\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"argsTextDelta\" in value) || typeof value.argsTextDelta !== \"string\") {\n throw new Error(\n '\"tool_call_delta\" parts expect an object with a \"toolCallId\" and \"argsTextDelta\" property.'\n );\n }\n return {\n type: \"tool_call_delta\",\n value\n };\n }\n};\nvar finishMessageStreamPart = {\n code: \"d\",\n name: \"finish_message\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"finishReason\" in value) || typeof value.finishReason !== \"string\") {\n throw new Error(\n '\"finish_message\" parts expect an object with a \"finishReason\" property.'\n );\n }\n const result = {\n finishReason: value.finishReason\n };\n if (\"usage\" in value && value.usage != null && typeof value.usage === \"object\" && \"promptTokens\" in value.usage && \"completionTokens\" in value.usage) {\n result.usage = {\n promptTokens: typeof value.usage.promptTokens === \"number\" ? value.usage.promptTokens : Number.NaN,\n completionTokens: typeof value.usage.completionTokens === \"number\" ? value.usage.completionTokens : Number.NaN\n };\n }\n return {\n type: \"finish_message\",\n value: result\n };\n }\n};\nvar finishStepStreamPart = {\n code: \"e\",\n name: \"finish_step\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"finishReason\" in value) || typeof value.finishReason !== \"string\") {\n throw new Error(\n '\"finish_step\" parts expect an object with a \"finishReason\" property.'\n );\n }\n const result = {\n finishReason: value.finishReason,\n isContinued: false\n };\n if (\"usage\" in value && value.usage != null && typeof value.usage === \"object\" && \"promptTokens\" in value.usage && \"completionTokens\" in value.usage) {\n result.usage = {\n promptTokens: typeof value.usage.promptTokens === \"number\" ? value.usage.promptTokens : Number.NaN,\n completionTokens: typeof value.usage.completionTokens === \"number\" ? value.usage.completionTokens : Number.NaN\n };\n }\n if (\"isContinued\" in value && typeof value.isContinued === \"boolean\") {\n result.isContinued = value.isContinued;\n }\n return {\n type: \"finish_step\",\n value: result\n };\n }\n};\nvar startStepStreamPart = {\n code: \"f\",\n name: \"start_step\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"messageId\" in value) || typeof value.messageId !== \"string\") {\n throw new Error(\n '\"start_step\" parts expect an object with an \"id\" property.'\n );\n }\n return {\n type: \"start_step\",\n value: {\n messageId: value.messageId\n }\n };\n }\n};\nvar reasoningStreamPart = {\n code: \"g\",\n name: \"reasoning\",\n parse: (value) => {\n if (typeof value !== \"string\") {\n throw new Error('\"reasoning\" parts expect a string value.');\n }\n return { type: \"reasoning\", value };\n }\n};\nvar sourcePart = {\n code: \"h\",\n name: \"source\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\") {\n throw new Error('\"source\" parts expect a Source object.');\n }\n return {\n type: \"source\",\n value\n };\n }\n};\nvar redactedReasoningStreamPart = {\n code: \"i\",\n name: \"redacted_reasoning\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"data\" in value) || typeof value.data !== \"string\") {\n throw new Error(\n '\"redacted_reasoning\" parts expect an object with a \"data\" property.'\n );\n }\n return { type: \"redacted_reasoning\", value: { data: value.data } };\n }\n};\nvar reasoningSignatureStreamPart = {\n code: \"j\",\n name: \"reasoning_signature\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"signature\" in value) || typeof value.signature !== \"string\") {\n throw new Error(\n '\"reasoning_signature\" parts expect an object with a \"signature\" property.'\n );\n }\n return {\n type: \"reasoning_signature\",\n value: { signature: value.signature }\n };\n }\n};\nvar fileStreamPart = {\n code: \"k\",\n name: \"file\",\n parse: (value) => {\n if (value == null || typeof value !== \"object\" || !(\"data\" in value) || typeof value.data !== \"string\" || !(\"mimeType\" in value) || typeof value.mimeType !== \"string\") {\n throw new Error(\n '\"file\" parts expect an object with a \"data\" and \"mimeType\" property.'\n );\n }\n return { type: \"file\", value };\n }\n};\nvar dataStreamParts = [\n textStreamPart2,\n dataStreamPart,\n errorStreamPart2,\n messageAnnotationsStreamPart,\n toolCallStreamPart,\n toolResultStreamPart,\n toolCallStreamingStartStreamPart,\n toolCallDeltaStreamPart,\n finishMessageStreamPart,\n finishStepStreamPart,\n startStepStreamPart,\n reasoningStreamPart,\n sourcePart,\n redactedReasoningStreamPart,\n reasoningSignatureStreamPart,\n fileStreamPart\n];\nvar dataStreamPartsByCode = Object.fromEntries(\n dataStreamParts.map((part) => [part.code, part])\n);\nvar DataStreamStringPrefixes = Object.fromEntries(\n dataStreamParts.map((part) => [part.name, part.code])\n);\nvar validCodes2 = dataStreamParts.map((part) => part.code);\nvar parseDataStreamPart = (line) => {\n const firstSeparatorIndex = line.indexOf(\":\");\n if (firstSeparatorIndex === -1) {\n throw new Error(\"Failed to parse stream string. No separator found.\");\n }\n const prefix = line.slice(0, firstSeparatorIndex);\n if (!validCodes2.includes(prefix)) {\n throw new Error(`Failed to parse stream string. Invalid code ${prefix}.`);\n }\n const code = prefix;\n const textValue = line.slice(firstSeparatorIndex + 1);\n const jsonValue = JSON.parse(textValue);\n return dataStreamPartsByCode[code].parse(jsonValue);\n};\nfunction formatDataStreamPart(type, value) {\n const streamPart = dataStreamParts.find((part) => part.name === type);\n if (!streamPart) {\n throw new Error(`Invalid stream part type: ${type}`);\n }\n return `${streamPart.code}:${JSON.stringify(value)}\n`;\n}\n\n// src/process-data-stream.ts\nvar NEWLINE = \"\\n\".charCodeAt(0);\nfunction concatChunks(chunks, totalLength) {\n const concatenatedChunks = new Uint8Array(totalLength);\n let offset = 0;\n for (const chunk of chunks) {\n concatenatedChunks.set(chunk, offset);\n offset += chunk.length;\n }\n chunks.length = 0;\n return concatenatedChunks;\n}\nasync function processDataStream({\n stream,\n onTextPart,\n onReasoningPart,\n onReasoningSignaturePart,\n onRedactedReasoningPart,\n onSourcePart,\n onFilePart,\n onDataPart,\n onErrorPart,\n onToolCallStreamingStartPart,\n onToolCallDeltaPart,\n onToolCallPart,\n onToolResultPart,\n onMessageAnnotationsPart,\n onFinishMessagePart,\n onFinishStepPart,\n onStartStepPart\n}) {\n const reader = stream.getReader();\n const decoder = new TextDecoder();\n const chunks = [];\n let totalLength = 0;\n while (true) {\n const { value } = await reader.read();\n if (value) {\n chunks.push(value);\n totalLength += value.length;\n if (value[value.length - 1] !== NEWLINE) {\n continue;\n }\n }\n if (chunks.length === 0) {\n break;\n }\n const concatenatedChunks = concatChunks(chunks, totalLength);\n totalLength = 0;\n const streamParts = decoder.decode(concatenatedChunks, { stream: true }).split(\"\\n\").filter((line) => line !== \"\").map(parseDataStreamPart);\n for (const { type, value: value2 } of streamParts) {\n switch (type) {\n case \"text\":\n await (onTextPart == null ? void 0 : onTextPart(value2));\n break;\n case \"reasoning\":\n await (onReasoningPart == null ? void 0 : onReasoningPart(value2));\n break;\n case \"reasoning_signature\":\n await (onReasoningSignaturePart == null ? void 0 : onReasoningSignaturePart(value2));\n break;\n case \"redacted_reasoning\":\n await (onRedactedReasoningPart == null ? void 0 : onRedactedReasoningPart(value2));\n break;\n case \"file\":\n await (onFilePart == null ? void 0 : onFilePart(value2));\n break;\n case \"source\":\n await (onSourcePart == null ? void 0 : onSourcePart(value2));\n break;\n case \"data\":\n await (onDataPart == null ? void 0 : onDataPart(value2));\n break;\n case \"error\":\n await (onErrorPart == null ? void 0 : onErrorPart(value2));\n break;\n case \"message_annotations\":\n await (onMessageAnnotationsPart == null ? void 0 : onMessageAnnotationsPart(value2));\n break;\n case \"tool_call_streaming_start\":\n await (onToolCallStreamingStartPart == null ? void 0 : onToolCallStreamingStartPart(value2));\n break;\n case \"tool_call_delta\":\n await (onToolCallDeltaPart == null ? void 0 : onToolCallDeltaPart(value2));\n break;\n case \"tool_call\":\n await (onToolCallPart == null ? void 0 : onToolCallPart(value2));\n break;\n case \"tool_result\":\n await (onToolResultPart == null ? void 0 : onToolResultPart(value2));\n break;\n case \"finish_message\":\n await (onFinishMessagePart == null ? void 0 : onFinishMessagePart(value2));\n break;\n case \"finish_step\":\n await (onFinishStepPart == null ? void 0 : onFinishStepPart(value2));\n break;\n case \"start_step\":\n await (onStartStepPart == null ? void 0 : onStartStepPart(value2));\n break;\n default: {\n const exhaustiveCheck = type;\n throw new Error(`Unknown stream part type: ${exhaustiveCheck}`);\n }\n }\n }\n }\n}\n\n// src/process-chat-response.ts\nasync function processChatResponse({\n stream,\n update,\n onToolCall,\n onFinish,\n generateId: generateId2 = generateIdFunction,\n getCurrentDate = () => /* @__PURE__ */ new Date(),\n lastMessage\n}) {\n var _a, _b;\n const replaceLastMessage = (lastMessage == null ? void 0 : lastMessage.role) === \"assistant\";\n let step = replaceLastMessage ? 1 + // find max step in existing tool invocations:\n ((_b = (_a = lastMessage.toolInvocations) == null ? void 0 : _a.reduce((max, toolInvocation) => {\n var _a2;\n return Math.max(max, (_a2 = toolInvocation.step) != null ? _a2 : 0);\n }, 0)) != null ? _b : 0) : 0;\n const message = replaceLastMessage ? structuredClone(lastMessage) : {\n id: generateId2(),\n createdAt: getCurrentDate(),\n role: \"assistant\",\n content: \"\",\n parts: []\n };\n let currentTextPart = void 0;\n let currentReasoningPart = void 0;\n let currentReasoningTextDetail = void 0;\n function updateToolInvocationPart(toolCallId, invocation) {\n const part = message.parts.find(\n (part2) => part2.type === \"tool-invocation\" && part2.toolInvocation.toolCallId === toolCallId\n );\n if (part != null) {\n part.toolInvocation = invocation;\n } else {\n message.parts.push({\n type: \"tool-invocation\",\n toolInvocation: invocation\n });\n }\n }\n const data = [];\n let messageAnnotations = replaceLastMessage ? lastMessage == null ? void 0 : lastMessage.annotations : void 0;\n const partialToolCalls = {};\n let usage = {\n completionTokens: NaN,\n promptTokens: NaN,\n totalTokens: NaN\n };\n let finishReason = \"unknown\";\n function execUpdate() {\n const copiedData = [...data];\n if (messageAnnotations == null ? void 0 : messageAnnotations.length) {\n message.annotations = messageAnnotations;\n }\n const copiedMessage = {\n // deep copy the message to ensure that deep changes (msg attachments) are updated\n // with SolidJS. SolidJS uses referential integration of sub-objects to detect changes.\n ...structuredClone(message),\n // add a revision id to ensure that the message is updated with SWR. SWR uses a\n // hashing approach by default to detect changes, but it only works for shallow\n // changes. This is why we need to add a revision id to ensure that the message\n // is updated with SWR (without it, the changes get stuck in SWR and are not\n // forwarded to rendering):\n revisionId: generateId2()\n };\n update({\n message: copiedMessage,\n data: copiedData,\n replaceLastMessage\n });\n }\n await processDataStream({\n stream,\n onTextPart(value) {\n if (currentTextPart == null) {\n currentTextPart = {\n type: \"text\",\n text: value\n };\n message.parts.push(currentTextPart);\n } else {\n currentTextPart.text += value;\n }\n message.content += value;\n execUpdate();\n },\n onReasoningPart(value) {\n var _a2;\n if (currentReasoningTextDetail == null) {\n currentReasoningTextDetail = { type: \"text\", text: value };\n if (currentReasoningPart != null) {\n currentReasoningPart.details.push(currentReasoningTextDetail);\n }\n } else {\n currentReasoningTextDetail.text += value;\n }\n if (currentReasoningPart == null) {\n currentReasoningPart = {\n type: \"reasoning\",\n reasoning: value,\n details: [currentReasoningTextDetail]\n };\n message.parts.push(currentReasoningPart);\n } else {\n currentReasoningPart.reasoning += value;\n }\n message.reasoning = ((_a2 = message.reasoning) != null ? _a2 : \"\") + value;\n execUpdate();\n },\n onReasoningSignaturePart(value) {\n if (currentReasoningTextDetail != null) {\n currentReasoningTextDetail.signature = value.signature;\n }\n },\n onRedactedReasoningPart(value) {\n if (currentReasoningPart == null) {\n currentReasoningPart = {\n type: \"reasoning\",\n reasoning: \"\",\n details: []\n };\n message.parts.push(currentReasoningPart);\n }\n currentReasoningPart.details.push({\n type: \"redacted\",\n data: value.data\n });\n currentReasoningTextDetail = void 0;\n execUpdate();\n },\n onFilePart(value) {\n message.parts.push({\n type: \"file\",\n mimeType: value.mimeType,\n data: value.data\n });\n execUpdate();\n },\n onSourcePart(value) {\n message.parts.push({\n type: \"source\",\n source: value\n });\n execUpdate();\n },\n onToolCallStreamingStartPart(value) {\n if (message.toolInvocations == null) {\n message.toolInvocations = [];\n }\n partialToolCalls[value.toolCallId] = {\n text: \"\",\n step,\n toolName: value.toolName,\n index: message.toolInvocations.length\n };\n const invocation = {\n state: \"partial-call\",\n step,\n toolCallId: value.toolCallId,\n toolName: value.toolName,\n args: void 0\n };\n message.toolInvocations.push(invocation);\n updateToolInvocationPart(value.toolCallId, invocation);\n execUpdate();\n },\n onToolCallDeltaPart(value) {\n const partialToolCall = partialToolCalls[value.toolCallId];\n partialToolCall.text += value.argsTextDelta;\n const { value: partialArgs } = parsePartialJson(partialToolCall.text);\n const invocation = {\n state: \"partial-call\",\n step: partialToolCall.step,\n toolCallId: value.toolCallId,\n toolName: partialToolCall.toolName,\n args: partialArgs\n };\n message.toolInvocations[partialToolCall.index] = invocation;\n updateToolInvocationPart(value.toolCallId, invocation);\n execUpdate();\n },\n async onToolCallPart(value) {\n const invocation = {\n state: \"call\",\n step,\n ...value\n };\n if (partialToolCalls[value.toolCallId] != null) {\n message.toolInvocations[partialToolCalls[value.toolCallId].index] = invocation;\n } else {\n if (message.toolInvocations == null) {\n message.toolInvocations = [];\n }\n message.toolInvocations.push(invocation);\n }\n updateToolInvocationPart(value.toolCallId, invocation);\n execUpdate();\n if (onToolCall) {\n const result = await onToolCall({ toolCall: value });\n if (result != null) {\n const invocation2 = {\n state: \"result\",\n step,\n ...value,\n result\n };\n message.toolInvocations[message.toolInvocations.length - 1] = invocation2;\n updateToolInvocationPart(value.toolCallId, invocation2);\n execUpdate();\n }\n }\n },\n onToolResultPart(value) {\n const toolInvocations = message.toolInvocations;\n if (toolInvocations == null) {\n throw new Error(\"tool_result must be preceded by a tool_call\");\n }\n const toolInvocationIndex = toolInvocations.findIndex(\n (invocation2) => invocation2.toolCallId === value.toolCallId\n );\n if (toolInvocationIndex === -1) {\n throw new Error(\n \"tool_result must be preceded by a tool_call with the same toolCallId\"\n );\n }\n const invocation = {\n ...toolInvocations[toolInvocationIndex],\n state: \"result\",\n ...value\n };\n toolInvocations[toolInvocationIndex] = invocation;\n updateToolInvocationPart(value.toolCallId, invocation);\n execUpdate();\n },\n onDataPart(value) {\n data.push(...value);\n execUpdate();\n },\n onMessageAnnotationsPart(value) {\n if (messageAnnotations == null) {\n messageAnnotations = [...value];\n } else {\n messageAnnotations.push(...value);\n }\n execUpdate();\n },\n onFinishStepPart(value) {\n step += 1;\n currentTextPart = value.isContinued ? currentTextPart : void 0;\n currentReasoningPart = void 0;\n currentReasoningTextDetail = void 0;\n },\n onStartStepPart(value) {\n if (!replaceLastMessage) {\n message.id = value.messageId;\n }\n message.parts.push({ type: \"step-start\" });\n execUpdate();\n },\n onFinishMessagePart(value) {\n finishReason = value.finishReason;\n if (value.usage != null) {\n usage = calculateLanguageModelUsage(value.usage);\n }\n },\n onErrorPart(error) {\n throw new Error(error);\n }\n });\n onFinish == null ? void 0 : onFinish({ message, finishReason, usage });\n}\n\n// src/process-chat-text-response.ts\nimport { generateId as generateIdFunction2 } from \"@ai-sdk/provider-utils\";\n\n// src/process-text-stream.ts\nasync function processTextStream({\n stream,\n onTextPart\n}) {\n const reader = stream.pipeThrough(new TextDecoderStream()).getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n await onTextPart(value);\n }\n}\n\n// src/process-chat-text-response.ts\nasync function processChatTextResponse({\n stream,\n update,\n onFinish,\n getCurrentDate = () => /* @__PURE__ */ new Date(),\n generateId: generateId2 = generateIdFunction2\n}) {\n const textPart = { type: \"text\", text: \"\" };\n const resultMessage = {\n id: generateId2(),\n createdAt: getCurrentDate(),\n role: \"assistant\",\n content: \"\",\n parts: [textPart]\n };\n await processTextStream({\n stream,\n onTextPart: (chunk) => {\n resultMessage.content += chunk;\n textPart.text += chunk;\n update({\n message: { ...resultMessage },\n data: [],\n replaceLastMessage: false\n });\n }\n });\n onFinish == null ? void 0 : onFinish(resultMessage, {\n usage: { completionTokens: NaN, promptTokens: NaN, totalTokens: NaN },\n finishReason: \"unknown\"\n });\n}\n\n// src/call-chat-api.ts\nvar getOriginalFetch = () => fetch;\nasync function callChatApi({\n api,\n body,\n streamProtocol = \"data\",\n credentials,\n headers,\n abortController,\n restoreMessagesOnFailure,\n onResponse,\n onUpdate,\n onFinish,\n onToolCall,\n generateId: generateId2,\n fetch: fetch2 = getOriginalFetch(),\n lastMessage,\n requestType = \"generate\"\n}) {\n var _a, _b, _c;\n const request = requestType === \"resume\" ? fetch2(`${api}?chatId=${body.id}`, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n signal: (_a = abortController == null ? void 0 : abortController()) == null ? void 0 : _a.signal,\n credentials\n }) : fetch2(api, {\n method: \"POST\",\n body: JSON.stringify(body),\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n signal: (_b = abortController == null ? void 0 : abortController()) == null ? void 0 : _b.signal,\n credentials\n });\n const response = await request.catch((err) => {\n restoreMessagesOnFailure();\n throw err;\n });\n if (onResponse) {\n try {\n await onResponse(response);\n } catch (err) {\n throw err;\n }\n }\n if (!response.ok) {\n restoreMessagesOnFailure();\n throw new Error(\n (_c = await response.text()) != null ? _c : \"Failed to fetch the chat response.\"\n );\n }\n if (!response.body) {\n throw new Error(\"The response body is empty.\");\n }\n switch (streamProtocol) {\n case \"text\": {\n await processChatTextResponse({\n stream: response.body,\n update: onUpdate,\n onFinish,\n generateId: generateId2\n });\n return;\n }\n case \"data\": {\n await processChatResponse({\n stream: response.body,\n update: onUpdate,\n lastMessage,\n onToolCall,\n onFinish({ message, finishReason, usage }) {\n if (onFinish && message != null) {\n onFinish(message, { usage, finishReason });\n }\n },\n generateId: generateId2\n });\n return;\n }\n default: {\n const exhaustiveCheck = streamProtocol;\n throw new Error(`Unknown stream protocol: ${exhaustiveCheck}`);\n }\n }\n}\n\n// src/call-completion-api.ts\nvar getOriginalFetch2 = () => fetch;\nasync function callCompletionApi({\n api,\n prompt,\n credentials,\n headers,\n body,\n streamProtocol = \"data\",\n setCompletion,\n setLoading,\n setError,\n setAbortController,\n onResponse,\n onFinish,\n onError,\n onData,\n fetch: fetch2 = getOriginalFetch2()\n}) {\n var _a;\n try {\n setLoading(true);\n setError(void 0);\n const abortController = new AbortController();\n setAbortController(abortController);\n setCompletion(\"\");\n const response = await fetch2(api, {\n method: \"POST\",\n body: JSON.stringify({\n prompt,\n ...body\n }),\n credentials,\n headers: {\n \"Content-Type\": \"application/json\",\n ...headers\n },\n signal: abortController.signal\n }).catch((err) => {\n throw err;\n });\n if (onResponse) {\n try {\n await onResponse(response);\n } catch (err) {\n throw err;\n }\n }\n if (!response.ok) {\n throw new Error(\n (_a = await response.text()) != null ? _a : \"Failed to fetch the chat response.\"\n );\n }\n if (!response.body) {\n throw new Error(\"The response body is empty.\");\n }\n let result = \"\";\n switch (streamProtocol) {\n case \"text\": {\n await processTextStream({\n stream: response.body,\n onTextPart: (chunk) => {\n result += chunk;\n setCompletion(result);\n }\n });\n break;\n }\n case \"data\": {\n await processDataStream({\n stream: response.body,\n onTextPart(value) {\n result += value;\n setCompletion(result);\n },\n onDataPart(value) {\n onData == null ? void 0 : onData(value);\n },\n onErrorPart(value) {\n throw new Error(value);\n }\n });\n break;\n }\n default: {\n const exhaustiveCheck = streamProtocol;\n throw new Error(`Unknown stream protocol: ${exhaustiveCheck}`);\n }\n }\n if (onFinish) {\n onFinish(prompt, result);\n }\n setAbortController(null);\n return result;\n } catch (err) {\n if (err.name === \"AbortError\") {\n setAbortController(null);\n return null;\n }\n if (err instanceof Error) {\n if (onError) {\n onError(err);\n }\n }\n setError(err);\n } finally {\n setLoading(false);\n }\n}\n\n// src/data-url.ts\nfunction getTextFromDataUrl(dataUrl) {\n const [header, base64Content] = dataUrl.split(\",\");\n const mimeType = header.split(\";\")[0].split(\":\")[1];\n if (mimeType == null || base64Content == null) {\n throw new Error(\"Invalid data URL format\");\n }\n try {\n return window.atob(base64Content);\n } catch (error) {\n throw new Error(`Error decoding data URL`);\n }\n}\n\n// src/extract-max-tool-invocation-step.ts\nfunction extractMaxToolInvocationStep(toolInvocations) {\n return toolInvocations == null ? void 0 : toolInvocations.reduce((max, toolInvocation) => {\n var _a;\n return Math.max(max, (_a = toolInvocation.step) != null ? _a : 0);\n }, 0);\n}\n\n// src/get-message-parts.ts\nfunction getMessageParts(message) {\n var _a;\n return (_a = message.parts) != null ? _a : [\n ...message.toolInvocations ? message.toolInvocations.map((toolInvocation) => ({\n type: \"tool-invocation\",\n toolInvocation\n })) : [],\n ...message.reasoning ? [\n {\n type: \"reasoning\",\n reasoning: message.reasoning,\n details: [{ type: \"text\", text: message.reasoning }]\n }\n ] : [],\n ...message.content ? [{ type: \"text\", text: message.content }] : []\n ];\n}\n\n// src/fill-message-parts.ts\nfunction fillMessageParts(messages) {\n return messages.map((message) => ({\n ...message,\n parts: getMessageParts(message)\n }));\n}\n\n// src/is-deep-equal-data.ts\nfunction isDeepEqualData(obj1, obj2) {\n if (obj1 === obj2)\n return true;\n if (obj1 == null || obj2 == null)\n return false;\n if (typeof obj1 !== \"object\" && typeof obj2 !== \"object\")\n return obj1 === obj2;\n if (obj1.constructor !== obj2.constructor)\n return false;\n if (obj1 instanceof Date && obj2 instanceof Date) {\n return obj1.getTime() === obj2.getTime();\n }\n if (Array.isArray(obj1)) {\n if (obj1.length !== obj2.length)\n return false;\n for (let i = 0; i < obj1.length; i++) {\n if (!isDeepEqualData(obj1[i], obj2[i]))\n return false;\n }\n return true;\n }\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n if (keys1.length !== keys2.length)\n return false;\n for (const key of keys1) {\n if (!keys2.includes(key))\n return false;\n if (!isDeepEqualData(obj1[key], obj2[key]))\n return false;\n }\n return true;\n}\n\n// src/prepare-attachments-for-request.ts\nasync function prepareAttachmentsForRequest(attachmentsFromOptions) {\n if (!attachmentsFromOptions) {\n return [];\n }\n if (globalThis.FileList && attachmentsFromOptions instanceof globalThis.FileList) {\n return Promise.all(\n Array.from(attachmentsFromOptions).map(async (attachment) => {\n const { name, type } = attachment;\n const dataUrl = await new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = (readerEvent) => {\n var _a;\n resolve((_a = readerEvent.target) == null ? void 0 : _a.result);\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(attachment);\n });\n return {\n name,\n contentType: type,\n url: dataUrl\n };\n })\n );\n }\n if (Array.isArray(attachmentsFromOptions)) {\n return attachmentsFromOptions;\n }\n throw new Error(\"Invalid attachments type\");\n}\n\n// src/process-assistant-stream.ts\nvar NEWLINE2 = \"\\n\".charCodeAt(0);\nfunction concatChunks2(chunks, totalLength) {\n const concatenatedChunks = new Uint8Array(totalLength);\n let offset = 0;\n for (const chunk of chunks) {\n concatenatedChunks.set(chunk, offset);\n offset += chunk.length;\n }\n chunks.length = 0;\n return concatenatedChunks;\n}\nasync function processAssistantStream({\n stream,\n onTextPart,\n onErrorPart,\n onAssistantMessagePart,\n onAssistantControlDataPart,\n onDataMessagePart\n}) {\n const reader = stream.getReader();\n const decoder = new TextDecoder();\n const chunks = [];\n let totalLength = 0;\n while (true) {\n const { value } = await reader.read();\n if (value) {\n chunks.push(value);\n totalLength += value.length;\n if (value[value.length - 1] !== NEWLINE2) {\n continue;\n }\n }\n if (chunks.length === 0) {\n break;\n }\n const concatenatedChunks = concatChunks2(chunks, totalLength);\n totalLength = 0;\n const streamParts = decoder.decode(concatenatedChunks, { stream: true }).split(\"\\n\").filter((line) => line !== \"\").map(parseAssistantStreamPart);\n for (const { type, value: value2 } of streamParts) {\n switch (type) {\n case \"text\":\n await (onTextPart == null ? void 0 : onTextPart(value2));\n break;\n case \"error\":\n await (onErrorPart == null ? void 0 : onErrorPart(value2));\n break;\n case \"assistant_message\":\n await (onAssistantMessagePart == null ? void 0 : onAssistantMessagePart(value2));\n break;\n case \"assistant_control_data\":\n await (onAssistantControlDataPart == null ? void 0 : onAssistantControlDataPart(value2));\n break;\n case \"data_message\":\n await (onDataMessagePart == null ? void 0 : onDataMessagePart(value2));\n break;\n default: {\n const exhaustiveCheck = type;\n throw new Error(`Unknown stream part type: ${exhaustiveCheck}`);\n }\n }\n }\n }\n}\n\n// src/schema.ts\nimport { validatorSymbol } from \"@ai-sdk/provider-utils\";\n\n// src/zod-schema.ts\nimport zodToJsonSchema from \"zod-to-json-schema\";\nfunction zodSchema(zodSchema2, options) {\n var _a;\n const useReferences = (_a = options == null ? void 0 : options.useReferences) != null ? _a : false;\n return jsonSchema(\n zodToJsonSchema(zodSchema2, {\n $refStrategy: useReferences ? \"root\" : \"none\",\n target: \"jsonSchema7\"\n // note: openai mode breaks various gemini conversions\n }),\n {\n validate: (value) => {\n const result = zodSchema2.safeParse(value);\n return result.success ? { success: true, value: result.data } : { success: false, error: result.error };\n }\n }\n );\n}\n\n// src/schema.ts\nvar schemaSymbol = Symbol.for(\"vercel.ai.schema\");\nfunction jsonSchema(jsonSchema2, {\n validate\n} = {}) {\n return {\n [schemaSymbol]: true,\n _type: void 0,\n // should never be used directly\n [validatorSymbol]: true,\n jsonSchema: jsonSchema2,\n validate\n };\n}\nfunction isSchema(value) {\n return typeof value === \"object\" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && \"jsonSchema\" in value && \"validate\" in value;\n}\nfunction asSchema(schema) {\n return isSchema(schema) ? schema : zodSchema(schema);\n}\n\n// src/should-resubmit-messages.ts\nfunction shouldResubmitMessages({\n originalMaxToolInvocationStep,\n originalMessageCount,\n maxSteps,\n messages\n}) {\n var _a;\n const lastMessage = messages[messages.length - 1];\n return (\n // check if the feature is enabled:\n maxSteps > 1 && // ensure there is a last message:\n lastMessage != null && // ensure we actually have new steps (to prevent infinite loops in case of errors):\n (messages.length > originalMessageCount || extractMaxToolInvocationStep(lastMessage.toolInvocations) !== originalMaxToolInvocationStep) && // check that next step is possible:\n isAssistantMessageWithCompletedToolCalls(lastMessage) && // limit the number of automatic steps:\n ((_a = extractMaxToolInvocationStep(lastMessage.toolInvocations)) != null ? _a : 0) < maxSteps\n );\n}\nfunction isAssistantMessageWithCompletedToolCalls(message) {\n if (message.role !== \"assistant\") {\n return false;\n }\n const lastStepStartIndex = message.parts.reduce((lastIndex, part, index) => {\n return part.type === \"step-start\" ? index : lastIndex;\n }, -1);\n const lastStepToolInvocations = message.parts.slice(lastStepStartIndex + 1).filter((part) => part.type === \"tool-invocation\");\n return lastStepToolInvocations.length > 0 && lastStepToolInvocations.every((part) => \"result\" in part.toolInvocation);\n}\n\n// src/update-tool-call-result.ts\nfunction updateToolCallResult({\n messages,\n toolCallId,\n toolResult: result\n}) {\n var _a;\n const lastMessage = messages[messages.length - 1];\n const invocationPart = lastMessage.parts.find(\n (part) => part.type === \"tool-invocation\" && part.toolInvocation.toolCallId === toolCallId\n );\n if (invocationPart == null) {\n return;\n }\n const toolResult = {\n ...invocationPart.toolInvocation,\n state: \"result\",\n result\n };\n invocationPart.toolInvocation = toolResult;\n lastMessage.toolInvocations = (_a = lastMessage.toolInvocations) == null ? void 0 : _a.map(\n (toolInvocation) => toolInvocation.toolCallId === toolCallId ? toolResult : toolInvocation\n );\n}\nexport {\n asSchema,\n callChatApi,\n callCompletionApi,\n extractMaxToolInvocationStep,\n fillMessageParts,\n formatAssistantStreamPart,\n formatDataStreamPart,\n generateId,\n getMessageParts,\n getTextFromDataUrl,\n isAssistantMessageWithCompletedToolCalls,\n isDeepEqualData,\n jsonSchema,\n parseAssistantStreamPart,\n parseDataStreamPart,\n parsePartialJson,\n prepareAttachmentsForRequest,\n processAssistantStream,\n processDataStream,\n processTextStream,\n shouldResubmitMessages,\n updateToolCallResult,\n zodSchema\n};\n//# sourceMappingURL=index.mjs.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport var _globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.9.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VERSION } from '../version';\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nexport function _makeCompatibilityCheck(ownVersion) {\n var acceptedVersions = new Set([ownVersion]);\n var rejectedVersions = new Set();\n var myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return function () { return false; };\n }\n var ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n var globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n var globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexport var isCompatible = _makeCompatibilityCheck(VERSION);\n//# sourceMappingURL=semver.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _globalThis } from '../platform';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\nvar major = VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nexport function registerGlobal(type, instance, diag, allowOverride) {\n var _a;\n if (allowOverride === void 0) { allowOverride = false; }\n var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== VERSION) {\n // All registered APIs must be of the same version exactly\n var err = new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n return true;\n}\nexport function getGlobal(type) {\n var _a, _b;\n var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !isCompatible(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexport function unregisterGlobal(type, diag) {\n diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\n//# sourceMappingURL=global-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { getGlobal } from '../internal/global-utils';\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nvar DiagComponentLogger = /** @class */ (function () {\n function DiagComponentLogger(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n DiagComponentLogger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('debug', this._namespace, args);\n };\n DiagComponentLogger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('error', this._namespace, args);\n };\n DiagComponentLogger.prototype.info = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('info', this._namespace, args);\n };\n DiagComponentLogger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('warn', this._namespace, args);\n };\n DiagComponentLogger.prototype.verbose = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('verbose', this._namespace, args);\n };\n return DiagComponentLogger;\n}());\nexport { DiagComponentLogger };\nfunction logProxy(funcName, namespace, args) {\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n}\n//# sourceMappingURL=ComponentLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nexport var DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DiagLogLevel } from '../types';\nexport function createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < DiagLogLevel.NONE) {\n maxLevel = DiagLogLevel.NONE;\n }\n else if (maxLevel > DiagLogLevel.ALL) {\n maxLevel = DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n var theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', DiagLogLevel.ERROR),\n warn: _filterFunc('warn', DiagLogLevel.WARN),\n info: _filterFunc('info', DiagLogLevel.INFO),\n debug: _filterFunc('debug', DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', DiagLogLevel.VERBOSE),\n };\n}\n//# sourceMappingURL=logLevelLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport { DiagLogLevel, } from '../diag/types';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n /**\n * Private internal constructor\n * @private\n */\n function DiagAPI() {\n function _logProxy(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n var self = this;\n // DiagAPI specific functions\n var setLogger = function (logger, optionsOrLogLevel) {\n var _a, _b, _c;\n if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; }\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n var oldLogger = getGlobal('diag');\n var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';\n oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n }\n return registerGlobal('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = function () {\n unregisterGlobal(API_NAME, self);\n };\n self.createComponentLogger = function (options) {\n return new DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n DiagAPI.instance = function () {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n };\n return DiagAPI;\n}());\nexport { DiagAPI };\n//# sourceMappingURL=diag.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Get a key to uniquely identify a context value */\nexport function createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nvar BaseContext = /** @class */ (function () {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n function BaseContext(parentContext) {\n // for minification\n var self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = function (key) { return self._currentContext.get(key); };\n self.setValue = function (key, value) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = function (key) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexport var ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from './context';\nvar NoopContextManager = /** @class */ (function () {\n function NoopContextManager() {\n }\n NoopContextManager.prototype.active = function () {\n return ROOT_CONTEXT;\n };\n NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n };\n NoopContextManager.prototype.bind = function (_context, target) {\n return target;\n };\n NoopContextManager.prototype.enable = function () {\n return this;\n };\n NoopContextManager.prototype.disable = function () {\n return this;\n };\n return NoopContextManager;\n}());\nexport { NoopContextManager };\n//# sourceMappingURL=NoopContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function ContextAPI() {\n }\n /** Get the singleton instance of the Context API */\n ContextAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n };\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n };\n /**\n * Get the currently active context\n */\n ContextAPI.prototype.active = function () {\n return this._getContextManager().active();\n };\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n ContextAPI.prototype.with = function (context, fn, thisArg) {\n var _a;\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], __read(args), false));\n };\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n ContextAPI.prototype.bind = function (context, target) {\n return this._getContextManager().bind(context, target);\n };\n ContextAPI.prototype._getContextManager = function () {\n return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n };\n /** Disable and remove the global context manager */\n ContextAPI.prototype.disable = function () {\n this._getContextManager().disable();\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return ContextAPI;\n}());\nexport { ContextAPI };\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TraceFlags } from './trace_flags';\nexport var INVALID_SPANID = '0000000000000000';\nexport var INVALID_TRACEID = '00000000000000000000000000000000';\nexport var INVALID_SPAN_CONTEXT = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nvar NonRecordingSpan = /** @class */ (function () {\n function NonRecordingSpan(_spanContext) {\n if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n NonRecordingSpan.prototype.spanContext = function () {\n return this._spanContext;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n return this;\n };\n NonRecordingSpan.prototype.addLink = function (_link) {\n return this;\n };\n NonRecordingSpan.prototype.addLinks = function (_links) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setStatus = function (_status) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.updateName = function (_name) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.end = function (_endTime) { };\n // isRecording always returns false for NonRecordingSpan.\n NonRecordingSpan.prototype.isRecording = function () {\n return false;\n };\n // By default does nothing\n NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n return NonRecordingSpan;\n}());\nexport { NonRecordingSpan };\n//# sourceMappingURL=NonRecordingSpan.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContextKey } from '../context/context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n/**\n * span key\n */\nvar SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan() {\n return getSpan(ContextAPI.getInstance().active());\n}\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan(spanContext));\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\n//# sourceMappingURL=context-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nexport function isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\nexport function isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext) {\n return new NonRecordingSpan(spanContext);\n}\n//# sourceMappingURL=spancontext-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextAPI } from '../api/context';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { isSpanContextValid } from './spancontext-utils';\nvar contextApi = ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n function NoopTracer() {\n }\n // startSpan starts a noop span.\n NoopTracer.prototype.startSpan = function (name, options, context) {\n if (context === void 0) { context = contextApi.active(); }\n var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan();\n }\n var parentFromContext = context && getSpanContext(context);\n if (isSpanContext(parentFromContext) &&\n isSpanContextValid(parentFromContext)) {\n return new NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan();\n }\n };\n NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = setSpan(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n };\n return NoopTracer;\n}());\nexport { NoopTracer };\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\nvar NOOP_TRACER = new NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n function ProxyTracer(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n ProxyTracer.prototype.startSpan = function (name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n };\n ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n var tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n };\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n ProxyTracer.prototype._getTracer = function () {\n if (this._delegate) {\n return this._delegate;\n }\n var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n };\n return ProxyTracer;\n}());\nexport { ProxyTracer };\n//# sourceMappingURL=ProxyTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nvar NoopTracerProvider = /** @class */ (function () {\n function NoopTracerProvider() {\n }\n NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n return new NoopTracer();\n };\n return NoopTracerProvider;\n}());\nexport { NoopTracerProvider };\n//# sourceMappingURL=NoopTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nvar ProxyTracerProvider = /** @class */ (function () {\n function ProxyTracerProvider() {\n }\n /**\n * Get a {@link ProxyTracer}\n */\n ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));\n };\n ProxyTracerProvider.prototype.getDelegate = function () {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n };\n /**\n * Set the delegate tracer provider\n */\n ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n this._delegate = delegate;\n };\n ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n };\n return ProxyTracerProvider;\n}());\nexport { ProxyTracerProvider };\n//# sourceMappingURL=ProxyTracerProvider.js.map","/**\n * An enumeration of status codes.\n */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';\nimport { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider();\n this.wrapSpanContext = wrapSpanContext;\n this.isSpanContextValid = isSpanContextValid;\n this.deleteSpan = deleteSpan;\n this.getSpan = getSpan;\n this.getActiveSpan = getActiveSpan;\n this.getSpanContext = getSpanContext;\n this.setSpan = setSpan;\n this.setSpanContext = setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n TraceAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n };\n /**\n * Returns the global tracer provider.\n */\n TraceAPI.prototype.getTracerProvider = function () {\n return getGlobal(API_NAME) || this._proxyTracerProvider;\n };\n /**\n * Returns a tracer from the global tracer provider.\n */\n TraceAPI.prototype.getTracer = function (name, version) {\n return this.getTracerProvider().getTracer(name, version);\n };\n /** Remove the global tracer provider */\n TraceAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider();\n };\n return TraceAPI;\n}());\nexport { TraceAPI };\n//# sourceMappingURL=trace.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport var trace = TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name17 in all)\n __defProp(target, name17, { get: all[name17], enumerable: true });\n};\n\n// core/index.ts\nimport { createIdGenerator as createIdGenerator5, generateId as generateId2 } from \"@ai-sdk/provider-utils\";\nimport {\n formatAssistantStreamPart,\n formatDataStreamPart as formatDataStreamPart3,\n jsonSchema as jsonSchema2,\n parseAssistantStreamPart,\n parseDataStreamPart,\n processDataStream,\n processTextStream,\n zodSchema\n} from \"@ai-sdk/ui-utils\";\n\n// core/data-stream/create-data-stream.ts\nimport { formatDataStreamPart } from \"@ai-sdk/ui-utils\";\nfunction createDataStream({\n execute,\n onError = () => \"An error occurred.\"\n // mask error messages for safety by default\n}) {\n let controller;\n const ongoingStreamPromises = [];\n const stream = new ReadableStream({\n start(controllerArg) {\n controller = controllerArg;\n }\n });\n function safeEnqueue(data) {\n try {\n controller.enqueue(data);\n } catch (error) {\n }\n }\n try {\n const result = execute({\n write(data) {\n safeEnqueue(data);\n },\n writeData(data) {\n safeEnqueue(formatDataStreamPart(\"data\", [data]));\n },\n writeMessageAnnotation(annotation) {\n safeEnqueue(formatDataStreamPart(\"message_annotations\", [annotation]));\n },\n writeSource(source) {\n safeEnqueue(formatDataStreamPart(\"source\", source));\n },\n merge(streamArg) {\n ongoingStreamPromises.push(\n (async () => {\n const reader = streamArg.getReader();\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n break;\n safeEnqueue(value);\n }\n })().catch((error) => {\n safeEnqueue(formatDataStreamPart(\"error\", onError(error)));\n })\n );\n },\n onError\n });\n if (result) {\n ongoingStreamPromises.push(\n result.catch((error) => {\n safeEnqueue(formatDataStreamPart(\"error\", onError(error)));\n })\n );\n }\n } catch (error) {\n safeEnqueue(formatDataStreamPart(\"error\", onError(error)));\n }\n const waitForStreams = new Promise(async (resolve) => {\n while (ongoingStreamPromises.length > 0) {\n await ongoingStreamPromises.shift();\n }\n resolve();\n });\n waitForStreams.finally(() => {\n try {\n controller.close();\n } catch (error) {\n }\n });\n return stream;\n}\n\n// core/util/prepare-response-headers.ts\nfunction prepareResponseHeaders(headers, {\n contentType,\n dataStreamVersion\n}) {\n const responseHeaders = new Headers(headers != null ? headers : {});\n if (!responseHeaders.has(\"Content-Type\")) {\n responseHeaders.set(\"Content-Type\", contentType);\n }\n if (dataStreamVersion !== void 0) {\n responseHeaders.set(\"X-Vercel-AI-Data-Stream\", dataStreamVersion);\n }\n return responseHeaders;\n}\n\n// core/data-stream/create-data-stream-response.ts\nfunction createDataStreamResponse({\n status,\n statusText,\n headers,\n execute,\n onError\n}) {\n return new Response(\n createDataStream({ execute, onError }).pipeThrough(new TextEncoderStream()),\n {\n status,\n statusText,\n headers: prepareResponseHeaders(headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n })\n }\n );\n}\n\n// core/util/prepare-outgoing-http-headers.ts\nfunction prepareOutgoingHttpHeaders(headers, {\n contentType,\n dataStreamVersion\n}) {\n const outgoingHeaders = {};\n if (headers != null) {\n for (const [key, value] of Object.entries(headers)) {\n outgoingHeaders[key] = value;\n }\n }\n if (outgoingHeaders[\"Content-Type\"] == null) {\n outgoingHeaders[\"Content-Type\"] = contentType;\n }\n if (dataStreamVersion !== void 0) {\n outgoingHeaders[\"X-Vercel-AI-Data-Stream\"] = dataStreamVersion;\n }\n return outgoingHeaders;\n}\n\n// core/util/write-to-server-response.ts\nfunction writeToServerResponse({\n response,\n status,\n statusText,\n headers,\n stream\n}) {\n response.writeHead(status != null ? status : 200, statusText, headers);\n const reader = stream.getReader();\n const read = async () => {\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n break;\n response.write(value);\n }\n } catch (error) {\n throw error;\n } finally {\n response.end();\n }\n };\n read();\n}\n\n// core/data-stream/pipe-data-stream-to-response.ts\nfunction pipeDataStreamToResponse(response, {\n status,\n statusText,\n headers,\n execute,\n onError\n}) {\n writeToServerResponse({\n response,\n status,\n statusText,\n headers: prepareOutgoingHttpHeaders(headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n }),\n stream: createDataStream({ execute, onError }).pipeThrough(\n new TextEncoderStream()\n )\n });\n}\n\n// errors/invalid-argument-error.ts\nimport { AISDKError } from \"@ai-sdk/provider\";\nvar name = \"AI_InvalidArgumentError\";\nvar marker = `vercel.ai.error.${name}`;\nvar symbol = Symbol.for(marker);\nvar _a;\nvar InvalidArgumentError = class extends AISDKError {\n constructor({\n parameter,\n value,\n message\n }) {\n super({\n name,\n message: `Invalid argument for parameter ${parameter}: ${message}`\n });\n this[_a] = true;\n this.parameter = parameter;\n this.value = value;\n }\n static isInstance(error) {\n return AISDKError.hasMarker(error, marker);\n }\n};\n_a = symbol;\n\n// util/retry-with-exponential-backoff.ts\nimport { APICallError } from \"@ai-sdk/provider\";\nimport { delay, getErrorMessage, isAbortError } from \"@ai-sdk/provider-utils\";\n\n// util/retry-error.ts\nimport { AISDKError as AISDKError2 } from \"@ai-sdk/provider\";\nvar name2 = \"AI_RetryError\";\nvar marker2 = `vercel.ai.error.${name2}`;\nvar symbol2 = Symbol.for(marker2);\nvar _a2;\nvar RetryError = class extends AISDKError2 {\n constructor({\n message,\n reason,\n errors\n }) {\n super({ name: name2, message });\n this[_a2] = true;\n this.reason = reason;\n this.errors = errors;\n this.lastError = errors[errors.length - 1];\n }\n static isInstance(error) {\n return AISDKError2.hasMarker(error, marker2);\n }\n};\n_a2 = symbol2;\n\n// util/retry-with-exponential-backoff.ts\nvar retryWithExponentialBackoff = ({\n maxRetries = 2,\n initialDelayInMs = 2e3,\n backoffFactor = 2\n} = {}) => async (f) => _retryWithExponentialBackoff(f, {\n maxRetries,\n delayInMs: initialDelayInMs,\n backoffFactor\n});\nasync function _retryWithExponentialBackoff(f, {\n maxRetries,\n delayInMs,\n backoffFactor\n}, errors = []) {\n try {\n return await f();\n } catch (error) {\n if (isAbortError(error)) {\n throw error;\n }\n if (maxRetries === 0) {\n throw error;\n }\n const errorMessage = getErrorMessage(error);\n const newErrors = [...errors, error];\n const tryNumber = newErrors.length;\n if (tryNumber > maxRetries) {\n throw new RetryError({\n message: `Failed after ${tryNumber} attempts. Last error: ${errorMessage}`,\n reason: \"maxRetriesExceeded\",\n errors: newErrors\n });\n }\n if (error instanceof Error && APICallError.isInstance(error) && error.isRetryable === true && tryNumber <= maxRetries) {\n await delay(delayInMs);\n return _retryWithExponentialBackoff(\n f,\n { maxRetries, delayInMs: backoffFactor * delayInMs, backoffFactor },\n newErrors\n );\n }\n if (tryNumber === 1) {\n throw error;\n }\n throw new RetryError({\n message: `Failed after ${tryNumber} attempts with non-retryable error: '${errorMessage}'`,\n reason: \"errorNotRetryable\",\n errors: newErrors\n });\n }\n}\n\n// core/prompt/prepare-retries.ts\nfunction prepareRetries({\n maxRetries\n}) {\n if (maxRetries != null) {\n if (!Number.isInteger(maxRetries)) {\n throw new InvalidArgumentError({\n parameter: \"maxRetries\",\n value: maxRetries,\n message: \"maxRetries must be an integer\"\n });\n }\n if (maxRetries < 0) {\n throw new InvalidArgumentError({\n parameter: \"maxRetries\",\n value: maxRetries,\n message: \"maxRetries must be >= 0\"\n });\n }\n }\n const maxRetriesResult = maxRetries != null ? maxRetries : 2;\n return {\n maxRetries: maxRetriesResult,\n retry: retryWithExponentialBackoff({ maxRetries: maxRetriesResult })\n };\n}\n\n// core/telemetry/assemble-operation-name.ts\nfunction assembleOperationName({\n operationId,\n telemetry\n}) {\n return {\n // standardized operation and resource name:\n \"operation.name\": `${operationId}${(telemetry == null ? void 0 : telemetry.functionId) != null ? ` ${telemetry.functionId}` : \"\"}`,\n \"resource.name\": telemetry == null ? void 0 : telemetry.functionId,\n // detailed, AI SDK specific data:\n \"ai.operationId\": operationId,\n \"ai.telemetry.functionId\": telemetry == null ? void 0 : telemetry.functionId\n };\n}\n\n// core/telemetry/get-base-telemetry-attributes.ts\nfunction getBaseTelemetryAttributes({\n model,\n settings,\n telemetry,\n headers\n}) {\n var _a17;\n return {\n \"ai.model.provider\": model.provider,\n \"ai.model.id\": model.modelId,\n // settings:\n ...Object.entries(settings).reduce((attributes, [key, value]) => {\n attributes[`ai.settings.${key}`] = value;\n return attributes;\n }, {}),\n // add metadata as attributes:\n ...Object.entries((_a17 = telemetry == null ? void 0 : telemetry.metadata) != null ? _a17 : {}).reduce(\n (attributes, [key, value]) => {\n attributes[`ai.telemetry.metadata.${key}`] = value;\n return attributes;\n },\n {}\n ),\n // request headers\n ...Object.entries(headers != null ? headers : {}).reduce((attributes, [key, value]) => {\n if (value !== void 0) {\n attributes[`ai.request.headers.${key}`] = value;\n }\n return attributes;\n }, {})\n };\n}\n\n// core/telemetry/get-tracer.ts\nimport { trace } from \"@opentelemetry/api\";\n\n// core/telemetry/noop-tracer.ts\nvar noopTracer = {\n startSpan() {\n return noopSpan;\n },\n startActiveSpan(name17, arg1, arg2, arg3) {\n if (typeof arg1 === \"function\") {\n return arg1(noopSpan);\n }\n if (typeof arg2 === \"function\") {\n return arg2(noopSpan);\n }\n if (typeof arg3 === \"function\") {\n return arg3(noopSpan);\n }\n }\n};\nvar noopSpan = {\n spanContext() {\n return noopSpanContext;\n },\n setAttribute() {\n return this;\n },\n setAttributes() {\n return this;\n },\n addEvent() {\n return this;\n },\n addLink() {\n return this;\n },\n addLinks() {\n return this;\n },\n setStatus() {\n return this;\n },\n updateName() {\n return this;\n },\n end() {\n return this;\n },\n isRecording() {\n return false;\n },\n recordException() {\n return this;\n }\n};\nvar noopSpanContext = {\n traceId: \"\",\n spanId: \"\",\n traceFlags: 0\n};\n\n// core/telemetry/get-tracer.ts\nfunction getTracer({\n isEnabled = false,\n tracer\n} = {}) {\n if (!isEnabled) {\n return noopTracer;\n }\n if (tracer) {\n return tracer;\n }\n return trace.getTracer(\"ai\");\n}\n\n// core/telemetry/record-span.ts\nimport { SpanStatusCode } from \"@opentelemetry/api\";\nfunction recordSpan({\n name: name17,\n tracer,\n attributes,\n fn,\n endWhenDone = true\n}) {\n return tracer.startActiveSpan(name17, { attributes }, async (span) => {\n try {\n const result = await fn(span);\n if (endWhenDone) {\n span.end();\n }\n return result;\n } catch (error) {\n try {\n if (error instanceof Error) {\n span.recordException({\n name: error.name,\n message: error.message,\n stack: error.stack\n });\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message\n });\n } else {\n span.setStatus({ code: SpanStatusCode.ERROR });\n }\n } finally {\n span.end();\n }\n throw error;\n }\n });\n}\n\n// core/telemetry/select-telemetry-attributes.ts\nfunction selectTelemetryAttributes({\n telemetry,\n attributes\n}) {\n if ((telemetry == null ? void 0 : telemetry.isEnabled) !== true) {\n return {};\n }\n return Object.entries(attributes).reduce((attributes2, [key, value]) => {\n if (value === void 0) {\n return attributes2;\n }\n if (typeof value === \"object\" && \"input\" in value && typeof value.input === \"function\") {\n if ((telemetry == null ? void 0 : telemetry.recordInputs) === false) {\n return attributes2;\n }\n const result = value.input();\n return result === void 0 ? attributes2 : { ...attributes2, [key]: result };\n }\n if (typeof value === \"object\" && \"output\" in value && typeof value.output === \"function\") {\n if ((telemetry == null ? void 0 : telemetry.recordOutputs) === false) {\n return attributes2;\n }\n const result = value.output();\n return result === void 0 ? attributes2 : { ...attributes2, [key]: result };\n }\n return { ...attributes2, [key]: value };\n }, {});\n}\n\n// core/embed/embed.ts\nasync function embed({\n model,\n value,\n maxRetries: maxRetriesArg,\n abortSignal,\n headers,\n experimental_telemetry: telemetry\n}) {\n const { maxRetries, retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { maxRetries }\n });\n const tracer = getTracer(telemetry);\n return recordSpan({\n name: \"ai.embed\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({ operationId: \"ai.embed\", telemetry }),\n ...baseTelemetryAttributes,\n \"ai.value\": { input: () => JSON.stringify(value) }\n }\n }),\n tracer,\n fn: async (span) => {\n const { embedding, usage, rawResponse } = await retry(\n () => (\n // nested spans to align with the embedMany telemetry data:\n recordSpan({\n name: \"ai.embed.doEmbed\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.embed.doEmbed\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.values\": { input: () => [JSON.stringify(value)] }\n }\n }),\n tracer,\n fn: async (doEmbedSpan) => {\n var _a17;\n const modelResponse = await model.doEmbed({\n values: [value],\n abortSignal,\n headers\n });\n const embedding2 = modelResponse.embeddings[0];\n const usage2 = (_a17 = modelResponse.usage) != null ? _a17 : { tokens: NaN };\n doEmbedSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embeddings\": {\n output: () => modelResponse.embeddings.map(\n (embedding3) => JSON.stringify(embedding3)\n )\n },\n \"ai.usage.tokens\": usage2.tokens\n }\n })\n );\n return {\n embedding: embedding2,\n usage: usage2,\n rawResponse: modelResponse.rawResponse\n };\n }\n })\n )\n );\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embedding\": { output: () => JSON.stringify(embedding) },\n \"ai.usage.tokens\": usage.tokens\n }\n })\n );\n return new DefaultEmbedResult({ value, embedding, usage, rawResponse });\n }\n });\n}\nvar DefaultEmbedResult = class {\n constructor(options) {\n this.value = options.value;\n this.embedding = options.embedding;\n this.usage = options.usage;\n this.rawResponse = options.rawResponse;\n }\n};\n\n// core/util/split-array.ts\nfunction splitArray(array, chunkSize) {\n if (chunkSize <= 0) {\n throw new Error(\"chunkSize must be greater than 0\");\n }\n const result = [];\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize));\n }\n return result;\n}\n\n// core/embed/embed-many.ts\nasync function embedMany({\n model,\n values,\n maxRetries: maxRetriesArg,\n abortSignal,\n headers,\n experimental_telemetry: telemetry\n}) {\n const { maxRetries, retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { maxRetries }\n });\n const tracer = getTracer(telemetry);\n return recordSpan({\n name: \"ai.embedMany\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({ operationId: \"ai.embedMany\", telemetry }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.values\": {\n input: () => values.map((value) => JSON.stringify(value))\n }\n }\n }),\n tracer,\n fn: async (span) => {\n const maxEmbeddingsPerCall = model.maxEmbeddingsPerCall;\n if (maxEmbeddingsPerCall == null) {\n const { embeddings: embeddings2, usage } = await retry(() => {\n return recordSpan({\n name: \"ai.embedMany.doEmbed\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.embedMany.doEmbed\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.values\": {\n input: () => values.map((value) => JSON.stringify(value))\n }\n }\n }),\n tracer,\n fn: async (doEmbedSpan) => {\n var _a17;\n const modelResponse = await model.doEmbed({\n values,\n abortSignal,\n headers\n });\n const embeddings3 = modelResponse.embeddings;\n const usage2 = (_a17 = modelResponse.usage) != null ? _a17 : { tokens: NaN };\n doEmbedSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embeddings\": {\n output: () => embeddings3.map((embedding) => JSON.stringify(embedding))\n },\n \"ai.usage.tokens\": usage2.tokens\n }\n })\n );\n return { embeddings: embeddings3, usage: usage2 };\n }\n });\n });\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embeddings\": {\n output: () => embeddings2.map((embedding) => JSON.stringify(embedding))\n },\n \"ai.usage.tokens\": usage.tokens\n }\n })\n );\n return new DefaultEmbedManyResult({ values, embeddings: embeddings2, usage });\n }\n const valueChunks = splitArray(values, maxEmbeddingsPerCall);\n const embeddings = [];\n let tokens = 0;\n for (const chunk of valueChunks) {\n const { embeddings: responseEmbeddings, usage } = await retry(() => {\n return recordSpan({\n name: \"ai.embedMany.doEmbed\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.embedMany.doEmbed\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.values\": {\n input: () => chunk.map((value) => JSON.stringify(value))\n }\n }\n }),\n tracer,\n fn: async (doEmbedSpan) => {\n var _a17;\n const modelResponse = await model.doEmbed({\n values: chunk,\n abortSignal,\n headers\n });\n const embeddings2 = modelResponse.embeddings;\n const usage2 = (_a17 = modelResponse.usage) != null ? _a17 : { tokens: NaN };\n doEmbedSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embeddings\": {\n output: () => embeddings2.map((embedding) => JSON.stringify(embedding))\n },\n \"ai.usage.tokens\": usage2.tokens\n }\n })\n );\n return { embeddings: embeddings2, usage: usage2 };\n }\n });\n });\n embeddings.push(...responseEmbeddings);\n tokens += usage.tokens;\n }\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.embeddings\": {\n output: () => embeddings.map((embedding) => JSON.stringify(embedding))\n },\n \"ai.usage.tokens\": tokens\n }\n })\n );\n return new DefaultEmbedManyResult({\n values,\n embeddings,\n usage: { tokens }\n });\n }\n });\n}\nvar DefaultEmbedManyResult = class {\n constructor(options) {\n this.values = options.values;\n this.embeddings = options.embeddings;\n this.usage = options.usage;\n }\n};\n\n// errors/no-image-generated-error.ts\nimport { AISDKError as AISDKError3 } from \"@ai-sdk/provider\";\nvar name3 = \"AI_NoImageGeneratedError\";\nvar marker3 = `vercel.ai.error.${name3}`;\nvar symbol3 = Symbol.for(marker3);\nvar _a3;\nvar NoImageGeneratedError = class extends AISDKError3 {\n constructor({\n message = \"No image generated.\",\n cause,\n responses\n }) {\n super({ name: name3, message, cause });\n this[_a3] = true;\n this.responses = responses;\n }\n static isInstance(error) {\n return AISDKError3.hasMarker(error, marker3);\n }\n};\n_a3 = symbol3;\n\n// core/generate-text/generated-file.ts\nimport {\n convertBase64ToUint8Array,\n convertUint8ArrayToBase64\n} from \"@ai-sdk/provider-utils\";\nvar DefaultGeneratedFile = class {\n constructor({\n data,\n mimeType\n }) {\n const isUint8Array = data instanceof Uint8Array;\n this.base64Data = isUint8Array ? void 0 : data;\n this.uint8ArrayData = isUint8Array ? data : void 0;\n this.mimeType = mimeType;\n }\n // lazy conversion with caching to avoid unnecessary conversion overhead:\n get base64() {\n if (this.base64Data == null) {\n this.base64Data = convertUint8ArrayToBase64(this.uint8ArrayData);\n }\n return this.base64Data;\n }\n // lazy conversion with caching to avoid unnecessary conversion overhead:\n get uint8Array() {\n if (this.uint8ArrayData == null) {\n this.uint8ArrayData = convertBase64ToUint8Array(this.base64Data);\n }\n return this.uint8ArrayData;\n }\n};\nvar DefaultGeneratedFileWithType = class extends DefaultGeneratedFile {\n constructor(options) {\n super(options);\n this.type = \"file\";\n }\n};\n\n// core/util/detect-mimetype.ts\nimport { convertBase64ToUint8Array as convertBase64ToUint8Array2 } from \"@ai-sdk/provider-utils\";\nvar imageMimeTypeSignatures = [\n {\n mimeType: \"image/gif\",\n bytesPrefix: [71, 73, 70],\n base64Prefix: \"R0lG\"\n },\n {\n mimeType: \"image/png\",\n bytesPrefix: [137, 80, 78, 71],\n base64Prefix: \"iVBORw\"\n },\n {\n mimeType: \"image/jpeg\",\n bytesPrefix: [255, 216],\n base64Prefix: \"/9j/\"\n },\n {\n mimeType: \"image/webp\",\n bytesPrefix: [82, 73, 70, 70],\n base64Prefix: \"UklGRg\"\n },\n {\n mimeType: \"image/bmp\",\n bytesPrefix: [66, 77],\n base64Prefix: \"Qk\"\n },\n {\n mimeType: \"image/tiff\",\n bytesPrefix: [73, 73, 42, 0],\n base64Prefix: \"SUkqAA\"\n },\n {\n mimeType: \"image/tiff\",\n bytesPrefix: [77, 77, 0, 42],\n base64Prefix: \"TU0AKg\"\n },\n {\n mimeType: \"image/avif\",\n bytesPrefix: [\n 0,\n 0,\n 0,\n 32,\n 102,\n 116,\n 121,\n 112,\n 97,\n 118,\n 105,\n 102\n ],\n base64Prefix: \"AAAAIGZ0eXBhdmlm\"\n },\n {\n mimeType: \"image/heic\",\n bytesPrefix: [\n 0,\n 0,\n 0,\n 32,\n 102,\n 116,\n 121,\n 112,\n 104,\n 101,\n 105,\n 99\n ],\n base64Prefix: \"AAAAIGZ0eXBoZWlj\"\n }\n];\nvar audioMimeTypeSignatures = [\n {\n mimeType: \"audio/mpeg\",\n bytesPrefix: [255, 251],\n base64Prefix: \"//s=\"\n },\n {\n mimeType: \"audio/wav\",\n bytesPrefix: [82, 73, 70, 70],\n base64Prefix: \"UklGR\"\n },\n {\n mimeType: \"audio/ogg\",\n bytesPrefix: [79, 103, 103, 83],\n base64Prefix: \"T2dnUw\"\n },\n {\n mimeType: \"audio/flac\",\n bytesPrefix: [102, 76, 97, 67],\n base64Prefix: \"ZkxhQw\"\n },\n {\n mimeType: \"audio/aac\",\n bytesPrefix: [64, 21, 0, 0],\n base64Prefix: \"QBUA\"\n },\n {\n mimeType: \"audio/mp4\",\n bytesPrefix: [102, 116, 121, 112],\n base64Prefix: \"ZnR5cA\"\n }\n];\nvar stripID3 = (data) => {\n const bytes = typeof data === \"string\" ? convertBase64ToUint8Array2(data) : data;\n const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;\n return bytes.slice(id3Size + 10);\n};\nfunction stripID3TagsIfPresent(data) {\n const hasId3 = typeof data === \"string\" && data.startsWith(\"SUQz\") || typeof data !== \"string\" && data.length > 10 && data[0] === 73 && // 'I'\n data[1] === 68 && // 'D'\n data[2] === 51;\n return hasId3 ? stripID3(data) : data;\n}\nfunction detectMimeType({\n data,\n signatures\n}) {\n const processedData = stripID3TagsIfPresent(data);\n for (const signature of signatures) {\n if (typeof processedData === \"string\" ? processedData.startsWith(signature.base64Prefix) : processedData.length >= signature.bytesPrefix.length && signature.bytesPrefix.every(\n (byte, index) => processedData[index] === byte\n )) {\n return signature.mimeType;\n }\n }\n return void 0;\n}\n\n// core/generate-image/generate-image.ts\nasync function generateImage({\n model,\n prompt,\n n = 1,\n size,\n aspectRatio,\n seed,\n providerOptions,\n maxRetries: maxRetriesArg,\n abortSignal,\n headers\n}) {\n var _a17;\n const { retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const maxImagesPerCall = (_a17 = model.maxImagesPerCall) != null ? _a17 : 1;\n const callCount = Math.ceil(n / maxImagesPerCall);\n const callImageCounts = Array.from({ length: callCount }, (_, i) => {\n if (i < callCount - 1) {\n return maxImagesPerCall;\n }\n const remainder = n % maxImagesPerCall;\n return remainder === 0 ? maxImagesPerCall : remainder;\n });\n const results = await Promise.all(\n callImageCounts.map(\n async (callImageCount) => retry(\n () => model.doGenerate({\n prompt,\n n: callImageCount,\n abortSignal,\n headers,\n size,\n aspectRatio,\n seed,\n providerOptions: providerOptions != null ? providerOptions : {}\n })\n )\n )\n );\n const images = [];\n const warnings = [];\n const responses = [];\n for (const result of results) {\n images.push(\n ...result.images.map(\n (image) => {\n var _a18;\n return new DefaultGeneratedFile({\n data: image,\n mimeType: (_a18 = detectMimeType({\n data: image,\n signatures: imageMimeTypeSignatures\n })) != null ? _a18 : \"image/png\"\n });\n }\n )\n );\n warnings.push(...result.warnings);\n responses.push(result.response);\n }\n if (!images.length) {\n throw new NoImageGeneratedError({ responses });\n }\n return new DefaultGenerateImageResult({ images, warnings, responses });\n}\nvar DefaultGenerateImageResult = class {\n constructor(options) {\n this.images = options.images;\n this.warnings = options.warnings;\n this.responses = options.responses;\n }\n get image() {\n return this.images[0];\n }\n};\n\n// core/generate-object/generate-object.ts\nimport {\n JSONParseError,\n TypeValidationError as TypeValidationError2\n} from \"@ai-sdk/provider\";\nimport { createIdGenerator, safeParseJSON } from \"@ai-sdk/provider-utils\";\n\n// errors/no-object-generated-error.ts\nimport { AISDKError as AISDKError4 } from \"@ai-sdk/provider\";\nvar name4 = \"AI_NoObjectGeneratedError\";\nvar marker4 = `vercel.ai.error.${name4}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4;\nvar NoObjectGeneratedError = class extends AISDKError4 {\n constructor({\n message = \"No object generated.\",\n cause,\n text: text2,\n response,\n usage,\n finishReason\n }) {\n super({ name: name4, message, cause });\n this[_a4] = true;\n this.text = text2;\n this.response = response;\n this.usage = usage;\n this.finishReason = finishReason;\n }\n static isInstance(error) {\n return AISDKError4.hasMarker(error, marker4);\n }\n};\n_a4 = symbol4;\n\n// util/download-error.ts\nimport { AISDKError as AISDKError5 } from \"@ai-sdk/provider\";\nvar name5 = \"AI_DownloadError\";\nvar marker5 = `vercel.ai.error.${name5}`;\nvar symbol5 = Symbol.for(marker5);\nvar _a5;\nvar DownloadError = class extends AISDKError5 {\n constructor({\n url,\n statusCode,\n statusText,\n cause,\n message = cause == null ? `Failed to download ${url}: ${statusCode} ${statusText}` : `Failed to download ${url}: ${cause}`\n }) {\n super({ name: name5, message, cause });\n this[_a5] = true;\n this.url = url;\n this.statusCode = statusCode;\n this.statusText = statusText;\n }\n static isInstance(error) {\n return AISDKError5.hasMarker(error, marker5);\n }\n};\n_a5 = symbol5;\n\n// util/download.ts\nasync function download({ url }) {\n var _a17;\n const urlText = url.toString();\n try {\n const response = await fetch(urlText);\n if (!response.ok) {\n throw new DownloadError({\n url: urlText,\n statusCode: response.status,\n statusText: response.statusText\n });\n }\n return {\n data: new Uint8Array(await response.arrayBuffer()),\n mimeType: (_a17 = response.headers.get(\"content-type\")) != null ? _a17 : void 0\n };\n } catch (error) {\n if (DownloadError.isInstance(error)) {\n throw error;\n }\n throw new DownloadError({ url: urlText, cause: error });\n }\n}\n\n// core/prompt/data-content.ts\nimport {\n convertBase64ToUint8Array as convertBase64ToUint8Array3,\n convertUint8ArrayToBase64 as convertUint8ArrayToBase642\n} from \"@ai-sdk/provider-utils\";\n\n// core/prompt/invalid-data-content-error.ts\nimport { AISDKError as AISDKError6 } from \"@ai-sdk/provider\";\nvar name6 = \"AI_InvalidDataContentError\";\nvar marker6 = `vercel.ai.error.${name6}`;\nvar symbol6 = Symbol.for(marker6);\nvar _a6;\nvar InvalidDataContentError = class extends AISDKError6 {\n constructor({\n content,\n cause,\n message = `Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof content}.`\n }) {\n super({ name: name6, message, cause });\n this[_a6] = true;\n this.content = content;\n }\n static isInstance(error) {\n return AISDKError6.hasMarker(error, marker6);\n }\n};\n_a6 = symbol6;\n\n// core/prompt/data-content.ts\nimport { z } from \"zod\";\nvar dataContentSchema = z.union([\n z.string(),\n z.instanceof(Uint8Array),\n z.instanceof(ArrayBuffer),\n z.custom(\n // Buffer might not be available in some environments such as CloudFlare:\n (value) => {\n var _a17, _b;\n return (_b = (_a17 = globalThis.Buffer) == null ? void 0 : _a17.isBuffer(value)) != null ? _b : false;\n },\n { message: \"Must be a Buffer\" }\n )\n]);\nfunction convertDataContentToBase64String(content) {\n if (typeof content === \"string\") {\n return content;\n }\n if (content instanceof ArrayBuffer) {\n return convertUint8ArrayToBase642(new Uint8Array(content));\n }\n return convertUint8ArrayToBase642(content);\n}\nfunction convertDataContentToUint8Array(content) {\n if (content instanceof Uint8Array) {\n return content;\n }\n if (typeof content === \"string\") {\n try {\n return convertBase64ToUint8Array3(content);\n } catch (error) {\n throw new InvalidDataContentError({\n message: \"Invalid data content. Content string is not a base64-encoded media.\",\n content,\n cause: error\n });\n }\n }\n if (content instanceof ArrayBuffer) {\n return new Uint8Array(content);\n }\n throw new InvalidDataContentError({ content });\n}\nfunction convertUint8ArrayToText(uint8Array) {\n try {\n return new TextDecoder().decode(uint8Array);\n } catch (error) {\n throw new Error(\"Error decoding Uint8Array to text\");\n }\n}\n\n// core/prompt/invalid-message-role-error.ts\nimport { AISDKError as AISDKError7 } from \"@ai-sdk/provider\";\nvar name7 = \"AI_InvalidMessageRoleError\";\nvar marker7 = `vercel.ai.error.${name7}`;\nvar symbol7 = Symbol.for(marker7);\nvar _a7;\nvar InvalidMessageRoleError = class extends AISDKError7 {\n constructor({\n role,\n message = `Invalid message role: '${role}'. Must be one of: \"system\", \"user\", \"assistant\", \"tool\".`\n }) {\n super({ name: name7, message });\n this[_a7] = true;\n this.role = role;\n }\n static isInstance(error) {\n return AISDKError7.hasMarker(error, marker7);\n }\n};\n_a7 = symbol7;\n\n// core/prompt/split-data-url.ts\nfunction splitDataUrl(dataUrl) {\n try {\n const [header, base64Content] = dataUrl.split(\",\");\n return {\n mimeType: header.split(\";\")[0].split(\":\")[1],\n base64Content\n };\n } catch (error) {\n return {\n mimeType: void 0,\n base64Content: void 0\n };\n }\n}\n\n// core/prompt/convert-to-language-model-prompt.ts\nasync function convertToLanguageModelPrompt({\n prompt,\n modelSupportsImageUrls = true,\n modelSupportsUrl = () => false,\n downloadImplementation = download\n}) {\n const downloadedAssets = await downloadAssets(\n prompt.messages,\n downloadImplementation,\n modelSupportsImageUrls,\n modelSupportsUrl\n );\n return [\n ...prompt.system != null ? [{ role: \"system\", content: prompt.system }] : [],\n ...prompt.messages.map(\n (message) => convertToLanguageModelMessage(message, downloadedAssets)\n )\n ];\n}\nfunction convertToLanguageModelMessage(message, downloadedAssets) {\n var _a17, _b, _c, _d, _e, _f;\n const role = message.role;\n switch (role) {\n case \"system\": {\n return {\n role: \"system\",\n content: message.content,\n providerMetadata: (_a17 = message.providerOptions) != null ? _a17 : message.experimental_providerMetadata\n };\n }\n case \"user\": {\n if (typeof message.content === \"string\") {\n return {\n role: \"user\",\n content: [{ type: \"text\", text: message.content }],\n providerMetadata: (_b = message.providerOptions) != null ? _b : message.experimental_providerMetadata\n };\n }\n return {\n role: \"user\",\n content: message.content.map((part) => convertPartToLanguageModelPart(part, downloadedAssets)).filter((part) => part.type !== \"text\" || part.text !== \"\"),\n providerMetadata: (_c = message.providerOptions) != null ? _c : message.experimental_providerMetadata\n };\n }\n case \"assistant\": {\n if (typeof message.content === \"string\") {\n return {\n role: \"assistant\",\n content: [{ type: \"text\", text: message.content }],\n providerMetadata: (_d = message.providerOptions) != null ? _d : message.experimental_providerMetadata\n };\n }\n return {\n role: \"assistant\",\n content: message.content.filter(\n // remove empty text parts:\n (part) => part.type !== \"text\" || part.text !== \"\"\n ).map((part) => {\n var _a18;\n const providerOptions = (_a18 = part.providerOptions) != null ? _a18 : part.experimental_providerMetadata;\n switch (part.type) {\n case \"file\": {\n return {\n type: \"file\",\n data: part.data instanceof URL ? part.data : convertDataContentToBase64String(part.data),\n filename: part.filename,\n mimeType: part.mimeType,\n providerMetadata: providerOptions\n };\n }\n case \"reasoning\": {\n return {\n type: \"reasoning\",\n text: part.text,\n signature: part.signature,\n providerMetadata: providerOptions\n };\n }\n case \"redacted-reasoning\": {\n return {\n type: \"redacted-reasoning\",\n data: part.data,\n providerMetadata: providerOptions\n };\n }\n case \"text\": {\n return {\n type: \"text\",\n text: part.text,\n providerMetadata: providerOptions\n };\n }\n case \"tool-call\": {\n return {\n type: \"tool-call\",\n toolCallId: part.toolCallId,\n toolName: part.toolName,\n args: part.args,\n providerMetadata: providerOptions\n };\n }\n }\n }),\n providerMetadata: (_e = message.providerOptions) != null ? _e : message.experimental_providerMetadata\n };\n }\n case \"tool\": {\n return {\n role: \"tool\",\n content: message.content.map((part) => {\n var _a18;\n return {\n type: \"tool-result\",\n toolCallId: part.toolCallId,\n toolName: part.toolName,\n result: part.result,\n content: part.experimental_content,\n isError: part.isError,\n providerMetadata: (_a18 = part.providerOptions) != null ? _a18 : part.experimental_providerMetadata\n };\n }),\n providerMetadata: (_f = message.providerOptions) != null ? _f : message.experimental_providerMetadata\n };\n }\n default: {\n const _exhaustiveCheck = role;\n throw new InvalidMessageRoleError({ role: _exhaustiveCheck });\n }\n }\n}\nasync function downloadAssets(messages, downloadImplementation, modelSupportsImageUrls, modelSupportsUrl) {\n const urls = messages.filter((message) => message.role === \"user\").map((message) => message.content).filter(\n (content) => Array.isArray(content)\n ).flat().filter(\n (part) => part.type === \"image\" || part.type === \"file\"\n ).filter(\n (part) => !(part.type === \"image\" && modelSupportsImageUrls === true)\n ).map((part) => part.type === \"image\" ? part.image : part.data).map(\n (part) => (\n // support string urls:\n typeof part === \"string\" && (part.startsWith(\"http:\") || part.startsWith(\"https:\")) ? new URL(part) : part\n )\n ).filter((image) => image instanceof URL).filter((url) => !modelSupportsUrl(url));\n const downloadedImages = await Promise.all(\n urls.map(async (url) => ({\n url,\n data: await downloadImplementation({ url })\n }))\n );\n return Object.fromEntries(\n downloadedImages.map(({ url, data }) => [url.toString(), data])\n );\n}\nfunction convertPartToLanguageModelPart(part, downloadedAssets) {\n var _a17, _b, _c, _d;\n if (part.type === \"text\") {\n return {\n type: \"text\",\n text: part.text,\n providerMetadata: (_a17 = part.providerOptions) != null ? _a17 : part.experimental_providerMetadata\n };\n }\n let mimeType = part.mimeType;\n let data;\n let content;\n let normalizedData;\n const type = part.type;\n switch (type) {\n case \"image\":\n data = part.image;\n break;\n case \"file\":\n data = part.data;\n break;\n default:\n throw new Error(`Unsupported part type: ${type}`);\n }\n try {\n content = typeof data === \"string\" ? new URL(data) : data;\n } catch (error) {\n content = data;\n }\n if (content instanceof URL) {\n if (content.protocol === \"data:\") {\n const { mimeType: dataUrlMimeType, base64Content } = splitDataUrl(\n content.toString()\n );\n if (dataUrlMimeType == null || base64Content == null) {\n throw new Error(`Invalid data URL format in part ${type}`);\n }\n mimeType = dataUrlMimeType;\n normalizedData = convertDataContentToUint8Array(base64Content);\n } else {\n const downloadedFile = downloadedAssets[content.toString()];\n if (downloadedFile) {\n normalizedData = downloadedFile.data;\n mimeType != null ? mimeType : mimeType = downloadedFile.mimeType;\n } else {\n normalizedData = content;\n }\n }\n } else {\n normalizedData = convertDataContentToUint8Array(content);\n }\n switch (type) {\n case \"image\": {\n if (normalizedData instanceof Uint8Array) {\n mimeType = (_b = detectMimeType({\n data: normalizedData,\n signatures: imageMimeTypeSignatures\n })) != null ? _b : mimeType;\n }\n return {\n type: \"image\",\n image: normalizedData,\n mimeType,\n providerMetadata: (_c = part.providerOptions) != null ? _c : part.experimental_providerMetadata\n };\n }\n case \"file\": {\n if (mimeType == null) {\n throw new Error(`Mime type is missing for file part`);\n }\n return {\n type: \"file\",\n data: normalizedData instanceof Uint8Array ? convertDataContentToBase64String(normalizedData) : normalizedData,\n filename: part.filename,\n mimeType,\n providerMetadata: (_d = part.providerOptions) != null ? _d : part.experimental_providerMetadata\n };\n }\n }\n}\n\n// core/prompt/prepare-call-settings.ts\nfunction prepareCallSettings({\n maxTokens,\n temperature,\n topP,\n topK,\n presencePenalty,\n frequencyPenalty,\n stopSequences,\n seed\n}) {\n if (maxTokens != null) {\n if (!Number.isInteger(maxTokens)) {\n throw new InvalidArgumentError({\n parameter: \"maxTokens\",\n value: maxTokens,\n message: \"maxTokens must be an integer\"\n });\n }\n if (maxTokens < 1) {\n throw new InvalidArgumentError({\n parameter: \"maxTokens\",\n value: maxTokens,\n message: \"maxTokens must be >= 1\"\n });\n }\n }\n if (temperature != null) {\n if (typeof temperature !== \"number\") {\n throw new InvalidArgumentError({\n parameter: \"temperature\",\n value: temperature,\n message: \"temperature must be a number\"\n });\n }\n }\n if (topP != null) {\n if (typeof topP !== \"number\") {\n throw new InvalidArgumentError({\n parameter: \"topP\",\n value: topP,\n message: \"topP must be a number\"\n });\n }\n }\n if (topK != null) {\n if (typeof topK !== \"number\") {\n throw new InvalidArgumentError({\n parameter: \"topK\",\n value: topK,\n message: \"topK must be a number\"\n });\n }\n }\n if (presencePenalty != null) {\n if (typeof presencePenalty !== \"number\") {\n throw new InvalidArgumentError({\n parameter: \"presencePenalty\",\n value: presencePenalty,\n message: \"presencePenalty must be a number\"\n });\n }\n }\n if (frequencyPenalty != null) {\n if (typeof frequencyPenalty !== \"number\") {\n throw new InvalidArgumentError({\n parameter: \"frequencyPenalty\",\n value: frequencyPenalty,\n message: \"frequencyPenalty must be a number\"\n });\n }\n }\n if (seed != null) {\n if (!Number.isInteger(seed)) {\n throw new InvalidArgumentError({\n parameter: \"seed\",\n value: seed,\n message: \"seed must be an integer\"\n });\n }\n }\n return {\n maxTokens,\n // TODO v5 remove default 0 for temperature\n temperature: temperature != null ? temperature : 0,\n topP,\n topK,\n presencePenalty,\n frequencyPenalty,\n stopSequences: stopSequences != null && stopSequences.length > 0 ? stopSequences : void 0,\n seed\n };\n}\n\n// core/prompt/standardize-prompt.ts\nimport { InvalidPromptError } from \"@ai-sdk/provider\";\nimport { safeValidateTypes } from \"@ai-sdk/provider-utils\";\nimport { z as z7 } from \"zod\";\n\n// core/prompt/attachments-to-parts.ts\nfunction attachmentsToParts(attachments) {\n var _a17, _b, _c;\n const parts = [];\n for (const attachment of attachments) {\n let url;\n try {\n url = new URL(attachment.url);\n } catch (error) {\n throw new Error(`Invalid URL: ${attachment.url}`);\n }\n switch (url.protocol) {\n case \"http:\":\n case \"https:\": {\n if ((_a17 = attachment.contentType) == null ? void 0 : _a17.startsWith(\"image/\")) {\n parts.push({ type: \"image\", image: url });\n } else {\n if (!attachment.contentType) {\n throw new Error(\n \"If the attachment is not an image, it must specify a content type\"\n );\n }\n parts.push({\n type: \"file\",\n data: url,\n mimeType: attachment.contentType\n });\n }\n break;\n }\n case \"data:\": {\n let header;\n let base64Content;\n let mimeType;\n try {\n [header, base64Content] = attachment.url.split(\",\");\n mimeType = header.split(\";\")[0].split(\":\")[1];\n } catch (error) {\n throw new Error(`Error processing data URL: ${attachment.url}`);\n }\n if (mimeType == null || base64Content == null) {\n throw new Error(`Invalid data URL format: ${attachment.url}`);\n }\n if ((_b = attachment.contentType) == null ? void 0 : _b.startsWith(\"image/\")) {\n parts.push({\n type: \"image\",\n image: convertDataContentToUint8Array(base64Content)\n });\n } else if ((_c = attachment.contentType) == null ? void 0 : _c.startsWith(\"text/\")) {\n parts.push({\n type: \"text\",\n text: convertUint8ArrayToText(\n convertDataContentToUint8Array(base64Content)\n )\n });\n } else {\n if (!attachment.contentType) {\n throw new Error(\n \"If the attachment is not an image or text, it must specify a content type\"\n );\n }\n parts.push({\n type: \"file\",\n data: base64Content,\n mimeType: attachment.contentType\n });\n }\n break;\n }\n default: {\n throw new Error(`Unsupported URL protocol: ${url.protocol}`);\n }\n }\n }\n return parts;\n}\n\n// core/prompt/message-conversion-error.ts\nimport { AISDKError as AISDKError8 } from \"@ai-sdk/provider\";\nvar name8 = \"AI_MessageConversionError\";\nvar marker8 = `vercel.ai.error.${name8}`;\nvar symbol8 = Symbol.for(marker8);\nvar _a8;\nvar MessageConversionError = class extends AISDKError8 {\n constructor({\n originalMessage,\n message\n }) {\n super({ name: name8, message });\n this[_a8] = true;\n this.originalMessage = originalMessage;\n }\n static isInstance(error) {\n return AISDKError8.hasMarker(error, marker8);\n }\n};\n_a8 = symbol8;\n\n// core/prompt/convert-to-core-messages.ts\nfunction convertToCoreMessages(messages, options) {\n var _a17, _b;\n const tools = (_a17 = options == null ? void 0 : options.tools) != null ? _a17 : {};\n const coreMessages = [];\n for (let i = 0; i < messages.length; i++) {\n const message = messages[i];\n const isLastMessage = i === messages.length - 1;\n const { role, content, experimental_attachments } = message;\n switch (role) {\n case \"system\": {\n coreMessages.push({\n role: \"system\",\n content\n });\n break;\n }\n case \"user\": {\n if (message.parts == null) {\n coreMessages.push({\n role: \"user\",\n content: experimental_attachments ? [\n { type: \"text\", text: content },\n ...attachmentsToParts(experimental_attachments)\n ] : content\n });\n } else {\n const textParts = message.parts.filter((part) => part.type === \"text\").map((part) => ({\n type: \"text\",\n text: part.text\n }));\n coreMessages.push({\n role: \"user\",\n content: experimental_attachments ? [...textParts, ...attachmentsToParts(experimental_attachments)] : textParts\n });\n }\n break;\n }\n case \"assistant\": {\n if (message.parts != null) {\n let processBlock2 = function() {\n const content2 = [];\n for (const part of block) {\n switch (part.type) {\n case \"file\":\n case \"text\": {\n content2.push(part);\n break;\n }\n case \"reasoning\": {\n for (const detail of part.details) {\n switch (detail.type) {\n case \"text\":\n content2.push({\n type: \"reasoning\",\n text: detail.text,\n signature: detail.signature\n });\n break;\n case \"redacted\":\n content2.push({\n type: \"redacted-reasoning\",\n data: detail.data\n });\n break;\n }\n }\n break;\n }\n case \"tool-invocation\":\n content2.push({\n type: \"tool-call\",\n toolCallId: part.toolInvocation.toolCallId,\n toolName: part.toolInvocation.toolName,\n args: part.toolInvocation.args\n });\n break;\n default: {\n const _exhaustiveCheck = part;\n throw new Error(`Unsupported part: ${_exhaustiveCheck}`);\n }\n }\n }\n coreMessages.push({\n role: \"assistant\",\n content: content2\n });\n const stepInvocations = block.filter(\n (part) => part.type === \"tool-invocation\"\n ).map((part) => part.toolInvocation);\n if (stepInvocations.length > 0) {\n coreMessages.push({\n role: \"tool\",\n content: stepInvocations.map(\n (toolInvocation) => {\n if (!(\"result\" in toolInvocation)) {\n throw new MessageConversionError({\n originalMessage: message,\n message: \"ToolInvocation must have a result: \" + JSON.stringify(toolInvocation)\n });\n }\n const { toolCallId, toolName, result } = toolInvocation;\n const tool2 = tools[toolName];\n return (tool2 == null ? void 0 : tool2.experimental_toToolResultContent) != null ? {\n type: \"tool-result\",\n toolCallId,\n toolName,\n result: tool2.experimental_toToolResultContent(result),\n experimental_content: tool2.experimental_toToolResultContent(result)\n } : {\n type: \"tool-result\",\n toolCallId,\n toolName,\n result\n };\n }\n )\n });\n }\n block = [];\n blockHasToolInvocations = false;\n currentStep++;\n };\n var processBlock = processBlock2;\n let currentStep = 0;\n let blockHasToolInvocations = false;\n let block = [];\n for (const part of message.parts) {\n switch (part.type) {\n case \"text\": {\n if (blockHasToolInvocations) {\n processBlock2();\n }\n block.push(part);\n break;\n }\n case \"file\":\n case \"reasoning\": {\n block.push(part);\n break;\n }\n case \"tool-invocation\": {\n if (((_b = part.toolInvocation.step) != null ? _b : 0) !== currentStep) {\n processBlock2();\n }\n block.push(part);\n blockHasToolInvocations = true;\n break;\n }\n }\n }\n processBlock2();\n break;\n }\n const toolInvocations = message.toolInvocations;\n if (toolInvocations == null || toolInvocations.length === 0) {\n coreMessages.push({ role: \"assistant\", content });\n break;\n }\n const maxStep = toolInvocations.reduce((max, toolInvocation) => {\n var _a18;\n return Math.max(max, (_a18 = toolInvocation.step) != null ? _a18 : 0);\n }, 0);\n for (let i2 = 0; i2 <= maxStep; i2++) {\n const stepInvocations = toolInvocations.filter(\n (toolInvocation) => {\n var _a18;\n return ((_a18 = toolInvocation.step) != null ? _a18 : 0) === i2;\n }\n );\n if (stepInvocations.length === 0) {\n continue;\n }\n coreMessages.push({\n role: \"assistant\",\n content: [\n ...isLastMessage && content && i2 === 0 ? [{ type: \"text\", text: content }] : [],\n ...stepInvocations.map(\n ({ toolCallId, toolName, args }) => ({\n type: \"tool-call\",\n toolCallId,\n toolName,\n args\n })\n )\n ]\n });\n coreMessages.push({\n role: \"tool\",\n content: stepInvocations.map((toolInvocation) => {\n if (!(\"result\" in toolInvocation)) {\n throw new MessageConversionError({\n originalMessage: message,\n message: \"ToolInvocation must have a result: \" + JSON.stringify(toolInvocation)\n });\n }\n const { toolCallId, toolName, result } = toolInvocation;\n const tool2 = tools[toolName];\n return (tool2 == null ? void 0 : tool2.experimental_toToolResultContent) != null ? {\n type: \"tool-result\",\n toolCallId,\n toolName,\n result: tool2.experimental_toToolResultContent(result),\n experimental_content: tool2.experimental_toToolResultContent(result)\n } : {\n type: \"tool-result\",\n toolCallId,\n toolName,\n result\n };\n })\n });\n }\n if (content && !isLastMessage) {\n coreMessages.push({ role: \"assistant\", content });\n }\n break;\n }\n case \"data\": {\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new MessageConversionError({\n originalMessage: message,\n message: `Unsupported role: ${_exhaustiveCheck}`\n });\n }\n }\n }\n return coreMessages;\n}\n\n// core/prompt/message.ts\nimport { z as z6 } from \"zod\";\n\n// core/types/provider-metadata.ts\nimport { z as z3 } from \"zod\";\n\n// core/types/json-value.ts\nimport { z as z2 } from \"zod\";\nvar jsonValueSchema = z2.lazy(\n () => z2.union([\n z2.null(),\n z2.string(),\n z2.number(),\n z2.boolean(),\n z2.record(z2.string(), jsonValueSchema),\n z2.array(jsonValueSchema)\n ])\n);\n\n// core/types/provider-metadata.ts\nvar providerMetadataSchema = z3.record(\n z3.string(),\n z3.record(z3.string(), jsonValueSchema)\n);\n\n// core/prompt/content-part.ts\nimport { z as z5 } from \"zod\";\n\n// core/prompt/tool-result-content.ts\nimport { z as z4 } from \"zod\";\nvar toolResultContentSchema = z4.array(\n z4.union([\n z4.object({ type: z4.literal(\"text\"), text: z4.string() }),\n z4.object({\n type: z4.literal(\"image\"),\n data: z4.string(),\n mimeType: z4.string().optional()\n })\n ])\n);\n\n// core/prompt/content-part.ts\nvar textPartSchema = z5.object({\n type: z5.literal(\"text\"),\n text: z5.string(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar imagePartSchema = z5.object({\n type: z5.literal(\"image\"),\n image: z5.union([dataContentSchema, z5.instanceof(URL)]),\n mimeType: z5.string().optional(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar filePartSchema = z5.object({\n type: z5.literal(\"file\"),\n data: z5.union([dataContentSchema, z5.instanceof(URL)]),\n filename: z5.string().optional(),\n mimeType: z5.string(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar reasoningPartSchema = z5.object({\n type: z5.literal(\"reasoning\"),\n text: z5.string(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar redactedReasoningPartSchema = z5.object({\n type: z5.literal(\"redacted-reasoning\"),\n data: z5.string(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar toolCallPartSchema = z5.object({\n type: z5.literal(\"tool-call\"),\n toolCallId: z5.string(),\n toolName: z5.string(),\n args: z5.unknown(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar toolResultPartSchema = z5.object({\n type: z5.literal(\"tool-result\"),\n toolCallId: z5.string(),\n toolName: z5.string(),\n result: z5.unknown(),\n content: toolResultContentSchema.optional(),\n isError: z5.boolean().optional(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\n\n// core/prompt/message.ts\nvar coreSystemMessageSchema = z6.object({\n role: z6.literal(\"system\"),\n content: z6.string(),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreUserMessageSchema = z6.object({\n role: z6.literal(\"user\"),\n content: z6.union([\n z6.string(),\n z6.array(z6.union([textPartSchema, imagePartSchema, filePartSchema]))\n ]),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreAssistantMessageSchema = z6.object({\n role: z6.literal(\"assistant\"),\n content: z6.union([\n z6.string(),\n z6.array(\n z6.union([\n textPartSchema,\n filePartSchema,\n reasoningPartSchema,\n redactedReasoningPartSchema,\n toolCallPartSchema\n ])\n )\n ]),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreToolMessageSchema = z6.object({\n role: z6.literal(\"tool\"),\n content: z6.array(toolResultPartSchema),\n providerOptions: providerMetadataSchema.optional(),\n experimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreMessageSchema = z6.union([\n coreSystemMessageSchema,\n coreUserMessageSchema,\n coreAssistantMessageSchema,\n coreToolMessageSchema\n]);\n\n// core/prompt/standardize-prompt.ts\nfunction standardizePrompt({\n prompt,\n tools\n}) {\n if (prompt.prompt == null && prompt.messages == null) {\n throw new InvalidPromptError({\n prompt,\n message: \"prompt or messages must be defined\"\n });\n }\n if (prompt.prompt != null && prompt.messages != null) {\n throw new InvalidPromptError({\n prompt,\n message: \"prompt and messages cannot be defined at the same time\"\n });\n }\n if (prompt.system != null && typeof prompt.system !== \"string\") {\n throw new InvalidPromptError({\n prompt,\n message: \"system must be a string\"\n });\n }\n if (prompt.prompt != null) {\n if (typeof prompt.prompt !== \"string\") {\n throw new InvalidPromptError({\n prompt,\n message: \"prompt must be a string\"\n });\n }\n return {\n type: \"prompt\",\n system: prompt.system,\n messages: [\n {\n role: \"user\",\n content: prompt.prompt\n }\n ]\n };\n }\n if (prompt.messages != null) {\n const promptType = detectPromptType(prompt.messages);\n const messages = promptType === \"ui-messages\" ? convertToCoreMessages(prompt.messages, {\n tools\n }) : prompt.messages;\n if (messages.length === 0) {\n throw new InvalidPromptError({\n prompt,\n message: \"messages must not be empty\"\n });\n }\n const validationResult = safeValidateTypes({\n value: messages,\n schema: z7.array(coreMessageSchema)\n });\n if (!validationResult.success) {\n throw new InvalidPromptError({\n prompt,\n message: [\n \"message must be a CoreMessage or a UI message\",\n `Validation error: ${validationResult.error.message}`\n ].join(\"\\n\"),\n cause: validationResult.error\n });\n }\n return {\n type: \"messages\",\n messages,\n system: prompt.system\n };\n }\n throw new Error(\"unreachable\");\n}\nfunction detectPromptType(prompt) {\n if (!Array.isArray(prompt)) {\n throw new InvalidPromptError({\n prompt,\n message: [\n \"messages must be an array of CoreMessage or UIMessage\",\n `Received non-array value: ${JSON.stringify(prompt)}`\n ].join(\"\\n\"),\n cause: prompt\n });\n }\n if (prompt.length === 0) {\n return \"messages\";\n }\n const characteristics = prompt.map(detectSingleMessageCharacteristics);\n if (characteristics.some((c) => c === \"has-ui-specific-parts\")) {\n return \"ui-messages\";\n }\n const nonMessageIndex = characteristics.findIndex(\n (c) => c !== \"has-core-specific-parts\" && c !== \"message\"\n );\n if (nonMessageIndex === -1) {\n return \"messages\";\n }\n throw new InvalidPromptError({\n prompt,\n message: [\n \"messages must be an array of CoreMessage or UIMessage\",\n `Received message of type: \"${characteristics[nonMessageIndex]}\" at index ${nonMessageIndex}`,\n `messages[${nonMessageIndex}]: ${JSON.stringify(prompt[nonMessageIndex])}`\n ].join(\"\\n\"),\n cause: prompt\n });\n}\nfunction detectSingleMessageCharacteristics(message) {\n if (typeof message === \"object\" && message !== null && (message.role === \"function\" || // UI-only role\n message.role === \"data\" || // UI-only role\n \"toolInvocations\" in message || // UI-specific field\n \"parts\" in message || // UI-specific field\n \"experimental_attachments\" in message)) {\n return \"has-ui-specific-parts\";\n } else if (typeof message === \"object\" && message !== null && \"content\" in message && (Array.isArray(message.content) || // Core messages can have array content\n \"experimental_providerMetadata\" in message || \"providerOptions\" in message)) {\n return \"has-core-specific-parts\";\n } else if (typeof message === \"object\" && message !== null && \"role\" in message && \"content\" in message && typeof message.content === \"string\" && [\"system\", \"user\", \"assistant\", \"tool\"].includes(message.role)) {\n return \"message\";\n } else {\n return \"other\";\n }\n}\n\n// core/types/usage.ts\nfunction calculateLanguageModelUsage({\n promptTokens,\n completionTokens\n}) {\n return {\n promptTokens,\n completionTokens,\n totalTokens: promptTokens + completionTokens\n };\n}\nfunction addLanguageModelUsage(usage1, usage2) {\n return {\n promptTokens: usage1.promptTokens + usage2.promptTokens,\n completionTokens: usage1.completionTokens + usage2.completionTokens,\n totalTokens: usage1.totalTokens + usage2.totalTokens\n };\n}\n\n// core/generate-object/inject-json-instruction.ts\nvar DEFAULT_SCHEMA_PREFIX = \"JSON schema:\";\nvar DEFAULT_SCHEMA_SUFFIX = \"You MUST answer with a JSON object that matches the JSON schema above.\";\nvar DEFAULT_GENERIC_SUFFIX = \"You MUST answer with JSON.\";\nfunction injectJsonInstruction({\n prompt,\n schema,\n schemaPrefix = schema != null ? DEFAULT_SCHEMA_PREFIX : void 0,\n schemaSuffix = schema != null ? DEFAULT_SCHEMA_SUFFIX : DEFAULT_GENERIC_SUFFIX\n}) {\n return [\n prompt != null && prompt.length > 0 ? prompt : void 0,\n prompt != null && prompt.length > 0 ? \"\" : void 0,\n // add a newline if prompt is not null\n schemaPrefix,\n schema != null ? JSON.stringify(schema) : void 0,\n schemaSuffix\n ].filter((line) => line != null).join(\"\\n\");\n}\n\n// core/generate-object/output-strategy.ts\nimport {\n isJSONArray,\n isJSONObject,\n TypeValidationError,\n UnsupportedFunctionalityError\n} from \"@ai-sdk/provider\";\nimport { safeValidateTypes as safeValidateTypes2 } from \"@ai-sdk/provider-utils\";\nimport { asSchema } from \"@ai-sdk/ui-utils\";\n\n// core/util/async-iterable-stream.ts\nfunction createAsyncIterableStream(source) {\n const stream = source.pipeThrough(new TransformStream());\n stream[Symbol.asyncIterator] = () => {\n const reader = stream.getReader();\n return {\n async next() {\n const { done, value } = await reader.read();\n return done ? { done: true, value: void 0 } : { done: false, value };\n }\n };\n };\n return stream;\n}\n\n// core/generate-object/output-strategy.ts\nvar noSchemaOutputStrategy = {\n type: \"no-schema\",\n jsonSchema: void 0,\n validatePartialResult({ value, textDelta }) {\n return { success: true, value: { partial: value, textDelta } };\n },\n validateFinalResult(value, context) {\n return value === void 0 ? {\n success: false,\n error: new NoObjectGeneratedError({\n message: \"No object generated: response did not match schema.\",\n text: context.text,\n response: context.response,\n usage: context.usage,\n finishReason: context.finishReason\n })\n } : { success: true, value };\n },\n createElementStream() {\n throw new UnsupportedFunctionalityError({\n functionality: \"element streams in no-schema mode\"\n });\n }\n};\nvar objectOutputStrategy = (schema) => ({\n type: \"object\",\n jsonSchema: schema.jsonSchema,\n validatePartialResult({ value, textDelta }) {\n return {\n success: true,\n value: {\n // Note: currently no validation of partial results:\n partial: value,\n textDelta\n }\n };\n },\n validateFinalResult(value) {\n return safeValidateTypes2({ value, schema });\n },\n createElementStream() {\n throw new UnsupportedFunctionalityError({\n functionality: \"element streams in object mode\"\n });\n }\n});\nvar arrayOutputStrategy = (schema) => {\n const { $schema, ...itemSchema } = schema.jsonSchema;\n return {\n type: \"enum\",\n // wrap in object that contains array of elements, since most LLMs will not\n // be able to generate an array directly:\n // possible future optimization: use arrays directly when model supports grammar-guided generation\n jsonSchema: {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n properties: {\n elements: { type: \"array\", items: itemSchema }\n },\n required: [\"elements\"],\n additionalProperties: false\n },\n validatePartialResult({ value, latestObject, isFirstDelta, isFinalDelta }) {\n var _a17;\n if (!isJSONObject(value) || !isJSONArray(value.elements)) {\n return {\n success: false,\n error: new TypeValidationError({\n value,\n cause: \"value must be an object that contains an array of elements\"\n })\n };\n }\n const inputArray = value.elements;\n const resultArray = [];\n for (let i = 0; i < inputArray.length; i++) {\n const element = inputArray[i];\n const result = safeValidateTypes2({ value: element, schema });\n if (i === inputArray.length - 1 && !isFinalDelta) {\n continue;\n }\n if (!result.success) {\n return result;\n }\n resultArray.push(result.value);\n }\n const publishedElementCount = (_a17 = latestObject == null ? void 0 : latestObject.length) != null ? _a17 : 0;\n let textDelta = \"\";\n if (isFirstDelta) {\n textDelta += \"[\";\n }\n if (publishedElementCount > 0) {\n textDelta += \",\";\n }\n textDelta += resultArray.slice(publishedElementCount).map((element) => JSON.stringify(element)).join(\",\");\n if (isFinalDelta) {\n textDelta += \"]\";\n }\n return {\n success: true,\n value: {\n partial: resultArray,\n textDelta\n }\n };\n },\n validateFinalResult(value) {\n if (!isJSONObject(value) || !isJSONArray(value.elements)) {\n return {\n success: false,\n error: new TypeValidationError({\n value,\n cause: \"value must be an object that contains an array of elements\"\n })\n };\n }\n const inputArray = value.elements;\n for (const element of inputArray) {\n const result = safeValidateTypes2({ value: element, schema });\n if (!result.success) {\n return result;\n }\n }\n return { success: true, value: inputArray };\n },\n createElementStream(originalStream) {\n let publishedElements = 0;\n return createAsyncIterableStream(\n originalStream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n switch (chunk.type) {\n case \"object\": {\n const array = chunk.object;\n for (; publishedElements < array.length; publishedElements++) {\n controller.enqueue(array[publishedElements]);\n }\n break;\n }\n case \"text-delta\":\n case \"finish\":\n case \"error\":\n break;\n default: {\n const _exhaustiveCheck = chunk;\n throw new Error(\n `Unsupported chunk type: ${_exhaustiveCheck}`\n );\n }\n }\n }\n })\n )\n );\n }\n };\n};\nvar enumOutputStrategy = (enumValues) => {\n return {\n type: \"enum\",\n // wrap in object that contains result, since most LLMs will not\n // be able to generate an enum value directly:\n // possible future optimization: use enums directly when model supports top-level enums\n jsonSchema: {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n properties: {\n result: { type: \"string\", enum: enumValues }\n },\n required: [\"result\"],\n additionalProperties: false\n },\n validateFinalResult(value) {\n if (!isJSONObject(value) || typeof value.result !== \"string\") {\n return {\n success: false,\n error: new TypeValidationError({\n value,\n cause: 'value must be an object that contains a string in the \"result\" property.'\n })\n };\n }\n const result = value.result;\n return enumValues.includes(result) ? { success: true, value: result } : {\n success: false,\n error: new TypeValidationError({\n value,\n cause: \"value must be a string in the enum\"\n })\n };\n },\n validatePartialResult() {\n throw new UnsupportedFunctionalityError({\n functionality: \"partial results in enum mode\"\n });\n },\n createElementStream() {\n throw new UnsupportedFunctionalityError({\n functionality: \"element streams in enum mode\"\n });\n }\n };\n};\nfunction getOutputStrategy({\n output,\n schema,\n enumValues\n}) {\n switch (output) {\n case \"object\":\n return objectOutputStrategy(asSchema(schema));\n case \"array\":\n return arrayOutputStrategy(asSchema(schema));\n case \"enum\":\n return enumOutputStrategy(enumValues);\n case \"no-schema\":\n return noSchemaOutputStrategy;\n default: {\n const _exhaustiveCheck = output;\n throw new Error(`Unsupported output: ${_exhaustiveCheck}`);\n }\n }\n}\n\n// core/generate-object/validate-object-generation-input.ts\nfunction validateObjectGenerationInput({\n output,\n mode,\n schema,\n schemaName,\n schemaDescription,\n enumValues\n}) {\n if (output != null && output !== \"object\" && output !== \"array\" && output !== \"enum\" && output !== \"no-schema\") {\n throw new InvalidArgumentError({\n parameter: \"output\",\n value: output,\n message: \"Invalid output type.\"\n });\n }\n if (output === \"no-schema\") {\n if (mode === \"auto\" || mode === \"tool\") {\n throw new InvalidArgumentError({\n parameter: \"mode\",\n value: mode,\n message: 'Mode must be \"json\" for no-schema output.'\n });\n }\n if (schema != null) {\n throw new InvalidArgumentError({\n parameter: \"schema\",\n value: schema,\n message: \"Schema is not supported for no-schema output.\"\n });\n }\n if (schemaDescription != null) {\n throw new InvalidArgumentError({\n parameter: \"schemaDescription\",\n value: schemaDescription,\n message: \"Schema description is not supported for no-schema output.\"\n });\n }\n if (schemaName != null) {\n throw new InvalidArgumentError({\n parameter: \"schemaName\",\n value: schemaName,\n message: \"Schema name is not supported for no-schema output.\"\n });\n }\n if (enumValues != null) {\n throw new InvalidArgumentError({\n parameter: \"enumValues\",\n value: enumValues,\n message: \"Enum values are not supported for no-schema output.\"\n });\n }\n }\n if (output === \"object\") {\n if (schema == null) {\n throw new InvalidArgumentError({\n parameter: \"schema\",\n value: schema,\n message: \"Schema is required for object output.\"\n });\n }\n if (enumValues != null) {\n throw new InvalidArgumentError({\n parameter: \"enumValues\",\n value: enumValues,\n message: \"Enum values are not supported for object output.\"\n });\n }\n }\n if (output === \"array\") {\n if (schema == null) {\n throw new InvalidArgumentError({\n parameter: \"schema\",\n value: schema,\n message: \"Element schema is required for array output.\"\n });\n }\n if (enumValues != null) {\n throw new InvalidArgumentError({\n parameter: \"enumValues\",\n value: enumValues,\n message: \"Enum values are not supported for array output.\"\n });\n }\n }\n if (output === \"enum\") {\n if (schema != null) {\n throw new InvalidArgumentError({\n parameter: \"schema\",\n value: schema,\n message: \"Schema is not supported for enum output.\"\n });\n }\n if (schemaDescription != null) {\n throw new InvalidArgumentError({\n parameter: \"schemaDescription\",\n value: schemaDescription,\n message: \"Schema description is not supported for enum output.\"\n });\n }\n if (schemaName != null) {\n throw new InvalidArgumentError({\n parameter: \"schemaName\",\n value: schemaName,\n message: \"Schema name is not supported for enum output.\"\n });\n }\n if (enumValues == null) {\n throw new InvalidArgumentError({\n parameter: \"enumValues\",\n value: enumValues,\n message: \"Enum values are required for enum output.\"\n });\n }\n for (const value of enumValues) {\n if (typeof value !== \"string\") {\n throw new InvalidArgumentError({\n parameter: \"enumValues\",\n value,\n message: \"Enum values must be strings.\"\n });\n }\n }\n }\n}\n\n// core/prompt/stringify-for-telemetry.ts\nfunction stringifyForTelemetry(prompt) {\n const processedPrompt = prompt.map((message) => {\n return {\n ...message,\n content: typeof message.content === \"string\" ? message.content : message.content.map(processPart)\n };\n });\n return JSON.stringify(processedPrompt);\n}\nfunction processPart(part) {\n if (part.type === \"image\") {\n return {\n ...part,\n image: part.image instanceof Uint8Array ? convertDataContentToBase64String(part.image) : part.image\n };\n }\n return part;\n}\n\n// core/generate-object/generate-object.ts\nvar originalGenerateId = createIdGenerator({ prefix: \"aiobj\", size: 24 });\nasync function generateObject({\n model,\n enum: enumValues,\n // rename bc enum is reserved by typescript\n schema: inputSchema,\n schemaName,\n schemaDescription,\n mode,\n output = \"object\",\n system,\n prompt,\n messages,\n maxRetries: maxRetriesArg,\n abortSignal,\n headers,\n experimental_repairText: repairText,\n experimental_telemetry: telemetry,\n experimental_providerMetadata,\n providerOptions = experimental_providerMetadata,\n _internal: {\n generateId: generateId3 = originalGenerateId,\n currentDate = () => /* @__PURE__ */ new Date()\n } = {},\n ...settings\n}) {\n validateObjectGenerationInput({\n output,\n mode,\n schema: inputSchema,\n schemaName,\n schemaDescription,\n enumValues\n });\n const { maxRetries, retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const outputStrategy = getOutputStrategy({\n output,\n schema: inputSchema,\n enumValues\n });\n if (outputStrategy.type === \"no-schema\" && mode === void 0) {\n mode = \"json\";\n }\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { ...settings, maxRetries }\n });\n const tracer = getTracer(telemetry);\n return recordSpan({\n name: \"ai.generateObject\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.generateObject\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.prompt\": {\n input: () => JSON.stringify({ system, prompt, messages })\n },\n \"ai.schema\": outputStrategy.jsonSchema != null ? { input: () => JSON.stringify(outputStrategy.jsonSchema) } : void 0,\n \"ai.schema.name\": schemaName,\n \"ai.schema.description\": schemaDescription,\n \"ai.settings.output\": outputStrategy.type,\n \"ai.settings.mode\": mode\n }\n }),\n tracer,\n fn: async (span) => {\n var _a17, _b, _c, _d;\n if (mode === \"auto\" || mode == null) {\n mode = model.defaultObjectGenerationMode;\n }\n let result;\n let finishReason;\n let usage;\n let warnings;\n let rawResponse;\n let response;\n let request;\n let logprobs;\n let resultProviderMetadata;\n switch (mode) {\n case \"json\": {\n const standardizedPrompt = standardizePrompt({\n prompt: {\n system: outputStrategy.jsonSchema == null ? injectJsonInstruction({ prompt: system }) : model.supportsStructuredOutputs ? system : injectJsonInstruction({\n prompt: system,\n schema: outputStrategy.jsonSchema\n }),\n prompt,\n messages\n },\n tools: void 0\n });\n const promptMessages = await convertToLanguageModelPrompt({\n prompt: standardizedPrompt,\n modelSupportsImageUrls: model.supportsImageUrls,\n modelSupportsUrl: (_a17 = model.supportsUrl) == null ? void 0 : _a17.bind(model)\n // support 'this' context\n });\n const generateResult = await retry(\n () => recordSpan({\n name: \"ai.generateObject.doGenerate\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.generateObject.doGenerate\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n \"ai.prompt.format\": {\n input: () => standardizedPrompt.type\n },\n \"ai.prompt.messages\": {\n input: () => JSON.stringify(promptMessages)\n },\n \"ai.settings.mode\": mode,\n // standardized gen-ai llm span attributes:\n \"gen_ai.system\": model.provider,\n \"gen_ai.request.model\": model.modelId,\n \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n \"gen_ai.request.max_tokens\": settings.maxTokens,\n \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n \"gen_ai.request.temperature\": settings.temperature,\n \"gen_ai.request.top_k\": settings.topK,\n \"gen_ai.request.top_p\": settings.topP\n }\n }),\n tracer,\n fn: async (span2) => {\n var _a18, _b2, _c2, _d2, _e, _f;\n const result2 = await model.doGenerate({\n mode: {\n type: \"object-json\",\n schema: outputStrategy.jsonSchema,\n name: schemaName,\n description: schemaDescription\n },\n ...prepareCallSettings(settings),\n inputFormat: standardizedPrompt.type,\n prompt: promptMessages,\n providerMetadata: providerOptions,\n abortSignal,\n headers\n });\n const responseData = {\n id: (_b2 = (_a18 = result2.response) == null ? void 0 : _a18.id) != null ? _b2 : generateId3(),\n timestamp: (_d2 = (_c2 = result2.response) == null ? void 0 : _c2.timestamp) != null ? _d2 : currentDate(),\n modelId: (_f = (_e = result2.response) == null ? void 0 : _e.modelId) != null ? _f : model.modelId\n };\n if (result2.text === void 0) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: the model did not return a response.\",\n response: responseData,\n usage: calculateLanguageModelUsage(result2.usage),\n finishReason: result2.finishReason\n });\n }\n span2.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": result2.finishReason,\n \"ai.response.object\": { output: () => result2.text },\n \"ai.response.id\": responseData.id,\n \"ai.response.model\": responseData.modelId,\n \"ai.response.timestamp\": responseData.timestamp.toISOString(),\n \"ai.usage.promptTokens\": result2.usage.promptTokens,\n \"ai.usage.completionTokens\": result2.usage.completionTokens,\n // standardized gen-ai llm span attributes:\n \"gen_ai.response.finish_reasons\": [result2.finishReason],\n \"gen_ai.response.id\": responseData.id,\n \"gen_ai.response.model\": responseData.modelId,\n \"gen_ai.usage.prompt_tokens\": result2.usage.promptTokens,\n \"gen_ai.usage.completion_tokens\": result2.usage.completionTokens\n }\n })\n );\n return { ...result2, objectText: result2.text, responseData };\n }\n })\n );\n result = generateResult.objectText;\n finishReason = generateResult.finishReason;\n usage = generateResult.usage;\n warnings = generateResult.warnings;\n rawResponse = generateResult.rawResponse;\n logprobs = generateResult.logprobs;\n resultProviderMetadata = generateResult.providerMetadata;\n request = (_b = generateResult.request) != null ? _b : {};\n response = generateResult.responseData;\n break;\n }\n case \"tool\": {\n const standardizedPrompt = standardizePrompt({\n prompt: { system, prompt, messages },\n tools: void 0\n });\n const promptMessages = await convertToLanguageModelPrompt({\n prompt: standardizedPrompt,\n modelSupportsImageUrls: model.supportsImageUrls,\n modelSupportsUrl: (_c = model.supportsUrl) == null ? void 0 : _c.bind(model)\n // support 'this' context,\n });\n const inputFormat = standardizedPrompt.type;\n const generateResult = await retry(\n () => recordSpan({\n name: \"ai.generateObject.doGenerate\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.generateObject.doGenerate\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n \"ai.prompt.format\": {\n input: () => inputFormat\n },\n \"ai.prompt.messages\": {\n input: () => stringifyForTelemetry(promptMessages)\n },\n \"ai.settings.mode\": mode,\n // standardized gen-ai llm span attributes:\n \"gen_ai.system\": model.provider,\n \"gen_ai.request.model\": model.modelId,\n \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n \"gen_ai.request.max_tokens\": settings.maxTokens,\n \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n \"gen_ai.request.temperature\": settings.temperature,\n \"gen_ai.request.top_k\": settings.topK,\n \"gen_ai.request.top_p\": settings.topP\n }\n }),\n tracer,\n fn: async (span2) => {\n var _a18, _b2, _c2, _d2, _e, _f, _g, _h;\n const result2 = await model.doGenerate({\n mode: {\n type: \"object-tool\",\n tool: {\n type: \"function\",\n name: schemaName != null ? schemaName : \"json\",\n description: schemaDescription != null ? schemaDescription : \"Respond with a JSON object.\",\n parameters: outputStrategy.jsonSchema\n }\n },\n ...prepareCallSettings(settings),\n inputFormat,\n prompt: promptMessages,\n providerMetadata: providerOptions,\n abortSignal,\n headers\n });\n const objectText = (_b2 = (_a18 = result2.toolCalls) == null ? void 0 : _a18[0]) == null ? void 0 : _b2.args;\n const responseData = {\n id: (_d2 = (_c2 = result2.response) == null ? void 0 : _c2.id) != null ? _d2 : generateId3(),\n timestamp: (_f = (_e = result2.response) == null ? void 0 : _e.timestamp) != null ? _f : currentDate(),\n modelId: (_h = (_g = result2.response) == null ? void 0 : _g.modelId) != null ? _h : model.modelId\n };\n if (objectText === void 0) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: the tool was not called.\",\n response: responseData,\n usage: calculateLanguageModelUsage(result2.usage),\n finishReason: result2.finishReason\n });\n }\n span2.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": result2.finishReason,\n \"ai.response.object\": { output: () => objectText },\n \"ai.response.id\": responseData.id,\n \"ai.response.model\": responseData.modelId,\n \"ai.response.timestamp\": responseData.timestamp.toISOString(),\n \"ai.usage.promptTokens\": result2.usage.promptTokens,\n \"ai.usage.completionTokens\": result2.usage.completionTokens,\n // standardized gen-ai llm span attributes:\n \"gen_ai.response.finish_reasons\": [result2.finishReason],\n \"gen_ai.response.id\": responseData.id,\n \"gen_ai.response.model\": responseData.modelId,\n \"gen_ai.usage.input_tokens\": result2.usage.promptTokens,\n \"gen_ai.usage.output_tokens\": result2.usage.completionTokens\n }\n })\n );\n return { ...result2, objectText, responseData };\n }\n })\n );\n result = generateResult.objectText;\n finishReason = generateResult.finishReason;\n usage = generateResult.usage;\n warnings = generateResult.warnings;\n rawResponse = generateResult.rawResponse;\n logprobs = generateResult.logprobs;\n resultProviderMetadata = generateResult.providerMetadata;\n request = (_d = generateResult.request) != null ? _d : {};\n response = generateResult.responseData;\n break;\n }\n case void 0: {\n throw new Error(\n \"Model does not have a default object generation mode.\"\n );\n }\n default: {\n const _exhaustiveCheck = mode;\n throw new Error(`Unsupported mode: ${_exhaustiveCheck}`);\n }\n }\n function processResult(result2) {\n const parseResult = safeParseJSON({ text: result2 });\n if (!parseResult.success) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: could not parse the response.\",\n cause: parseResult.error,\n text: result2,\n response,\n usage: calculateLanguageModelUsage(usage),\n finishReason\n });\n }\n const validationResult = outputStrategy.validateFinalResult(\n parseResult.value,\n {\n text: result2,\n response,\n usage: calculateLanguageModelUsage(usage)\n }\n );\n if (!validationResult.success) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: response did not match schema.\",\n cause: validationResult.error,\n text: result2,\n response,\n usage: calculateLanguageModelUsage(usage),\n finishReason\n });\n }\n return validationResult.value;\n }\n let object2;\n try {\n object2 = processResult(result);\n } catch (error) {\n if (repairText != null && NoObjectGeneratedError.isInstance(error) && (JSONParseError.isInstance(error.cause) || TypeValidationError2.isInstance(error.cause))) {\n const repairedText = await repairText({\n text: result,\n error: error.cause\n });\n if (repairedText === null) {\n throw error;\n }\n object2 = processResult(repairedText);\n } else {\n throw error;\n }\n }\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": finishReason,\n \"ai.response.object\": {\n output: () => JSON.stringify(object2)\n },\n \"ai.usage.promptTokens\": usage.promptTokens,\n \"ai.usage.completionTokens\": usage.completionTokens\n }\n })\n );\n return new DefaultGenerateObjectResult({\n object: object2,\n finishReason,\n usage: calculateLanguageModelUsage(usage),\n warnings,\n request,\n response: {\n ...response,\n headers: rawResponse == null ? void 0 : rawResponse.headers,\n body: rawResponse == null ? void 0 : rawResponse.body\n },\n logprobs,\n providerMetadata: resultProviderMetadata\n });\n }\n });\n}\nvar DefaultGenerateObjectResult = class {\n constructor(options) {\n this.object = options.object;\n this.finishReason = options.finishReason;\n this.usage = options.usage;\n this.warnings = options.warnings;\n this.providerMetadata = options.providerMetadata;\n this.experimental_providerMetadata = options.providerMetadata;\n this.response = options.response;\n this.request = options.request;\n this.logprobs = options.logprobs;\n }\n toJsonResponse(init) {\n var _a17;\n return new Response(JSON.stringify(this.object), {\n status: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n headers: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n contentType: \"application/json; charset=utf-8\"\n })\n });\n }\n};\n\n// core/generate-object/stream-object.ts\nimport { createIdGenerator as createIdGenerator2 } from \"@ai-sdk/provider-utils\";\nimport {\n isDeepEqualData,\n parsePartialJson\n} from \"@ai-sdk/ui-utils\";\n\n// util/delayed-promise.ts\nvar DelayedPromise = class {\n constructor() {\n this.status = { type: \"pending\" };\n this._resolve = void 0;\n this._reject = void 0;\n }\n get value() {\n if (this.promise) {\n return this.promise;\n }\n this.promise = new Promise((resolve, reject) => {\n if (this.status.type === \"resolved\") {\n resolve(this.status.value);\n } else if (this.status.type === \"rejected\") {\n reject(this.status.error);\n }\n this._resolve = resolve;\n this._reject = reject;\n });\n return this.promise;\n }\n resolve(value) {\n var _a17;\n this.status = { type: \"resolved\", value };\n if (this.promise) {\n (_a17 = this._resolve) == null ? void 0 : _a17.call(this, value);\n }\n }\n reject(error) {\n var _a17;\n this.status = { type: \"rejected\", error };\n if (this.promise) {\n (_a17 = this._reject) == null ? void 0 : _a17.call(this, error);\n }\n }\n};\n\n// util/create-resolvable-promise.ts\nfunction createResolvablePromise() {\n let resolve;\n let reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return {\n promise,\n resolve,\n reject\n };\n}\n\n// core/util/create-stitchable-stream.ts\nfunction createStitchableStream() {\n let innerStreamReaders = [];\n let controller = null;\n let isClosed = false;\n let waitForNewStream = createResolvablePromise();\n const processPull = async () => {\n if (isClosed && innerStreamReaders.length === 0) {\n controller == null ? void 0 : controller.close();\n return;\n }\n if (innerStreamReaders.length === 0) {\n waitForNewStream = createResolvablePromise();\n await waitForNewStream.promise;\n return processPull();\n }\n try {\n const { value, done } = await innerStreamReaders[0].read();\n if (done) {\n innerStreamReaders.shift();\n if (innerStreamReaders.length > 0) {\n await processPull();\n } else if (isClosed) {\n controller == null ? void 0 : controller.close();\n }\n } else {\n controller == null ? void 0 : controller.enqueue(value);\n }\n } catch (error) {\n controller == null ? void 0 : controller.error(error);\n innerStreamReaders.shift();\n if (isClosed && innerStreamReaders.length === 0) {\n controller == null ? void 0 : controller.close();\n }\n }\n };\n return {\n stream: new ReadableStream({\n start(controllerParam) {\n controller = controllerParam;\n },\n pull: processPull,\n async cancel() {\n for (const reader of innerStreamReaders) {\n await reader.cancel();\n }\n innerStreamReaders = [];\n isClosed = true;\n }\n }),\n addStream: (innerStream) => {\n if (isClosed) {\n throw new Error(\"Cannot add inner stream: outer stream is closed\");\n }\n innerStreamReaders.push(innerStream.getReader());\n waitForNewStream.resolve();\n },\n /**\n * Gracefully close the outer stream. This will let the inner streams\n * finish processing and then close the outer stream.\n */\n close: () => {\n isClosed = true;\n waitForNewStream.resolve();\n if (innerStreamReaders.length === 0) {\n controller == null ? void 0 : controller.close();\n }\n },\n /**\n * Immediately close the outer stream. This will cancel all inner streams\n * and close the outer stream.\n */\n terminate: () => {\n isClosed = true;\n waitForNewStream.resolve();\n innerStreamReaders.forEach((reader) => reader.cancel());\n innerStreamReaders = [];\n controller == null ? void 0 : controller.close();\n }\n };\n}\n\n// core/util/now.ts\nfunction now() {\n var _a17, _b;\n return (_b = (_a17 = globalThis == null ? void 0 : globalThis.performance) == null ? void 0 : _a17.now()) != null ? _b : Date.now();\n}\n\n// core/generate-object/stream-object.ts\nvar originalGenerateId2 = createIdGenerator2({ prefix: \"aiobj\", size: 24 });\nfunction streamObject({\n model,\n schema: inputSchema,\n schemaName,\n schemaDescription,\n mode,\n output = \"object\",\n system,\n prompt,\n messages,\n maxRetries,\n abortSignal,\n headers,\n experimental_telemetry: telemetry,\n experimental_providerMetadata,\n providerOptions = experimental_providerMetadata,\n onError,\n onFinish,\n _internal: {\n generateId: generateId3 = originalGenerateId2,\n currentDate = () => /* @__PURE__ */ new Date(),\n now: now2 = now\n } = {},\n ...settings\n}) {\n validateObjectGenerationInput({\n output,\n mode,\n schema: inputSchema,\n schemaName,\n schemaDescription\n });\n const outputStrategy = getOutputStrategy({ output, schema: inputSchema });\n if (outputStrategy.type === \"no-schema\" && mode === void 0) {\n mode = \"json\";\n }\n return new DefaultStreamObjectResult({\n model,\n telemetry,\n headers,\n settings,\n maxRetries,\n abortSignal,\n outputStrategy,\n system,\n prompt,\n messages,\n schemaName,\n schemaDescription,\n providerOptions,\n mode,\n onError,\n onFinish,\n generateId: generateId3,\n currentDate,\n now: now2\n });\n}\nvar DefaultStreamObjectResult = class {\n constructor({\n model,\n headers,\n telemetry,\n settings,\n maxRetries: maxRetriesArg,\n abortSignal,\n outputStrategy,\n system,\n prompt,\n messages,\n schemaName,\n schemaDescription,\n providerOptions,\n mode,\n onError,\n onFinish,\n generateId: generateId3,\n currentDate,\n now: now2\n }) {\n this.objectPromise = new DelayedPromise();\n this.usagePromise = new DelayedPromise();\n this.providerMetadataPromise = new DelayedPromise();\n this.warningsPromise = new DelayedPromise();\n this.requestPromise = new DelayedPromise();\n this.responsePromise = new DelayedPromise();\n const { maxRetries, retry } = prepareRetries({\n maxRetries: maxRetriesArg\n });\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { ...settings, maxRetries }\n });\n const tracer = getTracer(telemetry);\n const self = this;\n const stitchableStream = createStitchableStream();\n const eventProcessor = new TransformStream({\n transform(chunk, controller) {\n controller.enqueue(chunk);\n if (chunk.type === \"error\") {\n onError == null ? void 0 : onError({ error: chunk.error });\n }\n }\n });\n this.baseStream = stitchableStream.stream.pipeThrough(eventProcessor);\n recordSpan({\n name: \"ai.streamObject\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.streamObject\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.prompt\": {\n input: () => JSON.stringify({ system, prompt, messages })\n },\n \"ai.schema\": outputStrategy.jsonSchema != null ? { input: () => JSON.stringify(outputStrategy.jsonSchema) } : void 0,\n \"ai.schema.name\": schemaName,\n \"ai.schema.description\": schemaDescription,\n \"ai.settings.output\": outputStrategy.type,\n \"ai.settings.mode\": mode\n }\n }),\n tracer,\n endWhenDone: false,\n fn: async (rootSpan) => {\n var _a17, _b;\n if (mode === \"auto\" || mode == null) {\n mode = model.defaultObjectGenerationMode;\n }\n let callOptions;\n let transformer;\n switch (mode) {\n case \"json\": {\n const standardizedPrompt = standardizePrompt({\n prompt: {\n system: outputStrategy.jsonSchema == null ? injectJsonInstruction({ prompt: system }) : model.supportsStructuredOutputs ? system : injectJsonInstruction({\n prompt: system,\n schema: outputStrategy.jsonSchema\n }),\n prompt,\n messages\n },\n tools: void 0\n });\n callOptions = {\n mode: {\n type: \"object-json\",\n schema: outputStrategy.jsonSchema,\n name: schemaName,\n description: schemaDescription\n },\n ...prepareCallSettings(settings),\n inputFormat: standardizedPrompt.type,\n prompt: await convertToLanguageModelPrompt({\n prompt: standardizedPrompt,\n modelSupportsImageUrls: model.supportsImageUrls,\n modelSupportsUrl: (_a17 = model.supportsUrl) == null ? void 0 : _a17.bind(model)\n // support 'this' context\n }),\n providerMetadata: providerOptions,\n abortSignal,\n headers\n };\n transformer = {\n transform: (chunk, controller) => {\n switch (chunk.type) {\n case \"text-delta\":\n controller.enqueue(chunk.textDelta);\n break;\n case \"response-metadata\":\n case \"finish\":\n case \"error\":\n controller.enqueue(chunk);\n break;\n }\n }\n };\n break;\n }\n case \"tool\": {\n const standardizedPrompt = standardizePrompt({\n prompt: { system, prompt, messages },\n tools: void 0\n });\n callOptions = {\n mode: {\n type: \"object-tool\",\n tool: {\n type: \"function\",\n name: schemaName != null ? schemaName : \"json\",\n description: schemaDescription != null ? schemaDescription : \"Respond with a JSON object.\",\n parameters: outputStrategy.jsonSchema\n }\n },\n ...prepareCallSettings(settings),\n inputFormat: standardizedPrompt.type,\n prompt: await convertToLanguageModelPrompt({\n prompt: standardizedPrompt,\n modelSupportsImageUrls: model.supportsImageUrls,\n modelSupportsUrl: (_b = model.supportsUrl) == null ? void 0 : _b.bind(model)\n // support 'this' context,\n }),\n providerMetadata: providerOptions,\n abortSignal,\n headers\n };\n transformer = {\n transform(chunk, controller) {\n switch (chunk.type) {\n case \"tool-call-delta\":\n controller.enqueue(chunk.argsTextDelta);\n break;\n case \"response-metadata\":\n case \"finish\":\n case \"error\":\n controller.enqueue(chunk);\n break;\n }\n }\n };\n break;\n }\n case void 0: {\n throw new Error(\n \"Model does not have a default object generation mode.\"\n );\n }\n default: {\n const _exhaustiveCheck = mode;\n throw new Error(`Unsupported mode: ${_exhaustiveCheck}`);\n }\n }\n const {\n result: { stream, warnings, rawResponse, request },\n doStreamSpan,\n startTimestampMs\n } = await retry(\n () => recordSpan({\n name: \"ai.streamObject.doStream\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.streamObject.doStream\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n \"ai.prompt.format\": {\n input: () => callOptions.inputFormat\n },\n \"ai.prompt.messages\": {\n input: () => stringifyForTelemetry(callOptions.prompt)\n },\n \"ai.settings.mode\": mode,\n // standardized gen-ai llm span attributes:\n \"gen_ai.system\": model.provider,\n \"gen_ai.request.model\": model.modelId,\n \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n \"gen_ai.request.max_tokens\": settings.maxTokens,\n \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n \"gen_ai.request.temperature\": settings.temperature,\n \"gen_ai.request.top_k\": settings.topK,\n \"gen_ai.request.top_p\": settings.topP\n }\n }),\n tracer,\n endWhenDone: false,\n fn: async (doStreamSpan2) => ({\n startTimestampMs: now2(),\n doStreamSpan: doStreamSpan2,\n result: await model.doStream(callOptions)\n })\n })\n );\n self.requestPromise.resolve(request != null ? request : {});\n let usage;\n let finishReason;\n let providerMetadata;\n let object2;\n let error;\n let accumulatedText = \"\";\n let textDelta = \"\";\n let response = {\n id: generateId3(),\n timestamp: currentDate(),\n modelId: model.modelId\n };\n let latestObjectJson = void 0;\n let latestObject = void 0;\n let isFirstChunk = true;\n let isFirstDelta = true;\n const transformedStream = stream.pipeThrough(new TransformStream(transformer)).pipeThrough(\n new TransformStream({\n async transform(chunk, controller) {\n var _a18, _b2, _c;\n if (isFirstChunk) {\n const msToFirstChunk = now2() - startTimestampMs;\n isFirstChunk = false;\n doStreamSpan.addEvent(\"ai.stream.firstChunk\", {\n \"ai.stream.msToFirstChunk\": msToFirstChunk\n });\n doStreamSpan.setAttributes({\n \"ai.stream.msToFirstChunk\": msToFirstChunk\n });\n }\n if (typeof chunk === \"string\") {\n accumulatedText += chunk;\n textDelta += chunk;\n const { value: currentObjectJson, state: parseState } = parsePartialJson(accumulatedText);\n if (currentObjectJson !== void 0 && !isDeepEqualData(latestObjectJson, currentObjectJson)) {\n const validationResult = outputStrategy.validatePartialResult({\n value: currentObjectJson,\n textDelta,\n latestObject,\n isFirstDelta,\n isFinalDelta: parseState === \"successful-parse\"\n });\n if (validationResult.success && !isDeepEqualData(\n latestObject,\n validationResult.value.partial\n )) {\n latestObjectJson = currentObjectJson;\n latestObject = validationResult.value.partial;\n controller.enqueue({\n type: \"object\",\n object: latestObject\n });\n controller.enqueue({\n type: \"text-delta\",\n textDelta: validationResult.value.textDelta\n });\n textDelta = \"\";\n isFirstDelta = false;\n }\n }\n return;\n }\n switch (chunk.type) {\n case \"response-metadata\": {\n response = {\n id: (_a18 = chunk.id) != null ? _a18 : response.id,\n timestamp: (_b2 = chunk.timestamp) != null ? _b2 : response.timestamp,\n modelId: (_c = chunk.modelId) != null ? _c : response.modelId\n };\n break;\n }\n case \"finish\": {\n if (textDelta !== \"\") {\n controller.enqueue({ type: \"text-delta\", textDelta });\n }\n finishReason = chunk.finishReason;\n usage = calculateLanguageModelUsage(chunk.usage);\n providerMetadata = chunk.providerMetadata;\n controller.enqueue({ ...chunk, usage, response });\n self.usagePromise.resolve(usage);\n self.providerMetadataPromise.resolve(providerMetadata);\n self.responsePromise.resolve({\n ...response,\n headers: rawResponse == null ? void 0 : rawResponse.headers\n });\n const validationResult = outputStrategy.validateFinalResult(\n latestObjectJson,\n {\n text: accumulatedText,\n response,\n usage\n }\n );\n if (validationResult.success) {\n object2 = validationResult.value;\n self.objectPromise.resolve(object2);\n } else {\n error = new NoObjectGeneratedError({\n message: \"No object generated: response did not match schema.\",\n cause: validationResult.error,\n text: accumulatedText,\n response,\n usage,\n finishReason\n });\n self.objectPromise.reject(error);\n }\n break;\n }\n default: {\n controller.enqueue(chunk);\n break;\n }\n }\n },\n // invoke onFinish callback and resolve toolResults promise when the stream is about to close:\n async flush(controller) {\n try {\n const finalUsage = usage != null ? usage : {\n promptTokens: NaN,\n completionTokens: NaN,\n totalTokens: NaN\n };\n doStreamSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": finishReason,\n \"ai.response.object\": {\n output: () => JSON.stringify(object2)\n },\n \"ai.response.id\": response.id,\n \"ai.response.model\": response.modelId,\n \"ai.response.timestamp\": response.timestamp.toISOString(),\n \"ai.usage.promptTokens\": finalUsage.promptTokens,\n \"ai.usage.completionTokens\": finalUsage.completionTokens,\n // standardized gen-ai llm span attributes:\n \"gen_ai.response.finish_reasons\": [finishReason],\n \"gen_ai.response.id\": response.id,\n \"gen_ai.response.model\": response.modelId,\n \"gen_ai.usage.input_tokens\": finalUsage.promptTokens,\n \"gen_ai.usage.output_tokens\": finalUsage.completionTokens\n }\n })\n );\n doStreamSpan.end();\n rootSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.usage.promptTokens\": finalUsage.promptTokens,\n \"ai.usage.completionTokens\": finalUsage.completionTokens,\n \"ai.response.object\": {\n output: () => JSON.stringify(object2)\n }\n }\n })\n );\n await (onFinish == null ? void 0 : onFinish({\n usage: finalUsage,\n object: object2,\n error,\n response: {\n ...response,\n headers: rawResponse == null ? void 0 : rawResponse.headers\n },\n warnings,\n providerMetadata,\n experimental_providerMetadata: providerMetadata\n }));\n } catch (error2) {\n controller.enqueue({ type: \"error\", error: error2 });\n } finally {\n rootSpan.end();\n }\n }\n })\n );\n stitchableStream.addStream(transformedStream);\n }\n }).catch((error) => {\n stitchableStream.addStream(\n new ReadableStream({\n start(controller) {\n controller.enqueue({ type: \"error\", error });\n controller.close();\n }\n })\n );\n }).finally(() => {\n stitchableStream.close();\n });\n this.outputStrategy = outputStrategy;\n }\n get object() {\n return this.objectPromise.value;\n }\n get usage() {\n return this.usagePromise.value;\n }\n get experimental_providerMetadata() {\n return this.providerMetadataPromise.value;\n }\n get providerMetadata() {\n return this.providerMetadataPromise.value;\n }\n get warnings() {\n return this.warningsPromise.value;\n }\n get request() {\n return this.requestPromise.value;\n }\n get response() {\n return this.responsePromise.value;\n }\n get partialObjectStream() {\n return createAsyncIterableStream(\n this.baseStream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n switch (chunk.type) {\n case \"object\":\n controller.enqueue(chunk.object);\n break;\n case \"text-delta\":\n case \"finish\":\n case \"error\":\n break;\n default: {\n const _exhaustiveCheck = chunk;\n throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);\n }\n }\n }\n })\n )\n );\n }\n get elementStream() {\n return this.outputStrategy.createElementStream(this.baseStream);\n }\n get textStream() {\n return createAsyncIterableStream(\n this.baseStream.pipeThrough(\n new TransformStream({\n transform(chunk, controller) {\n switch (chunk.type) {\n case \"text-delta\":\n controller.enqueue(chunk.textDelta);\n break;\n case \"object\":\n case \"finish\":\n case \"error\":\n break;\n default: {\n const _exhaustiveCheck = chunk;\n throw new Error(`Unsupported chunk type: ${_exhaustiveCheck}`);\n }\n }\n }\n })\n )\n );\n }\n get fullStream() {\n return createAsyncIterableStream(this.baseStream);\n }\n pipeTextStreamToResponse(response, init) {\n writeToServerResponse({\n response,\n status: init == null ? void 0 : init.status,\n statusText: init == null ? void 0 : init.statusText,\n headers: prepareOutgoingHttpHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\"\n }),\n stream: this.textStream.pipeThrough(new TextEncoderStream())\n });\n }\n toTextStreamResponse(init) {\n var _a17;\n return new Response(this.textStream.pipeThrough(new TextEncoderStream()), {\n status: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n headers: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\"\n })\n });\n }\n};\n\n// core/generate-text/generate-text.ts\nimport { createIdGenerator as createIdGenerator3 } from \"@ai-sdk/provider-utils\";\n\n// errors/no-output-specified-error.ts\nimport { AISDKError as AISDKError9 } from \"@ai-sdk/provider\";\nvar name9 = \"AI_NoOutputSpecifiedError\";\nvar marker9 = `vercel.ai.error.${name9}`;\nvar symbol9 = Symbol.for(marker9);\nvar _a9;\nvar NoOutputSpecifiedError = class extends AISDKError9 {\n // used in isInstance\n constructor({ message = \"No output specified.\" } = {}) {\n super({ name: name9, message });\n this[_a9] = true;\n }\n static isInstance(error) {\n return AISDKError9.hasMarker(error, marker9);\n }\n};\n_a9 = symbol9;\n\n// errors/tool-execution-error.ts\nimport { AISDKError as AISDKError10, getErrorMessage as getErrorMessage2 } from \"@ai-sdk/provider\";\nvar name10 = \"AI_ToolExecutionError\";\nvar marker10 = `vercel.ai.error.${name10}`;\nvar symbol10 = Symbol.for(marker10);\nvar _a10;\nvar ToolExecutionError = class extends AISDKError10 {\n constructor({\n toolArgs,\n toolName,\n toolCallId,\n cause,\n message = `Error executing tool ${toolName}: ${getErrorMessage2(cause)}`\n }) {\n super({ name: name10, message, cause });\n this[_a10] = true;\n this.toolArgs = toolArgs;\n this.toolName = toolName;\n this.toolCallId = toolCallId;\n }\n static isInstance(error) {\n return AISDKError10.hasMarker(error, marker10);\n }\n};\n_a10 = symbol10;\n\n// core/prompt/prepare-tools-and-tool-choice.ts\nimport { asSchema as asSchema2 } from \"@ai-sdk/ui-utils\";\n\n// core/util/is-non-empty-object.ts\nfunction isNonEmptyObject(object2) {\n return object2 != null && Object.keys(object2).length > 0;\n}\n\n// core/prompt/prepare-tools-and-tool-choice.ts\nfunction prepareToolsAndToolChoice({\n tools,\n toolChoice,\n activeTools\n}) {\n if (!isNonEmptyObject(tools)) {\n return {\n tools: void 0,\n toolChoice: void 0\n };\n }\n const filteredTools = activeTools != null ? Object.entries(tools).filter(\n ([name17]) => activeTools.includes(name17)\n ) : Object.entries(tools);\n return {\n tools: filteredTools.map(([name17, tool2]) => {\n const toolType = tool2.type;\n switch (toolType) {\n case void 0:\n case \"function\":\n return {\n type: \"function\",\n name: name17,\n description: tool2.description,\n parameters: asSchema2(tool2.parameters).jsonSchema\n };\n case \"provider-defined\":\n return {\n type: \"provider-defined\",\n name: name17,\n id: tool2.id,\n args: tool2.args\n };\n default: {\n const exhaustiveCheck = toolType;\n throw new Error(`Unsupported tool type: ${exhaustiveCheck}`);\n }\n }\n }),\n toolChoice: toolChoice == null ? { type: \"auto\" } : typeof toolChoice === \"string\" ? { type: toolChoice } : { type: \"tool\", toolName: toolChoice.toolName }\n };\n}\n\n// core/util/split-on-last-whitespace.ts\nvar lastWhitespaceRegexp = /^([\\s\\S]*?)(\\s+)(\\S*)$/;\nfunction splitOnLastWhitespace(text2) {\n const match = text2.match(lastWhitespaceRegexp);\n return match ? { prefix: match[1], whitespace: match[2], suffix: match[3] } : void 0;\n}\n\n// core/util/remove-text-after-last-whitespace.ts\nfunction removeTextAfterLastWhitespace(text2) {\n const match = splitOnLastWhitespace(text2);\n return match ? match.prefix + match.whitespace : text2;\n}\n\n// core/generate-text/parse-tool-call.ts\nimport { safeParseJSON as safeParseJSON2, safeValidateTypes as safeValidateTypes3 } from \"@ai-sdk/provider-utils\";\nimport { asSchema as asSchema3 } from \"@ai-sdk/ui-utils\";\n\n// errors/invalid-tool-arguments-error.ts\nimport { AISDKError as AISDKError11, getErrorMessage as getErrorMessage3 } from \"@ai-sdk/provider\";\nvar name11 = \"AI_InvalidToolArgumentsError\";\nvar marker11 = `vercel.ai.error.${name11}`;\nvar symbol11 = Symbol.for(marker11);\nvar _a11;\nvar InvalidToolArgumentsError = class extends AISDKError11 {\n constructor({\n toolArgs,\n toolName,\n cause,\n message = `Invalid arguments for tool ${toolName}: ${getErrorMessage3(\n cause\n )}`\n }) {\n super({ name: name11, message, cause });\n this[_a11] = true;\n this.toolArgs = toolArgs;\n this.toolName = toolName;\n }\n static isInstance(error) {\n return AISDKError11.hasMarker(error, marker11);\n }\n};\n_a11 = symbol11;\n\n// errors/no-such-tool-error.ts\nimport { AISDKError as AISDKError12 } from \"@ai-sdk/provider\";\nvar name12 = \"AI_NoSuchToolError\";\nvar marker12 = `vercel.ai.error.${name12}`;\nvar symbol12 = Symbol.for(marker12);\nvar _a12;\nvar NoSuchToolError = class extends AISDKError12 {\n constructor({\n toolName,\n availableTools = void 0,\n message = `Model tried to call unavailable tool '${toolName}'. ${availableTools === void 0 ? \"No tools are available.\" : `Available tools: ${availableTools.join(\", \")}.`}`\n }) {\n super({ name: name12, message });\n this[_a12] = true;\n this.toolName = toolName;\n this.availableTools = availableTools;\n }\n static isInstance(error) {\n return AISDKError12.hasMarker(error, marker12);\n }\n};\n_a12 = symbol12;\n\n// errors/tool-call-repair-error.ts\nimport { AISDKError as AISDKError13, getErrorMessage as getErrorMessage4 } from \"@ai-sdk/provider\";\nvar name13 = \"AI_ToolCallRepairError\";\nvar marker13 = `vercel.ai.error.${name13}`;\nvar symbol13 = Symbol.for(marker13);\nvar _a13;\nvar ToolCallRepairError = class extends AISDKError13 {\n constructor({\n cause,\n originalError,\n message = `Error repairing tool call: ${getErrorMessage4(cause)}`\n }) {\n super({ name: name13, message, cause });\n this[_a13] = true;\n this.originalError = originalError;\n }\n static isInstance(error) {\n return AISDKError13.hasMarker(error, marker13);\n }\n};\n_a13 = symbol13;\n\n// core/generate-text/parse-tool-call.ts\nasync function parseToolCall({\n toolCall,\n tools,\n repairToolCall,\n system,\n messages\n}) {\n if (tools == null) {\n throw new NoSuchToolError({ toolName: toolCall.toolName });\n }\n try {\n return await doParseToolCall({ toolCall, tools });\n } catch (error) {\n if (repairToolCall == null || !(NoSuchToolError.isInstance(error) || InvalidToolArgumentsError.isInstance(error))) {\n throw error;\n }\n let repairedToolCall = null;\n try {\n repairedToolCall = await repairToolCall({\n toolCall,\n tools,\n parameterSchema: ({ toolName }) => asSchema3(tools[toolName].parameters).jsonSchema,\n system,\n messages,\n error\n });\n } catch (repairError) {\n throw new ToolCallRepairError({\n cause: repairError,\n originalError: error\n });\n }\n if (repairedToolCall == null) {\n throw error;\n }\n return await doParseToolCall({ toolCall: repairedToolCall, tools });\n }\n}\nasync function doParseToolCall({\n toolCall,\n tools\n}) {\n const toolName = toolCall.toolName;\n const tool2 = tools[toolName];\n if (tool2 == null) {\n throw new NoSuchToolError({\n toolName: toolCall.toolName,\n availableTools: Object.keys(tools)\n });\n }\n const schema = asSchema3(tool2.parameters);\n const parseResult = toolCall.args.trim() === \"\" ? safeValidateTypes3({ value: {}, schema }) : safeParseJSON2({ text: toolCall.args, schema });\n if (parseResult.success === false) {\n throw new InvalidToolArgumentsError({\n toolName,\n toolArgs: toolCall.args,\n cause: parseResult.error\n });\n }\n return {\n type: \"tool-call\",\n toolCallId: toolCall.toolCallId,\n toolName,\n args: parseResult.value\n };\n}\n\n// core/generate-text/reasoning-detail.ts\nfunction asReasoningText(reasoning) {\n const reasoningText = reasoning.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\");\n return reasoningText.length > 0 ? reasoningText : void 0;\n}\n\n// core/generate-text/to-response-messages.ts\nfunction toResponseMessages({\n text: text2 = \"\",\n files,\n reasoning,\n tools,\n toolCalls,\n toolResults,\n messageId,\n generateMessageId\n}) {\n const responseMessages = [];\n const content = [];\n if (reasoning.length > 0) {\n content.push(\n ...reasoning.map(\n (part) => part.type === \"text\" ? { ...part, type: \"reasoning\" } : { ...part, type: \"redacted-reasoning\" }\n )\n );\n }\n if (files.length > 0) {\n content.push(\n ...files.map((file) => ({\n type: \"file\",\n data: file.base64,\n mimeType: file.mimeType\n }))\n );\n }\n if (text2.length > 0) {\n content.push({ type: \"text\", text: text2 });\n }\n if (toolCalls.length > 0) {\n content.push(...toolCalls);\n }\n if (content.length > 0) {\n responseMessages.push({\n role: \"assistant\",\n content,\n id: messageId\n });\n }\n if (toolResults.length > 0) {\n responseMessages.push({\n role: \"tool\",\n id: generateMessageId(),\n content: toolResults.map((toolResult) => {\n const tool2 = tools[toolResult.toolName];\n return (tool2 == null ? void 0 : tool2.experimental_toToolResultContent) != null ? {\n type: \"tool-result\",\n toolCallId: toolResult.toolCallId,\n toolName: toolResult.toolName,\n result: tool2.experimental_toToolResultContent(toolResult.result),\n experimental_content: tool2.experimental_toToolResultContent(\n toolResult.result\n )\n } : {\n type: \"tool-result\",\n toolCallId: toolResult.toolCallId,\n toolName: toolResult.toolName,\n result: toolResult.result\n };\n })\n });\n }\n return responseMessages;\n}\n\n// core/generate-text/generate-text.ts\nvar originalGenerateId3 = createIdGenerator3({\n prefix: \"aitxt\",\n size: 24\n});\nvar originalGenerateMessageId = createIdGenerator3({\n prefix: \"msg\",\n size: 24\n});\nasync function generateText({\n model,\n tools,\n toolChoice,\n system,\n prompt,\n messages,\n maxRetries: maxRetriesArg,\n abortSignal,\n headers,\n maxSteps = 1,\n experimental_generateMessageId: generateMessageId = originalGenerateMessageId,\n experimental_output: output,\n experimental_continueSteps: continueSteps = false,\n experimental_telemetry: telemetry,\n experimental_providerMetadata,\n providerOptions = experimental_providerMetadata,\n experimental_activeTools: activeTools,\n experimental_prepareStep: prepareStep,\n experimental_repairToolCall: repairToolCall,\n _internal: {\n generateId: generateId3 = originalGenerateId3,\n currentDate = () => /* @__PURE__ */ new Date()\n } = {},\n onStepFinish,\n ...settings\n}) {\n var _a17;\n if (maxSteps < 1) {\n throw new InvalidArgumentError({\n parameter: \"maxSteps\",\n value: maxSteps,\n message: \"maxSteps must be at least 1\"\n });\n }\n const { maxRetries, retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { ...settings, maxRetries }\n });\n const initialPrompt = standardizePrompt({\n prompt: {\n system: (_a17 = output == null ? void 0 : output.injectIntoSystemPrompt({ system, model })) != null ? _a17 : system,\n prompt,\n messages\n },\n tools\n });\n const tracer = getTracer(telemetry);\n return recordSpan({\n name: \"ai.generateText\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.generateText\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // model:\n \"ai.model.provider\": model.provider,\n \"ai.model.id\": model.modelId,\n // specific settings that only make sense on the outer level:\n \"ai.prompt\": {\n input: () => JSON.stringify({ system, prompt, messages })\n },\n \"ai.settings.maxSteps\": maxSteps\n }\n }),\n tracer,\n fn: async (span) => {\n var _a18, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;\n const callSettings = prepareCallSettings(settings);\n let currentModelResponse;\n let currentToolCalls = [];\n let currentToolResults = [];\n let currentReasoningDetails = [];\n let stepCount = 0;\n const responseMessages = [];\n let text2 = \"\";\n const sources = [];\n const steps = [];\n let usage = {\n completionTokens: 0,\n promptTokens: 0,\n totalTokens: 0\n };\n let stepType = \"initial\";\n do {\n const promptFormat = stepCount === 0 ? initialPrompt.type : \"messages\";\n const stepInputMessages = [\n ...initialPrompt.messages,\n ...responseMessages\n ];\n const prepareStepResult = await (prepareStep == null ? void 0 : prepareStep({\n model,\n steps,\n maxSteps,\n stepNumber: stepCount\n }));\n const stepToolChoice = (_a18 = prepareStepResult == null ? void 0 : prepareStepResult.toolChoice) != null ? _a18 : toolChoice;\n const stepActiveTools = (_b = prepareStepResult == null ? void 0 : prepareStepResult.experimental_activeTools) != null ? _b : activeTools;\n const stepModel = (_c = prepareStepResult == null ? void 0 : prepareStepResult.model) != null ? _c : model;\n const promptMessages = await convertToLanguageModelPrompt({\n prompt: {\n type: promptFormat,\n system: initialPrompt.system,\n messages: stepInputMessages\n },\n modelSupportsImageUrls: stepModel.supportsImageUrls,\n modelSupportsUrl: (_d = stepModel.supportsUrl) == null ? void 0 : _d.bind(stepModel)\n // support 'this' context\n });\n const mode = {\n type: \"regular\",\n ...prepareToolsAndToolChoice({\n tools,\n toolChoice: stepToolChoice,\n activeTools: stepActiveTools\n })\n };\n currentModelResponse = await retry(\n () => recordSpan({\n name: \"ai.generateText.doGenerate\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.generateText.doGenerate\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n // model:\n \"ai.model.provider\": stepModel.provider,\n \"ai.model.id\": stepModel.modelId,\n // prompt:\n \"ai.prompt.format\": { input: () => promptFormat },\n \"ai.prompt.messages\": {\n input: () => stringifyForTelemetry(promptMessages)\n },\n \"ai.prompt.tools\": {\n // convert the language model level tools:\n input: () => {\n var _a19;\n return (_a19 = mode.tools) == null ? void 0 : _a19.map((tool2) => JSON.stringify(tool2));\n }\n },\n \"ai.prompt.toolChoice\": {\n input: () => mode.toolChoice != null ? JSON.stringify(mode.toolChoice) : void 0\n },\n // standardized gen-ai llm span attributes:\n \"gen_ai.system\": stepModel.provider,\n \"gen_ai.request.model\": stepModel.modelId,\n \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n \"gen_ai.request.max_tokens\": settings.maxTokens,\n \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n \"gen_ai.request.stop_sequences\": settings.stopSequences,\n \"gen_ai.request.temperature\": settings.temperature,\n \"gen_ai.request.top_k\": settings.topK,\n \"gen_ai.request.top_p\": settings.topP\n }\n }),\n tracer,\n fn: async (span2) => {\n var _a19, _b2, _c2, _d2, _e2, _f2;\n const result = await stepModel.doGenerate({\n mode,\n ...callSettings,\n inputFormat: promptFormat,\n responseFormat: output == null ? void 0 : output.responseFormat({ model }),\n prompt: promptMessages,\n providerMetadata: providerOptions,\n abortSignal,\n headers\n });\n const responseData = {\n id: (_b2 = (_a19 = result.response) == null ? void 0 : _a19.id) != null ? _b2 : generateId3(),\n timestamp: (_d2 = (_c2 = result.response) == null ? void 0 : _c2.timestamp) != null ? _d2 : currentDate(),\n modelId: (_f2 = (_e2 = result.response) == null ? void 0 : _e2.modelId) != null ? _f2 : stepModel.modelId\n };\n span2.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": result.finishReason,\n \"ai.response.text\": {\n output: () => result.text\n },\n \"ai.response.toolCalls\": {\n output: () => JSON.stringify(result.toolCalls)\n },\n \"ai.response.id\": responseData.id,\n \"ai.response.model\": responseData.modelId,\n \"ai.response.timestamp\": responseData.timestamp.toISOString(),\n \"ai.usage.promptTokens\": result.usage.promptTokens,\n \"ai.usage.completionTokens\": result.usage.completionTokens,\n // standardized gen-ai llm span attributes:\n \"gen_ai.response.finish_reasons\": [result.finishReason],\n \"gen_ai.response.id\": responseData.id,\n \"gen_ai.response.model\": responseData.modelId,\n \"gen_ai.usage.input_tokens\": result.usage.promptTokens,\n \"gen_ai.usage.output_tokens\": result.usage.completionTokens\n }\n })\n );\n return { ...result, response: responseData };\n }\n })\n );\n currentToolCalls = await Promise.all(\n ((_e = currentModelResponse.toolCalls) != null ? _e : []).map(\n (toolCall) => parseToolCall({\n toolCall,\n tools,\n repairToolCall,\n system,\n messages: stepInputMessages\n })\n )\n );\n currentToolResults = tools == null ? [] : await executeTools({\n toolCalls: currentToolCalls,\n tools,\n tracer,\n telemetry,\n messages: stepInputMessages,\n abortSignal\n });\n const currentUsage = calculateLanguageModelUsage(\n currentModelResponse.usage\n );\n usage = addLanguageModelUsage(usage, currentUsage);\n let nextStepType = \"done\";\n if (++stepCount < maxSteps) {\n if (continueSteps && currentModelResponse.finishReason === \"length\" && // only use continue when there are no tool calls:\n currentToolCalls.length === 0) {\n nextStepType = \"continue\";\n } else if (\n // there are tool calls:\n currentToolCalls.length > 0 && // all current tool calls have results:\n currentToolResults.length === currentToolCalls.length\n ) {\n nextStepType = \"tool-result\";\n }\n }\n const originalText = (_f = currentModelResponse.text) != null ? _f : \"\";\n const stepTextLeadingWhitespaceTrimmed = stepType === \"continue\" && // only for continue steps\n text2.trimEnd() !== text2 ? originalText.trimStart() : originalText;\n const stepText = nextStepType === \"continue\" ? removeTextAfterLastWhitespace(stepTextLeadingWhitespaceTrimmed) : stepTextLeadingWhitespaceTrimmed;\n text2 = nextStepType === \"continue\" || stepType === \"continue\" ? text2 + stepText : stepText;\n currentReasoningDetails = asReasoningDetails(\n currentModelResponse.reasoning\n );\n sources.push(...(_g = currentModelResponse.sources) != null ? _g : []);\n if (stepType === \"continue\") {\n const lastMessage = responseMessages[responseMessages.length - 1];\n if (typeof lastMessage.content === \"string\") {\n lastMessage.content += stepText;\n } else {\n lastMessage.content.push({\n text: stepText,\n type: \"text\"\n });\n }\n } else {\n responseMessages.push(\n ...toResponseMessages({\n text: text2,\n files: asFiles(currentModelResponse.files),\n reasoning: asReasoningDetails(currentModelResponse.reasoning),\n tools: tools != null ? tools : {},\n toolCalls: currentToolCalls,\n toolResults: currentToolResults,\n messageId: generateMessageId(),\n generateMessageId\n })\n );\n }\n const currentStepResult = {\n stepType,\n text: stepText,\n // TODO v5: rename reasoning to reasoningText (and use reasoning for composite array)\n reasoning: asReasoningText(currentReasoningDetails),\n reasoningDetails: currentReasoningDetails,\n files: asFiles(currentModelResponse.files),\n sources: (_h = currentModelResponse.sources) != null ? _h : [],\n toolCalls: currentToolCalls,\n toolResults: currentToolResults,\n finishReason: currentModelResponse.finishReason,\n usage: currentUsage,\n warnings: currentModelResponse.warnings,\n logprobs: currentModelResponse.logprobs,\n request: (_i = currentModelResponse.request) != null ? _i : {},\n response: {\n ...currentModelResponse.response,\n headers: (_j = currentModelResponse.rawResponse) == null ? void 0 : _j.headers,\n body: (_k = currentModelResponse.rawResponse) == null ? void 0 : _k.body,\n // deep clone msgs to avoid mutating past messages in multi-step:\n messages: structuredClone(responseMessages)\n },\n providerMetadata: currentModelResponse.providerMetadata,\n experimental_providerMetadata: currentModelResponse.providerMetadata,\n isContinued: nextStepType === \"continue\"\n };\n steps.push(currentStepResult);\n await (onStepFinish == null ? void 0 : onStepFinish(currentStepResult));\n stepType = nextStepType;\n } while (stepType !== \"done\");\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": currentModelResponse.finishReason,\n \"ai.response.text\": {\n output: () => currentModelResponse.text\n },\n \"ai.response.toolCalls\": {\n output: () => JSON.stringify(currentModelResponse.toolCalls)\n },\n \"ai.usage.promptTokens\": currentModelResponse.usage.promptTokens,\n \"ai.usage.completionTokens\": currentModelResponse.usage.completionTokens\n }\n })\n );\n return new DefaultGenerateTextResult({\n text: text2,\n files: asFiles(currentModelResponse.files),\n reasoning: asReasoningText(currentReasoningDetails),\n reasoningDetails: currentReasoningDetails,\n sources,\n outputResolver: () => {\n if (output == null) {\n throw new NoOutputSpecifiedError();\n }\n return output.parseOutput(\n { text: text2 },\n {\n response: currentModelResponse.response,\n usage,\n finishReason: currentModelResponse.finishReason\n }\n );\n },\n toolCalls: currentToolCalls,\n toolResults: currentToolResults,\n finishReason: currentModelResponse.finishReason,\n usage,\n warnings: currentModelResponse.warnings,\n request: (_l = currentModelResponse.request) != null ? _l : {},\n response: {\n ...currentModelResponse.response,\n headers: (_m = currentModelResponse.rawResponse) == null ? void 0 : _m.headers,\n body: (_n = currentModelResponse.rawResponse) == null ? void 0 : _n.body,\n messages: responseMessages\n },\n logprobs: currentModelResponse.logprobs,\n steps,\n providerMetadata: currentModelResponse.providerMetadata\n });\n }\n });\n}\nasync function executeTools({\n toolCalls,\n tools,\n tracer,\n telemetry,\n messages,\n abortSignal\n}) {\n const toolResults = await Promise.all(\n toolCalls.map(async ({ toolCallId, toolName, args }) => {\n const tool2 = tools[toolName];\n if ((tool2 == null ? void 0 : tool2.execute) == null) {\n return void 0;\n }\n const result = await recordSpan({\n name: \"ai.toolCall\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.toolCall\",\n telemetry\n }),\n \"ai.toolCall.name\": toolName,\n \"ai.toolCall.id\": toolCallId,\n \"ai.toolCall.args\": {\n output: () => JSON.stringify(args)\n }\n }\n }),\n tracer,\n fn: async (span) => {\n try {\n const result2 = await tool2.execute(args, {\n toolCallId,\n messages,\n abortSignal\n });\n try {\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.toolCall.result\": {\n output: () => JSON.stringify(result2)\n }\n }\n })\n );\n } catch (ignored) {\n }\n return result2;\n } catch (error) {\n throw new ToolExecutionError({\n toolCallId,\n toolName,\n toolArgs: args,\n cause: error\n });\n }\n }\n });\n return {\n type: \"tool-result\",\n toolCallId,\n toolName,\n args,\n result\n };\n })\n );\n return toolResults.filter(\n (result) => result != null\n );\n}\nvar DefaultGenerateTextResult = class {\n constructor(options) {\n this.text = options.text;\n this.files = options.files;\n this.reasoning = options.reasoning;\n this.reasoningDetails = options.reasoningDetails;\n this.toolCalls = options.toolCalls;\n this.toolResults = options.toolResults;\n this.finishReason = options.finishReason;\n this.usage = options.usage;\n this.warnings = options.warnings;\n this.request = options.request;\n this.response = options.response;\n this.steps = options.steps;\n this.experimental_providerMetadata = options.providerMetadata;\n this.providerMetadata = options.providerMetadata;\n this.logprobs = options.logprobs;\n this.outputResolver = options.outputResolver;\n this.sources = options.sources;\n }\n get experimental_output() {\n return this.outputResolver();\n }\n};\nfunction asReasoningDetails(reasoning) {\n if (reasoning == null) {\n return [];\n }\n if (typeof reasoning === \"string\") {\n return [{ type: \"text\", text: reasoning }];\n }\n return reasoning;\n}\nfunction asFiles(files) {\n var _a17;\n return (_a17 = files == null ? void 0 : files.map((file) => new DefaultGeneratedFile(file))) != null ? _a17 : [];\n}\n\n// core/generate-text/output.ts\nvar output_exports = {};\n__export(output_exports, {\n object: () => object,\n text: () => text\n});\nimport { safeParseJSON as safeParseJSON3, safeValidateTypes as safeValidateTypes4 } from \"@ai-sdk/provider-utils\";\nimport {\n asSchema as asSchema4,\n parsePartialJson as parsePartialJson2\n} from \"@ai-sdk/ui-utils\";\n\n// errors/index.ts\nimport {\n AISDKError as AISDKError16,\n APICallError as APICallError2,\n EmptyResponseBodyError,\n InvalidPromptError as InvalidPromptError2,\n InvalidResponseDataError,\n JSONParseError as JSONParseError2,\n LoadAPIKeyError,\n NoContentGeneratedError,\n NoSuchModelError,\n TypeValidationError as TypeValidationError3,\n UnsupportedFunctionalityError as UnsupportedFunctionalityError2\n} from \"@ai-sdk/provider\";\n\n// errors/invalid-stream-part-error.ts\nimport { AISDKError as AISDKError14 } from \"@ai-sdk/provider\";\nvar name14 = \"AI_InvalidStreamPartError\";\nvar marker14 = `vercel.ai.error.${name14}`;\nvar symbol14 = Symbol.for(marker14);\nvar _a14;\nvar InvalidStreamPartError = class extends AISDKError14 {\n constructor({\n chunk,\n message\n }) {\n super({ name: name14, message });\n this[_a14] = true;\n this.chunk = chunk;\n }\n static isInstance(error) {\n return AISDKError14.hasMarker(error, marker14);\n }\n};\n_a14 = symbol14;\n\n// errors/mcp-client-error.ts\nimport { AISDKError as AISDKError15 } from \"@ai-sdk/provider\";\nvar name15 = \"AI_MCPClientError\";\nvar marker15 = `vercel.ai.error.${name15}`;\nvar symbol15 = Symbol.for(marker15);\nvar _a15;\nvar MCPClientError = class extends AISDKError15 {\n constructor({\n name: name17 = \"MCPClientError\",\n message,\n cause\n }) {\n super({ name: name17, message, cause });\n this[_a15] = true;\n }\n static isInstance(error) {\n return AISDKError15.hasMarker(error, marker15);\n }\n};\n_a15 = symbol15;\n\n// core/generate-text/output.ts\nvar text = () => ({\n type: \"text\",\n responseFormat: () => ({ type: \"text\" }),\n injectIntoSystemPrompt({ system }) {\n return system;\n },\n parsePartial({ text: text2 }) {\n return { partial: text2 };\n },\n parseOutput({ text: text2 }) {\n return text2;\n }\n});\nvar object = ({\n schema: inputSchema\n}) => {\n const schema = asSchema4(inputSchema);\n return {\n type: \"object\",\n responseFormat: ({ model }) => ({\n type: \"json\",\n schema: model.supportsStructuredOutputs ? schema.jsonSchema : void 0\n }),\n injectIntoSystemPrompt({ system, model }) {\n return model.supportsStructuredOutputs ? system : injectJsonInstruction({\n prompt: system,\n schema: schema.jsonSchema\n });\n },\n parsePartial({ text: text2 }) {\n const result = parsePartialJson2(text2);\n switch (result.state) {\n case \"failed-parse\":\n case \"undefined-input\":\n return void 0;\n case \"repaired-parse\":\n case \"successful-parse\":\n return {\n // Note: currently no validation of partial results:\n partial: result.value\n };\n default: {\n const _exhaustiveCheck = result.state;\n throw new Error(`Unsupported parse state: ${_exhaustiveCheck}`);\n }\n }\n },\n parseOutput({ text: text2 }, context) {\n const parseResult = safeParseJSON3({ text: text2 });\n if (!parseResult.success) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: could not parse the response.\",\n cause: parseResult.error,\n text: text2,\n response: context.response,\n usage: context.usage,\n finishReason: context.finishReason\n });\n }\n const validationResult = safeValidateTypes4({\n value: parseResult.value,\n schema\n });\n if (!validationResult.success) {\n throw new NoObjectGeneratedError({\n message: \"No object generated: response did not match schema.\",\n cause: validationResult.error,\n text: text2,\n response: context.response,\n usage: context.usage,\n finishReason: context.finishReason\n });\n }\n return validationResult.value;\n }\n };\n};\n\n// core/generate-text/smooth-stream.ts\nimport { delay as originalDelay } from \"@ai-sdk/provider-utils\";\nimport { InvalidArgumentError as InvalidArgumentError2 } from \"@ai-sdk/provider\";\nvar CHUNKING_REGEXPS = {\n word: /\\S+\\s+/m,\n line: /\\n+/m\n};\nfunction smoothStream({\n delayInMs = 10,\n chunking = \"word\",\n _internal: { delay: delay2 = originalDelay } = {}\n} = {}) {\n let detectChunk;\n if (typeof chunking === \"function\") {\n detectChunk = (buffer) => {\n const match = chunking(buffer);\n if (match == null) {\n return null;\n }\n if (!match.length) {\n throw new Error(`Chunking function must return a non-empty string.`);\n }\n if (!buffer.startsWith(match)) {\n throw new Error(\n `Chunking function must return a match that is a prefix of the buffer. Received: \"${match}\" expected to start with \"${buffer}\"`\n );\n }\n return match;\n };\n } else {\n const chunkingRegex = typeof chunking === \"string\" ? CHUNKING_REGEXPS[chunking] : chunking;\n if (chunkingRegex == null) {\n throw new InvalidArgumentError2({\n argument: \"chunking\",\n message: `Chunking must be \"word\" or \"line\" or a RegExp. Received: ${chunking}`\n });\n }\n detectChunk = (buffer) => {\n const match = chunkingRegex.exec(buffer);\n if (!match) {\n return null;\n }\n return buffer.slice(0, match.index) + (match == null ? void 0 : match[0]);\n };\n }\n return () => {\n let buffer = \"\";\n return new TransformStream({\n async transform(chunk, controller) {\n if (chunk.type !== \"text-delta\") {\n if (buffer.length > 0) {\n controller.enqueue({ type: \"text-delta\", textDelta: buffer });\n buffer = \"\";\n }\n controller.enqueue(chunk);\n return;\n }\n buffer += chunk.textDelta;\n let match;\n while ((match = detectChunk(buffer)) != null) {\n controller.enqueue({ type: \"text-delta\", textDelta: match });\n buffer = buffer.slice(match.length);\n await delay2(delayInMs);\n }\n }\n });\n };\n}\n\n// core/generate-text/stream-text.ts\nimport { AISDKError as AISDKError17 } from \"@ai-sdk/provider\";\nimport { createIdGenerator as createIdGenerator4 } from \"@ai-sdk/provider-utils\";\nimport { formatDataStreamPart as formatDataStreamPart2 } from \"@ai-sdk/ui-utils\";\n\n// util/as-array.ts\nfunction asArray(value) {\n return value === void 0 ? [] : Array.isArray(value) ? value : [value];\n}\n\n// util/consume-stream.ts\nasync function consumeStream({\n stream,\n onError\n}) {\n const reader = stream.getReader();\n try {\n while (true) {\n const { done } = await reader.read();\n if (done)\n break;\n }\n } catch (error) {\n onError == null ? void 0 : onError(error);\n } finally {\n reader.releaseLock();\n }\n}\n\n// core/util/merge-streams.ts\nfunction mergeStreams(stream1, stream2) {\n const reader1 = stream1.getReader();\n const reader2 = stream2.getReader();\n let lastRead1 = void 0;\n let lastRead2 = void 0;\n let stream1Done = false;\n let stream2Done = false;\n async function readStream1(controller) {\n try {\n if (lastRead1 == null) {\n lastRead1 = reader1.read();\n }\n const result = await lastRead1;\n lastRead1 = void 0;\n if (!result.done) {\n controller.enqueue(result.value);\n } else {\n controller.close();\n }\n } catch (error) {\n controller.error(error);\n }\n }\n async function readStream2(controller) {\n try {\n if (lastRead2 == null) {\n lastRead2 = reader2.read();\n }\n const result = await lastRead2;\n lastRead2 = void 0;\n if (!result.done) {\n controller.enqueue(result.value);\n } else {\n controller.close();\n }\n } catch (error) {\n controller.error(error);\n }\n }\n return new ReadableStream({\n async pull(controller) {\n try {\n if (stream1Done) {\n await readStream2(controller);\n return;\n }\n if (stream2Done) {\n await readStream1(controller);\n return;\n }\n if (lastRead1 == null) {\n lastRead1 = reader1.read();\n }\n if (lastRead2 == null) {\n lastRead2 = reader2.read();\n }\n const { result, reader } = await Promise.race([\n lastRead1.then((result2) => ({ result: result2, reader: reader1 })),\n lastRead2.then((result2) => ({ result: result2, reader: reader2 }))\n ]);\n if (!result.done) {\n controller.enqueue(result.value);\n }\n if (reader === reader1) {\n lastRead1 = void 0;\n if (result.done) {\n await readStream2(controller);\n stream1Done = true;\n }\n } else {\n lastRead2 = void 0;\n if (result.done) {\n stream2Done = true;\n await readStream1(controller);\n }\n }\n } catch (error) {\n controller.error(error);\n }\n },\n cancel() {\n reader1.cancel();\n reader2.cancel();\n }\n });\n}\n\n// core/generate-text/run-tools-transformation.ts\nimport { generateId } from \"@ai-sdk/ui-utils\";\nfunction runToolsTransformation({\n tools,\n generatorStream,\n toolCallStreaming,\n tracer,\n telemetry,\n system,\n messages,\n abortSignal,\n repairToolCall\n}) {\n let toolResultsStreamController = null;\n const toolResultsStream = new ReadableStream({\n start(controller) {\n toolResultsStreamController = controller;\n }\n });\n const activeToolCalls = {};\n const outstandingToolResults = /* @__PURE__ */ new Set();\n let canClose = false;\n let finishChunk = void 0;\n function attemptClose() {\n if (canClose && outstandingToolResults.size === 0) {\n if (finishChunk != null) {\n toolResultsStreamController.enqueue(finishChunk);\n }\n toolResultsStreamController.close();\n }\n }\n const forwardStream = new TransformStream({\n async transform(chunk, controller) {\n const chunkType = chunk.type;\n switch (chunkType) {\n case \"text-delta\":\n case \"reasoning\":\n case \"reasoning-signature\":\n case \"redacted-reasoning\":\n case \"source\":\n case \"response-metadata\":\n case \"error\": {\n controller.enqueue(chunk);\n break;\n }\n case \"file\": {\n controller.enqueue(\n new DefaultGeneratedFileWithType({\n data: chunk.data,\n mimeType: chunk.mimeType\n })\n );\n break;\n }\n case \"tool-call-delta\": {\n if (toolCallStreaming) {\n if (!activeToolCalls[chunk.toolCallId]) {\n controller.enqueue({\n type: \"tool-call-streaming-start\",\n toolCallId: chunk.toolCallId,\n toolName: chunk.toolName\n });\n activeToolCalls[chunk.toolCallId] = true;\n }\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallId: chunk.toolCallId,\n toolName: chunk.toolName,\n argsTextDelta: chunk.argsTextDelta\n });\n }\n break;\n }\n case \"tool-call\": {\n try {\n const toolCall = await parseToolCall({\n toolCall: chunk,\n tools,\n repairToolCall,\n system,\n messages\n });\n controller.enqueue(toolCall);\n const tool2 = tools[toolCall.toolName];\n if (tool2.execute != null) {\n const toolExecutionId = generateId();\n outstandingToolResults.add(toolExecutionId);\n recordSpan({\n name: \"ai.toolCall\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.toolCall\",\n telemetry\n }),\n \"ai.toolCall.name\": toolCall.toolName,\n \"ai.toolCall.id\": toolCall.toolCallId,\n \"ai.toolCall.args\": {\n output: () => JSON.stringify(toolCall.args)\n }\n }\n }),\n tracer,\n fn: async (span) => tool2.execute(toolCall.args, {\n toolCallId: toolCall.toolCallId,\n messages,\n abortSignal\n }).then(\n (result) => {\n toolResultsStreamController.enqueue({\n ...toolCall,\n type: \"tool-result\",\n result\n });\n outstandingToolResults.delete(toolExecutionId);\n attemptClose();\n try {\n span.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.toolCall.result\": {\n output: () => JSON.stringify(result)\n }\n }\n })\n );\n } catch (ignored) {\n }\n },\n (error) => {\n toolResultsStreamController.enqueue({\n type: \"error\",\n error: new ToolExecutionError({\n toolCallId: toolCall.toolCallId,\n toolName: toolCall.toolName,\n toolArgs: toolCall.args,\n cause: error\n })\n });\n outstandingToolResults.delete(toolExecutionId);\n attemptClose();\n }\n )\n });\n }\n } catch (error) {\n toolResultsStreamController.enqueue({\n type: \"error\",\n error\n });\n }\n break;\n }\n case \"finish\": {\n finishChunk = {\n type: \"finish\",\n finishReason: chunk.finishReason,\n logprobs: chunk.logprobs,\n usage: calculateLanguageModelUsage(chunk.usage),\n experimental_providerMetadata: chunk.providerMetadata\n };\n break;\n }\n default: {\n const _exhaustiveCheck = chunkType;\n throw new Error(`Unhandled chunk type: ${_exhaustiveCheck}`);\n }\n }\n },\n flush() {\n canClose = true;\n attemptClose();\n }\n });\n return new ReadableStream({\n async start(controller) {\n return Promise.all([\n generatorStream.pipeThrough(forwardStream).pipeTo(\n new WritableStream({\n write(chunk) {\n controller.enqueue(chunk);\n },\n close() {\n }\n })\n ),\n toolResultsStream.pipeTo(\n new WritableStream({\n write(chunk) {\n controller.enqueue(chunk);\n },\n close() {\n controller.close();\n }\n })\n )\n ]);\n }\n });\n}\n\n// core/generate-text/stream-text.ts\nvar originalGenerateId4 = createIdGenerator4({\n prefix: \"aitxt\",\n size: 24\n});\nvar originalGenerateMessageId2 = createIdGenerator4({\n prefix: \"msg\",\n size: 24\n});\nfunction streamText({\n model,\n tools,\n toolChoice,\n system,\n prompt,\n messages,\n maxRetries,\n abortSignal,\n headers,\n maxSteps = 1,\n experimental_generateMessageId: generateMessageId = originalGenerateMessageId2,\n experimental_output: output,\n experimental_continueSteps: continueSteps = false,\n experimental_telemetry: telemetry,\n experimental_providerMetadata,\n providerOptions = experimental_providerMetadata,\n experimental_toolCallStreaming = false,\n toolCallStreaming = experimental_toolCallStreaming,\n experimental_activeTools: activeTools,\n experimental_repairToolCall: repairToolCall,\n experimental_transform: transform,\n onChunk,\n onError,\n onFinish,\n onStepFinish,\n _internal: {\n now: now2 = now,\n generateId: generateId3 = originalGenerateId4,\n currentDate = () => /* @__PURE__ */ new Date()\n } = {},\n ...settings\n}) {\n return new DefaultStreamTextResult({\n model,\n telemetry,\n headers,\n settings,\n maxRetries,\n abortSignal,\n system,\n prompt,\n messages,\n tools,\n toolChoice,\n toolCallStreaming,\n transforms: asArray(transform),\n activeTools,\n repairToolCall,\n maxSteps,\n output,\n continueSteps,\n providerOptions,\n onChunk,\n onError,\n onFinish,\n onStepFinish,\n now: now2,\n currentDate,\n generateId: generateId3,\n generateMessageId\n });\n}\nfunction createOutputTransformStream(output) {\n if (!output) {\n return new TransformStream({\n transform(chunk, controller) {\n controller.enqueue({ part: chunk, partialOutput: void 0 });\n }\n });\n }\n let text2 = \"\";\n let textChunk = \"\";\n let lastPublishedJson = \"\";\n function publishTextChunk({\n controller,\n partialOutput = void 0\n }) {\n controller.enqueue({\n part: { type: \"text-delta\", textDelta: textChunk },\n partialOutput\n });\n textChunk = \"\";\n }\n return new TransformStream({\n transform(chunk, controller) {\n if (chunk.type === \"step-finish\") {\n publishTextChunk({ controller });\n }\n if (chunk.type !== \"text-delta\") {\n controller.enqueue({ part: chunk, partialOutput: void 0 });\n return;\n }\n text2 += chunk.textDelta;\n textChunk += chunk.textDelta;\n const result = output.parsePartial({ text: text2 });\n if (result != null) {\n const currentJson = JSON.stringify(result.partial);\n if (currentJson !== lastPublishedJson) {\n publishTextChunk({ controller, partialOutput: result.partial });\n lastPublishedJson = currentJson;\n }\n }\n },\n flush(controller) {\n if (textChunk.length > 0) {\n publishTextChunk({ controller });\n }\n }\n });\n}\nvar DefaultStreamTextResult = class {\n constructor({\n model,\n telemetry,\n headers,\n settings,\n maxRetries: maxRetriesArg,\n abortSignal,\n system,\n prompt,\n messages,\n tools,\n toolChoice,\n toolCallStreaming,\n transforms,\n activeTools,\n repairToolCall,\n maxSteps,\n output,\n continueSteps,\n providerOptions,\n now: now2,\n currentDate,\n generateId: generateId3,\n generateMessageId,\n onChunk,\n onError,\n onFinish,\n onStepFinish\n }) {\n this.warningsPromise = new DelayedPromise();\n this.usagePromise = new DelayedPromise();\n this.finishReasonPromise = new DelayedPromise();\n this.providerMetadataPromise = new DelayedPromise();\n this.textPromise = new DelayedPromise();\n this.reasoningPromise = new DelayedPromise();\n this.reasoningDetailsPromise = new DelayedPromise();\n this.sourcesPromise = new DelayedPromise();\n this.filesPromise = new DelayedPromise();\n this.toolCallsPromise = new DelayedPromise();\n this.toolResultsPromise = new DelayedPromise();\n this.requestPromise = new DelayedPromise();\n this.responsePromise = new DelayedPromise();\n this.stepsPromise = new DelayedPromise();\n var _a17;\n if (maxSteps < 1) {\n throw new InvalidArgumentError({\n parameter: \"maxSteps\",\n value: maxSteps,\n message: \"maxSteps must be at least 1\"\n });\n }\n this.output = output;\n let recordedStepText = \"\";\n let recordedContinuationText = \"\";\n let recordedFullText = \"\";\n let stepReasoning = [];\n let stepFiles = [];\n let activeReasoningText = void 0;\n let recordedStepSources = [];\n const recordedSources = [];\n const recordedResponse = {\n id: generateId3(),\n timestamp: currentDate(),\n modelId: model.modelId,\n messages: []\n };\n let recordedToolCalls = [];\n let recordedToolResults = [];\n let recordedFinishReason = void 0;\n let recordedUsage = void 0;\n let stepType = \"initial\";\n const recordedSteps = [];\n let rootSpan;\n const eventProcessor = new TransformStream({\n async transform(chunk, controller) {\n controller.enqueue(chunk);\n const { part } = chunk;\n if (part.type === \"text-delta\" || part.type === \"reasoning\" || part.type === \"source\" || part.type === \"tool-call\" || part.type === \"tool-result\" || part.type === \"tool-call-streaming-start\" || part.type === \"tool-call-delta\") {\n await (onChunk == null ? void 0 : onChunk({ chunk: part }));\n }\n if (part.type === \"error\") {\n await (onError == null ? void 0 : onError({ error: part.error }));\n }\n if (part.type === \"text-delta\") {\n recordedStepText += part.textDelta;\n recordedContinuationText += part.textDelta;\n recordedFullText += part.textDelta;\n }\n if (part.type === \"reasoning\") {\n if (activeReasoningText == null) {\n activeReasoningText = { type: \"text\", text: part.textDelta };\n stepReasoning.push(activeReasoningText);\n } else {\n activeReasoningText.text += part.textDelta;\n }\n }\n if (part.type === \"reasoning-signature\") {\n if (activeReasoningText == null) {\n throw new AISDKError17({\n name: \"InvalidStreamPart\",\n message: \"reasoning-signature without reasoning\"\n });\n }\n activeReasoningText.signature = part.signature;\n activeReasoningText = void 0;\n }\n if (part.type === \"redacted-reasoning\") {\n stepReasoning.push({ type: \"redacted\", data: part.data });\n }\n if (part.type === \"file\") {\n stepFiles.push(part);\n }\n if (part.type === \"source\") {\n recordedSources.push(part.source);\n recordedStepSources.push(part.source);\n }\n if (part.type === \"tool-call\") {\n recordedToolCalls.push(part);\n }\n if (part.type === \"tool-result\") {\n recordedToolResults.push(part);\n }\n if (part.type === \"step-finish\") {\n const stepMessages = toResponseMessages({\n text: recordedContinuationText,\n files: stepFiles,\n reasoning: stepReasoning,\n tools: tools != null ? tools : {},\n toolCalls: recordedToolCalls,\n toolResults: recordedToolResults,\n messageId: part.messageId,\n generateMessageId\n });\n const currentStep = recordedSteps.length;\n let nextStepType = \"done\";\n if (currentStep + 1 < maxSteps) {\n if (continueSteps && part.finishReason === \"length\" && // only use continue when there are no tool calls:\n recordedToolCalls.length === 0) {\n nextStepType = \"continue\";\n } else if (\n // there are tool calls:\n recordedToolCalls.length > 0 && // all current tool calls have results:\n recordedToolResults.length === recordedToolCalls.length\n ) {\n nextStepType = \"tool-result\";\n }\n }\n const currentStepResult = {\n stepType,\n text: recordedStepText,\n reasoning: asReasoningText(stepReasoning),\n reasoningDetails: stepReasoning,\n files: stepFiles,\n sources: recordedStepSources,\n toolCalls: recordedToolCalls,\n toolResults: recordedToolResults,\n finishReason: part.finishReason,\n usage: part.usage,\n warnings: part.warnings,\n logprobs: part.logprobs,\n request: part.request,\n response: {\n ...part.response,\n messages: [...recordedResponse.messages, ...stepMessages]\n },\n providerMetadata: part.experimental_providerMetadata,\n experimental_providerMetadata: part.experimental_providerMetadata,\n isContinued: part.isContinued\n };\n await (onStepFinish == null ? void 0 : onStepFinish(currentStepResult));\n recordedSteps.push(currentStepResult);\n recordedToolCalls = [];\n recordedToolResults = [];\n recordedStepText = \"\";\n recordedStepSources = [];\n stepReasoning = [];\n stepFiles = [];\n activeReasoningText = void 0;\n if (nextStepType !== \"done\") {\n stepType = nextStepType;\n }\n if (nextStepType !== \"continue\") {\n recordedResponse.messages.push(...stepMessages);\n recordedContinuationText = \"\";\n }\n }\n if (part.type === \"finish\") {\n recordedResponse.id = part.response.id;\n recordedResponse.timestamp = part.response.timestamp;\n recordedResponse.modelId = part.response.modelId;\n recordedResponse.headers = part.response.headers;\n recordedUsage = part.usage;\n recordedFinishReason = part.finishReason;\n }\n },\n async flush(controller) {\n var _a18;\n try {\n if (recordedSteps.length === 0) {\n return;\n }\n const lastStep = recordedSteps[recordedSteps.length - 1];\n self.warningsPromise.resolve(lastStep.warnings);\n self.requestPromise.resolve(lastStep.request);\n self.responsePromise.resolve(lastStep.response);\n self.toolCallsPromise.resolve(lastStep.toolCalls);\n self.toolResultsPromise.resolve(lastStep.toolResults);\n self.providerMetadataPromise.resolve(\n lastStep.experimental_providerMetadata\n );\n self.reasoningPromise.resolve(lastStep.reasoning);\n self.reasoningDetailsPromise.resolve(lastStep.reasoningDetails);\n const finishReason = recordedFinishReason != null ? recordedFinishReason : \"unknown\";\n const usage = recordedUsage != null ? recordedUsage : {\n completionTokens: NaN,\n promptTokens: NaN,\n totalTokens: NaN\n };\n self.finishReasonPromise.resolve(finishReason);\n self.usagePromise.resolve(usage);\n self.textPromise.resolve(recordedFullText);\n self.sourcesPromise.resolve(recordedSources);\n self.filesPromise.resolve(lastStep.files);\n self.stepsPromise.resolve(recordedSteps);\n await (onFinish == null ? void 0 : onFinish({\n finishReason,\n logprobs: void 0,\n usage,\n text: recordedFullText,\n reasoning: lastStep.reasoning,\n reasoningDetails: lastStep.reasoningDetails,\n files: lastStep.files,\n sources: lastStep.sources,\n toolCalls: lastStep.toolCalls,\n toolResults: lastStep.toolResults,\n request: (_a18 = lastStep.request) != null ? _a18 : {},\n response: lastStep.response,\n warnings: lastStep.warnings,\n providerMetadata: lastStep.providerMetadata,\n experimental_providerMetadata: lastStep.experimental_providerMetadata,\n steps: recordedSteps\n }));\n rootSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": finishReason,\n \"ai.response.text\": { output: () => recordedFullText },\n \"ai.response.toolCalls\": {\n output: () => {\n var _a19;\n return ((_a19 = lastStep.toolCalls) == null ? void 0 : _a19.length) ? JSON.stringify(lastStep.toolCalls) : void 0;\n }\n },\n \"ai.usage.promptTokens\": usage.promptTokens,\n \"ai.usage.completionTokens\": usage.completionTokens\n }\n })\n );\n } catch (error) {\n controller.error(error);\n } finally {\n rootSpan.end();\n }\n }\n });\n const stitchableStream = createStitchableStream();\n this.addStream = stitchableStream.addStream;\n this.closeStream = stitchableStream.close;\n let stream = stitchableStream.stream;\n for (const transform of transforms) {\n stream = stream.pipeThrough(\n transform({\n tools,\n stopStream() {\n stitchableStream.terminate();\n }\n })\n );\n }\n this.baseStream = stream.pipeThrough(createOutputTransformStream(output)).pipeThrough(eventProcessor);\n const { maxRetries, retry } = prepareRetries({\n maxRetries: maxRetriesArg\n });\n const tracer = getTracer(telemetry);\n const baseTelemetryAttributes = getBaseTelemetryAttributes({\n model,\n telemetry,\n headers,\n settings: { ...settings, maxRetries }\n });\n const initialPrompt = standardizePrompt({\n prompt: {\n system: (_a17 = output == null ? void 0 : output.injectIntoSystemPrompt({ system, model })) != null ? _a17 : system,\n prompt,\n messages\n },\n tools\n });\n const self = this;\n recordSpan({\n name: \"ai.streamText\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({ operationId: \"ai.streamText\", telemetry }),\n ...baseTelemetryAttributes,\n // specific settings that only make sense on the outer level:\n \"ai.prompt\": {\n input: () => JSON.stringify({ system, prompt, messages })\n },\n \"ai.settings.maxSteps\": maxSteps\n }\n }),\n tracer,\n endWhenDone: false,\n fn: async (rootSpanArg) => {\n rootSpan = rootSpanArg;\n async function streamStep({\n currentStep,\n responseMessages,\n usage,\n stepType: stepType2,\n previousStepText,\n hasLeadingWhitespace,\n messageId\n }) {\n var _a18;\n const promptFormat = responseMessages.length === 0 ? initialPrompt.type : \"messages\";\n const stepInputMessages = [\n ...initialPrompt.messages,\n ...responseMessages\n ];\n const promptMessages = await convertToLanguageModelPrompt({\n prompt: {\n type: promptFormat,\n system: initialPrompt.system,\n messages: stepInputMessages\n },\n modelSupportsImageUrls: model.supportsImageUrls,\n modelSupportsUrl: (_a18 = model.supportsUrl) == null ? void 0 : _a18.bind(model)\n // support 'this' context\n });\n const mode = {\n type: \"regular\",\n ...prepareToolsAndToolChoice({ tools, toolChoice, activeTools })\n };\n const {\n result: { stream: stream2, warnings, rawResponse, request },\n doStreamSpan,\n startTimestampMs\n } = await retry(\n () => recordSpan({\n name: \"ai.streamText.doStream\",\n attributes: selectTelemetryAttributes({\n telemetry,\n attributes: {\n ...assembleOperationName({\n operationId: \"ai.streamText.doStream\",\n telemetry\n }),\n ...baseTelemetryAttributes,\n \"ai.prompt.format\": {\n input: () => promptFormat\n },\n \"ai.prompt.messages\": {\n input: () => stringifyForTelemetry(promptMessages)\n },\n \"ai.prompt.tools\": {\n // convert the language model level tools:\n input: () => {\n var _a19;\n return (_a19 = mode.tools) == null ? void 0 : _a19.map((tool2) => JSON.stringify(tool2));\n }\n },\n \"ai.prompt.toolChoice\": {\n input: () => mode.toolChoice != null ? JSON.stringify(mode.toolChoice) : void 0\n },\n // standardized gen-ai llm span attributes:\n \"gen_ai.system\": model.provider,\n \"gen_ai.request.model\": model.modelId,\n \"gen_ai.request.frequency_penalty\": settings.frequencyPenalty,\n \"gen_ai.request.max_tokens\": settings.maxTokens,\n \"gen_ai.request.presence_penalty\": settings.presencePenalty,\n \"gen_ai.request.stop_sequences\": settings.stopSequences,\n \"gen_ai.request.temperature\": settings.temperature,\n \"gen_ai.request.top_k\": settings.topK,\n \"gen_ai.request.top_p\": settings.topP\n }\n }),\n tracer,\n endWhenDone: false,\n fn: async (doStreamSpan2) => ({\n startTimestampMs: now2(),\n // get before the call\n doStreamSpan: doStreamSpan2,\n result: await model.doStream({\n mode,\n ...prepareCallSettings(settings),\n inputFormat: promptFormat,\n responseFormat: output == null ? void 0 : output.responseFormat({ model }),\n prompt: promptMessages,\n providerMetadata: providerOptions,\n abortSignal,\n headers\n })\n })\n })\n );\n const transformedStream = runToolsTransformation({\n tools,\n generatorStream: stream2,\n toolCallStreaming,\n tracer,\n telemetry,\n system,\n messages: stepInputMessages,\n repairToolCall,\n abortSignal\n });\n const stepRequest = request != null ? request : {};\n const stepToolCalls = [];\n const stepToolResults = [];\n const stepReasoning2 = [];\n const stepFiles2 = [];\n let activeReasoningText2 = void 0;\n let stepFinishReason = \"unknown\";\n let stepUsage = {\n promptTokens: 0,\n completionTokens: 0,\n totalTokens: 0\n };\n let stepProviderMetadata;\n let stepFirstChunk = true;\n let stepText = \"\";\n let fullStepText = stepType2 === \"continue\" ? previousStepText : \"\";\n let stepLogProbs;\n let stepResponse = {\n id: generateId3(),\n timestamp: currentDate(),\n modelId: model.modelId\n };\n let chunkBuffer = \"\";\n let chunkTextPublished = false;\n let inWhitespacePrefix = true;\n let hasWhitespaceSuffix = false;\n async function publishTextChunk({\n controller,\n chunk\n }) {\n controller.enqueue(chunk);\n stepText += chunk.textDelta;\n fullStepText += chunk.textDelta;\n chunkTextPublished = true;\n hasWhitespaceSuffix = chunk.textDelta.trimEnd() !== chunk.textDelta;\n }\n self.addStream(\n transformedStream.pipeThrough(\n new TransformStream({\n async transform(chunk, controller) {\n var _a19, _b, _c;\n if (stepFirstChunk) {\n const msToFirstChunk = now2() - startTimestampMs;\n stepFirstChunk = false;\n doStreamSpan.addEvent(\"ai.stream.firstChunk\", {\n \"ai.response.msToFirstChunk\": msToFirstChunk\n });\n doStreamSpan.setAttributes({\n \"ai.response.msToFirstChunk\": msToFirstChunk\n });\n controller.enqueue({\n type: \"step-start\",\n messageId,\n request: stepRequest,\n warnings: warnings != null ? warnings : []\n });\n }\n if (chunk.type === \"text-delta\" && chunk.textDelta.length === 0) {\n return;\n }\n const chunkType = chunk.type;\n switch (chunkType) {\n case \"text-delta\": {\n if (continueSteps) {\n const trimmedChunkText = inWhitespacePrefix && hasLeadingWhitespace ? chunk.textDelta.trimStart() : chunk.textDelta;\n if (trimmedChunkText.length === 0) {\n break;\n }\n inWhitespacePrefix = false;\n chunkBuffer += trimmedChunkText;\n const split = splitOnLastWhitespace(chunkBuffer);\n if (split != null) {\n chunkBuffer = split.suffix;\n await publishTextChunk({\n controller,\n chunk: {\n type: \"text-delta\",\n textDelta: split.prefix + split.whitespace\n }\n });\n }\n } else {\n await publishTextChunk({ controller, chunk });\n }\n break;\n }\n case \"reasoning\": {\n controller.enqueue(chunk);\n if (activeReasoningText2 == null) {\n activeReasoningText2 = {\n type: \"text\",\n text: chunk.textDelta\n };\n stepReasoning2.push(activeReasoningText2);\n } else {\n activeReasoningText2.text += chunk.textDelta;\n }\n break;\n }\n case \"reasoning-signature\": {\n controller.enqueue(chunk);\n if (activeReasoningText2 == null) {\n throw new InvalidStreamPartError({\n chunk,\n message: \"reasoning-signature without reasoning\"\n });\n }\n activeReasoningText2.signature = chunk.signature;\n activeReasoningText2 = void 0;\n break;\n }\n case \"redacted-reasoning\": {\n controller.enqueue(chunk);\n stepReasoning2.push({\n type: \"redacted\",\n data: chunk.data\n });\n break;\n }\n case \"tool-call\": {\n controller.enqueue(chunk);\n stepToolCalls.push(chunk);\n break;\n }\n case \"tool-result\": {\n controller.enqueue(chunk);\n stepToolResults.push(chunk);\n break;\n }\n case \"response-metadata\": {\n stepResponse = {\n id: (_a19 = chunk.id) != null ? _a19 : stepResponse.id,\n timestamp: (_b = chunk.timestamp) != null ? _b : stepResponse.timestamp,\n modelId: (_c = chunk.modelId) != null ? _c : stepResponse.modelId\n };\n break;\n }\n case \"finish\": {\n stepUsage = chunk.usage;\n stepFinishReason = chunk.finishReason;\n stepProviderMetadata = chunk.experimental_providerMetadata;\n stepLogProbs = chunk.logprobs;\n const msToFinish = now2() - startTimestampMs;\n doStreamSpan.addEvent(\"ai.stream.finish\");\n doStreamSpan.setAttributes({\n \"ai.response.msToFinish\": msToFinish,\n \"ai.response.avgCompletionTokensPerSecond\": 1e3 * stepUsage.completionTokens / msToFinish\n });\n break;\n }\n case \"file\": {\n stepFiles2.push(chunk);\n controller.enqueue(chunk);\n break;\n }\n case \"source\":\n case \"tool-call-streaming-start\":\n case \"tool-call-delta\": {\n controller.enqueue(chunk);\n break;\n }\n case \"error\": {\n controller.enqueue(chunk);\n stepFinishReason = \"error\";\n break;\n }\n default: {\n const exhaustiveCheck = chunkType;\n throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);\n }\n }\n },\n // invoke onFinish callback and resolve toolResults promise when the stream is about to close:\n async flush(controller) {\n const stepToolCallsJson = stepToolCalls.length > 0 ? JSON.stringify(stepToolCalls) : void 0;\n let nextStepType = \"done\";\n if (currentStep + 1 < maxSteps) {\n if (continueSteps && stepFinishReason === \"length\" && // only use continue when there are no tool calls:\n stepToolCalls.length === 0) {\n nextStepType = \"continue\";\n } else if (\n // there are tool calls:\n stepToolCalls.length > 0 && // all current tool calls have results:\n stepToolResults.length === stepToolCalls.length\n ) {\n nextStepType = \"tool-result\";\n }\n }\n if (continueSteps && chunkBuffer.length > 0 && (nextStepType !== \"continue\" || // when the next step is a regular step, publish the buffer\n stepType2 === \"continue\" && !chunkTextPublished)) {\n await publishTextChunk({\n controller,\n chunk: {\n type: \"text-delta\",\n textDelta: chunkBuffer\n }\n });\n chunkBuffer = \"\";\n }\n try {\n doStreamSpan.setAttributes(\n selectTelemetryAttributes({\n telemetry,\n attributes: {\n \"ai.response.finishReason\": stepFinishReason,\n \"ai.response.text\": { output: () => stepText },\n \"ai.response.toolCalls\": {\n output: () => stepToolCallsJson\n },\n \"ai.response.id\": stepResponse.id,\n \"ai.response.model\": stepResponse.modelId,\n \"ai.response.timestamp\": stepResponse.timestamp.toISOString(),\n \"ai.usage.promptTokens\": stepUsage.promptTokens,\n \"ai.usage.completionTokens\": stepUsage.completionTokens,\n // standardized gen-ai llm span attributes:\n \"gen_ai.response.finish_reasons\": [stepFinishReason],\n \"gen_ai.response.id\": stepResponse.id,\n \"gen_ai.response.model\": stepResponse.modelId,\n \"gen_ai.usage.input_tokens\": stepUsage.promptTokens,\n \"gen_ai.usage.output_tokens\": stepUsage.completionTokens\n }\n })\n );\n } catch (error) {\n } finally {\n doStreamSpan.end();\n }\n controller.enqueue({\n type: \"step-finish\",\n finishReason: stepFinishReason,\n usage: stepUsage,\n providerMetadata: stepProviderMetadata,\n experimental_providerMetadata: stepProviderMetadata,\n logprobs: stepLogProbs,\n request: stepRequest,\n response: {\n ...stepResponse,\n headers: rawResponse == null ? void 0 : rawResponse.headers\n },\n warnings,\n isContinued: nextStepType === \"continue\",\n messageId\n });\n const combinedUsage = addLanguageModelUsage(usage, stepUsage);\n if (nextStepType === \"done\") {\n controller.enqueue({\n type: \"finish\",\n finishReason: stepFinishReason,\n usage: combinedUsage,\n providerMetadata: stepProviderMetadata,\n experimental_providerMetadata: stepProviderMetadata,\n logprobs: stepLogProbs,\n response: {\n ...stepResponse,\n headers: rawResponse == null ? void 0 : rawResponse.headers\n }\n });\n self.closeStream();\n } else {\n if (stepType2 === \"continue\") {\n const lastMessage = responseMessages[responseMessages.length - 1];\n if (typeof lastMessage.content === \"string\") {\n lastMessage.content += stepText;\n } else {\n lastMessage.content.push({\n text: stepText,\n type: \"text\"\n });\n }\n } else {\n responseMessages.push(\n ...toResponseMessages({\n text: stepText,\n files: stepFiles2,\n reasoning: stepReasoning2,\n tools: tools != null ? tools : {},\n toolCalls: stepToolCalls,\n toolResults: stepToolResults,\n messageId,\n generateMessageId\n })\n );\n }\n await streamStep({\n currentStep: currentStep + 1,\n responseMessages,\n usage: combinedUsage,\n stepType: nextStepType,\n previousStepText: fullStepText,\n hasLeadingWhitespace: hasWhitespaceSuffix,\n messageId: (\n // keep the same id when continuing a step:\n nextStepType === \"continue\" ? messageId : generateMessageId()\n )\n });\n }\n }\n })\n )\n );\n }\n await streamStep({\n currentStep: 0,\n responseMessages: [],\n usage: {\n promptTokens: 0,\n completionTokens: 0,\n totalTokens: 0\n },\n previousStepText: \"\",\n stepType: \"initial\",\n hasLeadingWhitespace: false,\n messageId: generateMessageId()\n });\n }\n }).catch((error) => {\n self.addStream(\n new ReadableStream({\n start(controller) {\n controller.enqueue({ type: \"error\", error });\n controller.close();\n }\n })\n );\n self.closeStream();\n });\n }\n get warnings() {\n return this.warningsPromise.value;\n }\n get usage() {\n return this.usagePromise.value;\n }\n get finishReason() {\n return this.finishReasonPromise.value;\n }\n get experimental_providerMetadata() {\n return this.providerMetadataPromise.value;\n }\n get providerMetadata() {\n return this.providerMetadataPromise.value;\n }\n get text() {\n return this.textPromise.value;\n }\n get reasoning() {\n return this.reasoningPromise.value;\n }\n get reasoningDetails() {\n return this.reasoningDetailsPromise.value;\n }\n get sources() {\n return this.sourcesPromise.value;\n }\n get files() {\n return this.filesPromise.value;\n }\n get toolCalls() {\n return this.toolCallsPromise.value;\n }\n get toolResults() {\n return this.toolResultsPromise.value;\n }\n get request() {\n return this.requestPromise.value;\n }\n get response() {\n return this.responsePromise.value;\n }\n get steps() {\n return this.stepsPromise.value;\n }\n /**\n Split out a new stream from the original stream.\n The original stream is replaced to allow for further splitting,\n since we do not know how many times the stream will be split.\n \n Note: this leads to buffering the stream content on the server.\n However, the LLM results are expected to be small enough to not cause issues.\n */\n teeStream() {\n const [stream1, stream2] = this.baseStream.tee();\n this.baseStream = stream2;\n return stream1;\n }\n get textStream() {\n return createAsyncIterableStream(\n this.teeStream().pipeThrough(\n new TransformStream({\n transform({ part }, controller) {\n if (part.type === \"text-delta\") {\n controller.enqueue(part.textDelta);\n }\n }\n })\n )\n );\n }\n get fullStream() {\n return createAsyncIterableStream(\n this.teeStream().pipeThrough(\n new TransformStream({\n transform({ part }, controller) {\n controller.enqueue(part);\n }\n })\n )\n );\n }\n async consumeStream(options) {\n var _a17;\n try {\n await consumeStream({\n stream: this.fullStream,\n onError: options == null ? void 0 : options.onError\n });\n } catch (error) {\n (_a17 = options == null ? void 0 : options.onError) == null ? void 0 : _a17.call(options, error);\n }\n }\n get experimental_partialOutputStream() {\n if (this.output == null) {\n throw new NoOutputSpecifiedError();\n }\n return createAsyncIterableStream(\n this.teeStream().pipeThrough(\n new TransformStream({\n transform({ partialOutput }, controller) {\n if (partialOutput != null) {\n controller.enqueue(partialOutput);\n }\n }\n })\n )\n );\n }\n toDataStreamInternal({\n getErrorMessage: getErrorMessage5 = () => \"An error occurred.\",\n // mask error messages for safety by default\n sendUsage = true,\n sendReasoning = false,\n sendSources = false,\n experimental_sendFinish = true\n }) {\n return this.fullStream.pipeThrough(\n new TransformStream({\n transform: async (chunk, controller) => {\n const chunkType = chunk.type;\n switch (chunkType) {\n case \"text-delta\": {\n controller.enqueue(formatDataStreamPart2(\"text\", chunk.textDelta));\n break;\n }\n case \"reasoning\": {\n if (sendReasoning) {\n controller.enqueue(\n formatDataStreamPart2(\"reasoning\", chunk.textDelta)\n );\n }\n break;\n }\n case \"redacted-reasoning\": {\n if (sendReasoning) {\n controller.enqueue(\n formatDataStreamPart2(\"redacted_reasoning\", {\n data: chunk.data\n })\n );\n }\n break;\n }\n case \"reasoning-signature\": {\n if (sendReasoning) {\n controller.enqueue(\n formatDataStreamPart2(\"reasoning_signature\", {\n signature: chunk.signature\n })\n );\n }\n break;\n }\n case \"file\": {\n controller.enqueue(\n formatDataStreamPart2(\"file\", {\n mimeType: chunk.mimeType,\n data: chunk.base64\n })\n );\n break;\n }\n case \"source\": {\n if (sendSources) {\n controller.enqueue(\n formatDataStreamPart2(\"source\", chunk.source)\n );\n }\n break;\n }\n case \"tool-call-streaming-start\": {\n controller.enqueue(\n formatDataStreamPart2(\"tool_call_streaming_start\", {\n toolCallId: chunk.toolCallId,\n toolName: chunk.toolName\n })\n );\n break;\n }\n case \"tool-call-delta\": {\n controller.enqueue(\n formatDataStreamPart2(\"tool_call_delta\", {\n toolCallId: chunk.toolCallId,\n argsTextDelta: chunk.argsTextDelta\n })\n );\n break;\n }\n case \"tool-call\": {\n controller.enqueue(\n formatDataStreamPart2(\"tool_call\", {\n toolCallId: chunk.toolCallId,\n toolName: chunk.toolName,\n args: chunk.args\n })\n );\n break;\n }\n case \"tool-result\": {\n controller.enqueue(\n formatDataStreamPart2(\"tool_result\", {\n toolCallId: chunk.toolCallId,\n result: chunk.result\n })\n );\n break;\n }\n case \"error\": {\n controller.enqueue(\n formatDataStreamPart2(\"error\", getErrorMessage5(chunk.error))\n );\n break;\n }\n case \"step-start\": {\n controller.enqueue(\n formatDataStreamPart2(\"start_step\", {\n messageId: chunk.messageId\n })\n );\n break;\n }\n case \"step-finish\": {\n controller.enqueue(\n formatDataStreamPart2(\"finish_step\", {\n finishReason: chunk.finishReason,\n usage: sendUsage ? {\n promptTokens: chunk.usage.promptTokens,\n completionTokens: chunk.usage.completionTokens\n } : void 0,\n isContinued: chunk.isContinued\n })\n );\n break;\n }\n case \"finish\": {\n if (experimental_sendFinish) {\n controller.enqueue(\n formatDataStreamPart2(\"finish_message\", {\n finishReason: chunk.finishReason,\n usage: sendUsage ? {\n promptTokens: chunk.usage.promptTokens,\n completionTokens: chunk.usage.completionTokens\n } : void 0\n })\n );\n }\n break;\n }\n default: {\n const exhaustiveCheck = chunkType;\n throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);\n }\n }\n }\n })\n );\n }\n pipeDataStreamToResponse(response, {\n status,\n statusText,\n headers,\n data,\n getErrorMessage: getErrorMessage5,\n sendUsage,\n sendReasoning,\n sendSources,\n experimental_sendFinish\n } = {}) {\n writeToServerResponse({\n response,\n status,\n statusText,\n headers: prepareOutgoingHttpHeaders(headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n }),\n stream: this.toDataStream({\n data,\n getErrorMessage: getErrorMessage5,\n sendUsage,\n sendReasoning,\n sendSources,\n experimental_sendFinish\n })\n });\n }\n pipeTextStreamToResponse(response, init) {\n writeToServerResponse({\n response,\n status: init == null ? void 0 : init.status,\n statusText: init == null ? void 0 : init.statusText,\n headers: prepareOutgoingHttpHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\"\n }),\n stream: this.textStream.pipeThrough(new TextEncoderStream())\n });\n }\n // TODO breaking change 5.0: remove pipeThrough(new TextEncoderStream())\n toDataStream(options) {\n const stream = this.toDataStreamInternal({\n getErrorMessage: options == null ? void 0 : options.getErrorMessage,\n sendUsage: options == null ? void 0 : options.sendUsage,\n sendReasoning: options == null ? void 0 : options.sendReasoning,\n sendSources: options == null ? void 0 : options.sendSources,\n experimental_sendFinish: options == null ? void 0 : options.experimental_sendFinish\n }).pipeThrough(new TextEncoderStream());\n return (options == null ? void 0 : options.data) ? mergeStreams(options == null ? void 0 : options.data.stream, stream) : stream;\n }\n mergeIntoDataStream(writer, options) {\n writer.merge(\n this.toDataStreamInternal({\n getErrorMessage: writer.onError,\n sendUsage: options == null ? void 0 : options.sendUsage,\n sendReasoning: options == null ? void 0 : options.sendReasoning,\n sendSources: options == null ? void 0 : options.sendSources,\n experimental_sendFinish: options == null ? void 0 : options.experimental_sendFinish\n })\n );\n }\n toDataStreamResponse({\n headers,\n status,\n statusText,\n data,\n getErrorMessage: getErrorMessage5,\n sendUsage,\n sendReasoning,\n sendSources,\n experimental_sendFinish\n } = {}) {\n return new Response(\n this.toDataStream({\n data,\n getErrorMessage: getErrorMessage5,\n sendUsage,\n sendReasoning,\n sendSources,\n experimental_sendFinish\n }),\n {\n status,\n statusText,\n headers: prepareResponseHeaders(headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n })\n }\n );\n }\n toTextStreamResponse(init) {\n var _a17;\n return new Response(this.textStream.pipeThrough(new TextEncoderStream()), {\n status: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n headers: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\"\n })\n });\n }\n};\n\n// errors/no-speech-generated-error.ts\nimport { AISDKError as AISDKError18 } from \"@ai-sdk/provider\";\nvar NoSpeechGeneratedError = class extends AISDKError18 {\n constructor(options) {\n super({\n name: \"AI_NoSpeechGeneratedError\",\n message: \"No speech audio generated.\"\n });\n this.responses = options.responses;\n }\n};\n\n// core/generate-speech/generated-audio-file.ts\nvar DefaultGeneratedAudioFile = class extends DefaultGeneratedFile {\n constructor({\n data,\n mimeType\n }) {\n super({ data, mimeType });\n let format = \"mp3\";\n if (mimeType) {\n const mimeTypeParts = mimeType.split(\"/\");\n if (mimeTypeParts.length === 2) {\n if (mimeType !== \"audio/mpeg\") {\n format = mimeTypeParts[1];\n }\n }\n }\n if (!format) {\n throw new Error(\n \"Audio format must be provided or determinable from mimeType\"\n );\n }\n this.format = format;\n }\n};\n\n// core/generate-speech/generate-speech.ts\nasync function generateSpeech({\n model,\n text: text2,\n voice,\n outputFormat,\n instructions,\n speed,\n providerOptions = {},\n maxRetries: maxRetriesArg,\n abortSignal,\n headers\n}) {\n var _a17;\n const { retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const result = await retry(\n () => model.doGenerate({\n text: text2,\n voice,\n outputFormat,\n instructions,\n speed,\n abortSignal,\n headers,\n providerOptions\n })\n );\n if (!result.audio || result.audio.length === 0) {\n throw new NoSpeechGeneratedError({ responses: [result.response] });\n }\n return new DefaultSpeechResult({\n audio: new DefaultGeneratedAudioFile({\n data: result.audio,\n mimeType: (_a17 = detectMimeType({\n data: result.audio,\n signatures: audioMimeTypeSignatures\n })) != null ? _a17 : \"audio/mp3\"\n }),\n warnings: result.warnings,\n responses: [result.response],\n providerMetadata: result.providerMetadata\n });\n}\nvar DefaultSpeechResult = class {\n constructor(options) {\n var _a17;\n this.audio = options.audio;\n this.warnings = options.warnings;\n this.responses = options.responses;\n this.providerMetadata = (_a17 = options.providerMetadata) != null ? _a17 : {};\n }\n};\n\n// errors/no-transcript-generated-error.ts\nimport { AISDKError as AISDKError19 } from \"@ai-sdk/provider\";\nvar NoTranscriptGeneratedError = class extends AISDKError19 {\n constructor(options) {\n super({\n name: \"AI_NoTranscriptGeneratedError\",\n message: \"No transcript generated.\"\n });\n this.responses = options.responses;\n }\n};\n\n// core/transcribe/transcribe.ts\nasync function transcribe({\n model,\n audio,\n providerOptions = {},\n maxRetries: maxRetriesArg,\n abortSignal,\n headers\n}) {\n const { retry } = prepareRetries({ maxRetries: maxRetriesArg });\n const audioData = audio instanceof URL ? (await download({ url: audio })).data : convertDataContentToUint8Array(audio);\n const result = await retry(\n () => {\n var _a17;\n return model.doGenerate({\n audio: audioData,\n abortSignal,\n headers,\n providerOptions,\n mediaType: (_a17 = detectMimeType({\n data: audioData,\n signatures: audioMimeTypeSignatures\n })) != null ? _a17 : \"audio/wav\"\n });\n }\n );\n if (!result.text) {\n throw new NoTranscriptGeneratedError({ responses: [result.response] });\n }\n return new DefaultTranscriptionResult({\n text: result.text,\n segments: result.segments,\n language: result.language,\n durationInSeconds: result.durationInSeconds,\n warnings: result.warnings,\n responses: [result.response],\n providerMetadata: result.providerMetadata\n });\n}\nvar DefaultTranscriptionResult = class {\n constructor(options) {\n var _a17;\n this.text = options.text;\n this.segments = options.segments;\n this.language = options.language;\n this.durationInSeconds = options.durationInSeconds;\n this.warnings = options.warnings;\n this.responses = options.responses;\n this.providerMetadata = (_a17 = options.providerMetadata) != null ? _a17 : {};\n }\n};\n\n// core/util/merge-objects.ts\nfunction mergeObjects(target, source) {\n if (target === void 0 && source === void 0) {\n return void 0;\n }\n if (target === void 0) {\n return source;\n }\n if (source === void 0) {\n return target;\n }\n const result = { ...target };\n for (const key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n const sourceValue = source[key];\n if (sourceValue === void 0)\n continue;\n const targetValue = key in target ? target[key] : void 0;\n const isSourceObject = sourceValue !== null && typeof sourceValue === \"object\" && !Array.isArray(sourceValue) && !(sourceValue instanceof Date) && !(sourceValue instanceof RegExp);\n const isTargetObject = targetValue !== null && targetValue !== void 0 && typeof targetValue === \"object\" && !Array.isArray(targetValue) && !(targetValue instanceof Date) && !(targetValue instanceof RegExp);\n if (isSourceObject && isTargetObject) {\n result[key] = mergeObjects(\n targetValue,\n sourceValue\n );\n } else {\n result[key] = sourceValue;\n }\n }\n }\n return result;\n}\n\n// core/middleware/default-settings-middleware.ts\nfunction defaultSettingsMiddleware({\n settings\n}) {\n return {\n middlewareVersion: \"v1\",\n transformParams: async ({ params }) => {\n var _a17;\n return {\n ...settings,\n ...params,\n providerMetadata: mergeObjects(\n settings.providerMetadata,\n params.providerMetadata\n ),\n // special case for temperature 0\n // TODO remove when temperature defaults to undefined\n temperature: params.temperature === 0 || params.temperature == null ? (_a17 = settings.temperature) != null ? _a17 : 0 : params.temperature\n };\n }\n };\n}\n\n// core/util/get-potential-start-index.ts\nfunction getPotentialStartIndex(text2, searchedText) {\n if (searchedText.length === 0) {\n return null;\n }\n const directIndex = text2.indexOf(searchedText);\n if (directIndex !== -1) {\n return directIndex;\n }\n for (let i = text2.length - 1; i >= 0; i--) {\n const suffix = text2.substring(i);\n if (searchedText.startsWith(suffix)) {\n return i;\n }\n }\n return null;\n}\n\n// core/middleware/extract-reasoning-middleware.ts\nfunction extractReasoningMiddleware({\n tagName,\n separator = \"\\n\",\n startWithReasoning = false\n}) {\n const openingTag = `<${tagName}>`;\n const closingTag = `</${tagName}>`;\n return {\n middlewareVersion: \"v1\",\n wrapGenerate: async ({ doGenerate }) => {\n const { text: rawText, ...rest } = await doGenerate();\n if (rawText == null) {\n return { text: rawText, ...rest };\n }\n const text2 = startWithReasoning ? openingTag + rawText : rawText;\n const regexp = new RegExp(`${openingTag}(.*?)${closingTag}`, \"gs\");\n const matches = Array.from(text2.matchAll(regexp));\n if (!matches.length) {\n return { text: text2, ...rest };\n }\n const reasoning = matches.map((match) => match[1]).join(separator);\n let textWithoutReasoning = text2;\n for (let i = matches.length - 1; i >= 0; i--) {\n const match = matches[i];\n const beforeMatch = textWithoutReasoning.slice(0, match.index);\n const afterMatch = textWithoutReasoning.slice(\n match.index + match[0].length\n );\n textWithoutReasoning = beforeMatch + (beforeMatch.length > 0 && afterMatch.length > 0 ? separator : \"\") + afterMatch;\n }\n return { ...rest, text: textWithoutReasoning, reasoning };\n },\n wrapStream: async ({ doStream }) => {\n const { stream, ...rest } = await doStream();\n let isFirstReasoning = true;\n let isFirstText = true;\n let afterSwitch = false;\n let isReasoning = startWithReasoning;\n let buffer = \"\";\n return {\n stream: stream.pipeThrough(\n new TransformStream({\n transform: (chunk, controller) => {\n if (chunk.type !== \"text-delta\") {\n controller.enqueue(chunk);\n return;\n }\n buffer += chunk.textDelta;\n function publish(text2) {\n if (text2.length > 0) {\n const prefix = afterSwitch && (isReasoning ? !isFirstReasoning : !isFirstText) ? separator : \"\";\n controller.enqueue({\n type: isReasoning ? \"reasoning\" : \"text-delta\",\n textDelta: prefix + text2\n });\n afterSwitch = false;\n if (isReasoning) {\n isFirstReasoning = false;\n } else {\n isFirstText = false;\n }\n }\n }\n do {\n const nextTag = isReasoning ? closingTag : openingTag;\n const startIndex = getPotentialStartIndex(buffer, nextTag);\n if (startIndex == null) {\n publish(buffer);\n buffer = \"\";\n break;\n }\n publish(buffer.slice(0, startIndex));\n const foundFullMatch = startIndex + nextTag.length <= buffer.length;\n if (foundFullMatch) {\n buffer = buffer.slice(startIndex + nextTag.length);\n isReasoning = !isReasoning;\n afterSwitch = true;\n } else {\n buffer = buffer.slice(startIndex);\n break;\n }\n } while (true);\n }\n })\n ),\n ...rest\n };\n }\n };\n}\n\n// core/middleware/simulate-streaming-middleware.ts\nfunction simulateStreamingMiddleware() {\n return {\n middlewareVersion: \"v1\",\n wrapStream: async ({ doGenerate }) => {\n const result = await doGenerate();\n const simulatedStream = new ReadableStream({\n start(controller) {\n controller.enqueue({ type: \"response-metadata\", ...result.response });\n if (result.reasoning) {\n if (typeof result.reasoning === \"string\") {\n controller.enqueue({\n type: \"reasoning\",\n textDelta: result.reasoning\n });\n } else {\n for (const reasoning of result.reasoning) {\n switch (reasoning.type) {\n case \"text\": {\n controller.enqueue({\n type: \"reasoning\",\n textDelta: reasoning.text\n });\n if (reasoning.signature != null) {\n controller.enqueue({\n type: \"reasoning-signature\",\n signature: reasoning.signature\n });\n }\n break;\n }\n case \"redacted\": {\n controller.enqueue({\n type: \"redacted-reasoning\",\n data: reasoning.data\n });\n break;\n }\n }\n }\n }\n }\n if (result.text) {\n controller.enqueue({\n type: \"text-delta\",\n textDelta: result.text\n });\n }\n if (result.toolCalls) {\n for (const toolCall of result.toolCalls) {\n controller.enqueue({\n type: \"tool-call-delta\",\n toolCallType: \"function\",\n toolCallId: toolCall.toolCallId,\n toolName: toolCall.toolName,\n argsTextDelta: toolCall.args\n });\n controller.enqueue({\n type: \"tool-call\",\n ...toolCall\n });\n }\n }\n controller.enqueue({\n type: \"finish\",\n finishReason: result.finishReason,\n usage: result.usage,\n logprobs: result.logprobs,\n providerMetadata: result.providerMetadata\n });\n controller.close();\n }\n });\n return {\n stream: simulatedStream,\n rawCall: result.rawCall,\n rawResponse: result.rawResponse,\n warnings: result.warnings\n };\n }\n };\n}\n\n// core/middleware/wrap-language-model.ts\nvar wrapLanguageModel = ({\n model,\n middleware: middlewareArg,\n modelId,\n providerId\n}) => {\n return asArray(middlewareArg).reverse().reduce((wrappedModel, middleware) => {\n return doWrap({ model: wrappedModel, middleware, modelId, providerId });\n }, model);\n};\nvar doWrap = ({\n model,\n middleware: { transformParams, wrapGenerate, wrapStream },\n modelId,\n providerId\n}) => {\n var _a17;\n async function doTransform({\n params,\n type\n }) {\n return transformParams ? await transformParams({ params, type }) : params;\n }\n return {\n specificationVersion: \"v1\",\n provider: providerId != null ? providerId : model.provider,\n modelId: modelId != null ? modelId : model.modelId,\n defaultObjectGenerationMode: model.defaultObjectGenerationMode,\n supportsImageUrls: model.supportsImageUrls,\n supportsUrl: (_a17 = model.supportsUrl) == null ? void 0 : _a17.bind(model),\n supportsStructuredOutputs: model.supportsStructuredOutputs,\n async doGenerate(params) {\n const transformedParams = await doTransform({ params, type: \"generate\" });\n const doGenerate = async () => model.doGenerate(transformedParams);\n const doStream = async () => model.doStream(transformedParams);\n return wrapGenerate ? wrapGenerate({\n doGenerate,\n doStream,\n params: transformedParams,\n model\n }) : doGenerate();\n },\n async doStream(params) {\n const transformedParams = await doTransform({ params, type: \"stream\" });\n const doGenerate = async () => model.doGenerate(transformedParams);\n const doStream = async () => model.doStream(transformedParams);\n return wrapStream ? wrapStream({ doGenerate, doStream, params: transformedParams, model }) : doStream();\n }\n };\n};\nvar experimental_wrapLanguageModel = wrapLanguageModel;\n\n// core/prompt/append-client-message.ts\nfunction appendClientMessage({\n messages,\n message\n}) {\n return [\n ...messages.length > 0 && messages[messages.length - 1].id === message.id ? messages.slice(0, -1) : messages,\n message\n ];\n}\n\n// core/prompt/append-response-messages.ts\nimport {\n extractMaxToolInvocationStep\n} from \"@ai-sdk/ui-utils\";\nimport { AISDKError as AISDKError20 } from \"@ai-sdk/provider\";\nfunction appendResponseMessages({\n messages,\n responseMessages,\n _internal: { currentDate = () => /* @__PURE__ */ new Date() } = {}\n}) {\n var _a17, _b, _c, _d;\n const clonedMessages = structuredClone(messages);\n for (const message of responseMessages) {\n const role = message.role;\n const lastMessage = clonedMessages[clonedMessages.length - 1];\n const isLastMessageAssistant = lastMessage.role === \"assistant\";\n switch (role) {\n case \"assistant\": {\n let getToolInvocations2 = function(step) {\n return (typeof message.content === \"string\" ? [] : message.content.filter((part) => part.type === \"tool-call\")).map((call) => ({\n state: \"call\",\n step,\n args: call.args,\n toolCallId: call.toolCallId,\n toolName: call.toolName\n }));\n };\n var getToolInvocations = getToolInvocations2;\n const parts = [{ type: \"step-start\" }];\n let textContent = \"\";\n let reasoningTextContent = void 0;\n if (typeof message.content === \"string\") {\n textContent = message.content;\n parts.push({\n type: \"text\",\n text: message.content\n });\n } else {\n let reasoningPart = void 0;\n for (const part of message.content) {\n switch (part.type) {\n case \"text\": {\n reasoningPart = void 0;\n textContent += part.text;\n parts.push({\n type: \"text\",\n text: part.text\n });\n break;\n }\n case \"reasoning\": {\n if (reasoningPart == null) {\n reasoningPart = {\n type: \"reasoning\",\n reasoning: \"\",\n details: []\n };\n parts.push(reasoningPart);\n }\n reasoningTextContent = (reasoningTextContent != null ? reasoningTextContent : \"\") + part.text;\n reasoningPart.reasoning += part.text;\n reasoningPart.details.push({\n type: \"text\",\n text: part.text,\n signature: part.signature\n });\n break;\n }\n case \"redacted-reasoning\": {\n if (reasoningPart == null) {\n reasoningPart = {\n type: \"reasoning\",\n reasoning: \"\",\n details: []\n };\n parts.push(reasoningPart);\n }\n reasoningPart.details.push({\n type: \"redacted\",\n data: part.data\n });\n break;\n }\n case \"tool-call\":\n break;\n case \"file\":\n if (part.data instanceof URL) {\n throw new AISDKError20({\n name: \"InvalidAssistantFileData\",\n message: \"File data cannot be a URL\"\n });\n }\n parts.push({\n type: \"file\",\n mimeType: part.mimeType,\n data: convertDataContentToBase64String(part.data)\n });\n break;\n }\n }\n }\n if (isLastMessageAssistant) {\n const maxStep = extractMaxToolInvocationStep(\n lastMessage.toolInvocations\n );\n (_a17 = lastMessage.parts) != null ? _a17 : lastMessage.parts = [];\n lastMessage.content = textContent;\n lastMessage.reasoning = reasoningTextContent;\n lastMessage.parts.push(...parts);\n lastMessage.toolInvocations = [\n ...(_b = lastMessage.toolInvocations) != null ? _b : [],\n ...getToolInvocations2(maxStep === void 0 ? 0 : maxStep + 1)\n ];\n getToolInvocations2(maxStep === void 0 ? 0 : maxStep + 1).map((call) => ({\n type: \"tool-invocation\",\n toolInvocation: call\n })).forEach((part) => {\n lastMessage.parts.push(part);\n });\n } else {\n clonedMessages.push({\n role: \"assistant\",\n id: message.id,\n createdAt: currentDate(),\n // generate a createdAt date for the message, will be overridden by the client\n content: textContent,\n reasoning: reasoningTextContent,\n toolInvocations: getToolInvocations2(0),\n parts: [\n ...parts,\n ...getToolInvocations2(0).map((call) => ({\n type: \"tool-invocation\",\n toolInvocation: call\n }))\n ]\n });\n }\n break;\n }\n case \"tool\": {\n (_c = lastMessage.toolInvocations) != null ? _c : lastMessage.toolInvocations = [];\n if (lastMessage.role !== \"assistant\") {\n throw new Error(\n `Tool result must follow an assistant message: ${lastMessage.role}`\n );\n }\n (_d = lastMessage.parts) != null ? _d : lastMessage.parts = [];\n for (const contentPart of message.content) {\n const toolCall = lastMessage.toolInvocations.find(\n (call) => call.toolCallId === contentPart.toolCallId\n );\n const toolCallPart = lastMessage.parts.find(\n (part) => part.type === \"tool-invocation\" && part.toolInvocation.toolCallId === contentPart.toolCallId\n );\n if (!toolCall) {\n throw new Error(\"Tool call not found in previous message\");\n }\n toolCall.state = \"result\";\n const toolResult = toolCall;\n toolResult.result = contentPart.result;\n if (toolCallPart) {\n toolCallPart.toolInvocation = toolResult;\n } else {\n lastMessage.parts.push({\n type: \"tool-invocation\",\n toolInvocation: toolResult\n });\n }\n }\n break;\n }\n default: {\n const _exhaustiveCheck = role;\n throw new Error(`Unsupported message role: ${_exhaustiveCheck}`);\n }\n }\n }\n return clonedMessages;\n}\n\n// core/registry/custom-provider.ts\nimport { NoSuchModelError as NoSuchModelError2 } from \"@ai-sdk/provider\";\nfunction customProvider({\n languageModels,\n textEmbeddingModels,\n imageModels,\n fallbackProvider\n}) {\n return {\n languageModel(modelId) {\n if (languageModels != null && modelId in languageModels) {\n return languageModels[modelId];\n }\n if (fallbackProvider) {\n return fallbackProvider.languageModel(modelId);\n }\n throw new NoSuchModelError2({ modelId, modelType: \"languageModel\" });\n },\n textEmbeddingModel(modelId) {\n if (textEmbeddingModels != null && modelId in textEmbeddingModels) {\n return textEmbeddingModels[modelId];\n }\n if (fallbackProvider) {\n return fallbackProvider.textEmbeddingModel(modelId);\n }\n throw new NoSuchModelError2({ modelId, modelType: \"textEmbeddingModel\" });\n },\n imageModel(modelId) {\n if (imageModels != null && modelId in imageModels) {\n return imageModels[modelId];\n }\n if (fallbackProvider == null ? void 0 : fallbackProvider.imageModel) {\n return fallbackProvider.imageModel(modelId);\n }\n throw new NoSuchModelError2({ modelId, modelType: \"imageModel\" });\n }\n };\n}\nvar experimental_customProvider = customProvider;\n\n// core/registry/no-such-provider-error.ts\nimport { AISDKError as AISDKError21, NoSuchModelError as NoSuchModelError3 } from \"@ai-sdk/provider\";\nvar name16 = \"AI_NoSuchProviderError\";\nvar marker16 = `vercel.ai.error.${name16}`;\nvar symbol16 = Symbol.for(marker16);\nvar _a16;\nvar NoSuchProviderError = class extends NoSuchModelError3 {\n constructor({\n modelId,\n modelType,\n providerId,\n availableProviders,\n message = `No such provider: ${providerId} (available providers: ${availableProviders.join()})`\n }) {\n super({ errorName: name16, modelId, modelType, message });\n this[_a16] = true;\n this.providerId = providerId;\n this.availableProviders = availableProviders;\n }\n static isInstance(error) {\n return AISDKError21.hasMarker(error, marker16);\n }\n};\n_a16 = symbol16;\n\n// core/registry/provider-registry.ts\nimport { NoSuchModelError as NoSuchModelError4 } from \"@ai-sdk/provider\";\nfunction createProviderRegistry(providers, {\n separator = \":\"\n} = {}) {\n const registry = new DefaultProviderRegistry({\n separator\n });\n for (const [id, provider] of Object.entries(providers)) {\n registry.registerProvider({ id, provider });\n }\n return registry;\n}\nvar experimental_createProviderRegistry = createProviderRegistry;\nvar DefaultProviderRegistry = class {\n constructor({ separator }) {\n this.providers = {};\n this.separator = separator;\n }\n registerProvider({\n id,\n provider\n }) {\n this.providers[id] = provider;\n }\n getProvider(id) {\n const provider = this.providers[id];\n if (provider == null) {\n throw new NoSuchProviderError({\n modelId: id,\n modelType: \"languageModel\",\n providerId: id,\n availableProviders: Object.keys(this.providers)\n });\n }\n return provider;\n }\n splitId(id, modelType) {\n const index = id.indexOf(this.separator);\n if (index === -1) {\n throw new NoSuchModelError4({\n modelId: id,\n modelType,\n message: `Invalid ${modelType} id for registry: ${id} (must be in the format \"providerId${this.separator}modelId\")`\n });\n }\n return [id.slice(0, index), id.slice(index + this.separator.length)];\n }\n languageModel(id) {\n var _a17, _b;\n const [providerId, modelId] = this.splitId(id, \"languageModel\");\n const model = (_b = (_a17 = this.getProvider(providerId)).languageModel) == null ? void 0 : _b.call(_a17, modelId);\n if (model == null) {\n throw new NoSuchModelError4({ modelId: id, modelType: \"languageModel\" });\n }\n return model;\n }\n textEmbeddingModel(id) {\n var _a17;\n const [providerId, modelId] = this.splitId(id, \"textEmbeddingModel\");\n const provider = this.getProvider(providerId);\n const model = (_a17 = provider.textEmbeddingModel) == null ? void 0 : _a17.call(provider, modelId);\n if (model == null) {\n throw new NoSuchModelError4({\n modelId: id,\n modelType: \"textEmbeddingModel\"\n });\n }\n return model;\n }\n imageModel(id) {\n var _a17;\n const [providerId, modelId] = this.splitId(id, \"imageModel\");\n const provider = this.getProvider(providerId);\n const model = (_a17 = provider.imageModel) == null ? void 0 : _a17.call(provider, modelId);\n if (model == null) {\n throw new NoSuchModelError4({ modelId: id, modelType: \"imageModel\" });\n }\n return model;\n }\n};\n\n// core/tool/mcp/mcp-client.ts\nimport { jsonSchema } from \"@ai-sdk/ui-utils\";\n\n// core/tool/tool.ts\nfunction tool(tool2) {\n return tool2;\n}\n\n// core/tool/mcp/mcp-sse-transport.ts\nimport { createEventSourceParserStream } from \"@ai-sdk/provider-utils\";\n\n// core/tool/mcp/json-rpc-message.ts\nimport { z as z9 } from \"zod\";\n\n// core/tool/mcp/types.ts\nimport { z as z8 } from \"zod\";\nvar LATEST_PROTOCOL_VERSION = \"2024-11-05\";\nvar SUPPORTED_PROTOCOL_VERSIONS = [\n LATEST_PROTOCOL_VERSION,\n \"2024-10-07\"\n];\nvar ClientOrServerImplementationSchema = z8.object({\n name: z8.string(),\n version: z8.string()\n}).passthrough();\nvar BaseParamsSchema = z8.object({\n _meta: z8.optional(z8.object({}).passthrough())\n}).passthrough();\nvar ResultSchema = BaseParamsSchema;\nvar RequestSchema = z8.object({\n method: z8.string(),\n params: z8.optional(BaseParamsSchema)\n});\nvar ServerCapabilitiesSchema = z8.object({\n experimental: z8.optional(z8.object({}).passthrough()),\n logging: z8.optional(z8.object({}).passthrough()),\n prompts: z8.optional(\n z8.object({\n listChanged: z8.optional(z8.boolean())\n }).passthrough()\n ),\n resources: z8.optional(\n z8.object({\n subscribe: z8.optional(z8.boolean()),\n listChanged: z8.optional(z8.boolean())\n }).passthrough()\n ),\n tools: z8.optional(\n z8.object({\n listChanged: z8.optional(z8.boolean())\n }).passthrough()\n )\n}).passthrough();\nvar InitializeResultSchema = ResultSchema.extend({\n protocolVersion: z8.string(),\n capabilities: ServerCapabilitiesSchema,\n serverInfo: ClientOrServerImplementationSchema,\n instructions: z8.optional(z8.string())\n});\nvar PaginatedResultSchema = ResultSchema.extend({\n nextCursor: z8.optional(z8.string())\n});\nvar ToolSchema = z8.object({\n name: z8.string(),\n description: z8.optional(z8.string()),\n inputSchema: z8.object({\n type: z8.literal(\"object\"),\n properties: z8.optional(z8.object({}).passthrough())\n }).passthrough()\n}).passthrough();\nvar ListToolsResultSchema = PaginatedResultSchema.extend({\n tools: z8.array(ToolSchema)\n});\nvar TextContentSchema = z8.object({\n type: z8.literal(\"text\"),\n text: z8.string()\n}).passthrough();\nvar ImageContentSchema = z8.object({\n type: z8.literal(\"image\"),\n data: z8.string().base64(),\n mimeType: z8.string()\n}).passthrough();\nvar ResourceContentsSchema = z8.object({\n /**\n * The URI of this resource.\n */\n uri: z8.string(),\n /**\n * The MIME type of this resource, if known.\n */\n mimeType: z8.optional(z8.string())\n}).passthrough();\nvar TextResourceContentsSchema = ResourceContentsSchema.extend({\n text: z8.string()\n});\nvar BlobResourceContentsSchema = ResourceContentsSchema.extend({\n blob: z8.string().base64()\n});\nvar EmbeddedResourceSchema = z8.object({\n type: z8.literal(\"resource\"),\n resource: z8.union([TextResourceContentsSchema, BlobResourceContentsSchema])\n}).passthrough();\nvar CallToolResultSchema = ResultSchema.extend({\n content: z8.array(\n z8.union([TextContentSchema, ImageContentSchema, EmbeddedResourceSchema])\n ),\n isError: z8.boolean().default(false).optional()\n}).or(\n ResultSchema.extend({\n toolResult: z8.unknown()\n })\n);\n\n// core/tool/mcp/json-rpc-message.ts\nvar JSONRPC_VERSION = \"2.0\";\nvar JSONRPCRequestSchema = z9.object({\n jsonrpc: z9.literal(JSONRPC_VERSION),\n id: z9.union([z9.string(), z9.number().int()])\n}).merge(RequestSchema).strict();\nvar JSONRPCResponseSchema = z9.object({\n jsonrpc: z9.literal(JSONRPC_VERSION),\n id: z9.union([z9.string(), z9.number().int()]),\n result: ResultSchema\n}).strict();\nvar JSONRPCErrorSchema = z9.object({\n jsonrpc: z9.literal(JSONRPC_VERSION),\n id: z9.union([z9.string(), z9.number().int()]),\n error: z9.object({\n code: z9.number().int(),\n message: z9.string(),\n data: z9.optional(z9.unknown())\n })\n}).strict();\nvar JSONRPCNotificationSchema = z9.object({\n jsonrpc: z9.literal(JSONRPC_VERSION)\n}).merge(\n z9.object({\n method: z9.string(),\n params: z9.optional(BaseParamsSchema)\n })\n).strict();\nvar JSONRPCMessageSchema = z9.union([\n JSONRPCRequestSchema,\n JSONRPCNotificationSchema,\n JSONRPCResponseSchema,\n JSONRPCErrorSchema\n]);\n\n// core/tool/mcp/mcp-sse-transport.ts\nvar SseMCPTransport = class {\n constructor({\n url,\n headers\n }) {\n this.connected = false;\n this.url = new URL(url);\n this.headers = headers;\n }\n async start() {\n return new Promise((resolve, reject) => {\n if (this.connected) {\n return resolve();\n }\n this.abortController = new AbortController();\n const establishConnection = async () => {\n var _a17, _b, _c;\n try {\n const headers = new Headers(this.headers);\n headers.set(\"Accept\", \"text/event-stream\");\n const response = await fetch(this.url.href, {\n headers,\n signal: (_a17 = this.abortController) == null ? void 0 : _a17.signal\n });\n if (!response.ok || !response.body) {\n const error = new MCPClientError({\n message: `MCP SSE Transport Error: ${response.status} ${response.statusText}`\n });\n (_b = this.onerror) == null ? void 0 : _b.call(this, error);\n return reject(error);\n }\n const stream = response.body.pipeThrough(new TextDecoderStream()).pipeThrough(createEventSourceParserStream());\n const reader = stream.getReader();\n const processEvents = async () => {\n var _a18, _b2, _c2;\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n if (this.connected) {\n this.connected = false;\n throw new MCPClientError({\n message: \"MCP SSE Transport Error: Connection closed unexpectedly\"\n });\n }\n return;\n }\n const { event, data } = value;\n if (event === \"endpoint\") {\n this.endpoint = new URL(data, this.url);\n if (this.endpoint.origin !== this.url.origin) {\n throw new MCPClientError({\n message: `MCP SSE Transport Error: Endpoint origin does not match connection origin: ${this.endpoint.origin}`\n });\n }\n this.connected = true;\n resolve();\n } else if (event === \"message\") {\n try {\n const message = JSONRPCMessageSchema.parse(\n JSON.parse(data)\n );\n (_a18 = this.onmessage) == null ? void 0 : _a18.call(this, message);\n } catch (error) {\n const e = new MCPClientError({\n message: \"MCP SSE Transport Error: Failed to parse message\",\n cause: error\n });\n (_b2 = this.onerror) == null ? void 0 : _b2.call(this, e);\n }\n }\n }\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n return;\n }\n (_c2 = this.onerror) == null ? void 0 : _c2.call(this, error);\n reject(error);\n }\n };\n this.sseConnection = {\n close: () => reader.cancel()\n };\n processEvents();\n } catch (error) {\n if (error instanceof Error && error.name === \"AbortError\") {\n return;\n }\n (_c = this.onerror) == null ? void 0 : _c.call(this, error);\n reject(error);\n }\n };\n establishConnection();\n });\n }\n async close() {\n var _a17, _b, _c;\n this.connected = false;\n (_a17 = this.sseConnection) == null ? void 0 : _a17.close();\n (_b = this.abortController) == null ? void 0 : _b.abort();\n (_c = this.onclose) == null ? void 0 : _c.call(this);\n }\n async send(message) {\n var _a17, _b, _c;\n if (!this.endpoint || !this.connected) {\n throw new MCPClientError({\n message: \"MCP SSE Transport Error: Not connected\"\n });\n }\n try {\n const headers = new Headers(this.headers);\n headers.set(\"Content-Type\", \"application/json\");\n const init = {\n method: \"POST\",\n headers,\n body: JSON.stringify(message),\n signal: (_a17 = this.abortController) == null ? void 0 : _a17.signal\n };\n const response = await fetch(this.endpoint, init);\n if (!response.ok) {\n const text2 = await response.text().catch(() => null);\n const error = new MCPClientError({\n message: `MCP SSE Transport Error: POSTing to endpoint (HTTP ${response.status}): ${text2}`\n });\n (_b = this.onerror) == null ? void 0 : _b.call(this, error);\n return;\n }\n } catch (error) {\n (_c = this.onerror) == null ? void 0 : _c.call(this, error);\n return;\n }\n }\n};\n\n// core/tool/mcp/mcp-transport.ts\nfunction createMcpTransport(config) {\n if (config.type !== \"sse\") {\n throw new MCPClientError({\n message: \"Unsupported or invalid transport configuration. If you are using a custom transport, make sure it implements the MCPTransport interface.\"\n });\n }\n return new SseMCPTransport(config);\n}\nfunction isCustomMcpTransport(transport) {\n return \"start\" in transport && typeof transport.start === \"function\" && \"send\" in transport && typeof transport.send === \"function\" && \"close\" in transport && typeof transport.close === \"function\";\n}\n\n// core/tool/mcp/mcp-client.ts\nvar CLIENT_VERSION = \"1.0.0\";\nasync function createMCPClient(config) {\n const client = new MCPClient(config);\n await client.init();\n return client;\n}\nvar MCPClient = class {\n constructor({\n transport: transportConfig,\n name: name17 = \"ai-sdk-mcp-client\",\n onUncaughtError\n }) {\n this.requestMessageId = 0;\n this.responseHandlers = /* @__PURE__ */ new Map();\n this.serverCapabilities = {};\n this.isClosed = true;\n this.onUncaughtError = onUncaughtError;\n if (isCustomMcpTransport(transportConfig)) {\n this.transport = transportConfig;\n } else {\n this.transport = createMcpTransport(transportConfig);\n }\n this.transport.onclose = () => this.onClose();\n this.transport.onerror = (error) => this.onError(error);\n this.transport.onmessage = (message) => {\n if (\"method\" in message) {\n this.onError(\n new MCPClientError({\n message: \"Unsupported message type\"\n })\n );\n return;\n }\n this.onResponse(message);\n };\n this.clientInfo = {\n name: name17,\n version: CLIENT_VERSION\n };\n }\n async init() {\n try {\n await this.transport.start();\n this.isClosed = false;\n const result = await this.request({\n request: {\n method: \"initialize\",\n params: {\n protocolVersion: LATEST_PROTOCOL_VERSION,\n capabilities: {},\n clientInfo: this.clientInfo\n }\n },\n resultSchema: InitializeResultSchema\n });\n if (result === void 0) {\n throw new MCPClientError({\n message: \"Server sent invalid initialize result\"\n });\n }\n if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) {\n throw new MCPClientError({\n message: `Server's protocol version is not supported: ${result.protocolVersion}`\n });\n }\n this.serverCapabilities = result.capabilities;\n await this.notification({\n method: \"notifications/initialized\"\n });\n return this;\n } catch (error) {\n await this.close();\n throw error;\n }\n }\n async close() {\n var _a17;\n if (this.isClosed)\n return;\n await ((_a17 = this.transport) == null ? void 0 : _a17.close());\n this.onClose();\n }\n assertCapability(method) {\n switch (method) {\n case \"initialize\":\n break;\n case \"tools/list\":\n case \"tools/call\":\n if (!this.serverCapabilities.tools) {\n throw new MCPClientError({\n message: `Server does not support tools`\n });\n }\n break;\n default:\n throw new MCPClientError({\n message: `Unsupported method: ${method}`\n });\n }\n }\n async request({\n request,\n resultSchema,\n options\n }) {\n return new Promise((resolve, reject) => {\n if (this.isClosed) {\n return reject(\n new MCPClientError({\n message: \"Attempted to send a request from a closed client\"\n })\n );\n }\n this.assertCapability(request.method);\n const signal = options == null ? void 0 : options.signal;\n signal == null ? void 0 : signal.throwIfAborted();\n const messageId = this.requestMessageId++;\n const jsonrpcRequest = {\n ...request,\n jsonrpc: \"2.0\",\n id: messageId\n };\n const cleanup = () => {\n this.responseHandlers.delete(messageId);\n };\n this.responseHandlers.set(messageId, (response) => {\n if (signal == null ? void 0 : signal.aborted) {\n return reject(\n new MCPClientError({\n message: \"Request was aborted\",\n cause: signal.reason\n })\n );\n }\n if (response instanceof Error) {\n return reject(response);\n }\n try {\n const result = resultSchema.parse(response.result);\n resolve(result);\n } catch (error) {\n const parseError = new MCPClientError({\n message: \"Failed to parse server response\",\n cause: error\n });\n reject(parseError);\n }\n });\n this.transport.send(jsonrpcRequest).catch((error) => {\n cleanup();\n reject(error);\n });\n });\n }\n async listTools({\n params,\n options\n } = {}) {\n try {\n return this.request({\n request: { method: \"tools/list\", params },\n resultSchema: ListToolsResultSchema,\n options\n });\n } catch (error) {\n throw error;\n }\n }\n async callTool({\n name: name17,\n args,\n options\n }) {\n try {\n return this.request({\n request: { method: \"tools/call\", params: { name: name17, arguments: args } },\n resultSchema: CallToolResultSchema,\n options: {\n signal: options == null ? void 0 : options.abortSignal\n }\n });\n } catch (error) {\n throw error;\n }\n }\n async notification(notification) {\n const jsonrpcNotification = {\n ...notification,\n jsonrpc: \"2.0\"\n };\n await this.transport.send(jsonrpcNotification);\n }\n /**\n * Returns a set of AI SDK tools from the MCP server\n * @returns A record of tool names to their implementations\n */\n async tools({\n schemas = \"automatic\"\n } = {}) {\n var _a17;\n const tools = {};\n try {\n const listToolsResult = await this.listTools();\n for (const { name: name17, description, inputSchema } of listToolsResult.tools) {\n if (schemas !== \"automatic\" && !(name17 in schemas)) {\n continue;\n }\n const parameters = schemas === \"automatic\" ? jsonSchema({\n ...inputSchema,\n properties: (_a17 = inputSchema.properties) != null ? _a17 : {},\n additionalProperties: false\n }) : schemas[name17].parameters;\n const self = this;\n const toolWithExecute = tool({\n description,\n parameters,\n execute: async (args, options) => {\n var _a18;\n (_a18 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a18.throwIfAborted();\n return self.callTool({\n name: name17,\n args,\n options\n });\n }\n });\n tools[name17] = toolWithExecute;\n }\n return tools;\n } catch (error) {\n throw error;\n }\n }\n onClose() {\n if (this.isClosed)\n return;\n this.isClosed = true;\n const error = new MCPClientError({\n message: \"Connection closed\"\n });\n for (const handler of this.responseHandlers.values()) {\n handler(error);\n }\n this.responseHandlers.clear();\n }\n onError(error) {\n if (this.onUncaughtError) {\n this.onUncaughtError(error);\n }\n }\n onResponse(response) {\n const messageId = Number(response.id);\n const handler = this.responseHandlers.get(messageId);\n if (handler === void 0) {\n throw new MCPClientError({\n message: `Protocol error: Received a response for an unknown message ID: ${JSON.stringify(\n response\n )}`\n });\n }\n this.responseHandlers.delete(messageId);\n handler(\n \"result\" in response ? response : new MCPClientError({\n message: response.error.message,\n cause: response.error\n })\n );\n }\n};\n\n// core/util/cosine-similarity.ts\nfunction cosineSimilarity(vector1, vector2, options) {\n if (vector1.length !== vector2.length) {\n throw new InvalidArgumentError({\n parameter: \"vector1,vector2\",\n value: { vector1Length: vector1.length, vector2Length: vector2.length },\n message: `Vectors must have the same length`\n });\n }\n const n = vector1.length;\n if (n === 0) {\n if (options == null ? void 0 : options.throwErrorForEmptyVectors) {\n throw new InvalidArgumentError({\n parameter: \"vector1\",\n value: vector1,\n message: \"Vectors cannot be empty\"\n });\n }\n return 0;\n }\n let magnitudeSquared1 = 0;\n let magnitudeSquared2 = 0;\n let dotProduct = 0;\n for (let i = 0; i < n; i++) {\n const value1 = vector1[i];\n const value2 = vector2[i];\n magnitudeSquared1 += value1 * value1;\n magnitudeSquared2 += value2 * value2;\n dotProduct += value1 * value2;\n }\n return magnitudeSquared1 === 0 || magnitudeSquared2 === 0 ? 0 : dotProduct / (Math.sqrt(magnitudeSquared1) * Math.sqrt(magnitudeSquared2));\n}\n\n// core/util/simulate-readable-stream.ts\nimport { delay as delayFunction } from \"@ai-sdk/provider-utils\";\nfunction simulateReadableStream({\n chunks,\n initialDelayInMs = 0,\n chunkDelayInMs = 0,\n _internal\n}) {\n var _a17;\n const delay2 = (_a17 = _internal == null ? void 0 : _internal.delay) != null ? _a17 : delayFunction;\n let index = 0;\n return new ReadableStream({\n async pull(controller) {\n if (index < chunks.length) {\n await delay2(index === 0 ? initialDelayInMs : chunkDelayInMs);\n controller.enqueue(chunks[index++]);\n } else {\n controller.close();\n }\n }\n });\n}\n\n// streams/assistant-response.ts\nimport {\n formatAssistantStreamPart as formatAssistantStreamPart2\n} from \"@ai-sdk/ui-utils\";\nfunction AssistantResponse({ threadId, messageId }, process2) {\n const stream = new ReadableStream({\n async start(controller) {\n var _a17;\n const textEncoder = new TextEncoder();\n const sendMessage = (message) => {\n controller.enqueue(\n textEncoder.encode(\n formatAssistantStreamPart2(\"assistant_message\", message)\n )\n );\n };\n const sendDataMessage = (message) => {\n controller.enqueue(\n textEncoder.encode(\n formatAssistantStreamPart2(\"data_message\", message)\n )\n );\n };\n const sendError = (errorMessage) => {\n controller.enqueue(\n textEncoder.encode(formatAssistantStreamPart2(\"error\", errorMessage))\n );\n };\n const forwardStream = async (stream2) => {\n var _a18, _b;\n let result = void 0;\n for await (const value of stream2) {\n switch (value.event) {\n case \"thread.message.created\": {\n controller.enqueue(\n textEncoder.encode(\n formatAssistantStreamPart2(\"assistant_message\", {\n id: value.data.id,\n role: \"assistant\",\n content: [{ type: \"text\", text: { value: \"\" } }]\n })\n )\n );\n break;\n }\n case \"thread.message.delta\": {\n const content = (_a18 = value.data.delta.content) == null ? void 0 : _a18[0];\n if ((content == null ? void 0 : content.type) === \"text\" && ((_b = content.text) == null ? void 0 : _b.value) != null) {\n controller.enqueue(\n textEncoder.encode(\n formatAssistantStreamPart2(\"text\", content.text.value)\n )\n );\n }\n break;\n }\n case \"thread.run.completed\":\n case \"thread.run.requires_action\": {\n result = value.data;\n break;\n }\n }\n }\n return result;\n };\n controller.enqueue(\n textEncoder.encode(\n formatAssistantStreamPart2(\"assistant_control_data\", {\n threadId,\n messageId\n })\n )\n );\n try {\n await process2({\n sendMessage,\n sendDataMessage,\n forwardStream\n });\n } catch (error) {\n sendError((_a17 = error.message) != null ? _a17 : `${error}`);\n } finally {\n controller.close();\n }\n },\n pull(controller) {\n },\n cancel() {\n }\n });\n return new Response(stream, {\n status: 200,\n headers: {\n \"Content-Type\": \"text/plain; charset=utf-8\"\n }\n });\n}\n\n// streams/langchain-adapter.ts\nvar langchain_adapter_exports = {};\n__export(langchain_adapter_exports, {\n mergeIntoDataStream: () => mergeIntoDataStream,\n toDataStream: () => toDataStream,\n toDataStreamResponse: () => toDataStreamResponse\n});\nimport { formatDataStreamPart as formatDataStreamPart4 } from \"@ai-sdk/ui-utils\";\n\n// streams/stream-callbacks.ts\nfunction createCallbacksTransformer(callbacks = {}) {\n const textEncoder = new TextEncoder();\n let aggregatedResponse = \"\";\n return new TransformStream({\n async start() {\n if (callbacks.onStart)\n await callbacks.onStart();\n },\n async transform(message, controller) {\n controller.enqueue(textEncoder.encode(message));\n aggregatedResponse += message;\n if (callbacks.onToken)\n await callbacks.onToken(message);\n if (callbacks.onText && typeof message === \"string\") {\n await callbacks.onText(message);\n }\n },\n async flush() {\n if (callbacks.onCompletion) {\n await callbacks.onCompletion(aggregatedResponse);\n }\n if (callbacks.onFinal) {\n await callbacks.onFinal(aggregatedResponse);\n }\n }\n });\n}\n\n// streams/langchain-adapter.ts\nfunction toDataStreamInternal(stream, callbacks) {\n return stream.pipeThrough(\n new TransformStream({\n transform: async (value, controller) => {\n var _a17;\n if (typeof value === \"string\") {\n controller.enqueue(value);\n return;\n }\n if (\"event\" in value) {\n if (value.event === \"on_chat_model_stream\") {\n forwardAIMessageChunk(\n (_a17 = value.data) == null ? void 0 : _a17.chunk,\n controller\n );\n }\n return;\n }\n forwardAIMessageChunk(value, controller);\n }\n })\n ).pipeThrough(createCallbacksTransformer(callbacks)).pipeThrough(new TextDecoderStream()).pipeThrough(\n new TransformStream({\n transform: async (chunk, controller) => {\n controller.enqueue(formatDataStreamPart4(\"text\", chunk));\n }\n })\n );\n}\nfunction toDataStream(stream, callbacks) {\n return toDataStreamInternal(stream, callbacks).pipeThrough(\n new TextEncoderStream()\n );\n}\nfunction toDataStreamResponse(stream, options) {\n var _a17;\n const dataStream = toDataStreamInternal(\n stream,\n options == null ? void 0 : options.callbacks\n ).pipeThrough(new TextEncoderStream());\n const data = options == null ? void 0 : options.data;\n const init = options == null ? void 0 : options.init;\n const responseStream = data ? mergeStreams(data.stream, dataStream) : dataStream;\n return new Response(responseStream, {\n status: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n statusText: init == null ? void 0 : init.statusText,\n headers: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n })\n });\n}\nfunction mergeIntoDataStream(stream, options) {\n options.dataStream.merge(toDataStreamInternal(stream, options.callbacks));\n}\nfunction forwardAIMessageChunk(chunk, controller) {\n if (typeof chunk.content === \"string\") {\n controller.enqueue(chunk.content);\n } else {\n const content = chunk.content;\n for (const item of content) {\n if (item.type === \"text\") {\n controller.enqueue(item.text);\n }\n }\n }\n}\n\n// streams/llamaindex-adapter.ts\nvar llamaindex_adapter_exports = {};\n__export(llamaindex_adapter_exports, {\n mergeIntoDataStream: () => mergeIntoDataStream2,\n toDataStream: () => toDataStream2,\n toDataStreamResponse: () => toDataStreamResponse2\n});\nimport { convertAsyncIteratorToReadableStream } from \"@ai-sdk/provider-utils\";\nimport { formatDataStreamPart as formatDataStreamPart5 } from \"@ai-sdk/ui-utils\";\nfunction toDataStreamInternal2(stream, callbacks) {\n const trimStart = trimStartOfStream();\n return convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]()).pipeThrough(\n new TransformStream({\n async transform(message, controller) {\n controller.enqueue(trimStart(message.delta));\n }\n })\n ).pipeThrough(createCallbacksTransformer(callbacks)).pipeThrough(new TextDecoderStream()).pipeThrough(\n new TransformStream({\n transform: async (chunk, controller) => {\n controller.enqueue(formatDataStreamPart5(\"text\", chunk));\n }\n })\n );\n}\nfunction toDataStream2(stream, callbacks) {\n return toDataStreamInternal2(stream, callbacks).pipeThrough(\n new TextEncoderStream()\n );\n}\nfunction toDataStreamResponse2(stream, options = {}) {\n var _a17;\n const { init, data, callbacks } = options;\n const dataStream = toDataStreamInternal2(stream, callbacks).pipeThrough(\n new TextEncoderStream()\n );\n const responseStream = data ? mergeStreams(data.stream, dataStream) : dataStream;\n return new Response(responseStream, {\n status: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n statusText: init == null ? void 0 : init.statusText,\n headers: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n contentType: \"text/plain; charset=utf-8\",\n dataStreamVersion: \"v1\"\n })\n });\n}\nfunction mergeIntoDataStream2(stream, options) {\n options.dataStream.merge(toDataStreamInternal2(stream, options.callbacks));\n}\nfunction trimStartOfStream() {\n let isStreamStart = true;\n return (text2) => {\n if (isStreamStart) {\n text2 = text2.trimStart();\n if (text2)\n isStreamStart = false;\n }\n return text2;\n };\n}\n\n// streams/stream-data.ts\nimport { formatDataStreamPart as formatDataStreamPart6 } from \"@ai-sdk/ui-utils\";\n\n// util/constants.ts\nvar HANGING_STREAM_WARNING_TIME_MS = 15 * 1e3;\n\n// streams/stream-data.ts\nvar StreamData = class {\n constructor() {\n this.encoder = new TextEncoder();\n this.controller = null;\n this.isClosed = false;\n this.warningTimeout = null;\n const self = this;\n this.stream = new ReadableStream({\n start: async (controller) => {\n self.controller = controller;\n if (process.env.NODE_ENV === \"development\") {\n self.warningTimeout = setTimeout(() => {\n console.warn(\n \"The data stream is hanging. Did you forget to close it with `data.close()`?\"\n );\n }, HANGING_STREAM_WARNING_TIME_MS);\n }\n },\n pull: (controller) => {\n },\n cancel: (reason) => {\n this.isClosed = true;\n }\n });\n }\n async close() {\n if (this.isClosed) {\n throw new Error(\"Data Stream has already been closed.\");\n }\n if (!this.controller) {\n throw new Error(\"Stream controller is not initialized.\");\n }\n this.controller.close();\n this.isClosed = true;\n if (this.warningTimeout) {\n clearTimeout(this.warningTimeout);\n }\n }\n append(value) {\n if (this.isClosed) {\n throw new Error(\"Data Stream has already been closed.\");\n }\n if (!this.controller) {\n throw new Error(\"Stream controller is not initialized.\");\n }\n this.controller.enqueue(\n this.encoder.encode(formatDataStreamPart6(\"data\", [value]))\n );\n }\n appendMessageAnnotation(value) {\n if (this.isClosed) {\n throw new Error(\"Data Stream has already been closed.\");\n }\n if (!this.controller) {\n throw new Error(\"Stream controller is not initialized.\");\n }\n this.controller.enqueue(\n this.encoder.encode(formatDataStreamPart6(\"message_annotations\", [value]))\n );\n }\n};\nexport {\n AISDKError16 as AISDKError,\n APICallError2 as APICallError,\n AssistantResponse,\n DownloadError,\n EmptyResponseBodyError,\n InvalidArgumentError,\n InvalidDataContentError,\n InvalidMessageRoleError,\n InvalidPromptError2 as InvalidPromptError,\n InvalidResponseDataError,\n InvalidStreamPartError,\n InvalidToolArgumentsError,\n JSONParseError2 as JSONParseError,\n langchain_adapter_exports as LangChainAdapter,\n llamaindex_adapter_exports as LlamaIndexAdapter,\n LoadAPIKeyError,\n MCPClientError,\n MessageConversionError,\n NoContentGeneratedError,\n NoImageGeneratedError,\n NoObjectGeneratedError,\n NoOutputSpecifiedError,\n NoSuchModelError,\n NoSuchProviderError,\n NoSuchToolError,\n output_exports as Output,\n RetryError,\n StreamData,\n ToolCallRepairError,\n ToolExecutionError,\n TypeValidationError3 as TypeValidationError,\n UnsupportedFunctionalityError2 as UnsupportedFunctionalityError,\n appendClientMessage,\n appendResponseMessages,\n convertToCoreMessages,\n coreAssistantMessageSchema,\n coreMessageSchema,\n coreSystemMessageSchema,\n coreToolMessageSchema,\n coreUserMessageSchema,\n cosineSimilarity,\n createDataStream,\n createDataStreamResponse,\n createIdGenerator5 as createIdGenerator,\n createProviderRegistry,\n customProvider,\n defaultSettingsMiddleware,\n embed,\n embedMany,\n createMCPClient as experimental_createMCPClient,\n experimental_createProviderRegistry,\n experimental_customProvider,\n generateImage as experimental_generateImage,\n generateSpeech as experimental_generateSpeech,\n transcribe as experimental_transcribe,\n experimental_wrapLanguageModel,\n extractReasoningMiddleware,\n formatAssistantStreamPart,\n formatDataStreamPart3 as formatDataStreamPart,\n generateId2 as generateId,\n generateObject,\n generateText,\n jsonSchema2 as jsonSchema,\n parseAssistantStreamPart,\n parseDataStreamPart,\n pipeDataStreamToResponse,\n processDataStream,\n processTextStream,\n simulateReadableStream,\n simulateStreamingMiddleware,\n smoothStream,\n streamObject,\n streamText,\n tool,\n wrapLanguageModel,\n zodSchema\n};\n//# sourceMappingURL=index.mjs.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { getOpenAIModel } from \"./openai-provider-C18ibzKZ.js\";\nimport { Output, generateText } from \"ai\";\n\n//#region src/internal/agents/callEmbeddedAgent.ts\n/**\n* Call an embedded agent with tool call capture\n* This is the standard way to call embedded AI agents within MCP tools\n*\n* Error handling:\n* - Errors are re-thrown for the calling agent to handle\n* - Each agent can implement its own error handling strategy\n*/\nasync function callEmbeddedAgent({ system, prompt, tools, schema }) {\n\tconst capturedToolCalls = [];\n\tconst result = await generateText({\n\t\tmodel: getOpenAIModel(),\n\t\tsystem,\n\t\tprompt,\n\t\ttools,\n\t\tmaxSteps: 5,\n\t\ttemperature: 1,\n\t\texperimental_output: Output.object({ schema }),\n\t\tproviderOptions: { openai: {\n\t\t\tstructuredOutputs: false,\n\t\t\tstrictJsonSchema: false\n\t\t} },\n\t\tonStepFinish: (event) => {\n\t\t\tif (event.toolCalls && event.toolCalls.length > 0) for (const toolCall of event.toolCalls) capturedToolCalls.push({\n\t\t\t\ttoolName: toolCall.toolName,\n\t\t\t\targs: toolCall.args\n\t\t\t});\n\t\t}\n\t});\n\tif (!result.experimental_output) throw new Error(\"Failed to generate output\");\n\tconst rawOutput = result.experimental_output;\n\tif (typeof rawOutput === \"object\" && rawOutput !== null && \"error\" in rawOutput && typeof rawOutput.error === \"string\") throw new UserInputError(rawOutput.error);\n\tconst parsedResult = schema.safeParse(rawOutput);\n\tif (!parsedResult.success) throw new UserInputError(`Invalid agent response: ${parsedResult.error.message}`);\n\treturn {\n\t\tresult: parsedResult.data,\n\t\ttoolCalls: capturedToolCalls\n\t};\n}\n\n//#endregion\nexport { callEmbeddedAgent };\n//# sourceMappingURL=callEmbeddedAgent-CX8bB_WX.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { logIssue, logWarn } from \"./logging-DipAE5VU.js\";\nimport { ApiClientError, ApiServerError } from \"./errors-h_Ebmo8b.js\";\nimport { z } from \"zod\";\nimport { tool } from \"ai\";\n\n//#region src/internal/agents/tools/utils.ts\n/**\n* Standard response schema for all embedded agent tools.\n* Tools return either an error message or the result data, never both.\n*/\nconst AgentToolResponseSchema = z.object({\n\terror: z.string().optional().describe(\"Error message if the operation failed\"),\n\tresult: z.unknown().optional().describe(\"The successful result data\")\n});\n/**\n* Handles errors from agent tool execution and returns appropriate error messages.\n*\n* SECURITY: Only returns trusted error messages to prevent prompt injection.\n* We trust: Sentry API errors, our own UserInputError messages, and system templates.\n*/\nfunction handleAgentToolError(error) {\n\tif (error instanceof UserInputError) {\n\t\tlogWarn(error, {\n\t\t\tloggerScope: [\"agent-tools\", \"user-input\"],\n\t\t\tcontexts: { agentTool: { errorType: \"UserInputError\" } }\n\t\t});\n\t\treturn { error: `Input Error: ${error.message}. You may be able to resolve this by addressing the concern and trying again.` };\n\t}\n\tif (error instanceof ApiClientError) {\n\t\tconst message = error.toUserMessage();\n\t\tlogWarn(message, {\n\t\t\tloggerScope: [\"agent-tools\", \"api-client\"],\n\t\t\tcontexts: { agentTool: {\n\t\t\t\terrorType: error.name,\n\t\t\t\tstatus: error.status ?? null\n\t\t\t} }\n\t\t});\n\t\treturn { error: `Input Error: ${message}. You may be able to resolve this by addressing the concern and trying again.` };\n\t}\n\tif (error instanceof ApiServerError) {\n\t\tconst eventId$1 = logIssue(error);\n\t\tconst statusText = error.status ? ` (${error.status})` : \"\";\n\t\treturn { error: `Server Error${statusText}: ${error.message}. Event ID: ${eventId$1}. This is a system error that cannot be resolved by retrying.` };\n\t}\n\tconst eventId = logIssue(error);\n\treturn { error: `System Error: An unexpected error occurred. Event ID: ${eventId}. This is a system error that cannot be resolved by retrying.` };\n}\n/**\n* Creates an embedded agent tool with automatic error handling and schema wrapping.\n*\n* This wrapper:\n* - Maintains the same API as the AI SDK's tool() function\n* - Automatically wraps the result schema with error/result structure\n* - Handles all error types and returns them as structured responses\n* - Preserves type inference from the original tool implementation\n*\n* @example\n* ```typescript\n* export function createMyTool(apiService: SentryApiService) {\n* return agentTool({\n* description: \"My tool description\",\n* parameters: z.object({ param: z.string() }),\n* execute: async (params) => {\n* // Tool implementation that might throw errors\n* const result = await apiService.someMethod(params);\n* return result; // Original return type preserved\n* }\n* });\n* }\n* ```\n*/\nfunction agentTool(config) {\n\treturn tool({\n\t\tdescription: config.description,\n\t\tparameters: config.parameters,\n\t\texecute: async (params) => {\n\t\t\ttry {\n\t\t\t\tconst result = await config.execute(params);\n\t\t\t\treturn { result };\n\t\t\t} catch (error) {\n\t\t\t\treturn handleAgentToolError(error);\n\t\t\t}\n\t\t}\n\t});\n}\n\n//#endregion\nexport { agentTool };\n//# sourceMappingURL=utils-Bq75Ba9Z.js.map","import { agentTool } from \"./utils-Bq75Ba9Z.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/data/android.json\nvar namespace$72 = \"android\";\nvar description$72 = \"The Android platform on which the Android application is running.\\n\";\nvar attributes$72 = {\n\t\"android.os.api_level\": {\n\t\t\"description\": \"Uniquely identifies the framework API revision offered by a version (`os.version`) of the android operating system. More information can be found [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"33\", \"32\"]\n\t},\n\t\"android.app.state\": {\n\t\t\"description\": \"This attribute represents the state of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The Android lifecycle states are defined in [Activity lifecycle callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), and from which the `OS identifiers` are derived.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"created\",\n\t\t\t\"background\",\n\t\t\t\"foreground\"\n\t\t]\n\t}\n};\nvar android_default = {\n\tnamespace: namespace$72,\n\tdescription: description$72,\n\tattributes: attributes$72\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/app.json\nvar namespace$71 = \"app\";\nvar description$71 = \"Describes attributes related to client-side applications (e.g. web apps or mobile apps).\\n\";\nvar attributes$71 = {\n\t\"app.installation.id\": {\n\t\t\"description\": \"A unique identifier representing the installation of an application on a specific device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Its value SHOULD persist across launches of the same application installation, including through application upgrades.\\nIt SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled.\\nAdditionally, users might be able to reset this value (e.g. by clearing application data).\\nIf an app is installed multiple times on the same device (e.g. in different accounts on Android), each `app.installation.id` SHOULD have a different value.\\nIf multiple OpenTelemetry SDKs are used within the same application, they SHOULD use the same value for `app.installation.id`.\\nHardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the `app.installation.id`.\\n\\nFor iOS, this value SHOULD be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor).\\n\\nFor Android, examples of `app.installation.id` implementations include:\\n\\n- [Firebase Installation ID](https://firebase.google.com/docs/projects/manage-installations).\\n- A globally unique UUID which is persisted across sessions in your application.\\n- [App set ID](https://developer.android.com/identity/app-set-id).\\n- [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID).\\n\\nMore information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2ab2916d-a51f-4ac8-80ee-45ac31a28092\"]\n\t},\n\t\"app.screen.coordinate.x\": {\n\t\t\"description\": \"The x (horizontal) coordinate of a screen coordinate, in screen pixels.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"131\"]\n\t},\n\t\"app.screen.coordinate.y\": {\n\t\t\"description\": \"The y (vertical) component of a screen coordinate, in screen pixels.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12\", \"99\"]\n\t},\n\t\"app.widget.id\": {\n\t\t\"description\": \"An identifier that uniquely differentiates this widget from other widgets in the same application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A widget is an application component, typically an on-screen visual GUI element.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"f9bc787d-ff05-48ad-90e1-fca1d46130b3\", \"submit_order_1829\"]\n\t},\n\t\"app.widget.name\": {\n\t\t\"description\": \"The name of an application widget.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A widget is an application component, typically an on-screen visual GUI element.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"submit\",\n\t\t\t\"attack\",\n\t\t\t\"Clear Cart\"\n\t\t]\n\t}\n};\nvar app_default = {\n\tnamespace: namespace$71,\n\tdescription: description$71,\n\tattributes: attributes$71\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/artifact.json\nvar namespace$70 = \"artifact\";\nvar description$70 = \"This group describes attributes specific to artifacts. Artifacts are files or other immutable objects that are intended for distribution. This definition aligns directly with the [SLSA](https://slsa.dev/spec/v1.0/terminology#package-model) package model.\\n\";\nvar attributes$70 = {\n\t\"artifact.filename\": {\n\t\t\"description\": \"The human readable file name of the artifact, typically generated during build and release processes. Often includes the package name and version in the file name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This file name can also act as the [Package Name](https://slsa.dev/spec/v1.0/terminology#package-model)\\nin cases where the package ecosystem maps accordingly.\\nAdditionally, the artifact [can be published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain)\\nfor others, but that is not a guarantee.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"golang-binary-amd64-v0.1.0\",\n\t\t\t\"docker-image-amd64-v0.1.0\",\n\t\t\t\"release-1.tar.gz\",\n\t\t\t\"file-name-package.tar.gz\"\n\t\t]\n\t},\n\t\"artifact.version\": {\n\t\t\"description\": \"The version of the artifact.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"v0.1.0\",\n\t\t\t\"1.2.1\",\n\t\t\t\"122691-build\"\n\t\t]\n\t},\n\t\"artifact.purl\": {\n\t\t\"description\": \"The [Package URL](https://github.com/package-url/purl-spec) of the [package artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a standard way to identify and locate the packaged artifact.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pkg:github/package-url/purl-spec@1209109710924\", \"pkg:npm/foo@12.12.3\"]\n\t},\n\t\"artifact.hash\": {\n\t\t\"description\": \"The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), often found in checksum.txt on a release of the artifact and used to verify package integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The specific algorithm used to create the cryptographic hash value is\\nnot defined. In situations where an artifact has multiple\\ncryptographic hashes, it is up to the implementer to choose which\\nhash value to set here; this should be the most secure hash algorithm\\nthat is suitable for the situation and consistent with the\\ncorresponding attestation. The implementer can then provide the other\\nhash values through an additional set of attribute extensions as they\\ndeem necessary.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9\"]\n\t},\n\t\"artifact.attestation.id\": {\n\t\t\"description\": \"The id of the build [software attestation](https://slsa.dev/attestation-model).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123\"]\n\t},\n\t\"artifact.attestation.filename\": {\n\t\t\"description\": \"The provenance filename of the built attestation which directly relates to the build artifact filename. This filename SHOULD accompany the artifact at publish time. See the [SLSA Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) specification for more information.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"golang-binary-amd64-v0.1.0.attestation\",\n\t\t\t\"docker-image-amd64-v0.1.0.intoto.json1\",\n\t\t\t\"release-1.tar.gz.attestation\",\n\t\t\t\"file-name-package.tar.gz.intoto.json1\"\n\t\t]\n\t},\n\t\"artifact.attestation.hash\": {\n\t\t\"description\": \"The full [hash value (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of the built attestation. Some envelopes in the [software attestation space](https://github.com/in-toto/attestation/tree/main/spec) also refer to this as the **digest**.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408\"]\n\t}\n};\nvar artifact_default = {\n\tnamespace: namespace$70,\n\tdescription: description$70,\n\tattributes: attributes$70\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/aspnetcore.json\nvar namespace$69 = \"aspnetcore\";\nvar description$69 = \"ASP.NET Core attributes\";\nvar attributes$69 = {\n\t\"aspnetcore.rate_limiting.policy\": {\n\t\t\"description\": \"Rate limiting policy name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"fixed\",\n\t\t\t\"sliding\",\n\t\t\t\"token\"\n\t\t]\n\t},\n\t\"aspnetcore.rate_limiting.result\": {\n\t\t\"description\": \"Rate-limiting result, shows whether the lease was acquired or contains a rejection reason\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"acquired\",\n\t\t\t\"endpoint_limiter\",\n\t\t\t\"global_limiter\",\n\t\t\t\"request_canceled\"\n\t\t]\n\t},\n\t\"aspnetcore.routing.is_fallback\": {\n\t\t\"description\": \"A value that indicates whether the matched route is a fallback route.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"aspnetcore.diagnostics.handler.type\": {\n\t\t\"description\": \"Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"Contoso.MyHandler\"]\n\t},\n\t\"aspnetcore.request.is_unhandled\": {\n\t\t\"description\": \"Flag indicating if request was handled by the application pipeline.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"aspnetcore.routing.match_status\": {\n\t\t\"description\": \"Match result - success or failure\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"success\", \"failure\"]\n\t},\n\t\"aspnetcore.diagnostics.exception.result\": {\n\t\t\"description\": \"ASP.NET Core exception middleware handling result\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"handled\",\n\t\t\t\"unhandled\",\n\t\t\t\"skipped\",\n\t\t\t\"aborted\"\n\t\t]\n\t}\n};\nvar aspnetcore_default = {\n\tnamespace: namespace$69,\n\tdescription: description$69,\n\tattributes: attributes$69\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/aws.json\nvar namespace$68 = \"aws\";\nvar description$68 = \"This section defines generic attributes for AWS services.\\n\";\nvar attributes$68 = {\n\t\"aws.request_id\": {\n\t\t\"description\": \"The AWS request ID as returned in the response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id`.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"79b9da39-b7ae-508a-a6bc-864b2829c622\", \"C9ER4AJX75574TDJ\"]\n\t},\n\t\"aws.extended_request_id\": {\n\t\t\"description\": \"The AWS extended request ID as returned in the response header `x-amz-id-2`.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=\"]\n\t}\n};\nvar aws_default = {\n\tnamespace: namespace$68,\n\tdescription: description$68,\n\tattributes: attributes$68\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/azure.json\nvar namespace$67 = \"azure\";\nvar description$67 = \"This section defines generic attributes used by Azure Client Libraries.\\n\";\nvar attributes$67 = {\n\t\"azure.service.request.id\": {\n\t\t\"description\": \"The unique identifier of the service request. It's generated by the Azure service and returned with the response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00000000-0000-0000-0000-000000000000\"]\n\t},\n\t\"azure.resource_provider.namespace\": {\n\t\t\"description\": \"[Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Microsoft.Storage\",\n\t\t\t\"Microsoft.KeyVault\",\n\t\t\t\"Microsoft.ServiceBus\"\n\t\t]\n\t},\n\t\"azure.client.id\": {\n\t\t\"description\": \"The unique identifier of the client instance.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3ba4827d-4422-483f-b59f-85b74211c11d\", \"storage-client-1\"]\n\t}\n};\nvar azure_default = {\n\tnamespace: namespace$67,\n\tdescription: description$67,\n\tattributes: attributes$67\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/browser.json\nvar namespace$66 = \"browser\";\nvar description$66 = \"The web browser attributes\\n\";\nvar attributes$66 = {\n\t\"browser.brands\": {\n\t\t\"description\": \"Array of brand name and version separated by a space\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.brands`).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\" Not A;Brand 99\\\",\\\"Chromium 99\\\",\\\"Chrome 99\\\"]\"]\n\t},\n\t\"browser.platform\": {\n\t\t\"description\": \"The platform on which the browser is running\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.platform`). If unavailable, the legacy `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD be left unset in order for the values to be consistent.\\nThe list of possible values is defined in the [W3C User-Agent Client Hints specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). Note that some (but not all) of these values can overlap with values in the [`os.type` and `os.name` attributes](./os.md). However, for consistency, the values in the `browser.platform` attribute should capture the exact value that the user agent provides.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Windows\",\n\t\t\t\"macOS\",\n\t\t\t\"Android\"\n\t\t]\n\t},\n\t\"browser.mobile\": {\n\t\t\"description\": \"A boolean that is true if the browser is running on a mobile device\",\n\t\t\"type\": \"boolean\",\n\t\t\"note\": \"This value is intended to be taken from the [UA client hints API](https://wicg.github.io/ua-client-hints/#interface) (`navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be left unset.\\n\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"browser.language\": {\n\t\t\"description\": \"Preferred language of the user using the browser\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value is intended to be taken from the Navigator API `navigator.language`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"en\",\n\t\t\t\"en-US\",\n\t\t\t\"fr\",\n\t\t\t\"fr-FR\"\n\t\t]\n\t}\n};\nvar browser_default = {\n\tnamespace: namespace$66,\n\tdescription: description$66,\n\tattributes: attributes$66\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cassandra.json\nvar namespace$65 = \"cassandra\";\nvar description$65 = \"This section defines attributes for Cassandra.\\n\";\nvar attributes$65 = {\n\t\"cassandra.coordinator.dc\": {\n\t\t\"description\": \"The data center of the coordinating node for a query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-west-2\"]\n\t},\n\t\"cassandra.coordinator.id\": {\n\t\t\"description\": \"The ID of the coordinating node for a query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"be13faa2-8574-4d71-926d-27f16cf8a7af\"]\n\t},\n\t\"cassandra.consistency.level\": {\n\t\t\"description\": \"The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"all\",\n\t\t\t\"each_quorum\",\n\t\t\t\"quorum\",\n\t\t\t\"local_quorum\",\n\t\t\t\"one\",\n\t\t\t\"two\",\n\t\t\t\"three\",\n\t\t\t\"local_one\",\n\t\t\t\"any\",\n\t\t\t\"serial\",\n\t\t\t\"local_serial\"\n\t\t]\n\t},\n\t\"cassandra.query.idempotent\": {\n\t\t\"description\": \"Whether or not the query is idempotent.\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"cassandra.page.size\": {\n\t\t\"description\": \"The fetch size used for paging, i.e. how many rows will be returned at once.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"5000\"]\n\t},\n\t\"cassandra.speculative_execution.count\": {\n\t\t\"description\": \"The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"2\"]\n\t}\n};\nvar cassandra_default = {\n\tnamespace: namespace$65,\n\tdescription: description$65,\n\tattributes: attributes$65\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cicd.json\nvar namespace$64 = \"cicd\";\nvar description$64 = \"This group describes attributes specific to pipelines within a Continuous Integration and Continuous Deployment (CI/CD) system. A [pipeline](https://wikipedia.org/wiki/Pipeline_(computing)) in this case is a series of steps that are performed in order to deliver a new version of software. This aligns with the [Britannica](https://www.britannica.com/dictionary/pipeline) definition of a pipeline where a **pipeline** is the system for developing and producing something. In the context of CI/CD, a pipeline produces or delivers software.\\n\";\nvar attributes$64 = {\n\t\"cicd.pipeline.name\": {\n\t\t\"description\": \"The human readable name of the pipeline within a CI/CD system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Build and Test\",\n\t\t\t\"Lint\",\n\t\t\t\"Deploy Go Project\",\n\t\t\t\"deploy_to_environment\"\n\t\t]\n\t},\n\t\"cicd.pipeline.run.id\": {\n\t\t\"description\": \"The unique identifier of a pipeline run within a CI/CD system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"120912\"]\n\t},\n\t\"cicd.pipeline.run.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the pipeline run, providing the complete address in order to locate and identify the pipeline run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075\"]\n\t},\n\t\"cicd.pipeline.run.state\": {\n\t\t\"description\": \"The pipeline run goes through these states during its lifecycle.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"pending\",\n\t\t\t\"executing\",\n\t\t\t\"finalizing\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.name\": {\n\t\t\"description\": \"The human readable name of a task within a pipeline. Task here most closely aligns with a [computing process](https://wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. Other terms for tasks include commands, steps, and procedures.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Run GoLang Linter\",\n\t\t\t\"Go Build\",\n\t\t\t\"go-test\",\n\t\t\t\"deploy_binary\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.run.id\": {\n\t\t\"description\": \"The unique identifier of a task run within a pipeline.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12097\"]\n\t},\n\t\"cicd.pipeline.task.run.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the pipeline task run, providing the complete address in order to locate and identify the pipeline task run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075\"]\n\t},\n\t\"cicd.pipeline.task.run.result\": {\n\t\t\"description\": \"The result of a task run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"error\",\n\t\t\t\"timeout\",\n\t\t\t\"cancellation\",\n\t\t\t\"skip\"\n\t\t]\n\t},\n\t\"cicd.pipeline.task.type\": {\n\t\t\"description\": \"The type of the task within a pipeline.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"build\",\n\t\t\t\"test\",\n\t\t\t\"deploy\"\n\t\t]\n\t},\n\t\"cicd.pipeline.result\": {\n\t\t\"description\": \"The result of a pipeline run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"error\",\n\t\t\t\"timeout\",\n\t\t\t\"cancellation\",\n\t\t\t\"skip\"\n\t\t]\n\t},\n\t\"cicd.pipeline.action.name\": {\n\t\t\"description\": \"The kind of action a pipeline run is performing.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"BUILD\",\n\t\t\t\"RUN\",\n\t\t\t\"SYNC\"\n\t\t]\n\t},\n\t\"cicd.worker.id\": {\n\t\t\"description\": \"The unique identifier of a worker within a CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"abc123\",\n\t\t\t\"10.0.1.2\",\n\t\t\t\"controller\"\n\t\t]\n\t},\n\t\"cicd.worker.name\": {\n\t\t\"description\": \"The name of a worker within a CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"agent-abc\",\n\t\t\t\"controller\",\n\t\t\t\"Ubuntu LTS\"\n\t\t]\n\t},\n\t\"cicd.worker.url.full\": {\n\t\t\"description\": \"The [URL](https://wikipedia.org/wiki/URL) of the worker, providing the complete address in order to locate and identify the worker.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://cicd.example.org/worker/abc123\"]\n\t},\n\t\"cicd.worker.state\": {\n\t\t\"description\": \"The state of a CICD worker / agent.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"available\",\n\t\t\t\"busy\",\n\t\t\t\"offline\"\n\t\t]\n\t},\n\t\"cicd.system.component\": {\n\t\t\"description\": \"The name of a component of the CICD system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"controller\",\n\t\t\t\"scheduler\",\n\t\t\t\"agent\"\n\t\t]\n\t}\n};\nvar cicd_default = {\n\tnamespace: namespace$64,\n\tdescription: description$64,\n\tattributes: attributes$64\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/client.json\nvar namespace$63 = \"client\";\nvar description$63 = \"These attributes may be used to describe the client in a connection-based network interaction where there is one side that initiates the connection (the client is the side that initiates the connection). This covers all TCP network interactions since TCP is connection-based and one side initiates the connection (an exception is made for peer-to-peer communication over TCP where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.\\n\";\nvar attributes$63 = {\n\t\"client.address\": {\n\t\t\"description\": \"Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the server side, and when communicating through an intermediary, `client.address` SHOULD represent the client address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"client.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"client.port\": {\n\t\t\"description\": \"Client port number.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"When observed from the server side, and when communicating through an intermediary, `client.port` SHOULD represent the client port behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t}\n};\nvar client_default = {\n\tnamespace: namespace$63,\n\tdescription: description$63,\n\tattributes: attributes$63\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloud.json\nvar namespace$62 = \"cloud\";\nvar description$62 = \"A cloud environment (e.g. GCP, Azure, AWS).\\n\";\nvar attributes$62 = {\n\t\"cloud.provider\": {\n\t\t\"description\": \"Name of the cloud provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud\",\n\t\t\t\"aws\",\n\t\t\t\"azure\",\n\t\t\t\"gcp\",\n\t\t\t\"heroku\",\n\t\t\t\"ibm_cloud\",\n\t\t\t\"oracle_cloud\",\n\t\t\t\"tencent_cloud\"\n\t\t]\n\t},\n\t\"cloud.account.id\": {\n\t\t\"description\": \"The cloud account ID the resource is assigned to.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"111111111111\", \"opentelemetry\"]\n\t},\n\t\"cloud.region\": {\n\t\t\"description\": \"The geographical region within a cloud provider. When associated with a resource, this attribute specifies the region where the resource operates. When calling services or APIs deployed on a cloud, this attribute identifies the region where the called destination is deployed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-central1\", \"us-east-1\"]\n\t},\n\t\"cloud.resource_id\": {\n\t\t\"description\": \"Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://google.aip.dev/122#full-resource-names) on GCP)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"On some cloud providers, it may not be possible to determine the full ID at startup,\\nso it may be necessary to set `cloud.resource_id` as a span attribute instead.\\n\\nThe exact value to use for `cloud.resource_id` depends on the cloud provider.\\nThe following well-known definitions MUST be used if you set this attribute and they apply:\\n\\n- **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\\n Take care not to use the \\\"invoked ARN\\\" directly but replace any\\n [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)\\n with the resolved function version, as the same runtime instance may be invocable with\\n multiple different aliases.\\n- **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\\n- **Azure:** The [Fully Qualified Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) of the invoked function,\\n *not* the function app, having the form\\n `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.\\n This means that a span attribute MUST be used, as an Azure function app can host multiple functions that would usually share\\n a TracerProvider.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function\",\n\t\t\t\"//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID\",\n\t\t\t\"/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>\"\n\t\t]\n\t},\n\t\"cloud.availability_zone\": {\n\t\t\"description\": \"Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Availability zones are called \\\"zones\\\" on Alibaba Cloud and Google Cloud.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"us-east-1c\"]\n\t},\n\t\"cloud.platform\": {\n\t\t\"description\": \"The cloud platform in use.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The prefix of the service SHOULD match the one specified in `cloud.provider`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud_ecs\",\n\t\t\t\"alibaba_cloud_fc\",\n\t\t\t\"alibaba_cloud_openshift\",\n\t\t\t\"aws_ec2\",\n\t\t\t\"aws_ecs\",\n\t\t\t\"aws_eks\",\n\t\t\t\"aws_lambda\",\n\t\t\t\"aws_elastic_beanstalk\",\n\t\t\t\"aws_app_runner\",\n\t\t\t\"aws_openshift\",\n\t\t\t\"azure.vm\",\n\t\t\t\"azure.container_apps\",\n\t\t\t\"azure.container_instances\",\n\t\t\t\"azure.aks\",\n\t\t\t\"azure.functions\",\n\t\t\t\"azure.app_service\",\n\t\t\t\"azure.openshift\",\n\t\t\t\"azure_vm\",\n\t\t\t\"azure_container_apps\",\n\t\t\t\"azure_container_instances\",\n\t\t\t\"azure_aks\",\n\t\t\t\"azure_functions\",\n\t\t\t\"azure_app_service\",\n\t\t\t\"azure_openshift\",\n\t\t\t\"gcp_bare_metal_solution\",\n\t\t\t\"gcp_compute_engine\",\n\t\t\t\"gcp_cloud_run\",\n\t\t\t\"gcp_kubernetes_engine\",\n\t\t\t\"gcp_cloud_functions\",\n\t\t\t\"gcp_app_engine\",\n\t\t\t\"gcp_openshift\",\n\t\t\t\"ibm_cloud_openshift\",\n\t\t\t\"oracle_cloud_compute\",\n\t\t\t\"oracle_cloud_oke\",\n\t\t\t\"tencent_cloud_cvm\",\n\t\t\t\"tencent_cloud_eks\",\n\t\t\t\"tencent_cloud_scf\"\n\t\t]\n\t}\n};\nvar cloud_default = {\n\tnamespace: namespace$62,\n\tdescription: description$62,\n\tattributes: attributes$62\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloudevents.json\nvar namespace$61 = \"cloudevents\";\nvar description$61 = \"This document defines attributes for CloudEvents.\\n\";\nvar attributes$61 = {\n\t\"cloudevents.event_id\": {\n\t\t\"description\": \"The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) uniquely identifies the event.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123e4567-e89b-12d3-a456-426614174000\", \"0001\"]\n\t},\n\t\"cloudevents.event_source\": {\n\t\t\"description\": \"The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) identifies the context in which an event happened.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"https://github.com/cloudevents\",\n\t\t\t\"/cloudevents/spec/pull/123\",\n\t\t\t\"my-service\"\n\t\t]\n\t},\n\t\"cloudevents.event_spec_version\": {\n\t\t\"description\": \"The [version of the CloudEvents specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.0\"]\n\t},\n\t\"cloudevents.event_type\": {\n\t\t\"description\": \"The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) contains a value describing the type of event related to the originating occurrence.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"com.github.pull_request.opened\", \"com.example.object.deleted.v2\"]\n\t},\n\t\"cloudevents.event_subject\": {\n\t\t\"description\": \"The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) of the event in the context of the event producer (identified by source).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"mynewfile.jpg\"]\n\t}\n};\nvar cloudevents_default = {\n\tnamespace: namespace$61,\n\tdescription: description$61,\n\tattributes: attributes$61\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cloudfoundry.json\nvar namespace$60 = \"cloudfoundry\";\nvar description$60 = \"CloudFoundry resource attributes.\\n\";\nvar attributes$60 = {\n\t\"cloudfoundry.system.id\": {\n\t\t\"description\": \"A guid or another name describing the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `source_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the component name, e.g. \\\"gorouter\\\", for\\nCloudFoundry components.\\n\\nWhen system components are instrumented, values from the\\n[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)\\nshould be used. The `system.id` should be set to\\n`spec.deployment/spec.name`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"cf/gorouter\"]\n\t},\n\t\"cloudfoundry.system.instance.id\": {\n\t\t\"description\": \"A guid describing the concrete instance of the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the vm id for CloudFoundry components.\\n\\nWhen system components are instrumented, values from the\\n[Bosh spec](https://bosh.io/docs/jobs/#properties-spec)\\nshould be used. The `system.instance.id` should be set to `spec.id`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.app.name\": {\n\t\t\"description\": \"The name of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.application_name`. This is the same value\\nas reported by `cf apps`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-app-name\"]\n\t},\n\t\"cloudfoundry.app.id\": {\n\t\t\"description\": \"The guid of the application.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.application_id`. This is the same value as\\nreported by `cf app <app-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.app.instance.id\": {\n\t\t\"description\": \"The index of the application instance. 0 when just one instance is active.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope](https://github.com/cloudfoundry/loggregator-api#v2-envelope).\\nIt is used for logs and metrics emitted by CloudFoundry. It is\\nsupposed to contain the application instance index for applications\\ndeployed on the runtime.\\n\\nApplication instrumentation should use the value from environment\\nvariable `CF_INSTANCE_INDEX`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"1\"]\n\t},\n\t\"cloudfoundry.space.name\": {\n\t\t\"description\": \"The name of the CloudFoundry space the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.space_name`. This is the same value as\\nreported by `cf spaces`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-space-name\"]\n\t},\n\t\"cloudfoundry.space.id\": {\n\t\t\"description\": \"The guid of the CloudFoundry space the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.space_id`. This is the same value as\\nreported by `cf space <space-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.org.name\": {\n\t\t\"description\": \"The name of the CloudFoundry organization the app is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.org_name`. This is the same value as\\nreported by `cf orgs`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-org-name\"]\n\t},\n\t\"cloudfoundry.org.id\": {\n\t\t\"description\": \"The guid of the CloudFoundry org the application is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.org_id`. This is the same value as\\nreported by `cf org <org-name> --guid`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.process.id\": {\n\t\t\"description\": \"The UID identifying the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Application instrumentation should use the value from environment\\nvariable `VCAP_APPLICATION.process_id`. It is supposed to be equal to\\n`VCAP_APPLICATION.app_id` for applications deployed to the runtime.\\nFor system components, this could be the actual PID.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"cloudfoundry.process.type\": {\n\t\t\"description\": \"The type of process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"CloudFoundry applications can consist of multiple jobs. Usually the\\nmain process will be of type `web`. There can be additional background\\ntasks or side-cars with different process types.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"web\"]\n\t}\n};\nvar cloudfoundry_default = {\n\tnamespace: namespace$60,\n\tdescription: description$60,\n\tattributes: attributes$60\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/code.json\nvar namespace$59 = \"code\";\nvar description$59 = \"These attributes provide context about source code\\n\";\nvar attributes$59 = {\n\t\"code.function.name\": {\n\t\t\"description\": \"The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.\\nThe values are usually the same (or prefixes of) the ones found in native stack trace representation stored in\\n`code.stacktrace` without information on arguments.\\n\\nExamples:\\n\\n* Java method: `com.example.MyHttpService.serveRequest`\\n* Java anonymous class method: `com.mycompany.Main$1.myMethod`\\n* Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`\\n* PHP function: `GuzzleHttp\\\\Client::transfer`\\n* Go function: `github.com/my/repo/pkg.foo.func5`\\n* Elixir: `OpenTelemetry.Ctx.new`\\n* Erlang: `opentelemetry_ctx:new`\\n* Rust: `playground::my_module::my_cool_func`\\n* C function: `fopen`\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"com.example.MyHttpService.serveRequest\",\n\t\t\t\"GuzzleHttp\\\\Client::transfer\",\n\t\t\t\"fopen\"\n\t\t]\n\t},\n\t\"code.file.path\": {\n\t\t\"description\": \"The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/usr/local/MyApplication/content_root/app/index.php\"]\n\t},\n\t\"code.line.number\": {\n\t\t\"description\": \"The line number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"42\"]\n\t},\n\t\"code.column.number\": {\n\t\t\"description\": \"The column number in `code.file.path` best representing the operation. It SHOULD point within the code unit named in `code.function.name`. This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"16\"]\n\t},\n\t\"code.stacktrace\": {\n\t\t\"description\": \"A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute MUST NOT be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\\n\"]\n\t}\n};\nvar code_default = {\n\tnamespace: namespace$59,\n\tdescription: description$59,\n\tattributes: attributes$59\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/container.json\nvar namespace$58 = \"container\";\nvar description$58 = \"A container instance.\\n\";\nvar attributes$58 = {\n\t\"container.name\": {\n\t\t\"description\": \"Container name used by container runtime.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-autoconf\"]\n\t},\n\t\"container.id\": {\n\t\t\"description\": \"Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a3bf90e006b2\"]\n\t},\n\t\"container.runtime\": {\n\t\t\"description\": \"The container runtime managing this container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"docker\",\n\t\t\t\"containerd\",\n\t\t\t\"rkt\"\n\t\t]\n\t},\n\t\"container.image.name\": {\n\t\t\"description\": \"Name of the image the container was built on.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gcr.io/opentelemetry/operator\"]\n\t},\n\t\"container.image.tags\": {\n\t\t\"description\": \"Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"v1.27.1\\\",\\\"3.5.7-0\\\"]\"]\n\t},\n\t\"container.image.id\": {\n\t\t\"description\": \"Runtime specific image identifier. Usually a hash algorithm followed by a UUID.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Docker defines a sha256 of the image id; `container.image.id` corresponds to the `Image` field from the Docker container inspect [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) endpoint.\\nK8s defines a link to the container registry repository with digest `\\\"imageID\\\": \\\"registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625\\\"`.\\nThe ID is assigned by the container runtime and can vary in different environments. Consider using `oci.manifest.digest` if it is important to identify the same image in different environments/runtimes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f\"]\n\t},\n\t\"container.image.repo_digests\": {\n\t\t\"description\": \"Repo digests of the container image as provided by the container runtime.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"[Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) and [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) report those under the `RepoDigests` field.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb\\\",\\\"internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578\\\"]\"]\n\t},\n\t\"container.command\": {\n\t\t\"description\": \"The command used to run the container (i.e. the command name).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If using embedded credentials or sensitive data, it is recommended to remove them to prevent potential leakage.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcontribcol\"]\n\t},\n\t\"container.command_line\": {\n\t\t\"description\": \"The full command run by the container as a single string representing the full command.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcontribcol --config config.yaml\"]\n\t},\n\t\"container.command_args\": {\n\t\t\"description\": \"All the command arguments (including the command/executable itself) run by the container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"otelcontribcol\\\",\\\"--config\\\",\\\"config.yaml\\\"]\"]\n\t},\n\t\"container.label\": {\n\t\t\"description\": \"Container labels, `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For example, a docker container label `app` with value `nginx` SHOULD be recorded as the `container.label.app` attribute with value `\\\"nginx\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"nginx\"]\n\t},\n\t\"container.csi.plugin.name\": {\n\t\t\"description\": \"The name of the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin used by the volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This can sometimes be referred to as a \\\"driver\\\" in CSI implementations. This should represent the `name` field of the GetPluginInfo RPC.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pd.csi.storage.gke.io\"]\n\t},\n\t\"container.csi.volume.id\": {\n\t\t\"description\": \"The unique volume ID returned by the CSI ([Container Storage Interface](https://github.com/container-storage-interface/spec)) plugin.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This can sometimes be referred to as a \\\"volume handle\\\" in CSI implementations. This should represent the `Volume.volume_id` field in CSI spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk\"]\n\t}\n};\nvar container_default = {\n\tnamespace: namespace$58,\n\tdescription: description$58,\n\tattributes: attributes$58\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cpu.json\nvar namespace$57 = \"cpu\";\nvar description$57 = \"Attributes specific to a cpu instance.\";\nvar attributes$57 = {\n\t\"cpu.mode\": {\n\t\t\"description\": \"The mode of the CPU\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"user\",\n\t\t\t\"system\",\n\t\t\t\"nice\",\n\t\t\t\"idle\",\n\t\t\t\"iowait\",\n\t\t\t\"interrupt\",\n\t\t\t\"steal\",\n\t\t\t\"kernel\"\n\t\t]\n\t},\n\t\"cpu.logical_number\": {\n\t\t\"description\": \"The logical CPU number [0..n-1]\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t}\n};\nvar cpu_default = {\n\tnamespace: namespace$57,\n\tdescription: description$57,\n\tattributes: attributes$57\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/cpython.json\nvar namespace$56 = \"cpython\";\nvar description$56 = \"This document defines CPython related attributes.\\n\";\nvar attributes$56 = { \"cpython.gc.generation\": {\n\t\"description\": \"Value of the garbage collector collection generation.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"0\",\n\t\t\"1\",\n\t\t\"2\"\n\t]\n} };\nvar cpython_default = {\n\tnamespace: namespace$56,\n\tdescription: description$56,\n\tattributes: attributes$56\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/database.json\nvar namespace$55 = \"database\";\nvar description$55 = \"This group defines the attributes used to describe telemetry in the context of databases.\\n\";\nvar attributes$55 = {\n\t\"db.collection.name\": {\n\t\t\"description\": \"The name of a collection (table, container) within the database.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nThe collection name SHOULD NOT be extracted from `db.query.text`,\\nwhen the database system supports query text with multiple collections\\nin non-batch operations.\\n\\nFor batch operations, if the individual operations are known to have the same\\ncollection name then that collection name SHOULD be used.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"public.users\", \"customers\"]\n\t},\n\t\"db.namespace\": {\n\t\t\"description\": \"The name of the database, fully qualified within the server address and port.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a database system has multiple namespace components, they SHOULD be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) SHOULD be omitted.\\nSemantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.\\nIt is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"customers\", \"test.users\"]\n\t},\n\t\"db.operation.name\": {\n\t\t\"description\": \"The name of the operation or command being executed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nThe operation name SHOULD NOT be extracted from `db.query.text`,\\nwhen the database system supports query text with multiple operations\\nin non-batch operations.\\n\\nIf spaces can occur in the operation name, multiple consecutive spaces\\nSHOULD be normalized to a single space.\\n\\nFor batch operations, if the individual operations are known to have the same operation name\\nthen that operation name SHOULD be used prepended by `BATCH `,\\notherwise `db.operation.name` SHOULD be `BATCH` or some other database\\nsystem specific term if more applicable.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"findAndModify\",\n\t\t\t\"HMSET\",\n\t\t\t\"SELECT\"\n\t\t]\n\t},\n\t\"db.query.text\": {\n\t\t\"description\": \"The database query being executed.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).\\nFor batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.\\nParameterized query text SHOULD NOT be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"SELECT * FROM wuser_table where username = ?\", \"SET mykey ?\"]\n\t},\n\t\"db.query.parameter\": {\n\t\t\"description\": \"A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a query parameter has no name and instead is referenced only by index,\\nthen `<key>` SHOULD be the 0-based index.\\n\\n`db.query.parameter.<key>` SHOULD match\\nup with the parameterized placeholders present in `db.query.text`.\\n\\n`db.query.parameter.<key>` SHOULD NOT be captured on batch operations.\\n\\nExamples:\\n\\n- For a query `SELECT * FROM users where username = %s` with the parameter `\\\"jdoe\\\"`,\\n the attribute `db.query.parameter.0` SHOULD be set to `\\\"jdoe\\\"`.\\n\\n- For a query `\\\"SELECT * FROM users WHERE username = %(username)s;` with parameter\\n `username = \\\"jdoe\\\"`, the attribute `db.query.parameter.username` SHOULD be set to `\\\"jdoe\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"someval\", \"55\"]\n\t},\n\t\"db.query.summary\": {\n\t\t\"description\": \"Low cardinality summary of a database query.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The query summary describes a class of database queries and is useful\\nas a grouping key, especially when analyzing telemetry for database\\ncalls involving complex queries.\\n\\nSummary may be available to the instrumentation through\\ninstrumentation hooks or other means. If it is not available, instrumentations\\nthat support query parsing SHOULD generate a summary following\\n[Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query)\\nsection.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"SELECT wuser_table\",\n\t\t\t\"INSERT shipping_details SELECT orders\",\n\t\t\t\"get user by id\"\n\t\t]\n\t},\n\t\"db.stored_procedure.name\": {\n\t\t\"description\": \"The name of a stored procedure within the database.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It is RECOMMENDED to capture the value as provided by the application\\nwithout attempting to do any case normalization.\\n\\nFor batch operations, if the individual operations are known to have the same\\nstored procedure name then that stored procedure name SHOULD be used.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"GetCustomer\"]\n\t},\n\t\"db.operation.parameter\": {\n\t\t\"description\": \"A database operation parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For example, a client-side maximum number of rows to read from the database\\nMAY be recorded as the `db.operation.parameter.max_rows` attribute.\\n\\n`db.query.text` parameters SHOULD be captured using `db.query.parameter.<key>`\\ninstead of `db.operation.parameter.<key>`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"someval\", \"55\"]\n\t},\n\t\"db.operation.batch.size\": {\n\t\t\"description\": \"The number of queries included in a batch operation.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"2\",\n\t\t\t\"3\",\n\t\t\t\"4\"\n\t\t]\n\t},\n\t\"db.response.status_code\": {\n\t\t\"description\": \"Database response status code.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.\\nSemantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"102\",\n\t\t\t\"ORA-17002\",\n\t\t\t\"08P01\",\n\t\t\t\"404\"\n\t\t]\n\t},\n\t\"db.response.returned_rows\": {\n\t\t\"description\": \"Number of rows returned by the operation.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"10\",\n\t\t\t\"30\",\n\t\t\t\"1000\"\n\t\t]\n\t},\n\t\"db.system.name\": {\n\t\t\"description\": \"The database management system (DBMS) product as identified by the client instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"other_sql\",\n\t\t\t\"softwareag.adabas\",\n\t\t\t\"actian.ingres\",\n\t\t\t\"aws.dynamodb\",\n\t\t\t\"aws.redshift\",\n\t\t\t\"azure.cosmosdb\",\n\t\t\t\"intersystems.cache\",\n\t\t\t\"cassandra\",\n\t\t\t\"clickhouse\",\n\t\t\t\"cockroachdb\",\n\t\t\t\"couchbase\",\n\t\t\t\"couchdb\",\n\t\t\t\"derby\",\n\t\t\t\"elasticsearch\",\n\t\t\t\"firebirdsql\",\n\t\t\t\"gcp.spanner\",\n\t\t\t\"geode\",\n\t\t\t\"h2database\",\n\t\t\t\"hbase\",\n\t\t\t\"hive\",\n\t\t\t\"hsqldb\",\n\t\t\t\"ibm.db2\",\n\t\t\t\"ibm.informix\",\n\t\t\t\"ibm.netezza\",\n\t\t\t\"influxdb\",\n\t\t\t\"instantdb\",\n\t\t\t\"mariadb\",\n\t\t\t\"memcached\",\n\t\t\t\"mongodb\",\n\t\t\t\"microsoft.sql_server\",\n\t\t\t\"mysql\",\n\t\t\t\"neo4j\",\n\t\t\t\"opensearch\",\n\t\t\t\"oracle.db\",\n\t\t\t\"postgresql\",\n\t\t\t\"redis\",\n\t\t\t\"sap.hana\",\n\t\t\t\"sap.maxdb\",\n\t\t\t\"sqlite\",\n\t\t\t\"teradata\",\n\t\t\t\"trino\"\n\t\t]\n\t},\n\t\"db.client.connection.state\": {\n\t\t\"description\": \"The state of a connection in the pool\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"idle\", \"used\"]\n\t},\n\t\"db.client.connection.pool.name\": {\n\t\t\"description\": \"The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myDataSource\"]\n\t}\n};\nvar database_default = {\n\tnamespace: namespace$55,\n\tdescription: description$55,\n\tattributes: attributes$55\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/db.json\nvar namespace$54 = \"db\";\nvar description$54 = \"Database operations attributes\";\nvar attributes$54 = {\n\t\"db.system.name\": {\n\t\t\"description\": \"Identifies the database management system product\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"postgresql\",\n\t\t\t\"mysql\",\n\t\t\t\"microsoft.sql_server\",\n\t\t\t\"mongodb\",\n\t\t\t\"redis\",\n\t\t\t\"cassandra\"\n\t\t]\n\t},\n\t\"db.collection.name\": {\n\t\t\"description\": \"Name of a collection (table, container) within the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.namespace\": {\n\t\t\"description\": \"Fully qualified database name within server address and port\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.operation.name\": {\n\t\t\"description\": \"Name of the operation or command being executed\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"SELECT\",\n\t\t\t\"INSERT\",\n\t\t\t\"UPDATE\",\n\t\t\t\"DELETE\",\n\t\t\t\"CREATE\",\n\t\t\t\"DROP\",\n\t\t\t\"find\",\n\t\t\t\"insert\",\n\t\t\t\"update\",\n\t\t\t\"delete\"\n\t\t]\n\t},\n\t\"db.response.status_code\": {\n\t\t\"description\": \"Status code returned by the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.operation.batch.size\": {\n\t\t\"description\": \"Number of queries in a batch operation\",\n\t\t\"type\": \"number\"\n\t},\n\t\"db.query.summary\": {\n\t\t\"description\": \"Low-cardinality summary of a database query\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.query.text\": {\n\t\t\"description\": \"The actual database query being executed\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.stored_procedure.name\": {\n\t\t\"description\": \"Name of a stored procedure within the database\",\n\t\t\"type\": \"string\"\n\t},\n\t\"db.query.parameter.<key>\": {\n\t\t\"description\": \"Database query parameter values\",\n\t\t\"type\": \"string\"\n\t}\n};\nvar db_default = {\n\tnamespace: namespace$54,\n\tdescription: description$54,\n\tattributes: attributes$54\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/deployment.json\nvar namespace$53 = \"deployment\";\nvar description$53 = \"This document defines attributes for software deployments.\\n\";\nvar attributes$53 = {\n\t\"deployment.name\": {\n\t\t\"description\": \"The name of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"deploy my app\", \"deploy-frontend\"]\n\t},\n\t\"deployment.id\": {\n\t\t\"description\": \"The id of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1208\"]\n\t},\n\t\"deployment.status\": {\n\t\t\"description\": \"The status of the deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"failed\", \"succeeded\"]\n\t},\n\t\"deployment.environment.name\": {\n\t\t\"description\": \"Name of the [deployment environment](https://wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`deployment.environment.name` does not affect the uniqueness constraints defined through\\nthe `service.namespace`, `service.name` and `service.instance.id` resource attributes.\\nThis implies that resources carrying the following attribute combinations MUST be\\nconsidered to be identifying the same service:\\n\\n- `service.name=frontend`, `deployment.environment.name=production`\\n- `service.name=frontend`, `deployment.environment.name=staging`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"staging\", \"production\"]\n\t}\n};\nvar deployment_default = {\n\tnamespace: namespace$53,\n\tdescription: description$53,\n\tattributes: attributes$53\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/destination.json\nvar namespace$52 = \"destination\";\nvar description$52 = \"These attributes may be used to describe the receiver of a network exchange/packet. These should be used when there is no client/server relationship between the two sides, or when that relationship is unknown. This covers low-level network interactions (e.g. packet tracing) where you don't know if there was a connection or which side initiated it. This also covers unidirectional UDP flows and peer-to-peer communication where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server.\\n\";\nvar attributes$52 = {\n\t\"destination.address\": {\n\t\t\"description\": \"Destination address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the source side, and when communicating through an intermediary, `destination.address` SHOULD represent the destination address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"destination.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"destination.port\": {\n\t\t\"description\": \"Destination port number\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3389\", \"2888\"]\n\t}\n};\nvar destination_default = {\n\tnamespace: namespace$52,\n\tdescription: description$52,\n\tattributes: attributes$52\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/device.json\nvar namespace$51 = \"device\";\nvar description$51 = \"Describes device attributes.\\n\";\nvar attributes$51 = {\n\t\"device.id\": {\n\t\t\"description\": \"A unique identifier representing the device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Its value SHOULD be identical for all apps on a device and it SHOULD NOT change if an app is uninstalled and re-installed.\\nHowever, it might be resettable by the user for all apps on a device.\\nHardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be used as values.\\n\\nMore information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids).\\n\\n> [!WARNING]\\n>\\n> This attribute may contain sensitive (PII) information. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply,\\n> ensure you do your own due diligence.\\n>\\n> Due to these reasons, this identifier is not recommended for consumer applications and will likely result in rejection from both Google Play and App Store.\\n> However, it may be appropriate for specific enterprise scenarios, such as kiosk devices or enterprise-managed devices, with appropriate compliance clearance.\\n> Any instrumentation providing this identifier MUST implement it as an opt-in feature.\\n>\\n> See [`app.installation.id`](/docs/registry/attributes/app.md#app-installation-id) for a more privacy-preserving alternative.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123456789012345\", \"01:23:45:67:89:AB\"]\n\t},\n\t\"device.manufacturer\": {\n\t\t\"description\": \"The name of the device manufacturer\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The Android OS provides this field via [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). iOS apps SHOULD hardcode the value `Apple`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Apple\", \"Samsung\"]\n\t},\n\t\"device.model.identifier\": {\n\t\t\"description\": \"The model identifier for the device\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It's recommended this value represents a machine-readable version of the model identifier rather than the market or consumer-friendly name of the device.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"iPhone3,4\", \"SM-G920F\"]\n\t},\n\t\"device.model.name\": {\n\t\t\"description\": \"The marketing name for the device model\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"It's recommended this value represents a human-readable version of the device model rather than a machine-readable alternative.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"iPhone 6s Plus\", \"Samsung Galaxy S6\"]\n\t}\n};\nvar device_default = {\n\tnamespace: namespace$51,\n\tdescription: description$51,\n\tattributes: attributes$51\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/disk.json\nvar namespace$50 = \"disk\";\nvar description$50 = \"These attributes may be used for any disk related operation.\\n\";\nvar attributes$50 = { \"disk.io.direction\": {\n\t\"description\": \"The disk IO operation direction.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"read\", \"write\"]\n} };\nvar disk_default = {\n\tnamespace: namespace$50,\n\tdescription: description$50,\n\tattributes: attributes$50\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/dns.json\nvar namespace$49 = \"dns\";\nvar description$49 = \"This document defines the shared attributes used to report a DNS query.\\n\";\nvar attributes$49 = {\n\t\"dns.question.name\": {\n\t\t\"description\": \"The name being queried.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\\\\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \\\\t, \\\\r, and \\\\n respectively.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"www.example.com\", \"opentelemetry.io\"]\n\t},\n\t\"dns.answers\": {\n\t\t\"description\": \"The list of IPv4 or IPv6 addresses resolved during DNS lookup.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"10.0.0.1\\\",\\\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\\\"]\"]\n\t}\n};\nvar dns_default = {\n\tnamespace: namespace$49,\n\tdescription: description$49,\n\tattributes: attributes$49\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/dotnet.json\nvar namespace$48 = \"dotnet\";\nvar description$48 = \"This document defines .NET related attributes.\\n\";\nvar attributes$48 = { \"dotnet.gc.heap.generation\": {\n\t\"description\": \"Name of the garbage collector managed heap generation.\",\n\t\"type\": \"string\",\n\t\"stability\": \"stable\",\n\t\"examples\": [\n\t\t\"gen0\",\n\t\t\"gen1\",\n\t\t\"gen2\",\n\t\t\"loh\",\n\t\t\"poh\"\n\t]\n} };\nvar dotnet_default = {\n\tnamespace: namespace$48,\n\tdescription: description$48,\n\tattributes: attributes$48\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/elasticsearch.json\nvar namespace$47 = \"elasticsearch\";\nvar description$47 = \"This section defines attributes for Elasticsearch.\\n\";\nvar attributes$47 = { \"elasticsearch.node.name\": {\n\t\"description\": \"Represents the human-readable identifier of the node/instance to which a request was routed.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"instance-0000000001\"]\n} };\nvar elasticsearch_default = {\n\tnamespace: namespace$47,\n\tdescription: description$47,\n\tattributes: attributes$47\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/enduser.json\nvar namespace$46 = \"enduser\";\nvar description$46 = \"Describes the end user.\\n\";\nvar attributes$46 = {\n\t\"enduser.id\": {\n\t\t\"description\": \"Unique identifier of an end user in the system. It maybe a username, email address, or other identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Unique identifier of an end user in the system.\\n\\n> [!Warning]\\n> This field contains sensitive (PII) information.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"username\"]\n\t},\n\t\"enduser.pseudo.id\": {\n\t\t\"description\": \"Pseudonymous identifier of an end user. This identifier should be a random value that is not directly linked or associated with the end user's actual identity.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pseudonymous identifier of an end user.\\n\\n> [!Warning]\\n> This field contains sensitive (linkable PII) information.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"QdH5CAWJgqVT4rOr0qtumf\"]\n\t}\n};\nvar enduser_default = {\n\tnamespace: namespace$46,\n\tdescription: description$46,\n\tattributes: attributes$46\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/error.json\nvar namespace$45 = \"error\";\nvar description$45 = \"This document defines the shared attributes used to report an error.\\n\";\nvar attributes$45 = {\n\t\"error.type\": {\n\t\t\"description\": \"Describes a class of error the operation ended with.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The `error.type` SHOULD be predictable, and SHOULD have low cardinality.\\n\\nWhen `error.type` is set to a type (e.g., an exception type), its\\ncanonical class name identifying the type within the artifact SHOULD be used.\\n\\nInstrumentations SHOULD document the list of errors they report.\\n\\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\\nshould be prepared for `error.type` to have high cardinality at query time when no\\nadditional filters are applied.\\n\\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\\n\\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\\nit's RECOMMENDED to:\\n\\n- Use a domain-specific attribute\\n- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"_OTHER\"]\n\t},\n\t\"error.message\": {\n\t\t\"description\": \"A message providing more detail about an error in human-readable form.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`error.message` should provide additional context and detail about an error.\\nIt is NOT RECOMMENDED to duplicate the value of `error.type` in `error.message`.\\nIt is also NOT RECOMMENDED to duplicate the value of `exception.message` in `error.message`.\\n\\n`error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded cardinality and overlap with span status.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Unexpected input type: string\", \"The user has exceeded their storage quota\"]\n\t}\n};\nvar error_default = {\n\tnamespace: namespace$45,\n\tdescription: description$45,\n\tattributes: attributes$45\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/faas.json\nvar namespace$44 = \"faas\";\nvar description$44 = \"FaaS attributes\";\nvar attributes$44 = {\n\t\"faas.name\": {\n\t\t\"description\": \"The name of the single function that this runtime instance executes.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the name of the function as configured/deployed on the FaaS\\nplatform and is usually different from the name of the callback\\nfunction (which may be stored in the\\n[`code.namespace`/`code.function.name`](/docs/general/attributes.md#source-code-attributes)\\nspan attributes).\\n\\nFor some cloud providers, the above definition is ambiguous. The following\\ndefinition of function name MUST be used for this attribute\\n(and consequently the span name) for the listed cloud providers/products:\\n\\n- **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name\\n followed by a forward slash followed by the function name (this form\\n can also be seen in the resource JSON for the function).\\n This means that a span attribute MUST be used, as an Azure function\\n app can host multiple functions that would usually share\\n a TracerProvider (see also the `cloud.resource_id` attribute).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-function\", \"myazurefunctionapp/some-function-name\"]\n\t},\n\t\"faas.version\": {\n\t\t\"description\": \"The immutable version of the function being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Depending on the cloud provider and platform, use:\\n\\n- **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\\n (an integer represented as a decimal string).\\n- **Google Cloud Run (Services):** The [revision](https://cloud.google.com/run/docs/managing/revisions)\\n (i.e., the function name plus the revision suffix).\\n- **Google Cloud Functions:** The value of the\\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\\n- **Azure Functions:** Not applicable. Do not set this attribute.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"26\", \"pinkfroid-00002\"]\n\t},\n\t\"faas.instance\": {\n\t\t\"description\": \"The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"- **AWS Lambda:** Use the (full) log stream name.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de\"]\n\t},\n\t\"faas.max_memory\": {\n\t\t\"description\": \"The amount of memory available to the serverless function converted to Bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"134217728\"]\n\t},\n\t\"faas.trigger\": {\n\t\t\"description\": \"Type of the trigger which caused this function invocation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"datasource\",\n\t\t\t\"http\",\n\t\t\t\"pubsub\",\n\t\t\t\"timer\",\n\t\t\t\"other\"\n\t\t]\n\t},\n\t\"faas.invoked_name\": {\n\t\t\"description\": \"The name of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `faas.name` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-function\"]\n\t},\n\t\"faas.invoked_provider\": {\n\t\t\"description\": \"The cloud provider of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"alibaba_cloud\",\n\t\t\t\"aws\",\n\t\t\t\"azure\",\n\t\t\t\"gcp\",\n\t\t\t\"tencent_cloud\"\n\t\t]\n\t},\n\t\"faas.invoked_region\": {\n\t\t\"description\": \"The cloud region of the invoked function.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"eu-central-1\"]\n\t},\n\t\"faas.invocation_id\": {\n\t\t\"description\": \"The invocation ID of the current function invocation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"af9d5aa4-a685-4c5f-a22b-444f80b3cc28\"]\n\t},\n\t\"faas.time\": {\n\t\t\"description\": \"A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2020-01-23T13:47:06Z\"]\n\t},\n\t\"faas.cron\": {\n\t\t\"description\": \"A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0/5 * * * ? *\"]\n\t},\n\t\"faas.coldstart\": {\n\t\t\"description\": \"A boolean that is true if the serverless function is executed for the first time (aka cold-start).\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"faas.document.collection\": {\n\t\t\"description\": \"The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myBucketName\", \"myDbName\"]\n\t},\n\t\"faas.document.operation\": {\n\t\t\"description\": \"Describes the type of the operation that was performed on the data.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"insert\",\n\t\t\t\"edit\",\n\t\t\t\"delete\"\n\t\t]\n\t},\n\t\"faas.document.time\": {\n\t\t\"description\": \"A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2020-01-23T13:47:06Z\"]\n\t},\n\t\"faas.document.name\": {\n\t\t\"description\": \"The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myFile.txt\", \"myTableName\"]\n\t}\n};\nvar faas_default = {\n\tnamespace: namespace$44,\n\tdescription: description$44,\n\tattributes: attributes$44\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/feature_flags.json\nvar namespace$43 = \"feature_flags\";\nvar description$43 = \"This document defines attributes for Feature Flags.\\n\";\nvar attributes$43 = {\n\t\"feature_flag.key\": {\n\t\t\"description\": \"The lookup key of the feature flag.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"logo-color\"]\n\t},\n\t\"feature_flag.provider.name\": {\n\t\t\"description\": \"Identifies the feature flag provider.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"Flag Manager\"]\n\t},\n\t\"feature_flag.result.variant\": {\n\t\t\"description\": \"A semantic identifier for an evaluated flag value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A semantic identifier, commonly referred to as a variant, provides a means\\nfor referring to a value without including the value itself. This can\\nprovide additional context for understanding the meaning behind a value.\\nFor example, the variant `red` maybe be used for the value `#c05543`.\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"red\",\n\t\t\t\"true\",\n\t\t\t\"on\"\n\t\t]\n\t},\n\t\"feature_flag.context.id\": {\n\t\t\"description\": \"The unique identifier for the flag evaluation context. For example, the targeting key.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"5157782b-2203-4c80-a857-dbbd5e7761db\"]\n\t},\n\t\"feature_flag.version\": {\n\t\t\"description\": \"The version of the ruleset used during the evaluation. This may be any stable value which uniquely identifies the ruleset.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\"1\", \"01ABCDEF\"]\n\t},\n\t\"feature_flag.set.id\": {\n\t\t\"description\": \"The identifier of the [flag set](https://openfeature.dev/specification/glossary/#flag-set) to which the feature flag belongs.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"proj-1\",\n\t\t\t\"ab98sgs\",\n\t\t\t\"service1/dev\"\n\t\t]\n\t},\n\t\"feature_flag.result.reason\": {\n\t\t\"description\": \"The reason code which shows how a feature flag value was determined.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"static\",\n\t\t\t\"default\",\n\t\t\t\"targeting_match\",\n\t\t\t\"split\",\n\t\t\t\"cached\",\n\t\t\t\"disabled\",\n\t\t\t\"unknown\",\n\t\t\t\"stale\",\n\t\t\t\"error\"\n\t\t]\n\t},\n\t\"feature_flag.result.value\": {\n\t\t\"description\": \"The evaluated value of the feature flag.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"With some feature flag providers, feature flag results can be quite large or contain private or sensitive details.\\nBecause of this, `feature_flag.result.variant` is often the preferred attribute if it is available.\\n\\nIt may be desirable to redact or otherwise limit the size and scope of `feature_flag.result.value` if possible.\\nBecause the evaluated flag value is unstructured and may be any type, it is left to the instrumentation author to determine how best to achieve this.\\n\",\n\t\t\"stability\": \"release_candidate\",\n\t\t\"examples\": [\n\t\t\t\"#ff0000\",\n\t\t\t\"true\",\n\t\t\t\"3\"\n\t\t]\n\t}\n};\nvar feature_flags_default = {\n\tnamespace: namespace$43,\n\tdescription: description$43,\n\tattributes: attributes$43\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/file.json\nvar namespace$42 = \"file\";\nvar description$42 = \"Describes file attributes.\";\nvar attributes$42 = {\n\t\"file.accessed\": {\n\t\t\"description\": \"Time when the file was last accessed, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.attributes\": {\n\t\t\"description\": \"Array of file attributes.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Attributes names depend on the OS or file system. Here’s a non-exhaustive list of values expected for this attribute: `archive`, `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, `write`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"readonly\\\",\\\"hidden\\\"]\"]\n\t},\n\t\"file.created\": {\n\t\t\"description\": \"Time when the file was created, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute might not be supported by some file systems — NFS, FAT32, in embedded OS, etc.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.changed\": {\n\t\t\"description\": \"Time when the file attributes or metadata was last changed, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`file.changed` captures the time when any of the file's properties or attributes (including the content) are changed, while `file.modified` captures the timestamp when the file content is modified.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.directory\": {\n\t\t\"description\": \"Directory where the file is located. It should include the drive letter, when appropriate.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/home/user\", \"C:\\\\Program Files\\\\MyApp\"]\n\t},\n\t\"file.extension\": {\n\t\t\"description\": \"File extension, excluding the leading dot.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When the file name has multiple extensions (example.tar.gz), only the last one should be captured (\\\"gz\\\", not \\\"tar.gz\\\").\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"png\", \"gz\"]\n\t},\n\t\"file.fork_name\": {\n\t\t\"description\": \"Name of the fork. A fork is additional data associated with a filesystem object.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"On Linux, a resource fork is used to store additional data with a filesystem object. A file always has at least one fork for the data portion, and additional forks may exist.\\nOn NTFS, this is analogous to an Alternate Data Stream (ADS), and the default data stream for a file is just called $DATA. Zone.Identifier is commonly used by Windows to track contents downloaded from the Internet. An ADS is typically of the form: C:\\\\path\\\\to\\\\filename.extension:some_fork_name, and some_fork_name is the value that should populate `fork_name`. `filename.extension` should populate `file.name`, and `extension` should populate `file.extension`. The full path, `file.path`, will include the fork name.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Zone.Identifer\"]\n\t},\n\t\"file.group.id\": {\n\t\t\"description\": \"Primary Group ID (GID) of the file.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"file.group.name\": {\n\t\t\"description\": \"Primary group name of the file.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"users\"]\n\t},\n\t\"file.inode\": {\n\t\t\"description\": \"Inode representing the file in the filesystem.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"256383\"]\n\t},\n\t\"file.mode\": {\n\t\t\"description\": \"Mode of the file in octal representation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0640\"]\n\t},\n\t\"file.modified\": {\n\t\t\"description\": \"Time when the file content was last modified, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T12:00:00Z\"]\n\t},\n\t\"file.name\": {\n\t\t\"description\": \"Name of the file including the extension, without the directory.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"example.png\"]\n\t},\n\t\"file.owner.id\": {\n\t\t\"description\": \"The user ID (UID) or security identifier (SID) of the file owner.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"file.owner.name\": {\n\t\t\"description\": \"Username of the file owner.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"file.path\": {\n\t\t\"description\": \"Full path to the file, including the file name. It should include the drive letter, when appropriate.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/home/alice/example.png\", \"C:\\\\Program Files\\\\MyApp\\\\myapp.exe\"]\n\t},\n\t\"file.size\": {\n\t\t\"description\": \"File size in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"file.symbolic_link.target_path\": {\n\t\t\"description\": \"Path to the target of a symbolic link.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute is only applicable to symbolic links.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/usr/bin/python3\"]\n\t}\n};\nvar file_default = {\n\tnamespace: namespace$42,\n\tdescription: description$42,\n\tattributes: attributes$42\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/gcp.json\nvar namespace$41 = \"gcp\";\nvar description$41 = \"Attributes for Google Cloud client libraries.\\n\";\nvar attributes$41 = { \"gcp.client.service\": {\n\t\"description\": \"Identifies the Google Cloud service for which the official client library is intended.\",\n\t\"type\": \"string\",\n\t\"note\": \"Intended to be a stable identifier for Google Cloud client libraries that is uniform across implementation languages. The value should be derived from the canonical service domain for the service; for example, 'foo.googleapis.com' should result in a value of 'foo'.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"appengine\",\n\t\t\"run\",\n\t\t\"firestore\",\n\t\t\"alloydb\",\n\t\t\"spanner\"\n\t]\n} };\nvar gcp_default = {\n\tnamespace: namespace$41,\n\tdescription: description$41,\n\tattributes: attributes$41\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/gen_ai.json\nvar namespace$40 = \"gen_ai\";\nvar description$40 = \"This document defines the attributes used to describe telemetry in the context of Generative Artificial Intelligence (GenAI) Models requests and responses.\\n\";\nvar attributes$40 = {\n\t\"gen_ai.provider.name\": {\n\t\t\"description\": \"The Generative AI provider as identified by the client or server instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The attribute SHOULD be set based on the instrumentation's best\\nknowledge and may differ from the actual model provider.\\n\\nMultiple providers, including Azure OpenAI, Gemini, and AI hosting platforms\\nare accessible using the OpenAI REST API and corresponding client libraries,\\nbut may proxy or host models from different providers.\\n\\nThe `gen_ai.request.model`, `gen_ai.response.model`, and `server.address`\\nattributes may help identify the actual system in use.\\n\\nThe `gen_ai.provider.name` attribute acts as a discriminator that\\nidentifies the GenAI telemetry format flavor specific to that provider\\nwithin GenAI semantic conventions.\\nIt SHOULD be set consistently with provider-specific attributes and signals.\\nFor example, GenAI spans, metrics, and events related to AWS Bedrock\\nshould have the `gen_ai.provider.name` set to `aws.bedrock` and include\\napplicable `aws.bedrock.*` attributes and are not expected to include\\n`openai.*` attributes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"openai\",\n\t\t\t\"gcp.gen_ai\",\n\t\t\t\"gcp.vertex_ai\",\n\t\t\t\"gcp.gemini\",\n\t\t\t\"anthropic\",\n\t\t\t\"cohere\",\n\t\t\t\"azure.ai.inference\",\n\t\t\t\"azure.ai.openai\",\n\t\t\t\"ibm.watsonx.ai\",\n\t\t\t\"aws.bedrock\",\n\t\t\t\"perplexity\",\n\t\t\t\"x_ai\",\n\t\t\t\"deepseek\",\n\t\t\t\"groq\",\n\t\t\t\"mistral_ai\"\n\t\t]\n\t},\n\t\"gen_ai.request.model\": {\n\t\t\"description\": \"The name of the GenAI model a request is being made to.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gpt-4\"]\n\t},\n\t\"gen_ai.request.max_tokens\": {\n\t\t\"description\": \"The maximum number of tokens the model generates for a request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.request.choice.count\": {\n\t\t\"description\": \"The target number of candidate completions to return.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3\"]\n\t},\n\t\"gen_ai.request.temperature\": {\n\t\t\"description\": \"The temperature setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\"]\n\t},\n\t\"gen_ai.request.top_p\": {\n\t\t\"description\": \"The top_p sampling setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"gen_ai.request.top_k\": {\n\t\t\"description\": \"The top_k sampling setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"gen_ai.request.stop_sequences\": {\n\t\t\"description\": \"List of sequences that the model will use to stop generating further tokens.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"forest\\\",\\\"lived\\\"]\"]\n\t},\n\t\"gen_ai.request.frequency_penalty\": {\n\t\t\"description\": \"The frequency penalty setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"gen_ai.request.presence_penalty\": {\n\t\t\"description\": \"The presence penalty setting for the GenAI request.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"gen_ai.request.encoding_formats\": {\n\t\t\"description\": \"The encoding formats requested in an embeddings operation, if specified.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"base64\\\"]\", \"[\\\"float\\\",\\\"binary\\\"]\"]\n\t},\n\t\"gen_ai.request.seed\": {\n\t\t\"description\": \"Requests with same seed value more likely to return same result.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.response.id\": {\n\t\t\"description\": \"The unique identifier for the completion.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"chatcmpl-123\"]\n\t},\n\t\"gen_ai.response.model\": {\n\t\t\"description\": \"The name of the model that generated the response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gpt-4-0613\"]\n\t},\n\t\"gen_ai.response.finish_reasons\": {\n\t\t\"description\": \"Array of reasons the model stopped generating tokens, corresponding to each generation received.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"stop\\\"]\", \"[\\\"stop\\\",\\\"length\\\"]\"]\n\t},\n\t\"gen_ai.usage.input_tokens\": {\n\t\t\"description\": \"The number of tokens used in the GenAI input (prompt).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"100\"]\n\t},\n\t\"gen_ai.usage.output_tokens\": {\n\t\t\"description\": \"The number of tokens used in the GenAI response (completion).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"180\"]\n\t},\n\t\"gen_ai.token.type\": {\n\t\t\"description\": \"The type of token being counted.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"input\",\n\t\t\t\"output\",\n\t\t\t\"output\"\n\t\t]\n\t},\n\t\"gen_ai.conversation.id\": {\n\t\t\"description\": \"The unique identifier for a conversation (session, thread), used to store and correlate messages within this conversation.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"conv_5j66UpCpwteGg4YSxUnt7lPY\"]\n\t},\n\t\"gen_ai.agent.id\": {\n\t\t\"description\": \"The unique identifier of the GenAI agent.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"asst_5j66UpCpwteGg4YSxUnt7lPY\"]\n\t},\n\t\"gen_ai.agent.name\": {\n\t\t\"description\": \"Human-readable name of the GenAI agent provided by the application.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Math Tutor\", \"Fiction Writer\"]\n\t},\n\t\"gen_ai.agent.description\": {\n\t\t\"description\": \"Free-form description of the GenAI agent provided by the application.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Helps with math problems\", \"Generates fiction stories\"]\n\t},\n\t\"gen_ai.tool.name\": {\n\t\t\"description\": \"Name of the tool utilized by the agent.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Flights\"]\n\t},\n\t\"gen_ai.tool.call.id\": {\n\t\t\"description\": \"The tool call identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"call_mszuSIzqtI65i1wAUOE8w5H4\"]\n\t},\n\t\"gen_ai.tool.description\": {\n\t\t\"description\": \"The tool description.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Multiply two numbers\"]\n\t},\n\t\"gen_ai.tool.type\": {\n\t\t\"description\": \"Type of the tool utilized by the agent\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Extension: A tool executed on the agent-side to directly call external APIs, bridging the gap between the agent and real-world systems.\\n Agent-side operations involve actions that are performed by the agent on the server or within the agent's controlled environment.\\nFunction: A tool executed on the client-side, where the agent generates parameters for a predefined function, and the client executes the logic.\\n Client-side operations are actions taken on the user's end or within the client application.\\nDatastore: A tool used by the agent to access and query structured or unstructured external data for retrieval-augmented tasks or knowledge updates.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"function\",\n\t\t\t\"extension\",\n\t\t\t\"datastore\"\n\t\t]\n\t},\n\t\"gen_ai.data_source.id\": {\n\t\t\"description\": \"The data source identifier.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Data sources are used by AI agents and RAG applications to store grounding data. A data source may be an external database, object store, document collection, website, or any other storage system used by the GenAI agent or application. The `gen_ai.data_source.id` SHOULD match the identifier used by the GenAI system rather than a name specific to the external storage, such as a database or object store. Semantic conventions referencing `gen_ai.data_source.id` MAY also leverage additional attributes, such as `db.*`, to further identify and describe the data source.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"H7STPQYOND\"]\n\t},\n\t\"gen_ai.operation.name\": {\n\t\t\"description\": \"The name of the operation being performed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"chat\",\n\t\t\t\"generate_content\",\n\t\t\t\"text_completion\",\n\t\t\t\"embeddings\",\n\t\t\t\"create_agent\",\n\t\t\t\"invoke_agent\",\n\t\t\t\"execute_tool\"\n\t\t]\n\t},\n\t\"gen_ai.output.type\": {\n\t\t\"description\": \"Represents the content type requested by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute SHOULD be used when the client requests output of a specific type. The model may return zero or more outputs of this type.\\nThis attribute specifies the output modality and not the actual output format. For example, if an image is requested, the actual output could be a URL pointing to an image file.\\nAdditional output format details may be recorded in the future in the `gen_ai.output.{type}.*` attributes.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"text\",\n\t\t\t\"json\",\n\t\t\t\"image\",\n\t\t\t\"speech\"\n\t\t]\n\t}\n};\nvar gen_ai_default = {\n\tnamespace: namespace$40,\n\tdescription: description$40,\n\tattributes: attributes$40\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/geo.json\nvar namespace$39 = \"geo\";\nvar description$39 = \"Geo fields can carry data about a specific location related to an event. This geolocation information can be derived from techniques such as Geo IP, or be user-supplied.\\nNote: Geo attributes are typically used under another namespace, such as client.* and describe the location of the corresponding entity (device, end-user, etc). Semantic conventions that reference geo attributes (as a root namespace) or embed them (under their own namespace) SHOULD document what geo attributes describe in the scope of that convention.\\n\";\nvar attributes$39 = {\n\t\"geo.locality.name\": {\n\t\t\"description\": \"Locality name. Represents the name of a city, town, village, or similar populated place.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Montreal\", \"Berlin\"]\n\t},\n\t\"geo.continent.code\": {\n\t\t\"description\": \"Two-letter code representing continent’s name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"AF\",\n\t\t\t\"AN\",\n\t\t\t\"AS\",\n\t\t\t\"EU\",\n\t\t\t\"NA\",\n\t\t\t\"OC\",\n\t\t\t\"SA\"\n\t\t]\n\t},\n\t\"geo.country.iso_code\": {\n\t\t\"description\": \"Two-letter ISO Country Code ([ISO 3166-1 alpha2](https://wikipedia.org/wiki/ISO_3166-1#Codes)).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CA\"]\n\t},\n\t\"geo.location.lon\": {\n\t\t\"description\": \"Longitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"-73.61483\"]\n\t},\n\t\"geo.location.lat\": {\n\t\t\"description\": \"Latitude of the geo location in [WGS84](https://wikipedia.org/wiki/World_Geodetic_System#WGS84).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"45.505918\"]\n\t},\n\t\"geo.postal_code\": {\n\t\t\"description\": \"Postal code associated with the location. Values appropriate for this field may also be known as a postcode or ZIP code and will vary widely from country to country.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"94040\"]\n\t},\n\t\"geo.region.iso_code\": {\n\t\t\"description\": \"Region ISO code ([ISO 3166-2](https://wikipedia.org/wiki/ISO_3166-2)).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CA-QC\"]\n\t}\n};\nvar geo_default = {\n\tnamespace: namespace$39,\n\tdescription: description$39,\n\tattributes: attributes$39\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/go.json\nvar namespace$38 = \"go\";\nvar description$38 = \"This document defines Go related attributes.\\n\";\nvar attributes$38 = { \"go.memory.type\": {\n\t\"description\": \"The type of memory.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"stack\", \"other\"]\n} };\nvar go_default = {\n\tnamespace: namespace$38,\n\tdescription: description$38,\n\tattributes: attributes$38\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/graphql.json\nvar namespace$37 = \"graphql\";\nvar description$37 = \"This document defines attributes for GraphQL.\";\nvar attributes$37 = {\n\t\"graphql.operation.name\": {\n\t\t\"description\": \"The name of the operation being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"findBookById\"]\n\t},\n\t\"graphql.operation.type\": {\n\t\t\"description\": \"The type of the operation being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"query\",\n\t\t\t\"mutation\",\n\t\t\t\"subscription\"\n\t\t]\n\t},\n\t\"graphql.document\": {\n\t\t\"description\": \"The GraphQL document being executed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value may be sanitized to exclude sensitive information.\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"query findBookById { bookById(id: ?) { name } }\"]\n\t}\n};\nvar graphql_default = {\n\tnamespace: namespace$37,\n\tdescription: description$37,\n\tattributes: attributes$37\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/hardware.json\nvar namespace$36 = \"hardware\";\nvar description$36 = \"Attributes for hardware.\\n\";\nvar attributes$36 = {\n\t\"hw.id\": {\n\t\t\"description\": \"An identifier for the hardware component, unique within the monitored host\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"win32battery_battery_testsysa33_1\"]\n\t},\n\t\"hw.name\": {\n\t\t\"description\": \"An easily-recognizable name for the hardware component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"eth0\"]\n\t},\n\t\"hw.parent\": {\n\t\t\"description\": \"Unique identifier of the parent component (typically the `hw.id` attribute of the enclosure, or disk controller)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"dellStorage_perc_0\"]\n\t},\n\t\"hw.type\": {\n\t\t\"description\": \"Type of the component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Describes the category of the hardware component for which `hw.state` is being reported. For example, `hw.type=temperature` along with `hw.state=degraded` would indicate that the temperature of the hardware component has been reported as `degraded`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"battery\",\n\t\t\t\"cpu\",\n\t\t\t\"disk_controller\",\n\t\t\t\"enclosure\",\n\t\t\t\"fan\",\n\t\t\t\"gpu\",\n\t\t\t\"logical_disk\",\n\t\t\t\"memory\",\n\t\t\t\"network\",\n\t\t\t\"physical_disk\",\n\t\t\t\"power_supply\",\n\t\t\t\"tape_drive\",\n\t\t\t\"temperature\",\n\t\t\t\"voltage\"\n\t\t]\n\t},\n\t\"hw.state\": {\n\t\t\"description\": \"The current state of the component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"ok\",\n\t\t\t\"degraded\",\n\t\t\t\"failed\"\n\t\t]\n\t}\n};\nvar hardware_default = {\n\tnamespace: namespace$36,\n\tdescription: description$36,\n\tattributes: attributes$36\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/heroku.json\nvar namespace$35 = \"heroku\";\nvar description$35 = \"This document defines attributes for the Heroku platform on which application/s are running.\\n\";\nvar attributes$35 = {\n\t\"heroku.release.creation_timestamp\": {\n\t\t\"description\": \"Time and date the release was created\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2022-10-23T18:00:42Z\"]\n\t},\n\t\"heroku.release.commit\": {\n\t\t\"description\": \"Commit hash for the current release\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"e6134959463efd8966b20e75b913cafe3f5ec\"]\n\t},\n\t\"heroku.app.id\": {\n\t\t\"description\": \"Unique identifier for the application\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2daa2797-e42b-4624-9322-ec3f968df4da\"]\n\t}\n};\nvar heroku_default = {\n\tnamespace: namespace$35,\n\tdescription: description$35,\n\tattributes: attributes$35\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/host.json\nvar namespace$34 = \"host\";\nvar description$34 = \"A host is defined as a computing instance. For example, physical servers, virtual machines, switches or disk array.\\n\";\nvar attributes$34 = {\n\t\"host.id\": {\n\t\t\"description\": \"Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"fdbf79e8af94cb7f9e8df36789187052\"]\n\t},\n\t\"host.name\": {\n\t\t\"description\": \"Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-test\"]\n\t},\n\t\"host.type\": {\n\t\t\"description\": \"Type of host. For Cloud, this must be the machine type.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"n1-standard-1\"]\n\t},\n\t\"host.arch\": {\n\t\t\"description\": \"The CPU architecture the host system is running on.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"amd64\",\n\t\t\t\"arm32\",\n\t\t\t\"arm64\",\n\t\t\t\"ia64\",\n\t\t\t\"ppc32\",\n\t\t\t\"ppc64\",\n\t\t\t\"s390x\",\n\t\t\t\"x86\"\n\t\t]\n\t},\n\t\"host.image.name\": {\n\t\t\"description\": \"Name of the VM image or OS install the host was instantiated from.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"infra-ami-eks-worker-node-7d4ec78312\", \"CentOS-8-x86_64-1905\"]\n\t},\n\t\"host.image.id\": {\n\t\t\"description\": \"VM image ID or host OS image ID. For Cloud, this value is from the provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ami-07b06b442921831e5\"]\n\t},\n\t\"host.image.version\": {\n\t\t\"description\": \"The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0.1\"]\n\t},\n\t\"host.ip\": {\n\t\t\"description\": \"Available IP addresses of the host, excluding loopback interfaces.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses MUST be specified in the [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"192.168.1.140\\\",\\\"fe80::abc2:4a28:737a:609e\\\"]\"]\n\t},\n\t\"host.mac\": {\n\t\t\"description\": \"Available MAC addresses of the host, excluding loopback interfaces.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MAC Addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): as hyphen-separated octets in uppercase hexadecimal form from most to least significant.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"AC-DE-48-23-45-67\\\",\\\"AC-DE-48-23-45-67-01-9F\\\"]\"]\n\t},\n\t\"host.cpu.vendor.id\": {\n\t\t\"description\": \"Processor manufacturer identifier. A maximum 12-character string.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"[CPUID](https://wiki.osdev.org/CPUID) command returns the vendor ID string in EBX, EDX and ECX registers. Writing these to memory in this order results in a 12-character string.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"GenuineIntel\"]\n\t},\n\t\"host.cpu.family\": {\n\t\t\"description\": \"Family or generation of the CPU.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"6\", \"PA-RISC 1.1e\"]\n\t},\n\t\"host.cpu.model.id\": {\n\t\t\"description\": \"Model identifier. It provides more granular information about the CPU, distinguishing it from other CPUs within the same family.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"6\", \"9000/778/B180L\"]\n\t},\n\t\"host.cpu.model.name\": {\n\t\t\"description\": \"Model designation of the processor.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz\"]\n\t},\n\t\"host.cpu.stepping\": {\n\t\t\"description\": \"Stepping or core revisions.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"r1p1\"]\n\t},\n\t\"host.cpu.cache.l2.size\": {\n\t\t\"description\": \"The amount of level 2 memory cache available to the processor (in Bytes).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12288000\"]\n\t}\n};\nvar host_default = {\n\tnamespace: namespace$34,\n\tdescription: description$34,\n\tattributes: attributes$34\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/http.json\nvar namespace$33 = \"http\";\nvar description$33 = \"This document defines semantic convention attributes in the HTTP namespace.\";\nvar attributes$33 = {\n\t\"http.request.body.size\": {\n\t\t\"description\": \"The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3495\"]\n\t},\n\t\"http.request.header\": {\n\t\t\"description\": \"HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\\nIncluding all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nThe `User-Agent` header is already captured in the `user_agent.original` attribute.\\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\\n\\nThe attribute value MUST consist of either multiple header values as an array of strings\\nor a single-item array containing a possibly comma-concatenated string, depending on the way\\nthe HTTP library provides access to headers.\\n\\nExamples:\\n\\n- A header `Content-Type: application/json` SHOULD be recorded as the `http.request.header.content-type`\\n attribute with value `[\\\"application/json\\\"]`.\\n- A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` SHOULD be recorded as the `http.request.header.x-forwarded-for`\\n attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` or `[\\\"1.2.3.4, 1.2.3.5\\\"]` depending on the HTTP library.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"[\\\"application/json\\\"]\", \"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"http.request.method\": {\n\t\t\"description\": \"HTTP request method.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"HTTP request method value SHOULD be \\\"known\\\" to the instrumentation.\\nBy default, this convention defines \\\"known\\\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\\nand the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\\n\\nIf the HTTP request method is not known to instrumentation, it MUST set the `http.request.method` attribute to `_OTHER`.\\n\\nIf the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it MUST provide a way to override\\nthe list of known HTTP methods. If this override is done via environment variable, then the environment variable MUST be named\\nOTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\\n(this list MUST be a full override of the default known method, it is not a list of known methods in addition to the defaults).\\n\\nHTTP method names are case-sensitive and `http.request.method` attribute value MUST match a known HTTP method name exactly.\\nInstrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.\\nTracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"CONNECT\",\n\t\t\t\"DELETE\",\n\t\t\t\"GET\",\n\t\t\t\"HEAD\",\n\t\t\t\"OPTIONS\",\n\t\t\t\"PATCH\",\n\t\t\t\"POST\",\n\t\t\t\"PUT\",\n\t\t\t\"TRACE\",\n\t\t\t\"_OTHER\"\n\t\t]\n\t},\n\t\"http.request.method_original\": {\n\t\t\"description\": \"Original HTTP method sent by the client in the request line.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"GeT\",\n\t\t\t\"ACL\",\n\t\t\t\"foo\"\n\t\t]\n\t},\n\t\"http.request.resend_count\": {\n\t\t\"description\": \"The ordinal number of request resending attempt (for any reason, including redirects).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"The resend count SHOULD be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"3\"]\n\t},\n\t\"http.request.size\": {\n\t\t\"description\": \"The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1437\"]\n\t},\n\t\"http.response.body.size\": {\n\t\t\"description\": \"The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3495\"]\n\t},\n\t\"http.response.header\": {\n\t\t\"description\": \"HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which headers are to be captured.\\nIncluding all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nUsers MAY explicitly configure instrumentations to capture them even though it is not recommended.\\n\\nThe attribute value MUST consist of either multiple header values as an array of strings\\nor a single-item array containing a possibly comma-concatenated string, depending on the way\\nthe HTTP library provides access to headers.\\n\\nExamples:\\n\\n- A header `Content-Type: application/json` header SHOULD be recorded as the `http.request.response.content-type`\\n attribute with value `[\\\"application/json\\\"]`.\\n- A header `My-custom-header: abc, def` header SHOULD be recorded as the `http.response.header.my-custom-header`\\n attribute with value `[\\\"abc\\\", \\\"def\\\"]` or `[\\\"abc, def\\\"]` depending on the HTTP library.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"[\\\"application/json\\\"]\", \"[\\\"abc\\\",\\\"def\\\"]\"]\n\t},\n\t\"http.response.size\": {\n\t\t\"description\": \"The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1437\"]\n\t},\n\t\"http.response.status_code\": {\n\t\t\"description\": \"[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"200\"]\n\t},\n\t\"http.route\": {\n\t\t\"description\": \"The matched route, that is, the path template in the format used by the respective server framework.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.\\nSHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/users/:userID?\", \"{controller}/{action}/{id?}\"]\n\t},\n\t\"http.connection.state\": {\n\t\t\"description\": \"State of the HTTP connection in the HTTP connection pool.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"active\", \"idle\"]\n\t}\n};\nvar http_default = {\n\tnamespace: namespace$33,\n\tdescription: description$33,\n\tattributes: attributes$33\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/ios.json\nvar namespace$32 = \"ios\";\nvar description$32 = \"This group describes iOS-specific attributes.\\n\";\nvar attributes$32 = { \"ios.app.state\": {\n\t\"description\": \"This attribute represents the state of the application.\\n\",\n\t\"type\": \"string\",\n\t\"note\": \"The iOS lifecycle states are defined in the [UIApplicationDelegate documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate), and from which the `OS terminology` column values are derived.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"active\",\n\t\t\"inactive\",\n\t\t\"background\",\n\t\t\"foreground\",\n\t\t\"terminate\"\n\t]\n} };\nvar ios_default = {\n\tnamespace: namespace$32,\n\tdescription: description$32,\n\tattributes: attributes$32\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/jvm.json\nvar namespace$31 = \"jvm\";\nvar description$31 = \"This document defines Java Virtual machine related attributes.\\n\";\nvar attributes$31 = {\n\t\"jvm.gc.action\": {\n\t\t\"description\": \"Name of the garbage collector action.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"end of minor GC\", \"end of major GC\"]\n\t},\n\t\"jvm.gc.cause\": {\n\t\t\"description\": \"Name of the garbage collector cause.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector cause is generally obtained via [GarbageCollectionNotificationInfo#getGcCause()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcCause()).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"System.gc()\", \"Allocation Failure\"]\n\t},\n\t\"jvm.gc.name\": {\n\t\t\"description\": \"Name of the garbage collector.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"G1 Young Generation\", \"G1 Old Generation\"]\n\t},\n\t\"jvm.memory.type\": {\n\t\t\"description\": \"The type of memory.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"heap\", \"non_heap\"]\n\t},\n\t\"jvm.memory.pool.name\": {\n\t\t\"description\": \"Name of the memory pool.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"G1 Old Gen\",\n\t\t\t\"G1 Eden space\",\n\t\t\t\"G1 Survivor Space\"\n\t\t]\n\t},\n\t\"jvm.thread.daemon\": {\n\t\t\"description\": \"Whether the thread is daemon or not.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"stable\"\n\t},\n\t\"jvm.thread.state\": {\n\t\t\"description\": \"State of the thread.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"new\",\n\t\t\t\"runnable\",\n\t\t\t\"blocked\",\n\t\t\t\"waiting\",\n\t\t\t\"timed_waiting\",\n\t\t\t\"terminated\"\n\t\t]\n\t},\n\t\"jvm.buffer.pool.name\": {\n\t\t\"description\": \"Name of the buffer pool.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Pool names are generally obtained via [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"mapped\", \"direct\"]\n\t}\n};\nvar jvm_default = {\n\tnamespace: namespace$31,\n\tdescription: description$31,\n\tattributes: attributes$31\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/k8s.json\nvar namespace$30 = \"k8s\";\nvar description$30 = \"Kubernetes resource attributes.\\n\";\nvar attributes$30 = {\n\t\"k8s.cluster.name\": {\n\t\t\"description\": \"The name of the cluster.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-cluster\"]\n\t},\n\t\"k8s.cluster.uid\": {\n\t\t\"description\": \"A pseudo-ID for the cluster, set to the UID of the `kube-system` namespace.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"K8s doesn't have support for obtaining a cluster ID. If this is ever\\nadded, we will recommend collecting the `k8s.cluster.uid` through the\\nofficial APIs. In the meantime, we are able to use the `uid` of the\\n`kube-system` namespace as a proxy for cluster ID. Read on for the\\nrationale.\\n\\nEvery object created in a K8s cluster is assigned a distinct UID. The\\n`kube-system` namespace is used by Kubernetes itself and will exist\\nfor the lifetime of the cluster. Using the `uid` of the `kube-system`\\nnamespace is a reasonable proxy for the K8s ClusterID as it will only\\nchange if the cluster is rebuilt. Furthermore, Kubernetes UIDs are\\nUUIDs as standardized by\\n[ISO/IEC 9834-8 and ITU-T X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).\\nWhich states:\\n\\n> If generated according to one of the mechanisms defined in Rec.\\n> ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be\\n> different from all other UUIDs generated before 3603 A.D., or is\\n> extremely likely to be different (depending on the mechanism chosen).\\n\\nTherefore, UIDs between clusters should be extremely unlikely to\\nconflict.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"218fc5a9-a5f1-4b54-aa05-46717d0ab26d\"]\n\t},\n\t\"k8s.node.name\": {\n\t\t\"description\": \"The name of the Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"node-1\"]\n\t},\n\t\"k8s.node.uid\": {\n\t\t\"description\": \"The UID of the Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2\"]\n\t},\n\t\"k8s.node.label\": {\n\t\t\"description\": \"The label placed on the Node, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `kubernetes.io/arch` with value `arm64` SHOULD be recorded\\n as the `k8s.node.label.kubernetes.io/arch` attribute with value `\\\"arm64\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.node.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"arm64\", \"\"]\n\t},\n\t\"k8s.node.annotation\": {\n\t\t\"description\": \"The annotation placed on the Node, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `node.alpha.kubernetes.io/ttl` with value `0` SHOULD be recorded as\\n the `k8s.node.annotation.node.alpha.kubernetes.io/ttl` attribute with value `\\\"0\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n the `k8s.node.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.namespace.name\": {\n\t\t\"description\": \"The name of the namespace that the pod is running in.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"default\"]\n\t},\n\t\"k8s.namespace.label\": {\n\t\t\"description\": \"The label placed on the Namespace, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `kubernetes.io/metadata.name` with value `default` SHOULD be recorded\\n as the `k8s.namespace.label.kubernetes.io/metadata.name` attribute with value `\\\"default\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.namespace.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"default\", \"\"]\n\t},\n\t\"k8s.namespace.annotation\": {\n\t\t\"description\": \"The annotation placed on the Namespace, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `ttl` with value `0` SHOULD be recorded\\n as the `k8s.namespace.annotation.ttl` attribute with value `\\\"0\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.namespace.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.pod.uid\": {\n\t\t\"description\": \"The UID of the Pod.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.pod.name\": {\n\t\t\"description\": \"The name of the Pod.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry-pod-autoconf\"]\n\t},\n\t\"k8s.pod.label\": {\n\t\t\"description\": \"The label placed on the Pod, the `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `app` with value `my-app` SHOULD be recorded as\\n the `k8s.pod.label.app` attribute with value `\\\"my-app\\\"`.\\n- A label `mycompany.io/arch` with value `x64` SHOULD be recorded as\\n the `k8s.pod.label.mycompany.io/arch` attribute with value `\\\"x64\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.pod.label.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"my-app\",\n\t\t\t\"x64\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"k8s.pod.annotation\": {\n\t\t\"description\": \"The annotation placed on the Pod, the `<key>` being the annotation name, the value being the annotation value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `kubernetes.io/enforce-mountable-secrets` with value `true` SHOULD be recorded as\\n the `k8s.pod.annotation.kubernetes.io/enforce-mountable-secrets` attribute with value `\\\"true\\\"`.\\n- An annotation `mycompany.io/arch` with value `x64` SHOULD be recorded as\\n the `k8s.pod.annotation.mycompany.io/arch` attribute with value `\\\"x64\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n the `k8s.pod.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"true\",\n\t\t\t\"x64\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"k8s.container.name\": {\n\t\t\"description\": \"The name of the Container from Pod specification, must be unique within a Pod. Container runtime usually uses different globally unique name (`container.name`).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"redis\"]\n\t},\n\t\"k8s.container.restart_count\": {\n\t\t\"description\": \"Number of times the container was restarted. This attribute can be used to identify a particular container (running or stopped) within a container spec.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"k8s.container.status.last_terminated_reason\": {\n\t\t\"description\": \"Last terminated reason of the Container.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Evicted\", \"Error\"]\n\t},\n\t\"k8s.replicaset.uid\": {\n\t\t\"description\": \"The UID of the ReplicaSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.replicaset.name\": {\n\t\t\"description\": \"The name of the ReplicaSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.replicaset.label\": {\n\t\t\"description\": \"The label placed on the ReplicaSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `app` with value `guestbook` SHOULD be recorded\\n as the `k8s.replicaset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n the `k8s.replicaset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.replicaset.annotation\": {\n\t\t\"description\": \"The annotation placed on the ReplicaSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n as the `k8s.replicaset.annotation.replicas` attribute with value `\\\"0\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.replicaset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0\", \"\"]\n\t},\n\t\"k8s.replicationcontroller.uid\": {\n\t\t\"description\": \"The UID of the replication controller.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.replicationcontroller.name\": {\n\t\t\"description\": \"The name of the replication controller.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.resourcequota.uid\": {\n\t\t\"description\": \"The UID of the resource quota.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.resourcequota.name\": {\n\t\t\"description\": \"The name of the resource quota.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.deployment.uid\": {\n\t\t\"description\": \"The UID of the Deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.deployment.name\": {\n\t\t\"description\": \"The name of the Deployment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.deployment.label\": {\n\t\t\"description\": \"The label placed on the Deployment, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n as the `k8s.deployment.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n the `k8s.deployment.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.deployment.annotation\": {\n\t\t\"description\": \"The annotation placed on the Deployment, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n as the `k8s.deployment.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.deployment.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.statefulset.uid\": {\n\t\t\"description\": \"The UID of the StatefulSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.statefulset.name\": {\n\t\t\"description\": \"The name of the StatefulSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.statefulset.label\": {\n\t\t\"description\": \"The label placed on the StatefulSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `0` SHOULD be recorded\\n as the `k8s.statefulset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `injected` with empty string value SHOULD be recorded as\\n the `k8s.statefulset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.statefulset.annotation\": {\n\t\t\"description\": \"The annotation placed on the StatefulSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n as the `k8s.statefulset.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.statefulset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.daemonset.uid\": {\n\t\t\"description\": \"The UID of the DaemonSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.daemonset.name\": {\n\t\t\"description\": \"The name of the DaemonSet.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.daemonset.label\": {\n\t\t\"description\": \"The label placed on the DaemonSet, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `app` with value `guestbook` SHOULD be recorded\\n as the `k8s.daemonset.label.app` attribute with value `\\\"guestbook\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.daemonset.label.injected` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"guestbook\", \"\"]\n\t},\n\t\"k8s.daemonset.annotation\": {\n\t\t\"description\": \"The annotation placed on the DaemonSet, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `replicas` with value `1` SHOULD be recorded\\n as the `k8s.daemonset.annotation.replicas` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.daemonset.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.hpa.uid\": {\n\t\t\"description\": \"The UID of the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.hpa.name\": {\n\t\t\"description\": \"The name of the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.hpa.scaletargetref.kind\": {\n\t\t\"description\": \"The kind of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `kind` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Deployment\", \"StatefulSet\"]\n\t},\n\t\"k8s.hpa.scaletargetref.name\": {\n\t\t\"description\": \"The name of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `name` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-deployment\", \"my-statefulset\"]\n\t},\n\t\"k8s.hpa.scaletargetref.api_version\": {\n\t\t\"description\": \"The API version of the target resource to scale for the HorizontalPodAutoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"apps/v1\", \"autoscaling/v2\"]\n\t},\n\t\"k8s.hpa.metric.type\": {\n\t\t\"description\": \"The type of metric source for the horizontal pod autoscaler.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute reflects the `type` field of spec.metrics[] in the HPA.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Resource\", \"ContainerResource\"]\n\t},\n\t\"k8s.job.uid\": {\n\t\t\"description\": \"The UID of the Job.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.job.name\": {\n\t\t\"description\": \"The name of the Job.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.job.label\": {\n\t\t\"description\": \"The label placed on the Job, the `<key>` being the label name, the value being the label value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `jobtype` with value `ci` SHOULD be recorded\\n as the `k8s.job.label.jobtype` attribute with value `\\\"ci\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.job.label.automated` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ci\", \"\"]\n\t},\n\t\"k8s.job.annotation\": {\n\t\t\"description\": \"The annotation placed on the Job, the `<key>` being the annotation name, the value being the annotation value, even if the value is empty.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"\\nExamples:\\n\\n- A label `number` with value `1` SHOULD be recorded\\n as the `k8s.job.annotation.number` attribute with value `\\\"1\\\"`.\\n- A label `data` with empty string value SHOULD be recorded as\\n the `k8s.job.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\", \"\"]\n\t},\n\t\"k8s.cronjob.uid\": {\n\t\t\"description\": \"The UID of the CronJob.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"275ecb36-5aa8-4c2a-9c47-d8bb681b9aff\"]\n\t},\n\t\"k8s.cronjob.name\": {\n\t\t\"description\": \"The name of the CronJob.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"k8s.cronjob.label\": {\n\t\t\"description\": \"The label placed on the CronJob, the `<key>` being the label name, the value being the label value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- A label `type` with value `weekly` SHOULD be recorded as the\\n `k8s.cronjob.label.type` attribute with value `\\\"weekly\\\"`.\\n- A label `automated` with empty string value SHOULD be recorded as\\n the `k8s.cronjob.label.automated` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"weekly\", \"\"]\n\t},\n\t\"k8s.cronjob.annotation\": {\n\t\t\"description\": \"The cronjob annotation placed on the CronJob, the `<key>` being the annotation name, the value being the annotation value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- An annotation `retries` with value `4` SHOULD be recorded as the\\n `k8s.cronjob.annotation.retries` attribute with value `\\\"4\\\"`.\\n- An annotation `data` with empty string value SHOULD be recorded as\\n the `k8s.cronjob.annotation.data` attribute with value `\\\"\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"4\", \"\"]\n\t},\n\t\"k8s.volume.name\": {\n\t\t\"description\": \"The name of the K8s volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"volume0\"]\n\t},\n\t\"k8s.volume.type\": {\n\t\t\"description\": \"The type of the K8s volume.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"persistentVolumeClaim\",\n\t\t\t\"configMap\",\n\t\t\t\"downwardAPI\",\n\t\t\t\"emptyDir\",\n\t\t\t\"secret\",\n\t\t\t\"local\"\n\t\t]\n\t},\n\t\"k8s.namespace.phase\": {\n\t\t\"description\": \"The phase of the K8s namespace.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute aligns with the `phase` field of the\\n[K8s NamespaceStatus](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"active\", \"terminating\"]\n\t},\n\t\"k8s.node.condition.type\": {\n\t\t\"description\": \"The condition type of a K8s Node.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"K8s Node conditions as described\\nby [K8s documentation](https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition).\\n\\nThis attribute aligns with the `type` field of the\\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core)\\n\\nThe set of possible values is not limited to those listed here. Managed Kubernetes environments,\\nor custom controllers MAY introduce additional node condition types.\\nWhen this occurs, the exact value as reported by the Kubernetes API SHOULD be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Ready\",\n\t\t\t\"DiskPressure\",\n\t\t\t\"MemoryPressure\",\n\t\t\t\"PIDPressure\",\n\t\t\t\"NetworkUnavailable\"\n\t\t]\n\t},\n\t\"k8s.node.condition.status\": {\n\t\t\"description\": \"The status of the condition, one of True, False, Unknown.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This attribute aligns with the `status` field of the\\n[NodeCondition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"true\",\n\t\t\t\"false\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"k8s.container.status.state\": {\n\t\t\"description\": \"The state of the container. [K8s ContainerState](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"experimental\",\n\t\t\"examples\": [\n\t\t\t\"terminated\",\n\t\t\t\"running\",\n\t\t\t\"waiting\"\n\t\t]\n\t},\n\t\"k8s.container.status.reason\": {\n\t\t\"description\": \"The reason for the container state. Corresponds to the `reason` field of the: [K8s ContainerStateWaiting](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core) or [K8s ContainerStateTerminated](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"experimental\",\n\t\t\"examples\": [\n\t\t\t\"ContainerCreating\",\n\t\t\t\"CrashLoopBackOff\",\n\t\t\t\"CreateContainerConfigError\",\n\t\t\t\"ErrImagePull\",\n\t\t\t\"ImagePullBackOff\",\n\t\t\t\"OOMKilled\",\n\t\t\t\"Completed\",\n\t\t\t\"Error\",\n\t\t\t\"ContainerCannotRun\"\n\t\t]\n\t},\n\t\"k8s.hugepage.size\": {\n\t\t\"description\": \"The size (identifier) of the K8s huge page.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2Mi\"]\n\t},\n\t\"k8s.storageclass.name\": {\n\t\t\"description\": \"The name of K8s [StorageClass](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io) object.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"gold.storageclass.storage.k8s.io\"]\n\t},\n\t\"k8s.resourcequota.resource_name\": {\n\t\t\"description\": \"The name of the K8s resource a resource quota defines.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value for this attribute can be either the full `count/<resource>[.<group>]` string (e.g., count/deployments.apps, count/pods), or, for certain core Kubernetes resources, just the resource name (e.g., pods, services, configmaps). Both forms are supported by Kubernetes for object count quotas. See [Kubernetes Resource Quotas documentation](https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota) for more details.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"count/replicationcontrollers\"]\n\t}\n};\nvar k8s_default = {\n\tnamespace: namespace$30,\n\tdescription: description$30,\n\tattributes: attributes$30\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/linux.json\nvar namespace$29 = \"linux\";\nvar description$29 = \"Describes Linux Memory attributes\";\nvar attributes$29 = { \"linux.memory.slab.state\": {\n\t\"description\": \"The Linux Slab memory state\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"reclaimable\", \"unreclaimable\"]\n} };\nvar linux_default = {\n\tnamespace: namespace$29,\n\tdescription: description$29,\n\tattributes: attributes$29\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/log.json\nvar namespace$28 = \"log\";\nvar description$28 = \"This document defines log attributes\\n\";\nvar attributes$28 = { \"log.iostream\": {\n\t\"description\": \"The stream associated with the log. See below for a list of well-known values.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"stdout\", \"stderr\"]\n} };\nvar log_default = {\n\tnamespace: namespace$28,\n\tdescription: description$28,\n\tattributes: attributes$28\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/mcp.json\nvar namespace$27 = \"mcp\";\nvar description$27 = \"Model Context Protocol attributes for MCP tool calls and sessions\";\nvar attributes$27 = {\n\t\"mcp.tool.name\": {\n\t\t\"description\": \"Tool name (e.g., search_issues, search_events)\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"search_issues\",\n\t\t\t\"search_events\",\n\t\t\t\"get_issue_details\",\n\t\t\t\"update_issue\"\n\t\t]\n\t},\n\t\"mcp.session.id\": {\n\t\t\"description\": \"MCP session identifier\",\n\t\t\"type\": \"string\"\n\t},\n\t\"mcp.transport\": {\n\t\t\"description\": \"MCP transport protocol used\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"stdio\",\n\t\t\t\"http\",\n\t\t\t\"websocket\"\n\t\t]\n\t},\n\t\"mcp.request.id\": {\n\t\t\"description\": \"MCP request identifier\",\n\t\t\"type\": \"string\"\n\t},\n\t\"mcp.response.status\": {\n\t\t\"description\": \"MCP response status\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\"success\", \"error\"]\n\t},\n\t\"mcp.client.name\": {\n\t\t\"description\": \"Name of the MCP client application\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"Cursor\",\n\t\t\t\"Claude Code\",\n\t\t\t\"VSCode MCP Extension\",\n\t\t\t\"sentry-mcp-stdio\"\n\t\t]\n\t},\n\t\"mcp.client.version\": {\n\t\t\"description\": \"Version of the MCP client application\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"0.16.0\",\n\t\t\t\"1.0.0\",\n\t\t\t\"2.3.1\"\n\t\t]\n\t},\n\t\"mcp.server.name\": {\n\t\t\"description\": \"Name of the MCP server application\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"Sentry MCP Server\",\n\t\t\t\"GitHub MCP Server\",\n\t\t\t\"Slack MCP Server\"\n\t\t]\n\t},\n\t\"mcp.server.version\": {\n\t\t\"description\": \"Version of the MCP server application\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"0.1.0\",\n\t\t\t\"1.2.3\",\n\t\t\t\"2.0.0\"\n\t\t]\n\t},\n\t\"mcp.protocol.version\": {\n\t\t\"description\": \"MCP protocol version being used\",\n\t\t\"type\": \"string\",\n\t\t\"examples\": [\n\t\t\t\"2024-11-05\",\n\t\t\t\"1.0\",\n\t\t\t\"2.0\"\n\t\t]\n\t}\n};\nvar custom = true;\nvar mcp_default = {\n\tnamespace: namespace$27,\n\tdescription: description$27,\n\tattributes: attributes$27,\n\tcustom\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/messaging.json\nvar namespace$26 = \"messaging\";\nvar description$26 = \"Attributes describing telemetry around messaging systems and messaging activities.\";\nvar attributes$26 = {\n\t\"messaging.batch.message_count\": {\n\t\t\"description\": \"The number of messages sent, received, or processed in the scope of the batching operation.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"Instrumentations SHOULD NOT set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations SHOULD use `messaging.batch.message_count` for batching APIs and SHOULD NOT use it for single-message APIs.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"2\"\n\t\t]\n\t},\n\t\"messaging.client.id\": {\n\t\t\"description\": \"A unique identifier for the client that consumes or produces a message.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"client-5\", \"myhost@8742@s8083jm\"]\n\t},\n\t\"messaging.consumer.group.name\": {\n\t\t\"description\": \"The name of the consumer group with which a consumer is associated.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Semantic conventions for individual messaging systems SHOULD document whether `messaging.consumer.group.name` is applicable and what it means in the context of that system.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-group\", \"indexer\"]\n\t},\n\t\"messaging.destination.name\": {\n\t\t\"description\": \"The message destination name\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Destination name SHOULD uniquely identify a specific queue, topic or other entity within the broker. If\\nthe broker doesn't have such notion, the destination name SHOULD uniquely identify the broker.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MyQueue\", \"MyTopic\"]\n\t},\n\t\"messaging.destination.subscription.name\": {\n\t\t\"description\": \"The name of the destination subscription from which a message is consumed.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"subscription-a\"]\n\t},\n\t\"messaging.destination.template\": {\n\t\t\"description\": \"Low cardinality representation of the messaging destination name\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Destination names could be constructed from templates. An example would be a destination name involving a user name or product id. Although the destination name in this case is of high cardinality, the underlying template is of low cardinality and can be effectively used for grouping and aggregation.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/customers/{customerId}\"]\n\t},\n\t\"messaging.destination.anonymous\": {\n\t\t\"description\": \"A boolean that is true if the message destination is anonymous (could be unnamed or have auto-generated name).\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"messaging.destination.temporary\": {\n\t\t\"description\": \"A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"messaging.destination.partition.id\": {\n\t\t\"description\": \"The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1\"]\n\t},\n\t\"messaging.message.conversation_id\": {\n\t\t\"description\": \"The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \\\"Correlation ID\\\".\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MyConversationId\"]\n\t},\n\t\"messaging.message.envelope.size\": {\n\t\t\"description\": \"The size of the message body and metadata in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This can refer to both the compressed or uncompressed size. If both sizes are known, the uncompressed\\nsize should be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2738\"]\n\t},\n\t\"messaging.message.id\": {\n\t\t\"description\": \"A value used by the messaging system as an identifier for the message, represented as a string.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"452a7c7c7c7048c2f887f61572b18fc2\"]\n\t},\n\t\"messaging.message.body.size\": {\n\t\t\"description\": \"The size of the message body in bytes.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This can refer to both the compressed or uncompressed body size. If both sizes are known, the uncompressed\\nbody size should be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1439\"]\n\t},\n\t\"messaging.operation.type\": {\n\t\t\"description\": \"A string identifying the type of the messaging operation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If a custom value is used, it MUST be of low cardinality.\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"create\",\n\t\t\t\"send\",\n\t\t\t\"receive\",\n\t\t\t\"process\",\n\t\t\t\"settle\",\n\t\t\t\"deliver\",\n\t\t\t\"publish\"\n\t\t]\n\t},\n\t\"messaging.operation.name\": {\n\t\t\"description\": \"The system-specific name of the messaging operation.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"ack\",\n\t\t\t\"nack\",\n\t\t\t\"send\"\n\t\t]\n\t},\n\t\"messaging.system\": {\n\t\t\"description\": \"The messaging system as identified by the client instrumentation.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"activemq\",\n\t\t\t\"aws_sqs\",\n\t\t\t\"eventgrid\",\n\t\t\t\"eventhubs\",\n\t\t\t\"servicebus\",\n\t\t\t\"gcp_pubsub\",\n\t\t\t\"jms\",\n\t\t\t\"kafka\",\n\t\t\t\"rabbitmq\",\n\t\t\t\"rocketmq\",\n\t\t\t\"pulsar\"\n\t\t]\n\t}\n};\nvar messaging_default = {\n\tnamespace: namespace$26,\n\tdescription: description$26,\n\tattributes: attributes$26\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/network.json\nvar namespace$25 = \"network\";\nvar description$25 = \"These attributes may be used for any network related operation.\\n\";\nvar attributes$25 = {\n\t\"network.carrier.icc\": {\n\t\t\"description\": \"The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"DE\"]\n\t},\n\t\"network.carrier.mcc\": {\n\t\t\"description\": \"The mobile carrier country code.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"310\"]\n\t},\n\t\"network.carrier.mnc\": {\n\t\t\"description\": \"The mobile carrier network code.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"001\"]\n\t},\n\t\"network.carrier.name\": {\n\t\t\"description\": \"The name of the mobile carrier.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"sprint\"]\n\t},\n\t\"network.connection.subtype\": {\n\t\t\"description\": \"This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"gprs\",\n\t\t\t\"edge\",\n\t\t\t\"umts\",\n\t\t\t\"cdma\",\n\t\t\t\"evdo_0\",\n\t\t\t\"evdo_a\",\n\t\t\t\"cdma2000_1xrtt\",\n\t\t\t\"hsdpa\",\n\t\t\t\"hsupa\",\n\t\t\t\"hspa\",\n\t\t\t\"iden\",\n\t\t\t\"evdo_b\",\n\t\t\t\"lte\",\n\t\t\t\"ehrpd\",\n\t\t\t\"hspap\",\n\t\t\t\"gsm\",\n\t\t\t\"td_scdma\",\n\t\t\t\"iwlan\",\n\t\t\t\"nr\",\n\t\t\t\"nrnsa\",\n\t\t\t\"lte_ca\"\n\t\t]\n\t},\n\t\"network.connection.type\": {\n\t\t\"description\": \"The internet connection type.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"wifi\",\n\t\t\t\"wired\",\n\t\t\t\"cell\",\n\t\t\t\"unavailable\",\n\t\t\t\"unknown\"\n\t\t]\n\t},\n\t\"network.local.address\": {\n\t\t\"description\": \"Local address of the network connection - IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"10.1.2.80\", \"/tmp/my.sock\"]\n\t},\n\t\"network.local.port\": {\n\t\t\"description\": \"Local port number of the network connection.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t},\n\t\"network.peer.address\": {\n\t\t\"description\": \"Peer address of the network connection - IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"10.1.2.80\", \"/tmp/my.sock\"]\n\t},\n\t\"network.peer.port\": {\n\t\t\"description\": \"Peer port number of the network connection.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"65123\"]\n\t},\n\t\"network.protocol.name\": {\n\t\t\"description\": \"[OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"amqp\",\n\t\t\t\"http\",\n\t\t\t\"mqtt\"\n\t\t]\n\t},\n\t\"network.protocol.version\": {\n\t\t\"description\": \"The actual version of the protocol used for network communication.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute SHOULD be set to the negotiated version. If the actual protocol version is not known, this attribute SHOULD NOT be set.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"1.1\", \"2\"]\n\t},\n\t\"network.transport\": {\n\t\t\"description\": \"[OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\\n\\nConsider always setting the transport when setting a port number, since\\na port number is ambiguous without knowing the transport. For example\\ndifferent processes could be listening on TCP port 12345 and UDP port 12345.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"tcp\",\n\t\t\t\"udp\",\n\t\t\t\"pipe\",\n\t\t\t\"unix\",\n\t\t\t\"quic\"\n\t\t]\n\t},\n\t\"network.type\": {\n\t\t\"description\": \"[OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The value SHOULD be normalized to lowercase.\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"ipv4\", \"ipv6\"]\n\t},\n\t\"network.io.direction\": {\n\t\t\"description\": \"The network IO operation direction.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"transmit\", \"receive\"]\n\t},\n\t\"network.interface.name\": {\n\t\t\"description\": \"The network interface name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"lo\", \"eth0\"]\n\t},\n\t\"network.connection.state\": {\n\t\t\"description\": \"The state of network connection\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Connection states are defined as part of the [rfc9293](https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2)\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"closed\",\n\t\t\t\"close_wait\",\n\t\t\t\"closing\",\n\t\t\t\"established\",\n\t\t\t\"fin_wait_1\",\n\t\t\t\"fin_wait_2\",\n\t\t\t\"last_ack\",\n\t\t\t\"listen\",\n\t\t\t\"syn_received\",\n\t\t\t\"syn_sent\",\n\t\t\t\"time_wait\"\n\t\t]\n\t}\n};\nvar network_default = {\n\tnamespace: namespace$25,\n\tdescription: description$25,\n\tattributes: attributes$25\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/nodejs.json\nvar namespace$24 = \"nodejs\";\nvar description$24 = \"Describes Node.js related attributes.\";\nvar attributes$24 = { \"nodejs.eventloop.state\": {\n\t\"description\": \"The state of event loop time.\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"active\", \"idle\"]\n} };\nvar nodejs_default = {\n\tnamespace: namespace$24,\n\tdescription: description$24,\n\tattributes: attributes$24\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/oci.json\nvar namespace$23 = \"oci\";\nvar description$23 = \"An OCI image manifest.\\n\";\nvar attributes$23 = { \"oci.manifest.digest\": {\n\t\"description\": \"The digest of the OCI image manifest. For container images specifically is the digest by which the container image is known.\\n\",\n\t\"type\": \"string\",\n\t\"note\": \"Follows [OCI Image Manifest Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), and specifically the [Digest property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).\\nAn example can be found in [Example Image Manifest](https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest).\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4\"]\n} };\nvar oci_default = {\n\tnamespace: namespace$23,\n\tdescription: description$23,\n\tattributes: attributes$23\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/opentracing.json\nvar namespace$22 = \"opentracing\";\nvar description$22 = \"Attributes used by the OpenTracing Shim layer.\";\nvar attributes$22 = { \"opentracing.ref_type\": {\n\t\"description\": \"Parent-child Reference type\",\n\t\"type\": \"string\",\n\t\"note\": \"The causal relationship between a child Span and a parent Span.\\n\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"child_of\", \"follows_from\"]\n} };\nvar opentracing_default = {\n\tnamespace: namespace$22,\n\tdescription: description$22,\n\tattributes: attributes$22\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/os.json\nvar namespace$21 = \"os\";\nvar description$21 = \"The operating system (OS) on which the process represented by this resource is running.\\n\";\nvar attributes$21 = {\n\t\"os.type\": {\n\t\t\"description\": \"The operating system type.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"windows\",\n\t\t\t\"linux\",\n\t\t\t\"darwin\",\n\t\t\t\"freebsd\",\n\t\t\t\"netbsd\",\n\t\t\t\"openbsd\",\n\t\t\t\"dragonflybsd\",\n\t\t\t\"hpux\",\n\t\t\t\"aix\",\n\t\t\t\"solaris\",\n\t\t\t\"z_os\",\n\t\t\t\"zos\"\n\t\t]\n\t},\n\t\"os.description\": {\n\t\t\"description\": \"Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Microsoft Windows [Version 10.0.18363.778]\", \"Ubuntu 18.04.1 LTS\"]\n\t},\n\t\"os.name\": {\n\t\t\"description\": \"Human readable operating system name.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"iOS\",\n\t\t\t\"Android\",\n\t\t\t\"Ubuntu\"\n\t\t]\n\t},\n\t\"os.version\": {\n\t\t\"description\": \"The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14.2.1\", \"18.04.1\"]\n\t},\n\t\"os.build_id\": {\n\t\t\"description\": \"Unique identifier for a particular build or compilation of the operating system.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"TQ3C.230805.001.B2\",\n\t\t\t\"20E247\",\n\t\t\t\"22621\"\n\t\t]\n\t}\n};\nvar os_default = {\n\tnamespace: namespace$21,\n\tdescription: description$21,\n\tattributes: attributes$21\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/otel.json\nvar namespace$20 = \"otel\";\nvar description$20 = \"Attributes reserved for OpenTelemetry\";\nvar attributes$20 = {\n\t\"otel.status_code\": {\n\t\t\"description\": \"Name of the code, either \\\"OK\\\" or \\\"ERROR\\\". MUST NOT be set if the status code is UNSET.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"OK\", \"ERROR\"]\n\t},\n\t\"otel.status_description\": {\n\t\t\"description\": \"Description of the Status if it has a value, otherwise not set.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"resource not found\"]\n\t},\n\t\"otel.span.sampling_result\": {\n\t\t\"description\": \"The result value of the sampler for this span\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"DROP\",\n\t\t\t\"RECORD_ONLY\",\n\t\t\t\"RECORD_AND_SAMPLE\"\n\t\t]\n\t},\n\t\"otel.span.parent.origin\": {\n\t\t\"description\": \"Determines whether the span has a parent span, and if so, [whether it is a remote parent](https://opentelemetry.io/docs/specs/otel/trace/api/#isremote)\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"none\",\n\t\t\t\"local\",\n\t\t\t\"remote\"\n\t\t]\n\t}\n};\nvar otel_default = {\n\tnamespace: namespace$20,\n\tdescription: description$20,\n\tattributes: attributes$20\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/peer.json\nvar namespace$19 = \"peer\";\nvar description$19 = \"Operations that access some remote service.\\n\";\nvar attributes$19 = { \"peer.service\": {\n\t\"description\": \"The [`service.name`](/docs/resource/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"AuthTokenCache\"]\n} };\nvar peer_default = {\n\tnamespace: namespace$19,\n\tdescription: description$19,\n\tattributes: attributes$19\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/process.json\nvar namespace$18 = \"process\";\nvar description$18 = \"An operating system process.\\n\";\nvar attributes$18 = {\n\t\"process.pid\": {\n\t\t\"description\": \"Process identifier (PID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1234\"]\n\t},\n\t\"process.parent_pid\": {\n\t\t\"description\": \"Parent Process identifier (PPID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"111\"]\n\t},\n\t\"process.vpid\": {\n\t\t\"description\": \"Virtual process identifier.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"The process ID within a PID namespace. This is not necessarily unique across all processes on the host but it is unique within the process namespace that the process exists within.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"12\"]\n\t},\n\t\"process.session_leader.pid\": {\n\t\t\"description\": \"The PID of the process's session leader. This is also the session ID (SID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14\"]\n\t},\n\t\"process.group_leader.pid\": {\n\t\t\"description\": \"The PID of the process's group leader. This is also the process group ID (PGID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"23\"]\n\t},\n\t\"process.executable.build_id.gnu\": {\n\t\t\"description\": \"The GNU build ID as found in the `.note.gnu.build-id` ELF section (hex string).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"c89b11207f6479603b0d49bf291c092c2b719293\"]\n\t},\n\t\"process.executable.build_id.go\": {\n\t\t\"description\": \"The Go build ID as retrieved by `go tool buildid <go executable>`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY\"]\n\t},\n\t\"process.executable.build_id.htlhash\": {\n\t\t\"description\": \"Profiling specific build ID for executables. See the OTel specification for Profiles for more information.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"600DCAFE4A110000F2BF38C493F5FB92\"]\n\t},\n\t\"process.executable.name\": {\n\t\t\"description\": \"The name of the process executable. On Linux based systems, this SHOULD be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the base name of `GetProcessImageFileNameW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"otelcol\"]\n\t},\n\t\"process.executable.path\": {\n\t\t\"description\": \"The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/usr/bin/cmd/otelcol\"]\n\t},\n\t\"process.command\": {\n\t\t\"description\": \"The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"cmd/otelcol\"]\n\t},\n\t\"process.command_line\": {\n\t\t\"description\": \"The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"C:\\\\cmd\\\\otecol --config=\\\"my directory\\\\config.yaml\\\"\"]\n\t},\n\t\"process.command_args\": {\n\t\t\"description\": \"All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"cmd/otecol\\\",\\\"--config=config.yaml\\\"]\"]\n\t},\n\t\"process.args_count\": {\n\t\t\"description\": \"Length of the process.command_args array\\n\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This field can be useful for querying or performing bucket analysis on how many arguments were provided to start a process. More arguments may be an indication of suspicious activity.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"4\"]\n\t},\n\t\"process.owner\": {\n\t\t\"description\": \"The username of the user that owns the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"process.user.id\": {\n\t\t\"description\": \"The effective user ID (EUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1001\"]\n\t},\n\t\"process.user.name\": {\n\t\t\"description\": \"The username of the effective user of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"root\"]\n\t},\n\t\"process.real_user.id\": {\n\t\t\"description\": \"The real user ID (RUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1000\"]\n\t},\n\t\"process.real_user.name\": {\n\t\t\"description\": \"The username of the real user of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"operator\"]\n\t},\n\t\"process.saved_user.id\": {\n\t\t\"description\": \"The saved user ID (SUID) of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1002\"]\n\t},\n\t\"process.saved_user.name\": {\n\t\t\"description\": \"The username of the saved user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"operator\"]\n\t},\n\t\"process.runtime.name\": {\n\t\t\"description\": \"The name of the runtime of this process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"OpenJDK Runtime Environment\"]\n\t},\n\t\"process.runtime.version\": {\n\t\t\"description\": \"The version of the runtime of this process, as returned by the runtime without modification.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"14.0.2\"]\n\t},\n\t\"process.runtime.description\": {\n\t\t\"description\": \"An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0\"]\n\t},\n\t\"process.title\": {\n\t\t\"description\": \"Process title (proctitle)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In many Unix-like systems, process title (proctitle), is the string that represents the name or command line of a running process, displayed by system monitoring tools like ps, top, and htop.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"cat /etc/hostname\",\n\t\t\t\"xfce4-session\",\n\t\t\t\"bash\"\n\t\t]\n\t},\n\t\"process.creation.time\": {\n\t\t\"description\": \"The date and time the process was created, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2023-11-21T09:25:34.853Z\"]\n\t},\n\t\"process.exit.time\": {\n\t\t\"description\": \"The date and time the process exited, in ISO 8601 format.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2023-11-21T09:26:12.315Z\"]\n\t},\n\t\"process.exit.code\": {\n\t\t\"description\": \"The exit code of the process.\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"127\"]\n\t},\n\t\"process.interactive\": {\n\t\t\"description\": \"Whether the process is connected to an interactive shell.\\n\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"process.working_directory\": {\n\t\t\"description\": \"The working directory of the process.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"/root\"]\n\t},\n\t\"process.context_switch_type\": {\n\t\t\"description\": \"Specifies whether the context switches for this data point were voluntary or involuntary.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"voluntary\", \"involuntary\"]\n\t},\n\t\"process.paging.fault_type\": {\n\t\t\"description\": \"The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"major\", \"minor\"]\n\t},\n\t\"process.environment_variable\": {\n\t\t\"description\": \"Process environment variables, `<key>` being the environment variable name, the value being the environment variable value.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Examples:\\n\\n- an environment variable `USER` with value `\\\"ubuntu\\\"` SHOULD be recorded\\nas the `process.environment_variable.USER` attribute with value `\\\"ubuntu\\\"`.\\n\\n- an environment variable `PATH` with value `\\\"/usr/local/bin:/usr/bin\\\"`\\nSHOULD be recorded as the `process.environment_variable.PATH` attribute\\nwith value `\\\"/usr/local/bin:/usr/bin\\\"`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ubuntu\", \"/usr/local/bin:/usr/bin\"]\n\t}\n};\nvar process_default = {\n\tnamespace: namespace$18,\n\tdescription: description$18,\n\tattributes: attributes$18\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/profile.json\nvar namespace$17 = \"profile\";\nvar description$17 = \"Describes the origin of a single frame in a Profile.\\n\";\nvar attributes$17 = { \"profile.frame.type\": {\n\t\"description\": \"Describes the interpreter or compiler of a single frame.\\n\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\n\t\t\"dotnet\",\n\t\t\"jvm\",\n\t\t\"kernel\",\n\t\t\"native\",\n\t\t\"perl\",\n\t\t\"php\",\n\t\t\"cpython\",\n\t\t\"ruby\",\n\t\t\"v8js\",\n\t\t\"beam\",\n\t\t\"go\",\n\t\t\"rust\"\n\t]\n} };\nvar profile_default = {\n\tnamespace: namespace$17,\n\tdescription: description$17,\n\tattributes: attributes$17\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/rpc.json\nvar namespace$16 = \"rpc\";\nvar description$16 = \"This document defines attributes for remote procedure calls.\";\nvar attributes$16 = {\n\t\"rpc.connect_rpc.error_code\": {\n\t\t\"description\": \"The [error codes](https://connectrpc.com//docs/protocol/#error-codes) of the Connect request. Error codes are always string values.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"cancelled\",\n\t\t\t\"unknown\",\n\t\t\t\"invalid_argument\",\n\t\t\t\"deadline_exceeded\",\n\t\t\t\"not_found\",\n\t\t\t\"already_exists\",\n\t\t\t\"permission_denied\",\n\t\t\t\"resource_exhausted\",\n\t\t\t\"failed_precondition\",\n\t\t\t\"aborted\",\n\t\t\t\"out_of_range\",\n\t\t\t\"unimplemented\",\n\t\t\t\"internal\",\n\t\t\t\"unavailable\",\n\t\t\t\"data_loss\",\n\t\t\t\"unauthenticated\"\n\t\t]\n\t},\n\t\"rpc.connect_rpc.request.metadata\": {\n\t\t\"description\": \"Connect request metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` SHOULD be recorded as\\nthe `rpc.connect_rpc.request.metadata.my-custom-key` attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"rpc.connect_rpc.response.metadata\": {\n\t\t\"description\": \"Connect response metadata, `<key>` being the normalized Connect Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `\\\"attribute_value\\\"` SHOULD be recorded as\\nthe `rpc.connect_rpc.response.metadata.my-custom-key` attribute with value `[\\\"attribute_value\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"attribute_value\\\"]\"]\n\t},\n\t\"rpc.grpc.status_code\": {\n\t\t\"description\": \"The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"0\",\n\t\t\t\"1\",\n\t\t\t\"2\",\n\t\t\t\"3\",\n\t\t\t\"4\",\n\t\t\t\"5\",\n\t\t\t\"6\",\n\t\t\t\"7\",\n\t\t\t\"8\",\n\t\t\t\"9\",\n\t\t\t\"10\",\n\t\t\t\"11\",\n\t\t\t\"12\",\n\t\t\t\"13\",\n\t\t\t\"14\",\n\t\t\t\"15\",\n\t\t\t\"16\"\n\t\t]\n\t},\n\t\"rpc.grpc.request.metadata\": {\n\t\t\"description\": \"gRPC request metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all request metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]` SHOULD be recorded as\\n`rpc.grpc.request.metadata.my-custom-key` attribute with value `[\\\"1.2.3.4\\\", \\\"1.2.3.5\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"1.2.3.4\\\",\\\"1.2.3.5\\\"]\"]\n\t},\n\t\"rpc.grpc.response.metadata\": {\n\t\t\"description\": \"gRPC response metadata, `<key>` being the normalized gRPC Metadata key (lowercase), the value being the metadata values.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Instrumentations SHOULD require an explicit configuration of which metadata values are to be captured.\\nIncluding all response metadata values can be a security risk - explicit configuration helps avoid leaking sensitive information.\\n\\nFor example, a property `my-custom-key` with value `[\\\"attribute_value\\\"]` SHOULD be recorded as\\nthe `rpc.grpc.response.metadata.my-custom-key` attribute with value `[\\\"attribute_value\\\"]`\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"attribute_value\\\"]\"]\n\t},\n\t\"rpc.jsonrpc.error_code\": {\n\t\t\"description\": \"`error.code` property of response if it is an error response.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"-32700\", \"100\"]\n\t},\n\t\"rpc.jsonrpc.error_message\": {\n\t\t\"description\": \"`error.message` property of response if it is an error response.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Parse error\", \"User already exists\"]\n\t},\n\t\"rpc.jsonrpc.request_id\": {\n\t\t\"description\": \"`id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"10\",\n\t\t\t\"request-7\",\n\t\t\t\"\"\n\t\t]\n\t},\n\t\"rpc.jsonrpc.version\": {\n\t\t\"description\": \"Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't specify this, the value can be omitted.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2.0\", \"1.0\"]\n\t},\n\t\"rpc.method\": {\n\t\t\"description\": \"The name of the (logical) method being called, must be equal to the $method part in the span name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function.name` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"exampleMethod\"]\n\t},\n\t\"rpc.service\": {\n\t\t\"description\": \"The full (logical) name of the service being called, including its package name, if applicable.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"myservice.EchoService\"]\n\t},\n\t\"rpc.system\": {\n\t\t\"description\": \"A string identifying the remoting system. See below for a list of well-known identifiers.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"grpc\",\n\t\t\t\"java_rmi\",\n\t\t\t\"dotnet_wcf\",\n\t\t\t\"apache_dubbo\",\n\t\t\t\"connect_rpc\"\n\t\t]\n\t},\n\t\"rpc.message.type\": {\n\t\t\"description\": \"Whether this is a received or sent message.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SENT\", \"RECEIVED\"]\n\t},\n\t\"rpc.message.id\": {\n\t\t\"description\": \"MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"This way we guarantee that the values will be consistent between different implementations.\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"rpc.message.compressed_size\": {\n\t\t\"description\": \"Compressed size of the message in bytes.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t},\n\t\"rpc.message.uncompressed_size\": {\n\t\t\"description\": \"Uncompressed size of the message in bytes.\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\"\n\t}\n};\nvar rpc_default = {\n\tnamespace: namespace$16,\n\tdescription: description$16,\n\tattributes: attributes$16\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/server.json\nvar namespace$15 = \"server\";\nvar description$15 = \"These attributes may be used to describe the server in a connection-based network interaction where there is one side that initiates the connection (the client is the side that initiates the connection). This covers all TCP network interactions since TCP is connection-based and one side initiates the connection (an exception is made for peer-to-peer communication over TCP where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server). This also covers UDP network interactions where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.\\n\";\nvar attributes$15 = {\n\t\"server.address\": {\n\t\t\"description\": \"Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"server.port\": {\n\t\t\"description\": \"Server port number.\",\n\t\t\"type\": \"number\",\n\t\t\"note\": \"When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"80\",\n\t\t\t\"8080\",\n\t\t\t\"443\"\n\t\t]\n\t}\n};\nvar server_default = {\n\tnamespace: namespace$15,\n\tdescription: description$15,\n\tattributes: attributes$15\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/service.json\nvar namespace$14 = \"service\";\nvar description$14 = \"A service instance.\\n\";\nvar attributes$14 = {\n\t\"service.name\": {\n\t\t\"description\": \"Logical name of the service.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"shoppingcart\"]\n\t},\n\t\"service.version\": {\n\t\t\"description\": \"The version string of the service API or implementation. The format is not defined by these conventions.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"2.0.0\", \"a01dbef8a\"]\n\t},\n\t\"service.namespace\": {\n\t\t\"description\": \"A namespace for `service.name`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Shop\"]\n\t},\n\t\"service.instance.id\": {\n\t\t\"description\": \"The string ID of the service instance.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words\\n`service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to\\ndistinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled\\nservice).\\n\\nImplementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC\\n4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of\\nthis value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and\\nSHOULD use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\\n\\nUUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is\\nneeded. Similar to what can be seen in the man page for the\\n[`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying\\ndata, such as pod name and namespace should be treated as confidential, being the user's choice to expose it\\nor not via another resource attribute.\\n\\nFor applications running behind an application server (like unicorn), we do not recommend using one identifier\\nfor all processes participating in the application. Instead, it's recommended each division (e.g. a worker\\nthread in unicorn) to have its own instance.id.\\n\\nIt's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the\\nservice instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will\\nlikely be wrong, as the Collector might not know from which container within that pod the telemetry originated.\\nHowever, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance\\nfor that telemetry. This is typically the case for scraping receivers, as they know the target address and\\nport.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"627cc493-f310-47de-96bd-71410b7dec09\"]\n\t}\n};\nvar service_default = {\n\tnamespace: namespace$14,\n\tdescription: description$14,\n\tattributes: attributes$14\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/session.json\nvar namespace$13 = \"session\";\nvar description$13 = \"Session is defined as the period of time encompassing all activities performed by the application and the actions executed by the end user.\\nConsequently, a Session is represented as a collection of Logs, Events, and Spans emitted by the Client Application throughout the Session's duration. Each Session is assigned a unique identifier, which is included as an attribute in the Logs, Events, and Spans generated during the Session's lifecycle.\\nWhen a session reaches end of life, typically due to user inactivity or session timeout, a new session identifier will be assigned. The previous session identifier may be provided by the instrumentation so that telemetry backends can link the two sessions.\\n\";\nvar attributes$13 = {\n\t\"session.id\": {\n\t\t\"description\": \"A unique id to identify a session.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00112233-4455-6677-8899-aabbccddeeff\"]\n\t},\n\t\"session.previous_id\": {\n\t\t\"description\": \"The previous `session.id` for this user, when known.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"00112233-4455-6677-8899-aabbccddeeff\"]\n\t}\n};\nvar session_default = {\n\tnamespace: namespace$13,\n\tdescription: description$13,\n\tattributes: attributes$13\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/signalr.json\nvar namespace$12 = \"signalr\";\nvar description$12 = \"SignalR attributes\";\nvar attributes$12 = {\n\t\"signalr.connection.status\": {\n\t\t\"description\": \"SignalR HTTP connection closure status.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"normal_closure\",\n\t\t\t\"timeout\",\n\t\t\t\"app_shutdown\"\n\t\t]\n\t},\n\t\"signalr.transport\": {\n\t\t\"description\": \"[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"server_sent_events\",\n\t\t\t\"long_polling\",\n\t\t\t\"web_sockets\"\n\t\t]\n\t}\n};\nvar signalr_default = {\n\tnamespace: namespace$12,\n\tdescription: description$12,\n\tattributes: attributes$12\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/source.json\nvar namespace$11 = \"source\";\nvar description$11 = \"These attributes may be used to describe the sender of a network exchange/packet. These should be used when there is no client/server relationship between the two sides, or when that relationship is unknown. This covers low-level network interactions (e.g. packet tracing) where you don't know if there was a connection or which side initiated it. This also covers unidirectional UDP flows and peer-to-peer communication where the \\\"user-facing\\\" surface of the protocol / API doesn't expose a clear notion of client and server.\\n\";\nvar attributes$11 = {\n\t\"source.address\": {\n\t\t\"description\": \"Source address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"When observed from the destination side, and when communicating through an intermediary, `source.address` SHOULD represent the source address behind any intermediaries, for example proxies, if it's available.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"source.example.com\",\n\t\t\t\"10.1.2.80\",\n\t\t\t\"/tmp/my.sock\"\n\t\t]\n\t},\n\t\"source.port\": {\n\t\t\"description\": \"Source port number\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"3389\", \"2888\"]\n\t}\n};\nvar source_default = {\n\tnamespace: namespace$11,\n\tdescription: description$11,\n\tattributes: attributes$11\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/system.json\nvar namespace$10 = \"system\";\nvar description$10 = \"Describes System attributes\";\nvar attributes$10 = { \"system.device\": {\n\t\"description\": \"The device identifier\",\n\t\"type\": \"string\",\n\t\"stability\": \"development\",\n\t\"examples\": [\"(identifier)\"]\n} };\nvar system_default = {\n\tnamespace: namespace$10,\n\tdescription: description$10,\n\tattributes: attributes$10\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/telemetry.json\nvar namespace$9 = \"telemetry\";\nvar description$9 = \"This document defines attributes for telemetry SDK.\\n\";\nvar attributes$9 = {\n\t\"telemetry.sdk.name\": {\n\t\t\"description\": \"The name of the telemetry SDK as defined above.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.\\nIf another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the\\n`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\\nor another suitable identifier depending on the language.\\nThe identifier `opentelemetry` is reserved and MUST NOT be used in this case.\\nAll custom identifiers SHOULD be stable across different versions of an implementation.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"opentelemetry\"]\n\t},\n\t\"telemetry.sdk.language\": {\n\t\t\"description\": \"The language of the telemetry SDK.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"cpp\",\n\t\t\t\"dotnet\",\n\t\t\t\"erlang\",\n\t\t\t\"go\",\n\t\t\t\"java\",\n\t\t\t\"nodejs\",\n\t\t\t\"php\",\n\t\t\t\"python\",\n\t\t\t\"ruby\",\n\t\t\t\"rust\",\n\t\t\t\"swift\",\n\t\t\t\"webjs\"\n\t\t]\n\t},\n\t\"telemetry.sdk.version\": {\n\t\t\"description\": \"The version string of the telemetry SDK.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"1.2.3\"]\n\t},\n\t\"telemetry.distro.name\": {\n\t\t\"description\": \"The name of the auto instrumentation agent or distribution, if used.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to\\na string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"parts-unlimited-java\"]\n\t},\n\t\"telemetry.distro.version\": {\n\t\t\"description\": \"The version string of the auto instrumentation agent or distribution, if used.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.2.3\"]\n\t}\n};\nvar telemetry_default = {\n\tnamespace: namespace$9,\n\tdescription: description$9,\n\tattributes: attributes$9\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/test.json\nvar namespace$8 = \"test\";\nvar description$8 = \"This group describes attributes specific to [software tests](https://wikipedia.org/wiki/Software_testing).\\n\";\nvar attributes$8 = {\n\t\"test.suite.name\": {\n\t\t\"description\": \"The human readable name of a [test suite](https://wikipedia.org/wiki/Test_suite).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"TestSuite1\"]\n\t},\n\t\"test.suite.run.status\": {\n\t\t\"description\": \"The status of the test suite run.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"success\",\n\t\t\t\"failure\",\n\t\t\t\"skipped\",\n\t\t\t\"aborted\",\n\t\t\t\"timed_out\",\n\t\t\t\"in_progress\"\n\t\t]\n\t},\n\t\"test.case.name\": {\n\t\t\"description\": \"The fully qualified human readable name of the [test case](https://wikipedia.org/wiki/Test_case).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"org.example.TestCase1.test1\",\n\t\t\t\"example/tests/TestCase1.test1\",\n\t\t\t\"ExampleTestCase1_test1\"\n\t\t]\n\t},\n\t\"test.case.result.status\": {\n\t\t\"description\": \"The status of the actual test case result from test execution.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"pass\", \"fail\"]\n\t}\n};\nvar test_default = {\n\tnamespace: namespace$8,\n\tdescription: description$8,\n\tattributes: attributes$8\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/thread.json\nvar namespace$7 = \"thread\";\nvar description$7 = \"These attributes may be used for any operation to store information about a thread that started a span.\\n\";\nvar attributes$7 = {\n\t\"thread.id\": {\n\t\t\"description\": \"Current \\\"managed\\\" thread ID (as opposed to OS thread ID).\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"42\"]\n\t},\n\t\"thread.name\": {\n\t\t\"description\": \"Current thread name.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"main\"]\n\t}\n};\nvar thread_default = {\n\tnamespace: namespace$7,\n\tdescription: description$7,\n\tattributes: attributes$7\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/tls.json\nvar namespace$6 = \"tls\";\nvar description$6 = \"This document defines semantic convention attributes in the TLS namespace.\";\nvar attributes$6 = {\n\t\"tls.cipher\": {\n\t\t\"description\": \"String indicating the [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used during the current connection.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The values allowed for `tls.cipher` MUST be one of the `Descriptions` of the [registered TLS Cipher Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"TLS_RSA_WITH_3DES_EDE_CBC_SHA\", \"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256\"]\n\t},\n\t\"tls.client.certificate\": {\n\t\t\"description\": \"PEM-encoded stand-alone certificate offered by the client. This is usually mutually-exclusive of `client.certificate_chain` since this value also exists in that list.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MII...\"]\n\t},\n\t\"tls.client.certificate_chain\": {\n\t\t\"description\": \"Array of PEM-encoded certificates that make up the certificate chain offered by the client. This is usually mutually-exclusive of `client.certificate` since that value should be the first certificate in the chain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"MII...\\\",\\\"MI...\\\"]\"]\n\t},\n\t\"tls.client.hash.md5\": {\n\t\t\"description\": \"Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"]\n\t},\n\t\"tls.client.hash.sha1\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9E393D93138888D288266C2D915214D1D1CCEB2A\"]\n\t},\n\t\"tls.client.hash.sha256\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the client. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"]\n\t},\n\t\"tls.client.issuer\": {\n\t\t\"description\": \"Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"]\n\t},\n\t\"tls.client.ja3\": {\n\t\t\"description\": \"A hash that identifies clients based on how they perform an SSL/TLS handshake.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"d4e5b18d6b55c71272893221c96ba240\"]\n\t},\n\t\"tls.client.not_after\": {\n\t\t\"description\": \"Date/Time indicating when client certificate is no longer considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.client.not_before\": {\n\t\t\"description\": \"Date/Time indicating when client certificate is first considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1970-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.client.subject\": {\n\t\t\"description\": \"Distinguished name of subject of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=myclient, OU=Documentation Team, DC=example, DC=com\"]\n\t},\n\t\"tls.client.supported_ciphers\": {\n\t\t\"description\": \"Array of ciphers offered by the client during the client hello.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\\\",\\\"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384\\\"]\"]\n\t},\n\t\"tls.curve\": {\n\t\t\"description\": \"String indicating the curve used for the given cipher, when applicable\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"secp256r1\"]\n\t},\n\t\"tls.established\": {\n\t\t\"description\": \"Boolean flag indicating if the TLS negotiation was successful and transitioned to an encrypted tunnel.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"tls.next_protocol\": {\n\t\t\"description\": \"String indicating the protocol being tunneled. Per the values in the [IANA registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), this string should be lower case.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"http/1.1\"]\n\t},\n\t\"tls.protocol.name\": {\n\t\t\"description\": \"Normalized lowercase protocol name parsed from original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"ssl\", \"tls\"]\n\t},\n\t\"tls.protocol.version\": {\n\t\t\"description\": \"Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values)\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1.2\", \"3\"]\n\t},\n\t\"tls.resumed\": {\n\t\t\"description\": \"Boolean flag indicating if this TLS connection was resumed from an existing TLS negotiation.\",\n\t\t\"type\": \"boolean\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"true\"]\n\t},\n\t\"tls.server.certificate\": {\n\t\t\"description\": \"PEM-encoded stand-alone certificate offered by the server. This is usually mutually-exclusive of `server.certificate_chain` since this value also exists in that list.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"MII...\"]\n\t},\n\t\"tls.server.certificate_chain\": {\n\t\t\"description\": \"Array of PEM-encoded certificates that make up the certificate chain offered by the server. This is usually mutually-exclusive of `server.certificate` since that value should be the first certificate in the chain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"MII...\\\",\\\"MI...\\\"]\"]\n\t},\n\t\"tls.server.hash.md5\": {\n\t\t\"description\": \"Certificate fingerprint using the MD5 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC\"]\n\t},\n\t\"tls.server.hash.sha1\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA1 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"9E393D93138888D288266C2D915214D1D1CCEB2A\"]\n\t},\n\t\"tls.server.hash.sha256\": {\n\t\t\"description\": \"Certificate fingerprint using the SHA256 digest of DER-encoded version of certificate offered by the server. For consistency with other hash values, this value should be formatted as an uppercase hash.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0\"]\n\t},\n\t\"tls.server.issuer\": {\n\t\t\"description\": \"Distinguished name of [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of the issuer of the x.509 certificate presented by the client.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com\"]\n\t},\n\t\"tls.server.ja3s\": {\n\t\t\"description\": \"A hash that identifies servers based on how they perform an SSL/TLS handshake.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"d4e5b18d6b55c71272893221c96ba240\"]\n\t},\n\t\"tls.server.not_after\": {\n\t\t\"description\": \"Date/Time indicating when server certificate is no longer considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"2021-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.server.not_before\": {\n\t\t\"description\": \"Date/Time indicating when server certificate is first considered valid.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"1970-01-01T00:00:00.000Z\"]\n\t},\n\t\"tls.server.subject\": {\n\t\t\"description\": \"Distinguished name of subject of the x.509 certificate presented by the server.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"CN=myserver, OU=Documentation Team, DC=example, DC=com\"]\n\t}\n};\nvar tls_default = {\n\tnamespace: namespace$6,\n\tdescription: description$6,\n\tattributes: attributes$6\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/url.json\nvar namespace$5 = \"url\";\nvar description$5 = \"Attributes describing URL.\";\nvar attributes$5 = {\n\t\"url.domain\": {\n\t\t\"description\": \"Domain extracted from the `url.full`, such as \\\"opentelemetry.io\\\".\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In some cases a URL may refer to an IP and/or port directly, without a domain name. In this case, the IP address would go to the domain field. If the URL contains a [literal IPv6 address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by `[` and `]`, the `[` and `]` characters should also be captured in the domain field.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"www.foo.bar\",\n\t\t\t\"opentelemetry.io\",\n\t\t\t\"3.12.167.2\",\n\t\t\t\"[1080:0:0:0:8:800:200C:417A]\"\n\t\t]\n\t},\n\t\"url.extension\": {\n\t\t\"description\": \"The file extension extracted from the `url.full`, excluding the leading dot.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The file extension is only set if it exists, as not every url has a file extension. When the file name has multiple extensions `example.tar.gz`, only the last one should be captured `gz`, not `tar.gz`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"png\", \"gz\"]\n\t},\n\t\"url.fragment\": {\n\t\t\"description\": \"The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"SemConv\"]\n\t},\n\t\"url.full\": {\n\t\t\"description\": \"Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment\\nis not transmitted over HTTP, but if it is known, it SHOULD be included nevertheless.\\n\\n`url.full` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`.\\nIn such case username and password SHOULD be redacted and attribute's value SHOULD be `https://REDACTED:REDACTED@www.example.com/`.\\n\\n`url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed).\\n\\nSensitive content provided in `url.full` SHOULD be scrubbed when instrumentations can identify it.\\n\\n![Development](https://img.shields.io/badge/-development-blue)\\nQuery string values for the following keys SHOULD be redacted by default and replaced by the\\nvalue `REDACTED`:\\n\\n* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\\n* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\\n\\nThis list is subject to change over time.\\n\\nWhen a query string value is redacted, the query string key SHOULD still be preserved, e.g.\\n`https://www.example.com/path?color=blue&sig=REDACTED`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"//localhost\"]\n\t},\n\t\"url.original\": {\n\t\t\"description\": \"Unmodified original URL as seen in the event source.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not.\\n`url.original` might contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case password and username SHOULD NOT be redacted and attribute's value SHOULD remain the same.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://www.foo.bar/search?q=OpenTelemetry#SemConv\", \"search?q=OpenTelemetry\"]\n\t},\n\t\"url.path\": {\n\t\t\"description\": \"The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Sensitive content provided in `url.path` SHOULD be scrubbed when instrumentations can identify it.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"/search\"]\n\t},\n\t\"url.port\": {\n\t\t\"description\": \"Port extracted from the `url.full`\\n\",\n\t\t\"type\": \"number\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"443\"]\n\t},\n\t\"url.query\": {\n\t\t\"description\": \"The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Sensitive content provided in `url.query` SHOULD be scrubbed when instrumentations can identify it.\\n\\n![Development](https://img.shields.io/badge/-development-blue)\\nQuery string values for the following keys SHOULD be redacted by default and replaced by the value `REDACTED`:\\n\\n* [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\\n* [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\\n* [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\\n\\nThis list is subject to change over time.\\n\\nWhen a query string value is redacted, the query string key SHOULD still be preserved, e.g.\\n`q=OpenTelemetry&sig=REDACTED`.\\n\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\"q=OpenTelemetry\"]\n\t},\n\t\"url.registered_domain\": {\n\t\t\"description\": \"The highest registered url domain, stripped of the subdomain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value can be determined precisely with the [public suffix list](https://publicsuffix.org/). For example, the registered domain for `foo.example.com` is `example.com`. Trying to approximate this by simply taking the last two labels will not work well for TLDs such as `co.uk`.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"example.com\", \"foo.co.uk\"]\n\t},\n\t\"url.scheme\": {\n\t\t\"description\": \"The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"stable\",\n\t\t\"examples\": [\n\t\t\t\"https\",\n\t\t\t\"ftp\",\n\t\t\t\"telnet\"\n\t\t]\n\t},\n\t\"url.subdomain\": {\n\t\t\"description\": \"The subdomain portion of a fully qualified domain name includes all of the names except the host name under the registered_domain. In a partially qualified domain, or if the qualification level of the full name cannot be determined, subdomain contains all of the names below the registered domain.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, with no trailing period.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"east\", \"sub2.sub1\"]\n\t},\n\t\"url.template\": {\n\t\t\"description\": \"The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"/users/{id}\",\n\t\t\t\"/users/:id\",\n\t\t\t\"/users?id={id}\"\n\t\t]\n\t},\n\t\"url.top_level_domain\": {\n\t\t\"description\": \"The effective top level domain (eTLD), also known as the domain suffix, is the last part of the domain name. For example, the top level domain for example.com is `com`.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"This value can be determined precisely with the [public suffix list](https://publicsuffix.org/).\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"com\", \"co.uk\"]\n\t}\n};\nvar url_default = {\n\tnamespace: namespace$5,\n\tdescription: description$5,\n\tattributes: attributes$5\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/user.json\nvar namespace$4 = \"user\";\nvar description$4 = \"Describes information about the user.\";\nvar attributes$4 = {\n\t\"user.email\": {\n\t\t\"description\": \"User email address.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a.einstein@example.com\"]\n\t},\n\t\"user.full_name\": {\n\t\t\"description\": \"User's full name\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"Albert Einstein\"]\n\t},\n\t\"user.hash\": {\n\t\t\"description\": \"Unique user hash to correlate information for a user in anonymized form.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Useful if `user.id` or `user.name` contain confidential information and cannot be used.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"364fc68eaf4c8acec74a4e52d7d1feaa\"]\n\t},\n\t\"user.id\": {\n\t\t\"description\": \"Unique identifier of the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"S-1-5-21-202424912787-2692429404-2351956786-1000\"]\n\t},\n\t\"user.name\": {\n\t\t\"description\": \"Short name or login/username of the user.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"a.einstein\"]\n\t},\n\t\"user.roles\": {\n\t\t\"description\": \"Array of user roles at the time of the event.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"[\\\"admin\\\",\\\"reporting_user\\\"]\"]\n\t}\n};\nvar user_default = {\n\tnamespace: namespace$4,\n\tdescription: description$4,\n\tattributes: attributes$4\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/v8js.json\nvar namespace$3 = \"v8js\";\nvar description$3 = \"Describes V8 JS Engine Runtime related attributes.\";\nvar attributes$3 = {\n\t\"v8js.gc.type\": {\n\t\t\"description\": \"The type of garbage collection.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"major\",\n\t\t\t\"minor\",\n\t\t\t\"incremental\",\n\t\t\t\"weakcb\"\n\t\t]\n\t},\n\t\"v8js.heap.space.name\": {\n\t\t\"description\": \"The name of the space type of heap memory.\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Value can be retrieved from value `space_name` of [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics)\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"new_space\",\n\t\t\t\"old_space\",\n\t\t\t\"code_space\",\n\t\t\t\"map_space\",\n\t\t\t\"large_object_space\"\n\t\t]\n\t}\n};\nvar v8js_default = {\n\tnamespace: namespace$3,\n\tdescription: description$3,\n\tattributes: attributes$3\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/vcs.json\nvar namespace$2 = \"vcs\";\nvar description$2 = \"This group defines the attributes for [Version Control Systems (VCS)](https://wikipedia.org/wiki/Version_control).\\n\";\nvar attributes$2 = {\n\t\"vcs.repository.url.full\": {\n\t\t\"description\": \"The [canonical URL](https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical.) of the repository providing the complete HTTP(S) address in order to locate and identify the repository through a browser.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"In Git Version Control Systems, the canonical URL SHOULD NOT include\\nthe `.git` extension.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"https://github.com/opentelemetry/open-telemetry-collector-contrib\", \"https://gitlab.com/my-org/my-project/my-projects-project/repo\"]\n\t},\n\t\"vcs.repository.name\": {\n\t\t\"description\": \"The human readable name of the repository. It SHOULD NOT include any additional identifier like Group/SubGroup in GitLab or organization in GitHub.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"Due to it only being the name, it can clash with forks of the same\\nrepository if collecting telemetry across multiple orgs or groups in\\nthe same backends.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"semantic-conventions\", \"my-cool-repo\"]\n\t},\n\t\"vcs.ref.base.name\": {\n\t\t\"description\": \"The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-feature-branch\", \"tag-1-test\"]\n\t},\n\t\"vcs.ref.base.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.ref.base.revision\": {\n\t\t\"description\": \"The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`base` refers to the starting point of a change. For example, `main`\\nwould be the base reference of type branch if you've created a new\\nreference of type branch from it and created new commits. The\\nrevision can be a full [hash value (see\\nglossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),\\nof the recorded change to a ref within a repository pointing to a\\ncommit [commit](https://git-scm.com/docs/git-commit) object. It does\\nnot necessarily have to be a hash; it can simply define a [revision\\nnumber](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html)\\nwhich is an integer that is monotonically increasing. In cases where\\nit is identical to the `ref.base.name`, it SHOULD still be included.\\nIt is up to the implementer to decide which value to set as the\\nrevision based on the VCS system and situational context.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t\t\t\"main\",\n\t\t\t\"123\",\n\t\t\t\"HEAD\"\n\t\t]\n\t},\n\t\"vcs.ref.head.name\": {\n\t\t\"description\": \"The name of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as **branch** or **tag** in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"my-feature-branch\", \"tag-1-test\"]\n\t},\n\t\"vcs.ref.head.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.ref.head.revision\": {\n\t\t\"description\": \"The revision, literally [revised version](https://www.merriam-webster.com/dictionary/revision), The revision most often refers to a commit object in Git, or a revision number in SVN.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"note\": \"`head` refers to where you are right now; the current reference at a\\ngiven time.The revision can be a full [hash value (see\\nglossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf),\\nof the recorded change to a ref within a repository pointing to a\\ncommit [commit](https://git-scm.com/docs/git-commit) object. It does\\nnot necessarily have to be a hash; it can simply define a [revision\\nnumber](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html)\\nwhich is an integer that is monotonically increasing. In cases where\\nit is identical to the `ref.head.name`, it SHOULD still be included.\\nIt is up to the implementer to decide which value to set as the\\nrevision based on the VCS system and situational context.\\n\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc\",\n\t\t\t\"main\",\n\t\t\t\"123\",\n\t\t\t\"HEAD\"\n\t\t]\n\t},\n\t\"vcs.ref.type\": {\n\t\t\"description\": \"The type of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the repository.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"branch\", \"tag\"]\n\t},\n\t\"vcs.revision_delta.direction\": {\n\t\t\"description\": \"The type of revision comparison.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"behind\", \"ahead\"]\n\t},\n\t\"vcs.line_change.type\": {\n\t\t\"description\": \"The type of line change being measured on a branch or change.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"added\", \"removed\"]\n\t},\n\t\"vcs.change.title\": {\n\t\t\"description\": \"The human readable title of the change (pull request/merge request/changelist). This title is often a brief summary of the change and may get merged in to a ref as the commit summary.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"Fixes broken thing\",\n\t\t\t\"feat: add my new feature\",\n\t\t\t\"[chore] update dependency\"\n\t\t]\n\t},\n\t\"vcs.change.id\": {\n\t\t\"description\": \"The ID of the change (pull request/merge request/changelist) if applicable. This is usually a unique (within repository) identifier generated by the VCS system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"123\"]\n\t},\n\t\"vcs.change.state\": {\n\t\t\"description\": \"The state of the change (pull request/merge request/changelist).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"open\",\n\t\t\t\"wip\",\n\t\t\t\"closed\",\n\t\t\t\"merged\"\n\t\t]\n\t},\n\t\"vcs.owner.name\": {\n\t\t\"description\": \"The group owner within the version control system.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"my-org\",\n\t\t\t\"myteam\",\n\t\t\t\"business-unit\"\n\t\t]\n\t},\n\t\"vcs.provider.name\": {\n\t\t\"description\": \"The name of the version control system provider.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\n\t\t\t\"github\",\n\t\t\t\"gitlab\",\n\t\t\t\"gittea\",\n\t\t\t\"gitea\",\n\t\t\t\"bitbucket\"\n\t\t]\n\t}\n};\nvar vcs_default = {\n\tnamespace: namespace$2,\n\tdescription: description$2,\n\tattributes: attributes$2\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/webengine.json\nvar namespace$1 = \"webengine\";\nvar description$1 = \"This document defines the attributes used to describe the packaged software running the application code.\\n\";\nvar attributes$1 = {\n\t\"webengine.name\": {\n\t\t\"description\": \"The name of the web engine.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"WildFly\"]\n\t},\n\t\"webengine.version\": {\n\t\t\"description\": \"The version of the web engine.\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"21.0.0\"]\n\t},\n\t\"webengine.description\": {\n\t\t\"description\": \"Additional description of the web engine (e.g. detailed version and edition information).\\n\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final\"]\n\t}\n};\nvar webengine_default = {\n\tnamespace: namespace$1,\n\tdescription: description$1,\n\tattributes: attributes$1\n};\n\n//#endregion\n//#region src/internal/agents/tools/data/zos.json\nvar namespace = \"zos\";\nvar description = \"This document defines attributes of a z/OS resource.\\n\";\nvar attributes = {\n\t\"zos.smf.id\": {\n\t\t\"description\": \"The System Management Facility (SMF) Identifier uniquely identified a z/OS system within a SYSPLEX or mainframe environment and is used for system and performance analysis.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SYS1\"]\n\t},\n\t\"zos.sysplex.name\": {\n\t\t\"description\": \"The name of the SYSPLEX to which the z/OS system belongs too.\",\n\t\t\"type\": \"string\",\n\t\t\"stability\": \"development\",\n\t\t\"examples\": [\"SYSPLEX1\"]\n\t}\n};\nvar zos_default = {\n\tnamespace,\n\tdescription,\n\tattributes\n};\n\n//#endregion\n//#region src/internal/agents/tools/otel-semantics.ts\nconst namespaceData = {\n\tandroid: android_default,\n\tapp: app_default,\n\tartifact: artifact_default,\n\taspnetcore: aspnetcore_default,\n\taws: aws_default,\n\tazure: azure_default,\n\tbrowser: browser_default,\n\tcassandra: cassandra_default,\n\tcicd: cicd_default,\n\tclient: client_default,\n\tcloud: cloud_default,\n\tcloudevents: cloudevents_default,\n\tcloudfoundry: cloudfoundry_default,\n\tcode: code_default,\n\tcontainer: container_default,\n\tcpu: cpu_default,\n\tcpython: cpython_default,\n\tdatabase: database_default,\n\tdb: db_default,\n\tdeployment: deployment_default,\n\tdestination: destination_default,\n\tdevice: device_default,\n\tdisk: disk_default,\n\tdns: dns_default,\n\tdotnet: dotnet_default,\n\telasticsearch: elasticsearch_default,\n\tenduser: enduser_default,\n\terror: error_default,\n\tfaas: faas_default,\n\tfeature_flags: feature_flags_default,\n\tfile: file_default,\n\tgcp: gcp_default,\n\tgen_ai: gen_ai_default,\n\tgeo: geo_default,\n\tgo: go_default,\n\tgraphql: graphql_default,\n\thardware: hardware_default,\n\theroku: heroku_default,\n\thost: host_default,\n\thttp: http_default,\n\tios: ios_default,\n\tjvm: jvm_default,\n\tk8s: k8s_default,\n\tlinux: linux_default,\n\tlog: log_default,\n\tmcp: mcp_default,\n\tmessaging: messaging_default,\n\tnetwork: network_default,\n\tnodejs: nodejs_default,\n\toci: oci_default,\n\topentracing: opentracing_default,\n\tos: os_default,\n\totel: otel_default,\n\tpeer: peer_default,\n\tprocess: process_default,\n\tprofile: profile_default,\n\trpc: rpc_default,\n\tserver: server_default,\n\tservice: service_default,\n\tsession: session_default,\n\tsignalr: signalr_default,\n\tsource: source_default,\n\tsystem: system_default,\n\ttelemetry: telemetry_default,\n\ttest: test_default,\n\tthread: thread_default,\n\ttls: tls_default,\n\turl: url_default,\n\tuser: user_default,\n\tv8js: v8js_default,\n\tvcs: vcs_default,\n\twebengine: webengine_default,\n\tzos: zos_default\n};\n/**\n* Lookup OpenTelemetry semantic convention attributes for a given namespace\n*/\nasync function lookupOtelSemantics(namespace$73, dataset, apiService, organizationSlug, projectId) {\n\tconst normalizedNamespace = namespace$73.replace(/-/g, \"_\");\n\tconst data = namespaceData[normalizedNamespace];\n\tif (!data) {\n\t\tconst allNamespaces = Object.keys(namespaceData);\n\t\tconst suggestions = allNamespaces.filter((ns) => ns.includes(namespace$73) || namespace$73.includes(ns)).slice(0, 3);\n\t\treturn suggestions.length > 0 ? `Namespace '${namespace$73}' not found. Did you mean: ${suggestions.join(\", \")}?` : `Namespace '${namespace$73}' not found. Use 'list' to see all available namespaces.`;\n\t}\n\tlet response = `# OpenTelemetry Semantic Conventions: ${data.namespace}\\n\\n`;\n\tresponse += `${data.description}\\n\\n`;\n\tif (data.custom) response += \"**Note:** This is a custom namespace, not part of standard OpenTelemetry conventions.\\n\\n\";\n\tconst attributes$73 = Object.entries(data.attributes);\n\tresponse += `## Attributes (${attributes$73.length} total)\\n\\n`;\n\tconst sortedAttributes = attributes$73.sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [key, attr] of sortedAttributes) {\n\t\tresponse += `### \\`${key}\\`\\n`;\n\t\tresponse += `- **Type:** ${attr.type}\\n`;\n\t\tresponse += `- **Description:** ${attr.description}\\n`;\n\t\tif (attr.stability) response += `- **Stability:** ${attr.stability}\\n`;\n\t\tif (attr.examples && attr.examples.length > 0) response += `- **Examples:** ${attr.examples.map((ex) => `\\`${typeof ex === \"object\" ? JSON.stringify(ex) : String(ex)}\\``).join(\", \")}\\n`;\n\t\tif (attr.note) response += `- **Note:** ${attr.note}\\n`;\n\t\tresponse += \"\\n\";\n\t}\n\treturn response;\n}\n/**\n* Create the otel-semantics-lookup tool for AI agents\n*/\n/**\n* Create a tool for looking up OpenTelemetry semantic convention attributes\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createOtelLookupTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\treturn agentTool({\n\t\tdescription: \"Look up OpenTelemetry semantic convention attributes for a specific namespace. OpenTelemetry attributes are universal standards that work across all datasets.\",\n\t\tparameters: z.object({\n\t\t\tnamespace: z.string().describe(\"The OpenTelemetry namespace to look up (e.g., 'gen_ai', 'db', 'http', 'mcp')\"),\n\t\t\tdataset: z.enum([\n\t\t\t\t\"spans\",\n\t\t\t\t\"errors\",\n\t\t\t\t\"logs\"\n\t\t\t]).describe(\"REQUIRED: Dataset to check attribute availability in. The agent MUST specify this based on their chosen dataset.\")\n\t\t}),\n\t\texecute: async ({ namespace: namespace$73, dataset }) => {\n\t\t\treturn await lookupOtelSemantics(namespace$73, dataset, apiService, organizationSlug, projectId);\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createOtelLookupTool, lookupOtelSemantics };\n//# sourceMappingURL=otel-semantics-DEnkwUAq.js.map","import { agentTool } from \"./utils-Bq75Ba9Z.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/whoami.ts\n/**\n* Get the current authenticated user's information from Sentry API\n*/\nasync function getCurrentUser(apiService) {\n\tconst user = await apiService.getAuthenticatedUser();\n\treturn {\n\t\tid: user.id,\n\t\tname: user.name,\n\t\temail: user.email\n\t};\n}\n/**\n* Create a tool for getting current user information\n* The tool is pre-bound with the API service configured for the appropriate region\n*/\nfunction createWhoamiTool(options) {\n\tconst { apiService } = options;\n\treturn agentTool({\n\t\tdescription: \"Get the current authenticated user's information\",\n\t\tparameters: z.object({}),\n\t\texecute: async () => {\n\t\t\tconst user = await getCurrentUser(apiService);\n\t\t\treturn `Current user: ${user.name || \"Unknown\"} (${user.email}, ID: ${user.id})`;\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createWhoamiTool, getCurrentUser };\n//# sourceMappingURL=whoami-BHrE9F4J.js.map","import { agentTool } from \"./utils-Bq75Ba9Z.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/search-events/utils.ts\nfunction getStringValue(event, key, defaultValue = \"\") {\n\tconst value = event[key];\n\treturn typeof value === \"string\" ? value : defaultValue;\n}\nfunction getNumberValue(event, key) {\n\tconst value = event[key];\n\treturn typeof value === \"number\" ? value : void 0;\n}\nfunction isAggregateQuery(fields) {\n\treturn fields.some((field) => field.includes(\"(\") && field.includes(\")\"));\n}\nasync function fetchCustomAttributes(apiService, organizationSlug, dataset, projectId, timeParams) {\n\tconst customAttributes = {};\n\tconst fieldTypes = {};\n\tif (dataset === \"errors\") {\n\t\tconst tagsResponse = await apiService.listTags({\n\t\t\torganizationSlug,\n\t\t\tdataset: \"events\",\n\t\t\tproject: projectId,\n\t\t\tstatsPeriod: \"14d\",\n\t\t\tuseCache: true,\n\t\t\tuseFlagsBackend: true\n\t\t});\n\t\tfor (const tag of tagsResponse) if (tag.key && !tag.key.startsWith(\"sentry:\")) customAttributes[tag.key] = tag.name || tag.key;\n\t} else {\n\t\tconst itemType = dataset === \"logs\" ? \"logs\" : \"spans\";\n\t\tconst attributesResponse = await apiService.listTraceItemAttributes({\n\t\t\torganizationSlug,\n\t\t\titemType,\n\t\t\tproject: projectId,\n\t\t\tstatsPeriod: \"14d\"\n\t\t});\n\t\tfor (const attr of attributesResponse) if (attr.key && !attr.key.startsWith(\"sentry:\")) {\n\t\t\tcustomAttributes[attr.key] = attr.name || attr.key;\n\t\t\tif (attr.type && (attr.type === \"string\" || attr.type === \"number\")) fieldTypes[attr.key] = attr.type;\n\t\t}\n\t}\n\treturn {\n\t\tattributes: customAttributes,\n\t\tfieldTypes\n\t};\n}\n/**\n* Create a tool for the agent to query available attributes by dataset\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createDatasetAttributesTool(options) {\n\tconst { apiService, organizationSlug, projectId } = options;\n\treturn agentTool({\n\t\tdescription: \"Query available attributes and fields for a specific Sentry dataset to understand what data is available\",\n\t\tparameters: z.object({ dataset: z.enum([\n\t\t\t\"spans\",\n\t\t\t\"errors\",\n\t\t\t\"logs\"\n\t\t]).describe(\"The dataset to query attributes for\") }),\n\t\texecute: async ({ dataset }) => {\n\t\t\tconst { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS, NUMERIC_FIELDS } = await import(\"./tools/search-events/config.js\");\n\t\t\tconst { attributes: customAttributes, fieldTypes } = await fetchCustomAttributes(apiService, organizationSlug, dataset, projectId);\n\t\t\tconst allFields = {\n\t\t\t\t...BASE_COMMON_FIELDS,\n\t\t\t\t...DATASET_FIELDS[dataset],\n\t\t\t\t...customAttributes\n\t\t\t};\n\t\t\tconst recommendedFields = RECOMMENDED_FIELDS[dataset];\n\t\t\tconst allFieldTypes = { ...fieldTypes };\n\t\t\tconst staticNumericFields = NUMERIC_FIELDS[dataset] || /* @__PURE__ */ new Set();\n\t\t\tfor (const field of staticNumericFields) allFieldTypes[field] = \"number\";\n\t\t\treturn `Dataset: ${dataset}\n\nAvailable Fields (${Object.keys(allFields).length} total):\n${Object.entries(allFields).slice(0, 50).map(([key, desc]) => `- ${key}: ${desc}`).join(\"\\n\")}\n${Object.keys(allFields).length > 50 ? `\\n... and ${Object.keys(allFields).length - 50} more fields` : \"\"}\n\nRecommended Fields for ${dataset}:\n${recommendedFields.basic.map((f) => `- ${f}`).join(\"\\n\")}\n\nField Types (CRITICAL for aggregate functions):\n${Object.entries(allFieldTypes).slice(0, 30).map(([key, type]) => `- ${key}: ${type}`).join(\"\\n\")}\n${Object.keys(allFieldTypes).length > 30 ? `\\n... and ${Object.keys(allFieldTypes).length - 30} more fields` : \"\"}\n\nIMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.\n\nUse this information to construct appropriate queries for the ${dataset} dataset.`;\n\t\t}\n\t});\n}\n\n//#endregion\nexport { createDatasetAttributesTool, fetchCustomAttributes, getNumberValue, getStringValue, isAggregateQuery };\n//# sourceMappingURL=utils-EGQqk2W7.js.map","import { ConfigurationError } from \"./errors-BXmNwD2K.js\";\nimport { callEmbeddedAgent } from \"./callEmbeddedAgent-CX8bB_WX.js\";\nimport { createOtelLookupTool } from \"./otel-semantics-DEnkwUAq.js\";\nimport { createWhoamiTool } from \"./whoami-BHrE9F4J.js\";\nimport { createDatasetAttributesTool } from \"./utils-EGQqk2W7.js\";\nimport { systemPrompt } from \"./config-DtimzxvV.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/search-events/agent.ts\nconst searchEventsAgentOutputSchema = z.object({\n\tdataset: z.enum([\n\t\t\"spans\",\n\t\t\"errors\",\n\t\t\"logs\"\n\t]).describe(\"Which dataset to use for the query\"),\n\tquery: z.string().describe(\"The Sentry query string for filtering results\"),\n\tfields: z.array(z.string()).describe(\"Array of field names to return in results.\"),\n\tsort: z.string().describe(\"Sort parameter for results.\"),\n\ttimeRange: z.union([\n\t\tz.object({ statsPeriod: z.string().describe(\"Relative time period like '1h', '24h', '7d'\") }),\n\t\tz.object({\n\t\t\tstart: z.string().describe(\"ISO 8601 start time\"),\n\t\t\tend: z.string().describe(\"ISO 8601 end time\")\n\t\t}),\n\t\tz.null()\n\t]).describe(\"Time range for filtering events. Use either statsPeriod for relative time or start/end for absolute time.\"),\n\texplanation: z.string().describe(\"Brief explanation of how you translated this query.\")\n}).refine((data) => {\n\tif (!data.sort || !data.fields || data.fields.length === 0) return true;\n\tconst sortField = data.sort.startsWith(\"-\") ? data.sort.substring(1) : data.sort;\n\treturn data.fields.includes(sortField);\n}, { message: \"Sort field must be included in the fields array. Sentry requires that any field used for sorting must also be explicitly selected. Add the sort field to the fields array or choose a different sort field that's already included.\" });\n/**\n* Search events agent - single entry point for translating natural language queries to Sentry search syntax\n* This returns both the translated query result AND the tool calls made by the agent\n*/\nasync function searchEventsAgent(options) {\n\tif (!process.env.OPENAI_API_KEY) throw new ConfigurationError(\"OPENAI_API_KEY environment variable is required for semantic search\");\n\tconst datasetAttributesTool = createDatasetAttributesTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst otelLookupTool = createOtelLookupTool({\n\t\tapiService: options.apiService,\n\t\torganizationSlug: options.organizationSlug,\n\t\tprojectId: options.projectId\n\t});\n\tconst whoamiTool = createWhoamiTool({ apiService: options.apiService });\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt: options.query,\n\t\ttools: {\n\t\t\tdatasetAttributes: datasetAttributesTool,\n\t\t\totelSemantics: otelLookupTool,\n\t\t\twhoami: whoamiTool\n\t\t},\n\t\tschema: searchEventsAgentOutputSchema\n\t});\n}\n\n//#endregion\nexport { searchEventsAgent, searchEventsAgentOutputSchema };\n//# sourceMappingURL=agent-DUcsM6ug.js.map","import { getStringValue, isAggregateQuery } from \"./utils-EGQqk2W7.js\";\nimport * as Sentry from \"@sentry/node\";\n\n//#region src/tools/search-events/formatters.ts\n/**\n* Format an explanation for how a natural language query was translated\n*/\nfunction formatExplanation(explanation) {\n\treturn `## How I interpreted your query\\n\\n${explanation}`;\n}\n/**\n* Format error event results for display\n*/\nfunction formatErrorResults(params) {\n\tconst { eventData, naturalLanguageQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n\telse output += `⚠️ **IMPORTANT**: Display these errors as highlighted alert cards with color-coded severity levels and clickable Event IDs.\\n\\n`;\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += `**View these results in Sentry**:\\n${explorerUrl}\\n`;\n\toutput += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\tif (eventData.length === 0) {\n\t\tSentry.logger.info(Sentry.logger.fmt`No error events found for query: ${naturalLanguageQuery}`, {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"errors\"\n\t\t});\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"error\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"title\",\n\t\t\t\"issue\",\n\t\t\t\"project\",\n\t\t\t\"level\",\n\t\t\t\"error.type\",\n\t\t\t\"message\",\n\t\t\t\"culprit\",\n\t\t\t\"timestamp\",\n\t\t\t\"last_seen()\",\n\t\t\t\"count()\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"title\") || getStringValue(event, \"message\") || getStringValue(event, \"error.value\") || \"Error Event\";\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"issue\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Issue ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else output += `**${field}**: ${value}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `**${key}**: ${value}\\n`;\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- Get more details about a specific error: Use the Issue ID\\n\";\n\toutput += \"- View error groups: Navigate to the Issues page in Sentry\\n\";\n\toutput += \"- Set up alerts: Configure alert rules for these error patterns\\n\";\n\treturn output;\n}\n/**\n* Format log event results for display\n*/\nfunction formatLogResults(params) {\n\tconst { eventData, naturalLanguageQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n\telse output += `⚠️ **IMPORTANT**: Display these logs in console format with monospace font, color-coded severity (🔴 ERROR, 🟡 WARN, 🔵 INFO), and preserve timestamps.\\n\\n`;\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += `**View these results in Sentry**:\\n${explorerUrl}\\n`;\n\toutput += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\tif (eventData.length === 0) {\n\t\tSentry.logger.info(Sentry.logger.fmt`No log events found for query: ${naturalLanguageQuery}`, {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"logs\"\n\t\t});\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"log\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\toutput += \"```console\\n\";\n\t\tfor (const event of eventData) {\n\t\t\tconst timestamp = getStringValue(event, \"timestamp\", \"N/A\");\n\t\t\tconst severity = getStringValue(event, \"severity\", \"info\");\n\t\t\tconst message = getStringValue(event, \"message\", \"No message\");\n\t\t\tconst severityUpper = severity.toUpperCase();\n\t\t\tconst severityEmojis = {\n\t\t\t\tERROR: \"🔴\",\n\t\t\t\tFATAL: \"🔴\",\n\t\t\t\tWARN: \"🟡\",\n\t\t\t\tWARNING: \"🟡\",\n\t\t\t\tINFO: \"🔵\",\n\t\t\t\tDEBUG: \"⚫\",\n\t\t\t\tTRACE: \"⚫\"\n\t\t\t};\n\t\t\tconst severityEmoji = severityEmojis[severityUpper] || \"🔵\";\n\t\t\toutput += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\\n`;\n\t\t}\n\t\toutput += \"```\\n\\n\";\n\t\toutput += \"## Log Details\\n\\n\";\n\t\tconst priorityFields = [\n\t\t\t\"message\",\n\t\t\t\"severity\",\n\t\t\t\"severity_number\",\n\t\t\t\"timestamp\",\n\t\t\t\"project\",\n\t\t\t\"trace\",\n\t\t\t\"sentry.item_id\"\n\t\t];\n\t\tfor (let i = 0; i < eventData.length; i++) {\n\t\t\tconst event = eventData[i];\n\t\t\toutput += `### Log ${i + 1}\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `- **Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else output += `- **${field}**: ${value}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `- **${key}**: ${value}\\n`;\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- View related traces: Click on the Trace URL if available\\n\";\n\toutput += \"- Filter by severity: Adjust your query to focus on specific log levels\\n\";\n\toutput += \"- Export logs: Use the Sentry web interface for bulk export\\n\";\n\treturn output;\n}\n/**\n* Format span/trace event results for display\n*/\nfunction formatSpanResults(params) {\n\tconst { eventData, naturalLanguageQuery, includeExplanation, apiService, organizationSlug, explorerUrl, sentryQuery, fields, explanation } = params;\n\tlet output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n\tif (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n\telse output += `⚠️ **IMPORTANT**: Display these traces as a performance timeline with duration bars and hierarchical span relationships.\\n\\n`;\n\tif (includeExplanation && explanation) {\n\t\toutput += formatExplanation(explanation);\n\t\toutput += `\\n\\n`;\n\t}\n\toutput += `**View these results in Sentry**:\\n${explorerUrl}\\n`;\n\toutput += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\tif (eventData.length === 0) {\n\t\tSentry.logger.info(Sentry.logger.fmt`No span events found for query: ${naturalLanguageQuery}`, {\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\torganizationSlug,\n\t\t\tdataset: \"spans\"\n\t\t});\n\t\toutput += `No results found.\\n\\n`;\n\t\toutput += `Try being more specific or using different terms in your search.\\n`;\n\t\treturn output;\n\t}\n\toutput += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `trace${eventData.length === 1 ? \"\" : \"s\"}/span${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\tif (isAggregateQuery(fields)) {\n\t\toutput += \"```json\\n\";\n\t\toutput += JSON.stringify(eventData, null, 2);\n\t\toutput += \"\\n```\\n\\n\";\n\t} else {\n\t\tconst priorityFields = [\n\t\t\t\"id\",\n\t\t\t\"span.op\",\n\t\t\t\"span.description\",\n\t\t\t\"transaction\",\n\t\t\t\"span.duration\",\n\t\t\t\"span.status\",\n\t\t\t\"trace\",\n\t\t\t\"project\",\n\t\t\t\"timestamp\"\n\t\t];\n\t\tfor (const event of eventData) {\n\t\t\tconst title = getStringValue(event, \"span.description\") || getStringValue(event, \"transaction\") || getStringValue(event, \"span.op\") || \"Span\";\n\t\t\toutput += `## ${title}\\n\\n`;\n\t\t\tfor (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {\n\t\t\t\tconst value = event[field];\n\t\t\t\tif (field === \"trace\" && typeof value === \"string\") {\n\t\t\t\t\toutput += `**Trace ID**: ${value}\\n`;\n\t\t\t\t\toutput += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n\t\t\t\t} else if (field === \"span.duration\" && typeof value === \"number\") output += `**${field}**: ${value}ms\\n`;\n\t\t\t\telse output += `**${field}**: ${value}\\n`;\n\t\t\t}\n\t\t\tconst displayedFields = new Set([...priorityFields, \"id\"]);\n\t\t\tfor (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `**${key}**: ${value}\\n`;\n\t\t\toutput += \"\\n\";\n\t\t}\n\t}\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- View the full trace: Click on the Trace URL above\\n\";\n\toutput += \"- Search for related spans: Modify your query to be more specific\\n\";\n\toutput += \"- Export data: Use the Sentry web interface for advanced analysis\\n\";\n\treturn output;\n}\n\n//#endregion\nexport { formatErrorResults, formatExplanation, formatLogResults, formatSpanResults };\n//# sourceMappingURL=formatters-BDf0umPC.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { RECOMMENDED_FIELDS } from \"./config-DtimzxvV.js\";\nimport { searchEventsAgent } from \"./agent-DUcsM6ug.js\";\nimport { formatErrorResults, formatLogResults, formatSpanResults } from \"./formatters-BDf0umPC.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/search-events/handler.ts\nvar handler_default = defineTool({\n\tname: \"search_events\",\n\trequiredSkills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Search for events AND perform counts/aggregations - the ONLY tool for statistics and counts.\",\n\t\t\"\",\n\t\t\"Supports TWO query types:\",\n\t\t\"1. AGGREGATIONS (counts, sums, averages): 'how many errors', 'count of issues', 'total tokens'\",\n\t\t\"2. Individual events with timestamps: 'show me error logs from last hour'\",\n\t\t\"\",\n\t\t\"USE THIS FOR ALL COUNTS/STATISTICS:\",\n\t\t\"- 'how many errors today' → returns count\",\n\t\t\"- 'count of database failures' → returns count\",\n\t\t\"- 'total number of issues' → returns count\",\n\t\t\"- 'average response time' → returns avg()\",\n\t\t\"- 'sum of tokens used' → returns sum()\",\n\t\t\"\",\n\t\t\"ALSO USE FOR INDIVIDUAL EVENTS:\",\n\t\t\"- 'error logs from last hour' → returns event list\",\n\t\t\"- 'database errors with timestamps' → returns event list\",\n\t\t\"- 'trace spans for slow API calls' → returns span list\",\n\t\t\"\",\n\t\t\"Dataset Selection (AI automatically chooses):\",\n\t\t\"- errors: Exception/crash events\",\n\t\t\"- logs: Log entries\",\n\t\t\"- spans: Performance data, AI/LLM calls, token usage\",\n\t\t\"\",\n\t\t\"DO NOT USE for grouped issue lists → use search_issues\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_events(organizationSlug='my-org', naturalLanguageQuery='how many errors today')\",\n\t\t\"search_events(organizationSlug='my-org', naturalLanguageQuery='count of database failures this week')\",\n\t\t\"search_events(organizationSlug='my-org', naturalLanguageQuery='total tokens used by model')\",\n\t\t\"search_events(organizationSlug='my-org', naturalLanguageQuery='error logs from the last hour')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- Parse org/project notation directly without calling find_organizations or find_projects.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tnaturalLanguageQuery: z.string().trim().min(1).describe(\"Natural language description of what you want to search for\"),\n\t\tprojectSlug: ParamProjectSlug.nullable().default(null),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tlimit: z.number().min(1).max(100).default(10).describe(\"Maximum number of results to return\"),\n\t\tincludeExplanation: z.boolean().default(false).describe(\"Include explanation of how the query was translated\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tif (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\t\tlet projectId;\n\t\tif (params.projectSlug) {\n\t\t\tconst project = await apiService.getProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlug\n\t\t\t});\n\t\t\tprojectId = String(project.id);\n\t\t}\n\t\tconst agentResult = await searchEventsAgent({\n\t\t\tquery: params.naturalLanguageQuery,\n\t\t\torganizationSlug,\n\t\t\tapiService,\n\t\t\tprojectId\n\t\t});\n\t\tconst parsed = agentResult.result;\n\t\tconst dataset = parsed.dataset;\n\t\tconst recommendedFields = RECOMMENDED_FIELDS[dataset];\n\t\tif (!parsed.sort) throw new UserInputError(`Search Events Agent response missing required 'sort' parameter. Received: ${JSON.stringify(parsed, null, 2)}. The agent must specify how to sort results (e.g., '-timestamp' for newest first, '-count()' for highest count).`);\n\t\tconst sentryQuery = parsed.query || \"\";\n\t\tconst requestedFields = parsed.fields || [];\n\t\tconst isAggregateQuery = requestedFields.some((field) => field.includes(\"(\") && field.includes(\")\"));\n\t\tlet fields;\n\t\tif (isAggregateQuery) {\n\t\t\tif (!requestedFields || requestedFields.length === 0) throw new UserInputError(`AI response missing required 'fields' for aggregate query. The AI must specify which fields to return. For aggregate queries, include only the aggregate functions (like count(), avg()) and groupBy fields.`);\n\t\t\tfields = requestedFields;\n\t\t} else fields = requestedFields && requestedFields.length > 0 ? requestedFields : recommendedFields.basic;\n\t\tconst sortParam = parsed.sort;\n\t\tconst timeParams = {};\n\t\tif (parsed.timeRange) {\n\t\t\tif (\"statsPeriod\" in parsed.timeRange) timeParams.statsPeriod = parsed.timeRange.statsPeriod;\n\t\t\telse if (\"start\" in parsed.timeRange && \"end\" in parsed.timeRange) {\n\t\t\t\ttimeParams.start = parsed.timeRange.start;\n\t\t\t\ttimeParams.end = parsed.timeRange.end;\n\t\t\t}\n\t\t} else timeParams.statsPeriod = \"14d\";\n\t\tconst eventsResponse = await apiService.searchEvents({\n\t\t\torganizationSlug,\n\t\t\tquery: sentryQuery,\n\t\t\tfields,\n\t\t\tlimit: params.limit,\n\t\t\tprojectId,\n\t\t\tdataset,\n\t\t\tsort: sortParam,\n\t\t\t...timeParams\n\t\t});\n\t\tconst aggregateFunctions = fields.filter((field) => field.includes(\"(\") && field.includes(\")\"));\n\t\tconst groupByFields = fields.filter((field) => !field.includes(\"(\") && !field.includes(\")\"));\n\t\tconst explorerUrl = apiService.getEventsExplorerUrl(organizationSlug, sentryQuery, projectId, dataset, fields, sortParam, aggregateFunctions, groupByFields, timeParams.statsPeriod, timeParams.start, timeParams.end);\n\t\tfunction isValidResponse(response) {\n\t\t\treturn typeof response === \"object\" && response !== null;\n\t\t}\n\t\tfunction isValidEventArray(data) {\n\t\t\treturn Array.isArray(data) && data.every((item) => typeof item === \"object\" && item !== null);\n\t\t}\n\t\tif (!isValidResponse(eventsResponse)) throw new Error(\"Invalid response format from Sentry API\");\n\t\tconst eventData = eventsResponse.data;\n\t\tif (!isValidEventArray(eventData)) throw new Error(\"Invalid event data format from Sentry API\");\n\t\tconst formatParams = {\n\t\t\teventData,\n\t\t\tnaturalLanguageQuery: params.naturalLanguageQuery,\n\t\t\tincludeExplanation: params.includeExplanation,\n\t\t\tapiService,\n\t\t\torganizationSlug,\n\t\t\texplorerUrl,\n\t\t\tsentryQuery,\n\t\t\tfields,\n\t\t\texplanation: parsed.explanation\n\t\t};\n\t\tswitch (dataset) {\n\t\t\tcase \"errors\": return formatErrorResults(formatParams);\n\t\t\tcase \"logs\": return formatLogResults(formatParams);\n\t\t\tcase \"spans\": return formatSpanResults(formatParams);\n\t\t}\n\t}\n});\n\n//#endregion\nexport { handler_default };\n//# sourceMappingURL=handler-DJ0HK96y.js.map","import { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/create-team.ts\nvar create_team_default = defineTool({\n\tname: \"create_team\",\n\trequiredSkills: [\"project-management\"],\n\trequiredScopes: [\"team:write\"],\n\tdescription: [\n\t\t\"Create a new team in Sentry.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS WANT TO:\",\n\t\t\"- 'Create a new team'\",\n\t\t\"- 'Set up a team called [X]'\",\n\t\t\"- 'I need a team for my project'\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create a new team\",\n\t\t\"```\",\n\t\t\"create_team(organizationSlug='my-organization', name='the-goats')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tname: z.string().trim().describe(\"The name of the team to create.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tconst team = await apiService.createTeam({\n\t\t\torganizationSlug,\n\t\t\tname: params.name\n\t\t});\n\t\tlet output = `# New Team in **${organizationSlug}**\\n\\n`;\n\t\toutput += `**ID**: ${team.id}\\n`;\n\t\toutput += `**Slug**: ${team.slug}\\n`;\n\t\toutput += `**Name**: ${team.name}\\n`;\n\t\toutput += \"# Using this information\\n\\n\";\n\t\toutput += `- You should always inform the user of the Team Slug value.\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { create_team_default };\n//# sourceMappingURL=create-team-BAdl8A5-.js.map","import { ParamOrganizationSlug, ParamPlatform, ParamRegionUrl, ParamTeamSlug } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { logIssue } from \"./logging-DipAE5VU.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/create-project.ts\nvar create_project_default = defineTool({\n\tname: \"create_project\",\n\trequiredSkills: [\"project-management\"],\n\trequiredScopes: [\"project:write\", \"team:read\"],\n\tdescription: [\n\t\t\"Create a new project in Sentry (includes DSN automatically).\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS WANT TO:\",\n\t\t\"- 'Create a new project'\",\n\t\t\"- 'Set up a project for [app/service] with team [X]'\",\n\t\t\"- 'I need a new Sentry project'\",\n\t\t\"- Create project AND need DSN in one step\",\n\t\t\"\",\n\t\t\"DO NOT USE create_dsn after this - DSN is included in output.\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create new project with team\",\n\t\t\"```\",\n\t\t\"create_project(organizationSlug='my-organization', teamSlug='my-team', name='my-project', platform='javascript')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<teamSlug>.\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tteamSlug: ParamTeamSlug,\n\t\tname: z.string().trim().describe(\"The name of the project to create. Typically this is commonly the name of the repository or service. It is only used as a visual label in Sentry.\"),\n\t\tplatform: ParamPlatform.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"team.slug\", params.teamSlug);\n\t\tconst project = await apiService.createProject({\n\t\t\torganizationSlug,\n\t\t\tteamSlug: params.teamSlug,\n\t\t\tname: params.name,\n\t\t\tplatform: params.platform\n\t\t});\n\t\tlet clientKey = null;\n\t\ttry {\n\t\t\tclientKey = await apiService.createClientKey({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug: project.slug,\n\t\t\t\tname: \"Default\"\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tlogIssue(err);\n\t\t}\n\t\tlet output = `# New Project in **${organizationSlug}**\\n\\n`;\n\t\toutput += `**ID**: ${project.id}\\n`;\n\t\toutput += `**Slug**: ${project.slug}\\n`;\n\t\toutput += `**Name**: ${project.name}\\n`;\n\t\tif (clientKey) output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\\n\\n`;\n\t\telse output += \"**SENTRY_DSN**: There was an error fetching this value.\\n\\n\";\n\t\toutput += \"# Using this information\\n\\n\";\n\t\toutput += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\\n`;\n\t\toutput += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { create_project_default };\n//# sourceMappingURL=create-project-OSqZHO31.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { logIssue } from \"./logging-DipAE5VU.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/update-project.ts\nvar update_project_default = defineTool({\n\tname: \"update_project\",\n\trequiredSkills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Update a project's name or slug to fix onboarding mistakes\",\n\t\t\"- Change the platform assigned to a project\",\n\t\t\"- Update team assignment for a project\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Update a project's name and slug\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Assign a project to a different team\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### Update platform\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- Team assignment is handled separately from other project settings\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"- When updating the slug, the project will be accessible at the new slug after the update\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tname: z.string().trim().describe(\"The new name for the project\").nullable().default(null),\n\t\tslug: z.string().toLowerCase().trim().describe(\"The new slug for the project (must be unique)\").nullable().default(null),\n\t\tplatform: ParamPlatform.nullable().default(null),\n\t\tteamSlug: ParamTeamSlug.nullable().default(null).describe(\"The team to assign this project to. Note: this will replace the current team assignment.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tif (params.teamSlug) {\n\t\t\tsetTag(\"team.slug\", params.teamSlug);\n\t\t\ttry {\n\t\t\t\tawait apiService.addTeamToProject({\n\t\t\t\t\torganizationSlug,\n\t\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\t\tteamSlug: params.teamSlug\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tlogIssue(err);\n\t\t\t\tthrow new Error(`Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t}\n\t\tconst hasProjectUpdates = params.name || params.slug || params.platform;\n\t\tlet project;\n\t\tif (hasProjectUpdates) try {\n\t\t\tproject = await apiService.updateProject({\n\t\t\t\torganizationSlug,\n\t\t\t\tprojectSlug: params.projectSlug,\n\t\t\t\tname: params.name,\n\t\t\t\tslug: params.slug,\n\t\t\t\tplatform: params.platform\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tlogIssue(err);\n\t\t\tthrow new Error(`Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`);\n\t\t}\n\t\telse {\n\t\t\tconst projects = await apiService.listProjects(organizationSlug);\n\t\t\tproject = projects.find((p) => p.slug === params.projectSlug);\n\t\t\tif (!project) throw new UserInputError(`Project ${params.projectSlug} not found`);\n\t\t}\n\t\tlet output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n\t\toutput += `**ID**: ${project.id}\\n`;\n\t\toutput += `**Slug**: ${project.slug}\\n`;\n\t\toutput += `**Name**: ${project.name}\\n`;\n\t\tif (project.platform) output += `**Platform**: ${project.platform}\\n`;\n\t\tconst updates = [];\n\t\tif (params.name) updates.push(`name to \"${params.name}\"`);\n\t\tif (params.slug) updates.push(`slug to \"${params.slug}\"`);\n\t\tif (params.platform) updates.push(`platform to \"${params.platform}\"`);\n\t\tif (params.teamSlug) updates.push(`team assignment to \"${params.teamSlug}\"`);\n\t\tif (updates.length > 0) {\n\t\t\toutput += `\\n## Updates Applied\\n`;\n\t\t\toutput += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n\t\t\toutput += `\\n`;\n\t\t}\n\t\toutput += \"\\n# Using this information\\n\\n\";\n\t\toutput += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n\t\tif (params.teamSlug) output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { update_project_default };\n//# sourceMappingURL=update-project-DUo5F94A.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/create-dsn.ts\nvar create_dsn_default = defineTool({\n\tname: \"create_dsn\",\n\trequiredSkills: [\"project-management\"],\n\trequiredScopes: [\"project:write\"],\n\tdescription: [\n\t\t\"Create an additional DSN for an EXISTING project.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN:\",\n\t\t\"- Project already exists and needs additional DSN\",\n\t\t\"- 'Create another DSN for project X'\",\n\t\t\"- 'I need a production DSN for existing project'\",\n\t\t\"\",\n\t\t\"DO NOT USE for new projects (use create_project instead)\",\n\t\t\"\",\n\t\t\"Be careful when using this tool!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Create additional DSN for existing project\",\n\t\t\"```\",\n\t\t\"create_dsn(organizationSlug='my-organization', projectSlug='my-project', name='Production')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug,\n\t\tname: z.string().trim().describe(\"The name of the DSN to create, for example 'Production'.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst clientKey = await apiService.createClientKey({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug,\n\t\t\tname: params.name\n\t\t});\n\t\tlet output = `# New DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n\t\toutput += `**DSN**: ${clientKey.dsn.public}\\n`;\n\t\toutput += `**Name**: ${clientKey.name}\\n\\n`;\n\t\toutput += \"# Using this information\\n\\n\";\n\t\toutput += \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { create_dsn_default };\n//# sourceMappingURL=create-dsn-cwJCYVxO.js.map","import { ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/find-dsns.ts\nvar find_dsns_default = defineTool({\n\tname: \"find_dsns\",\n\trequiredSkills: [\"project-management\"],\n\trequiredScopes: [\"project:read\"],\n\tdescription: [\n\t\t\"List all Sentry DSNs for a specific project.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Retrieve a SENTRY_DSN for a specific project\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n\t\t\"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you might want to call `find_organizations()` first.\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tprojectSlug: ParamProjectSlug\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst organizationSlug = params.organizationSlug;\n\t\tsetTag(\"organization.slug\", organizationSlug);\n\t\tsetTag(\"project.slug\", params.projectSlug);\n\t\tconst clientKeys = await apiService.listClientKeys({\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: params.projectSlug\n\t\t});\n\t\tlet output = `# DSNs in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n\t\tif (clientKeys.length === 0) {\n\t\t\toutput += \"No DSNs were found.\\n\\nYou can create new one using the `create_dsn` tool.\";\n\t\t\treturn output;\n\t\t}\n\t\tfor (const clientKey of clientKeys) {\n\t\t\toutput += `## ${clientKey.name}\\n`;\n\t\t\toutput += `**ID**: ${clientKey.id}\\n`;\n\t\t\toutput += `**DSN**: ${clientKey.dsn.public}\\n\\n`;\n\t\t}\n\t\toutput += \"# Using this information\\n\\n\";\n\t\toutput += \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { find_dsns_default };\n//# sourceMappingURL=find-dsns-op9qb46s.js.map","//#region src/internal/fetch-utils.ts\n/**\n* Fetch with timeout using AbortController\n* @param url - The URL to fetch\n* @param options - Standard fetch options\n* @param timeoutMs - Timeout in milliseconds (default: 30000)\n* @returns Promise<Response>\n* @throws Error if request times out\n*/\nasync function fetchWithTimeout(url, options = {}, timeoutMs = 3e4) {\n\tconst controller = new AbortController();\n\tconst timeoutId = setTimeout(() => controller.abort(), timeoutMs);\n\ttry {\n\t\tconst response = await fetch(url, {\n\t\t\t...options,\n\t\t\tsignal: controller.signal\n\t\t});\n\t\treturn response;\n\t} catch (error) {\n\t\tif (error instanceof Error && error.name === \"AbortError\") throw new Error(`Request timeout after ${timeoutMs}ms`);\n\t\tthrow error;\n\t} finally {\n\t\tclearTimeout(timeoutId);\n\t}\n}\n/**\n* Retry a function with exponential backoff\n* @param fn - The async function to retry\n* @param options - Retry options\n* @param options.maxRetries - Maximum number of retries (default: 3)\n* @param options.initialDelay - Initial delay in milliseconds (default: 1000)\n* @param options.shouldRetry - Predicate to determine if error should be retried (default: always retry)\n* @returns Promise with the function result\n* @throws The last error if all retries are exhausted\n*/\nasync function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, shouldRetry = (error) => true } = {}) {\n\tlet lastError;\n\tlet delay = initialDelay;\n\tfor (let attempt = 0; attempt <= maxRetries; attempt++) try {\n\t\treturn await fn();\n\t} catch (error) {\n\t\tlastError = error;\n\t\tif (attempt === maxRetries || !shouldRetry(error)) throw error;\n\t\tawait new Promise((resolve) => setTimeout(resolve, delay));\n\t\tdelay = Math.min(delay * 2, 3e4);\n\t}\n\tthrow lastError;\n}\n\n//#endregion\nexport { fetchWithTimeout, retryWithBackoff };\n//# sourceMappingURL=fetch-utils-BWMzxmEl.js.map","import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { ApiError, ApiServerError } from \"./errors-h_Ebmo8b.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { parseIssueParams } from \"./issue-helpers-CW_FS0Jn.js\";\nimport { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getHumanInterventionGuidance, getOutputForAutofixStep, getStatusDisplayName, isTerminalStatus } from \"./seer-D6i7nmhd.js\";\nimport { retryWithBackoff } from \"./fetch-utils-BWMzxmEl.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/analyze-issue-with-seer.ts\nvar analyze_issue_with_seer_default = defineTool({\n\tname: \"analyze_issue_with_seer\",\n\trequiredSkills: [\"seer\"],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n\t\t\"\",\n\t\t\"Use this tool when you need:\",\n\t\t\"- Detailed AI-powered root cause analysis\",\n\t\t\"- Specific code fixes and implementation guidance\",\n\t\t\"- Step-by-step troubleshooting for complex issues\",\n\t\t\"- Understanding why an error is happening in production\",\n\t\t\"\",\n\t\t\"What this tool provides:\",\n\t\t\"- Root cause analysis with code-level explanations\",\n\t\t\"- Specific file locations and line numbers where errors occur\",\n\t\t\"- Concrete code fixes you can apply\",\n\t\t\"- Step-by-step implementation guidance\",\n\t\t\"\",\n\t\t\"This tool automatically:\",\n\t\t\"1. Checks if analysis already exists (instant results)\",\n\t\t\"2. Starts new AI analysis if needed (~2-5 minutes)\",\n\t\t\"3. Returns complete fix recommendations\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### User: \\\"What's causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\\\"\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n\t\t\"```\",\n\t\t\"\",\n\t\t\"### User: \\\"Can you help me understand why this is failing in production?\\\"\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use this tool when you need deeper analysis beyond basic issue details\",\n\t\t\"- If the user provides an issueUrl, extract it and use that parameter alone\",\n\t\t\"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n\t\t\"- Results are cached - subsequent calls return instantly\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug.optional(),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tissueId: ParamIssueShortId.optional(),\n\t\tissueUrl: ParamIssueUrl.optional(),\n\t\tinstruction: z.string().describe(\"Optional custom instruction for the AI analysis\").optional()\n\t},\n\tannotations: {\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: false,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tconst { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tissueId: params.issueId,\n\t\t\tissueUrl: params.issueUrl\n\t\t});\n\t\tsetTag(\"organization.slug\", orgSlug);\n\t\tlet output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\t\tlet autofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\torganizationSlug: orgSlug,\n\t\t\tissueId: parsedIssueId\n\t\t}), {\n\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\tshouldRetry: (error) => {\n\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t}\n\t\t});\n\t\tif (!autofixState.autofix) {\n\t\t\toutput += `Starting new analysis...\\n\\n`;\n\t\t\tconst startResult = await apiService.startAutofix({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId,\n\t\t\t\tinstruction: params.instruction\n\t\t\t});\n\t\t\toutput += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, 1e3));\n\t\t\tautofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\tissueId: parsedIssueId\n\t\t\t}), {\n\t\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\t\tshouldRetry: (error) => {\n\t\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\toutput += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\t\t\tconst existingStatus = autofixState.autofix.status;\n\t\t\tif (isTerminalStatus(existingStatus)) {\n\t\t\t\toutput += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\t\t\t\tfor (const step of autofixState.autofix.steps) {\n\t\t\t\t\toutput += getOutputForAutofixStep(step);\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\t\t\t\tif (existingStatus !== \"COMPLETED\") {\n\t\t\t\t\toutput += `\\n**Status**: ${existingStatus}\\n`;\n\t\t\t\t\toutput += getHumanInterventionGuidance(existingStatus);\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\t}\n\t\t}\n\t\tconst startTime = Date.now();\n\t\tlet lastStatus = \"\";\n\t\tlet consecutiveErrors = 0;\n\t\twhile (Date.now() - startTime < SEER_TIMEOUT) {\n\t\t\tif (!autofixState.autofix) {\n\t\t\t\toutput += `Error: Analysis state lost. Please try again by running:\\n`;\n\t\t\t\toutput += `\\`\\`\\`\\n`;\n\t\t\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\t\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tconst status = autofixState.autofix.status;\n\t\t\tif (isTerminalStatus(status)) {\n\t\t\t\toutput += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\t\t\t\tfor (const step of autofixState.autofix.steps) {\n\t\t\t\t\toutput += getOutputForAutofixStep(step);\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\t\t\t\tif (status !== \"COMPLETED\") {\n\t\t\t\t\toutput += `\\n**Status**: ${status}\\n`;\n\t\t\t\t\toutput += getHumanInterventionGuidance(status);\n\t\t\t\t}\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tif (status !== lastStatus) {\n\t\t\t\tconst activeStep = autofixState.autofix.steps.find((step) => step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\");\n\t\t\t\tif (activeStep) output += `Processing: ${activeStep.title}...\\n`;\n\t\t\t\tlastStatus = status;\n\t\t\t}\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, SEER_POLLING_INTERVAL));\n\t\t\ttry {\n\t\t\t\tautofixState = await retryWithBackoff(() => apiService.getAutofixState({\n\t\t\t\t\torganizationSlug: orgSlug,\n\t\t\t\t\tissueId: parsedIssueId\n\t\t\t\t}), {\n\t\t\t\t\tmaxRetries: SEER_MAX_RETRIES,\n\t\t\t\t\tinitialDelay: SEER_INITIAL_RETRY_DELAY,\n\t\t\t\t\tshouldRetry: (error) => {\n\t\t\t\t\t\treturn error instanceof ApiServerError || !(error instanceof ApiError);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconsecutiveErrors = 0;\n\t\t\t} catch (error) {\n\t\t\t\tconsecutiveErrors++;\n\t\t\t\tif (consecutiveErrors >= 3) {\n\t\t\t\t\toutput += `\\n## Error During Analysis\\n\\n`;\n\t\t\t\t\toutput += `Unable to retrieve analysis status after multiple attempts.\\n`;\n\t\t\t\t\toutput += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n\t\t\t\t\toutput += `You can check the status later by running the same command again:\\n`;\n\t\t\t\t\toutput += `\\`\\`\\`\\n`;\n\t\t\t\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\t\t\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\t\t\t\treturn output;\n\t\t\t\t}\n\t\t\t\toutput += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n\t\t\t}\n\t\t}\n\t\tif (autofixState.autofix) {\n\t\t\toutput += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n\t\t\tfor (const step of autofixState.autofix.steps) {\n\t\t\t\toutput += getOutputForAutofixStep(step);\n\t\t\t\toutput += \"\\n\";\n\t\t\t}\n\t\t}\n\t\toutput += `\\n## Analysis Timed Out\\n\\n`;\n\t\toutput += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1e3}s).\\n\\n`;\n\t\toutput += `\\nYou can check the status later by running the same command again:\\n`;\n\t\toutput += `\\`\\`\\`\\n`;\n\t\toutput += params.issueUrl ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")` : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n\t\toutput += `\\n\\`\\`\\`\\n`;\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { analyze_issue_with_seer_default };\n//# sourceMappingURL=analyze-issue-with-seer-Bn3h3z1Q.js.map","import { ParamSentryGuide } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { ApiError } from \"./errors-h_Ebmo8b.js\";\nimport { fetchWithTimeout } from \"./fetch-utils-BWMzxmEl.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/search-docs.ts\nvar search_docs_default = defineTool({\n\tname: \"search_docs\",\n\trequiredSkills: [\"docs\"],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Search Sentry documentation for SDK setup, instrumentation, and configuration guidance.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Set up Sentry SDK or framework integrations (Django, Flask, Express, Next.js, etc.)\",\n\t\t\"- Configure features like performance monitoring, error sampling, or release tracking\",\n\t\t\"- Implement custom instrumentation (spans, transactions, breadcrumbs)\",\n\t\t\"- Configure data scrubbing, filtering, or sampling rules\",\n\t\t\"\",\n\t\t\"Returns snippets only. Use `get_doc(path='...')` to fetch full documentation content.\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"```\",\n\t\t\"search_docs(query='Django setup configuration SENTRY_DSN', guide='python/django')\",\n\t\t\"search_docs(query='source maps webpack upload', guide='javascript/nextjs')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use guide parameter to filter to specific technologies (e.g., 'javascript/nextjs')\",\n\t\t\"- Include specific feature names like 'beforeSend', 'tracesSampleRate', 'SENTRY_DSN'\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\tquery: z.string().trim().min(2, \"Search query is too short. Please provide at least 2 characters.\").max(200, \"Search query is too long. Please keep your query under 200 characters.\").describe(\"The search query in natural language. Be specific about what you're looking for.\"),\n\t\tmaxResults: z.number().int().min(1).max(10).default(3).describe(\"Maximum number of results to return (1-10)\"),\n\t\tguide: ParamSentryGuide.nullable().default(null)\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tlet output = `# Documentation Search Results\\n\\n`;\n\t\toutput += `**Query**: \"${params.query}\"\\n`;\n\t\tif (params.guide) output += `**Guide**: ${params.guide}\\n`;\n\t\toutput += `\\n`;\n\t\tconst host = context.mcpUrl || \"https://mcp.sentry.dev\";\n\t\tconst searchUrl = new URL(\"/api/search\", host);\n\t\tconst response = await fetchWithTimeout(searchUrl.toString(), {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: { \"Content-Type\": \"application/json\" },\n\t\t\tbody: JSON.stringify({\n\t\t\t\tquery: params.query,\n\t\t\t\tmaxResults: params.maxResults,\n\t\t\t\tguide: params.guide\n\t\t\t})\n\t\t}, 15e3);\n\t\tif (!response.ok) {\n\t\t\tconst errorData = await response.json().catch(() => null);\n\t\t\tconst errorMessage = errorData?.error || `Search failed with status ${response.status}`;\n\t\t\tthrow new ApiError(errorMessage, response.status);\n\t\t}\n\t\tconst data = await response.json();\n\t\tif (\"error\" in data && data.error) {\n\t\t\toutput += `**Error**: ${data.error}\\n\\n`;\n\t\t\treturn output;\n\t\t}\n\t\tif (data.results.length === 0) {\n\t\t\toutput += \"No documentation found matching your query.\\n\\n\";\n\t\t\treturn output;\n\t\t}\n\t\toutput += `Found ${data.results.length} match${data.results.length === 1 ? \"\" : \"es\"}\\n\\n`;\n\t\toutput += `These are just snippets. Use \\`get_doc(path='...')\\` to fetch the full content.\\n\\n`;\n\t\tfor (const [index, result] of data.results.entries()) {\n\t\t\toutput += `## ${index + 1}. ${result.url}\\n\\n`;\n\t\t\toutput += `**Path**: ${result.id}\\n`;\n\t\t\toutput += `**Relevance**: ${(result.relevance * 100).toFixed(1)}%\\n\\n`;\n\t\t\tif (index < 3) {\n\t\t\t\toutput += \"**Matching Context**\\n\";\n\t\t\t\toutput += `> ${result.snippet.replace(/\\n/g, \"\\n> \")}\\n\\n`;\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { search_docs_default };\n//# sourceMappingURL=search-docs-BTxn8zJZ.js.map","import { UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { ApiError } from \"./errors-h_Ebmo8b.js\";\nimport { USER_AGENT } from \"./version-DmM5pPKz.js\";\nimport { fetchWithTimeout } from \"./fetch-utils-BWMzxmEl.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/get-doc.ts\nvar get_doc_default = defineTool({\n\tname: \"get_doc\",\n\trequiredSkills: [\"docs\"],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Fetch the full markdown content of a Sentry documentation page.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Read the complete documentation for a specific topic\",\n\t\t\"- Get detailed implementation examples or code snippets\",\n\t\t\"- Access the full context of a documentation page\",\n\t\t\"- Extract specific sections from documentation\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"### Get the Next.js integration guide\",\n\t\t\"\",\n\t\t\"```\",\n\t\t\"get_doc(path='/platforms/javascript/guides/nextjs.md')\",\n\t\t\"```\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- Use the path from search_docs results for accurate fetching\",\n\t\t\"- Paths should end with .md extension\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: { path: z.string().trim().describe(\"The documentation path (e.g., '/platforms/javascript/guides/nextjs.md'). Get this from search_docs results.\") },\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tsetTag(\"doc.path\", params.path);\n\t\tlet output = `# Documentation Content\\n\\n`;\n\t\toutput += `**Path**: ${params.path}\\n\\n`;\n\t\tif (!params.path.endsWith(\".md\")) throw new UserInputError(\"Invalid documentation path. Path must end with .md extension.\");\n\t\tconst baseUrl = \"https://docs.sentry.io\";\n\t\tconst docUrl = new URL(params.path, baseUrl);\n\t\tconst allowedDomains = [\"docs.sentry.io\", \"develop.sentry.io\"];\n\t\tif (!allowedDomains.includes(docUrl.hostname)) throw new UserInputError(`Invalid domain. Documentation can only be fetched from allowed domains: ${allowedDomains.join(\", \")}`);\n\t\tconst response = await fetchWithTimeout(docUrl.toString(), { headers: {\n\t\t\tAccept: \"text/plain, text/markdown\",\n\t\t\t\"User-Agent\": USER_AGENT\n\t\t} }, 15e3);\n\t\tif (!response.ok) {\n\t\t\tif (response.status === 404) {\n\t\t\t\toutput += `**Error**: Documentation not found at this path.\\n\\n`;\n\t\t\t\toutput += `Please verify the path is correct. Common issues:\\n`;\n\t\t\t\toutput += `- Path should start with / (e.g., /platforms/javascript/guides/nextjs.md)\\n`;\n\t\t\t\toutput += `- Path should match exactly what's shown in search_docs results\\n`;\n\t\t\t\toutput += `- Some pages may have been moved or renamed\\n\\n`;\n\t\t\t\toutput += `Try searching again with \\`search_docs()\\` to find the correct path.\\n`;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\tthrow new ApiError(`Failed to fetch documentation: ${response.statusText}`, response.status);\n\t\t}\n\t\tconst content = await response.text();\n\t\tif (content.trim().startsWith(\"<!DOCTYPE\") || content.trim().startsWith(\"<html\")) {\n\t\t\toutput += `> **Error**: Received HTML instead of markdown. The path may be incorrect.\\n\\n`;\n\t\t\toutput += `Make sure to use the .md extension in the path.\\n`;\n\t\t\toutput += `Example: /platforms/javascript/guides/nextjs.md\\n`;\n\t\t\treturn output;\n\t\t}\n\t\toutput += \"---\\n\\n\";\n\t\toutput += content;\n\t\toutput += \"\\n\\n---\\n\\n\";\n\t\toutput += \"## Using this documentation\\n\\n\";\n\t\toutput += \"- This is the raw markdown content from Sentry's documentation\\n\";\n\t\toutput += \"- Code examples and configuration snippets can be copied directly\\n\";\n\t\toutput += \"- Links in the documentation are relative to https://docs.sentry.io\\n\";\n\t\toutput += \"- For more related topics, use `search_docs()` to find additional pages\\n\";\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { get_doc_default };\n//# sourceMappingURL=get-doc-CkdqvAbH.js.map","import { agentTool } from \"./utils-Bq75Ba9Z.js\";\nimport { z } from \"zod\";\n\n//#region src/internal/agents/tools/dataset-fields.ts\n/**\n* Discover available fields for a dataset by querying Sentry's tags API\n*/\nasync function discoverDatasetFields(apiService, organizationSlug, dataset, options = {}) {\n\tconst { projectId } = options;\n\tconst tags = await apiService.listTags({\n\t\torganizationSlug,\n\t\tdataset,\n\t\tproject: projectId,\n\t\tstatsPeriod: \"14d\"\n\t});\n\tconst fields = tags.filter((tag) => !tag.key.startsWith(\"sentry:\")).map((tag) => ({\n\t\tkey: tag.key,\n\t\tname: tag.name,\n\t\ttotalValues: tag.totalValues,\n\t\texamples: getFieldExamples(tag.key, dataset)\n\t}));\n\treturn {\n\t\tdataset,\n\t\tfields,\n\t\tcommonPatterns: getCommonPatterns(dataset)\n\t};\n}\n/**\n* Create a tool for discovering available fields in a dataset\n* The tool is pre-bound with the API service and organization configured for the appropriate region\n*/\nfunction createDatasetFieldsTool(options) {\n\tconst { apiService, organizationSlug, dataset, projectId } = options;\n\treturn agentTool({\n\t\tdescription: `Discover available fields for ${dataset} searches in Sentry (includes example values)`,\n\t\tparameters: z.object({}),\n\t\texecute: async () => {\n\t\t\treturn discoverDatasetFields(apiService, organizationSlug, dataset, { projectId });\n\t\t}\n\t});\n}\n/**\n* Get example values for common fields\n*/\nfunction getFieldExamples(key, dataset) {\n\tconst commonExamples = {\n\t\tlevel: [\n\t\t\t\"error\",\n\t\t\t\"warning\",\n\t\t\t\"info\",\n\t\t\t\"debug\",\n\t\t\t\"fatal\"\n\t\t],\n\t\tenvironment: [\n\t\t\t\"production\",\n\t\t\t\"staging\",\n\t\t\t\"development\"\n\t\t],\n\t\trelease: [\n\t\t\t\"v1.0.0\",\n\t\t\t\"latest\",\n\t\t\t\"backend@1.2.3\"\n\t\t],\n\t\tuser: [\"user123\", \"email@example.com\"]\n\t};\n\tconst issueExamples = {\n\t\t...commonExamples,\n\t\tassignedOrSuggested: [\n\t\t\t\"email@example.com\",\n\t\t\t\"team-slug\",\n\t\t\t\"me\"\n\t\t],\n\t\tis: [\n\t\t\t\"unresolved\",\n\t\t\t\"resolved\",\n\t\t\t\"ignored\"\n\t\t]\n\t};\n\tconst eventExamples = {\n\t\t...commonExamples,\n\t\t\"http.method\": [\n\t\t\t\"GET\",\n\t\t\t\"POST\",\n\t\t\t\"PUT\",\n\t\t\t\"DELETE\"\n\t\t],\n\t\t\"http.status_code\": [\n\t\t\t\"200\",\n\t\t\t\"404\",\n\t\t\t\"500\"\n\t\t],\n\t\t\"db.system\": [\n\t\t\t\"postgresql\",\n\t\t\t\"mysql\",\n\t\t\t\"redis\"\n\t\t]\n\t};\n\tif (dataset === \"search_issues\") return issueExamples[key];\n\tif (dataset === \"events\" || dataset === \"errors\") return eventExamples[key];\n\treturn commonExamples[key];\n}\n/**\n* Get common search patterns for a dataset\n*/\nfunction getCommonPatterns(dataset) {\n\tif (dataset === \"search_issues\") return [\n\t\t{\n\t\t\tpattern: \"is:unresolved\",\n\t\t\tdescription: \"Open issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"is:resolved\",\n\t\t\tdescription: \"Closed issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"level:error\",\n\t\t\tdescription: \"Error level issues\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"firstSeen:-24h\",\n\t\t\tdescription: \"New issues from last 24 hours\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"userCount:>100\",\n\t\t\tdescription: \"Affecting more than 100 users\"\n\t\t}\n\t];\n\tif (dataset === \"events\" || dataset === \"errors\") return [\n\t\t{\n\t\t\tpattern: \"level:error\",\n\t\t\tdescription: \"Error events\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"environment:production\",\n\t\t\tdescription: \"Production events\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"timestamp:-1h\",\n\t\t\tdescription: \"Events from last hour\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"has:http.method\",\n\t\t\tdescription: \"HTTP requests\"\n\t\t},\n\t\t{\n\t\t\tpattern: \"has:db.statement\",\n\t\t\tdescription: \"Database queries\"\n\t\t}\n\t];\n\treturn [];\n}\n\n//#endregion\nexport { createDatasetFieldsTool, discoverDatasetFields, getCommonPatterns, getFieldExamples };\n//# sourceMappingURL=dataset-fields-DNUZW54W.js.map","//#region src/tools/search-issues/config.ts\n/**\n* Configuration for the search-issues agent\n*/\nconst systemPrompt = `You are a Sentry issue search query translator. Convert natural language queries to Sentry issue search syntax.\n\nIMPORTANT RULES:\n1. Use Sentry issue search syntax, NOT SQL\n2. Time ranges use relative notation: -24h, -7d, -30d\n3. Comparisons: >, <, >=, <=\n4. Boolean operators: AND, OR, NOT (or !)\n5. Field values with spaces need quotes: environment:\"dev server\"\n\nBUILT-IN FIELDS:\n- is: Issue status (unresolved, resolved, ignored, archived)\n- level: Severity level (error, warning, info, debug, fatal)\n IMPORTANT: Almost NEVER use this field. Terms like \"critical\", \"important\", \"severe\" refer to IMPACT not level.\n Only use if user explicitly says \"error level\", \"warning level\", etc.\n- environment: Deployment environment (production, staging, development)\n- release: Version/release identifier\n- firstSeen: When the issue was FIRST encountered (use for \"new issues\", \"started\", \"began\")\n WARNING: Excludes ongoing issues that started before the time window\n- lastSeen: When the issue was LAST encountered (use for \"from the last\", \"recent\", \"active\")\n This includes ALL issues seen during the time window, regardless of when they started\n- assigned: Issues explicitly assigned to a user (email or \"me\") \n- assignedOrSuggested: Issues assigned to OR suggested for a user (broader match)\n- userCount: Number of unique users affected\n- eventCount: Total number of events\n\nCOMMON QUERY PATTERNS:\n- Unresolved issues: is:unresolved (NO level filter unless explicitly requested)\n- Critical/important issues: is:unresolved with sort:freq or sort:user (NOT level:error)\n- Recent activity: lastSeen:-24h\n- New issues: firstSeen:-7d\n- High impact: userCount:>100\n- My work: assignedOrSuggested:me\n\nSORTING RULES:\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"is:unresolved sort:user\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"is:unresolved\", sort: \"user\" ← Sort in separate field\n\n2. AVAILABLE SORT OPTIONS:\n - date: Last seen (default)\n - freq: Event frequency \n - new: First seen\n - user: User count\n\n3. IMPORTANT: Query field is for filtering only (is:, level:, environment:, etc.)\n\n'ME' REFERENCES:\n- When the user says \"assigned to me\" or similar, you MUST use the whoami tool to get the current user's email\n- Replace \"me\" with the actual email address in the query\n- Example: \"assigned to me\" → use whoami tool → assignedOrSuggested:user@example.com\n\nEXAMPLES:\n\"critical bugs\" → query: \"level:error is:unresolved\", sort: \"date\"\n\"worst issues affecting the most users\" → query: \"is:unresolved\", sort: \"user\"\n\"assigned to john@example.com\" → query: \"assignedOrSuggested:john@example.com\", sort: \"date\"\n\nNEVER: query: \"is:unresolved sort:user\" ← Sort goes in separate field!\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nAlways use the issueFields tool to discover available fields when needed.\nUse the whoami tool when you need to resolve 'me' references.`;\n\n//#endregion\nexport { systemPrompt };\n//# sourceMappingURL=config-48eLu9dt.js.map","import { ConfigurationError } from \"./errors-BXmNwD2K.js\";\nimport { callEmbeddedAgent } from \"./callEmbeddedAgent-CX8bB_WX.js\";\nimport { createWhoamiTool } from \"./whoami-BHrE9F4J.js\";\nimport { createDatasetFieldsTool } from \"./dataset-fields-DNUZW54W.js\";\nimport { systemPrompt } from \"./config-48eLu9dt.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/search-issues/agent.ts\nconst searchIssuesAgentOutputSchema = z.object({\n\tquery: z.string().describe(\"The Sentry issue search query\"),\n\tsort: z.enum([\n\t\t\"date\",\n\t\t\"freq\",\n\t\t\"new\",\n\t\t\"user\"\n\t]).nullable().describe(\"How to sort the results\"),\n\texplanation: z.string().describe(\"Brief explanation of how you translated this query.\")\n});\n/**\n* Search issues agent - single entry point for translating natural language queries to Sentry issue search syntax\n* This returns both the translated query result AND the tool calls made by the agent\n*/\nasync function searchIssuesAgent(options) {\n\tif (!process.env.OPENAI_API_KEY) throw new ConfigurationError(\"OPENAI_API_KEY environment variable is required for semantic search\");\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt: options.query,\n\t\ttools: {\n\t\t\tissueFields: createDatasetFieldsTool({\n\t\t\t\tapiService: options.apiService,\n\t\t\t\torganizationSlug: options.organizationSlug,\n\t\t\t\tdataset: \"search_issues\",\n\t\t\t\tprojectId: options.projectId\n\t\t\t}),\n\t\t\twhoami: createWhoamiTool({ apiService: options.apiService })\n\t\t},\n\t\tschema: searchIssuesAgentOutputSchema\n\t});\n}\n\n//#endregion\nexport { searchIssuesAgent, searchIssuesAgentOutputSchema };\n//# sourceMappingURL=agent-BEGFNdJ3.js.map","import { getIssueUrl, getIssuesSearchUrl } from \"./url-utils-DoqJlWab.js\";\nimport * as Sentry from \"@sentry/node\";\n\n//#region src/tools/search-issues/formatters.ts\n/**\n* Format an explanation for how a natural language query was translated\n*/\nfunction formatExplanation(explanation) {\n\treturn `## How I interpreted your query\\n\\n${explanation}`;\n}\n/**\n* Format issue search results for display\n*/\nfunction formatIssueResults(params) {\n\tconst { issues, organizationSlug, projectSlugOrId, query, regionUrl, naturalLanguageQuery, skipHeader = false } = params;\n\tconst host = regionUrl ? new URL(regionUrl).host : \"sentry.io\";\n\tlet output = \"\";\n\tif (!skipHeader) {\n\t\tif (naturalLanguageQuery) output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n\t\telse {\n\t\t\toutput = `# Issues in **${organizationSlug}`;\n\t\t\tif (projectSlugOrId) output += `/${projectSlugOrId}`;\n\t\t\toutput += \"**\\n\\n\";\n\t\t}\n\t\toutput += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\\n\\n`;\n\t}\n\tif (issues.length === 0) {\n\t\tSentry.logger.info(Sentry.logger.fmt`No issues found for query: ${naturalLanguageQuery || query}`, {\n\t\t\tquery,\n\t\t\torganizationSlug,\n\t\t\tprojectSlug: projectSlugOrId,\n\t\t\tnaturalLanguageQuery\n\t\t});\n\t\toutput += \"No issues found matching your search criteria.\\n\\n\";\n\t\toutput += \"Try adjusting your search criteria or time range.\";\n\t\treturn output;\n\t}\n\tconst searchUrl = getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId);\n\toutput += `**View these results in Sentry**:\\n${searchUrl}\\n`;\n\toutput += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\toutput += `Found **${issues.length}** issue${issues.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\tissues.forEach((issue, index) => {\n\t\tconst issueUrl = getIssueUrl(host, organizationSlug, issue.shortId);\n\t\toutput += `## ${index + 1}. [${issue.shortId}](${issueUrl})\\n\\n`;\n\t\toutput += `**${issue.title}**\\n\\n`;\n\t\toutput += `- **Status**: ${issue.status}\\n`;\n\t\toutput += `- **Users**: ${issue.userCount || 0}\\n`;\n\t\toutput += `- **Events**: ${issue.count || 0}\\n`;\n\t\tif (issue.assignedTo) {\n\t\t\tconst assignee = issue.assignedTo;\n\t\t\tif (typeof assignee === \"string\") output += `- **Assigned to**: ${assignee}\\n`;\n\t\t\telse if (assignee && typeof assignee === \"object\" && \"name\" in assignee) output += `- **Assigned to**: ${assignee.name}\\n`;\n\t\t}\n\t\toutput += `- **First seen**: ${formatDate(issue.firstSeen)}\\n`;\n\t\toutput += `- **Last seen**: ${formatDate(issue.lastSeen)}\\n`;\n\t\tif (issue.culprit) output += `- **Culprit**: \\`${issue.culprit}\\`\\n`;\n\t\toutput += \"\\n\";\n\t});\n\toutput += \"## Next Steps\\n\\n\";\n\toutput += \"- Get more details about a specific issue: Use the Issue ID with get_issue_details\\n\";\n\toutput += \"- Update issue status: Use update_issue to resolve or assign issues\\n\";\n\toutput += \"- View event counts: Use search_events for aggregated statistics\\n\";\n\treturn output;\n}\n/**\n* Format date for display\n*/\nfunction formatDate(dateString) {\n\tif (!dateString) return \"N/A\";\n\tconst date = new Date(dateString);\n\tconst now = /* @__PURE__ */ new Date();\n\tconst diffMs = now.getTime() - date.getTime();\n\tconst diffHours = Math.floor(diffMs / (1e3 * 60 * 60));\n\tif (diffHours < 1) {\n\t\tconst diffMinutes = Math.floor(diffMs / (1e3 * 60));\n\t\treturn `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n\t}\n\tif (diffHours < 24) return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n\tconst diffDays = Math.floor(diffHours / 24);\n\tif (diffDays < 30) return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n\treturn date.toLocaleDateString();\n}\n\n//#endregion\nexport { formatExplanation, formatIssueResults };\n//# sourceMappingURL=formatters-ddoifBDN.js.map","import { isNumericId, validateSlugOrId } from \"./slug-validation-BKH2JUpn.js\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"./schema-yM01CDL7.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { apiServiceFromContext } from \"./api-C49LlEqH.js\";\nimport { searchIssuesAgent } from \"./agent-BEGFNdJ3.js\";\nimport { formatExplanation, formatIssueResults } from \"./formatters-ddoifBDN.js\";\nimport { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\n\n//#region src/tools/search-issues/handler.ts\nvar handler_default = defineTool({\n\tname: \"search_issues\",\n\trequiredSkills: [\n\t\t\"inspect\",\n\t\t\"triage\",\n\t\t\"seer\"\n\t],\n\trequiredScopes: [\"event:read\"],\n\tdescription: [\n\t\t\"Search for grouped issues/problems in Sentry - returns a LIST of issues, NOT counts or aggregations.\",\n\t\t\"\",\n\t\t\"Uses AI to translate natural language queries into Sentry issue search syntax.\",\n\t\t\"Returns grouped issues with metadata like title, status, and user count.\",\n\t\t\"\",\n\t\t\"USE THIS TOOL WHEN USERS WANT:\",\n\t\t\"- A LIST of issues: 'show me issues', 'what problems do we have'\",\n\t\t\"- Filtered issue lists: 'unresolved issues', 'critical bugs'\",\n\t\t\"- Issues by impact: 'errors affecting more than 100 users'\",\n\t\t\"- Issues by assignment: 'issues assigned to me'\",\n\t\t\"\",\n\t\t\"DO NOT USE FOR COUNTS/AGGREGATIONS:\",\n\t\t\"- 'how many errors' → use search_events\",\n\t\t\"- 'count of issues' → use search_events\",\n\t\t\"- 'total number of errors today' → use search_events\",\n\t\t\"- 'sum/average/statistics' → use search_events\",\n\t\t\"\",\n\t\t\"ALSO DO NOT USE FOR:\",\n\t\t\"- Individual error events with timestamps → use search_events\",\n\t\t\"- Details about a specific issue ID → use get_issue_details\",\n\t\t\"\",\n\t\t\"REMEMBER: This tool returns a LIST of issues, not counts or statistics!\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"search_issues(organizationSlug='my-org', naturalLanguageQuery='critical bugs from last week')\",\n\t\t\"search_issues(organizationSlug='my-org', naturalLanguageQuery='unhandled errors affecting 100+ users')\",\n\t\t\"search_issues(organizationSlug='my-org', naturalLanguageQuery='issues assigned to me')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlugOrId>.\",\n\t\t\"- Parse org/project notation directly without calling find_organizations or find_projects.\",\n\t\t\"- The projectSlugOrId parameter accepts both project slugs (e.g., 'my-project') and numeric IDs (e.g., '123456').\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\torganizationSlug: ParamOrganizationSlug,\n\t\tnaturalLanguageQuery: z.string().trim().min(1).describe(\"Natural language description of issues to search for\"),\n\t\tprojectSlugOrId: z.string().toLowerCase().trim().superRefine(validateSlugOrId).nullable().default(null).describe(\"The project's slug or numeric ID (optional)\"),\n\t\tregionUrl: ParamRegionUrl.nullable().default(null),\n\t\tlimit: z.number().min(1).max(100).default(10).describe(\"Maximum number of issues to return\"),\n\t\tincludeExplanation: z.boolean().default(false).describe(\"Include explanation of how the query was translated\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl ?? void 0 });\n\t\tsetTag(\"organization.slug\", params.organizationSlug);\n\t\tif (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) setTag(\"project.id\", params.projectSlugOrId);\n\t\telse setTag(\"project.slug\", params.projectSlugOrId);\n\t\tlet projectId;\n\t\tif (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) projectId = params.projectSlugOrId;\n\t\telse {\n\t\t\tconst project = await apiService.getProject({\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlugOrId\n\t\t\t});\n\t\t\tprojectId = String(project.id);\n\t\t}\n\t\tconst agentResult = await searchIssuesAgent({\n\t\t\tquery: params.naturalLanguageQuery,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tapiService,\n\t\t\tprojectId\n\t\t});\n\t\tconst translatedQuery = agentResult.result;\n\t\tconst issues = await apiService.listIssues({\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlug: params.projectSlugOrId ?? void 0,\n\t\t\tquery: translatedQuery.query ?? void 0,\n\t\t\tsortBy: translatedQuery.sort || \"date\",\n\t\t\tlimit: params.limit\n\t\t});\n\t\tlet output = \"\";\n\t\tif (params.includeExplanation) {\n\t\t\toutput += `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\t\t\toutput += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\\n\\n`;\n\t\t\toutput += `## Query Translation\\n`;\n\t\t\toutput += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n\t\t\toutput += `Sentry query: \\`${translatedQuery.query}\\``;\n\t\t\tif (translatedQuery.sort) output += `\\nSort: ${translatedQuery.sort}`;\n\t\t\toutput += `\\n\\n`;\n\t\t\tif (translatedQuery.explanation) {\n\t\t\t\toutput += formatExplanation(translatedQuery.explanation);\n\t\t\t\toutput += `\\n\\n`;\n\t\t\t}\n\t\t\toutput += formatIssueResults({\n\t\t\t\tissues,\n\t\t\t\torganizationSlug: params.organizationSlug,\n\t\t\t\tprojectSlugOrId: params.projectSlugOrId ?? void 0,\n\t\t\t\tquery: translatedQuery.query,\n\t\t\t\tregionUrl: params.regionUrl ?? void 0,\n\t\t\t\tnaturalLanguageQuery: params.naturalLanguageQuery,\n\t\t\t\tskipHeader: true\n\t\t\t});\n\t\t} else output = formatIssueResults({\n\t\t\tissues,\n\t\t\torganizationSlug: params.organizationSlug,\n\t\t\tprojectSlugOrId: params.projectSlugOrId ?? void 0,\n\t\t\tquery: translatedQuery.query,\n\t\t\tregionUrl: params.regionUrl ?? void 0,\n\t\t\tnaturalLanguageQuery: params.naturalLanguageQuery,\n\t\t\tskipHeader: false\n\t\t});\n\t\treturn output;\n\t}\n});\n\n//#endregion\nexport { handler_default };\n//# sourceMappingURL=handler-BEqYQTaW.js.map","//#region src/tools/use-sentry/config.ts\n/**\n* Configuration for the use_sentry embedded agent.\n*\n* This agent translates natural language requests into Sentry operations\n* by intelligently calling available Sentry MCP tools.\n*/\n/**\n* System prompt for the embedded agent.\n*/\nconst systemPrompt = `You are an agent responsible for assisting users on accessing information from Sentry (sentry.io) via MCP tools.\n\nALWAYS evaluate which tools are the most appropriate to use based on the user's prompt. You ALWAYS use tools to answer questions. Evaluating the tool descriptions and parameters thoroughly to answer the user's prompt.\n\nThe user may include various parameters to pass to those tools in their prompt. You MUST treat URLs as parameters for tool calls, as well as recognizing <organizationSlug>/<projectSlug> notation.\n\nYou MUST return tool results directly without interpreting them.`;\n/**\n* Additional configuration for the agent.\n*/\nconst agentConfig = { maxSteps: 10 };\n\n//#endregion\nexport { agentConfig, systemPrompt };\n//# sourceMappingURL=config-DkQjdsDV.js.map","import { ConfigurationError } from \"./errors-BXmNwD2K.js\";\nimport { callEmbeddedAgent } from \"./callEmbeddedAgent-CX8bB_WX.js\";\nimport { systemPrompt } from \"./config-DkQjdsDV.js\";\nimport { z } from \"zod\";\n\n//#region src/tools/use-sentry/agent.ts\n/**\n* Output schema for the embedded agent.\n* The agent returns the final result string directly from its tool calls.\n*/\nconst outputSchema = z.object({ result: z.string().describe(\"The final result from your tool calls that answers the user's request\") });\n/**\n* use_sentry agent - executes natural language requests using Sentry MCP tools\n* This returns the final result AND the tool calls made by the agent\n*/\nasync function useSentryAgent(options) {\n\tif (!process.env.OPENAI_API_KEY) throw new ConfigurationError(\"OPENAI_API_KEY environment variable is required for use_sentry tool\");\n\tconst prompt = options.request;\n\treturn await callEmbeddedAgent({\n\t\tsystem: systemPrompt,\n\t\tprompt,\n\t\ttools: options.tools,\n\t\tschema: outputSchema\n\t});\n}\n\n//#endregion\nexport { useSentryAgent };\n//# sourceMappingURL=agent-BH2CU6gS.js.map","import { ConfigurationError, UserInputError } from \"./errors-BXmNwD2K.js\";\nimport { logIssue } from \"./logging-DipAE5VU.js\";\nimport { ApiClientError, ApiError, ApiServerError } from \"./errors-h_Ebmo8b.js\";\n\n//#region src/internal/error-handling.ts\n/**\n* Type guard to identify user input validation errors.\n*/\nfunction isUserInputError(error) {\n\treturn error instanceof UserInputError;\n}\n/**\n* Type guard to identify configuration errors.\n*/\nfunction isConfigurationError(error) {\n\treturn error instanceof ConfigurationError;\n}\n/**\n* Type guard to identify API errors.\n*/\nfunction isApiError(error) {\n\treturn error instanceof ApiError;\n}\n/**\n* Type guard to identify API client errors (4xx).\n*/\nfunction isApiClientError(error) {\n\treturn error instanceof ApiClientError;\n}\n/**\n* Type guard to identify API server errors (5xx).\n*/\nfunction isApiServerError(error) {\n\treturn error instanceof ApiServerError;\n}\n/**\n* Format an error for user display with markdown formatting.\n* This is used by tool handlers to format errors for MCP responses.\n*\n* SECURITY: Only return trusted error messages to prevent prompt injection vulnerabilities.\n* We trust: Sentry API errors, our own UserInputError/ConfigurationError messages, and system templates.\n*/\nasync function formatErrorForUser(error) {\n\tif (isUserInputError(error)) return [\n\t\t\"**Input Error**\",\n\t\t\"It looks like there was a problem with the input you provided.\",\n\t\terror.message,\n\t\t`You may be able to resolve the issue by addressing the concern and trying again.`\n\t].join(\"\\n\\n\");\n\tif (isConfigurationError(error)) return [\n\t\t\"**Configuration Error**\",\n\t\t\"There appears to be a configuration issue with your setup.\",\n\t\terror.message,\n\t\t`Please check your environment configuration and try again.`\n\t].join(\"\\n\\n\");\n\tif (isApiClientError(error)) {\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} error with your request to the Sentry API.` : \"There was an error with your request.\";\n\t\treturn [\n\t\t\t\"**Input Error**\",\n\t\t\tstatusText,\n\t\t\terror.toUserMessage(),\n\t\t\t`You may be able to resolve the issue by addressing the concern and trying again.`\n\t\t].join(\"\\n\\n\");\n\t}\n\tif (isApiServerError(error)) {\n\t\tconst eventId$1 = logIssue(error);\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} server error with the Sentry API.` : \"There was a server error.\";\n\t\treturn [\n\t\t\t\"**Error**\",\n\t\t\tstatusText,\n\t\t\t`${error.message}`,\n\t\t\t`**Event ID**: ${eventId$1}`,\n\t\t\t`Please contact support with this Event ID if the problem persists.`\n\t\t].join(\"\\n\\n\");\n\t}\n\tif (isApiError(error)) {\n\t\tconst statusText = error.status ? `There was an HTTP ${error.status} error with your request to the Sentry API.` : \"There was an error with your request.\";\n\t\treturn [\n\t\t\t\"**Error**\",\n\t\t\tstatusText,\n\t\t\t`${error.message}`,\n\t\t\t`You may be able to resolve the issue by addressing the concern and trying again.`\n\t\t].join(\"\\n\\n\");\n\t}\n\tconst eventId = logIssue(error);\n\treturn [\n\t\t\"**Error**\",\n\t\t\"It looks like there was a problem communicating with the Sentry API.\",\n\t\t\"Please report the following to the user for the Sentry team:\",\n\t\t`**Event ID**: ${eventId}`,\n\t\tprocess.env.NODE_ENV !== \"production\" ? error instanceof Error ? error.message : String(error) : \"\"\n\t].filter(Boolean).join(\"\\n\\n\");\n}\n\n//#endregion\nexport { formatErrorForUser, isApiClientError, isApiError, isApiServerError, isConfigurationError, isUserInputError };\n//# sourceMappingURL=error-handling-jSzAQs4J.js.map","//#region src/internal/constraint-helpers.ts\n/**\n* Determines which tool parameter keys should be filtered out of the schema\n* because they will be injected from constraints.\n*\n* Handles parameter aliases: when a projectSlug constraint exists and the tool\n* has a projectSlugOrId parameter, the alias will be applied UNLESS projectSlugOrId\n* is explicitly constrained with a truthy value.\n*\n* @param constraints - The active constraints (org, project, region)\n* @param toolInputSchema - The tool's input schema definition\n* @returns Array of parameter keys that should be filtered from the schema\n*\n* @example\n* ```typescript\n* const constraints = { projectSlug: \"my-project\", organizationSlug: \"my-org\" };\n* const schema = { organizationSlug: z.string(), projectSlugOrId: z.string() };\n* const keys = getConstraintKeysToFilter(constraints, schema);\n* // Returns: [\"organizationSlug\", \"projectSlugOrId\"]\n* // projectSlugOrId is included because projectSlug constraint will map to it\n* ```\n*/\nfunction getConstraintKeysToFilter(constraints, toolInputSchema) {\n\treturn Object.entries(constraints).flatMap(([key, value]) => {\n\t\tif (!value) return [];\n\t\tconst keys = [];\n\t\tif (key in toolInputSchema) keys.push(key);\n\t\tif (key === \"projectSlug\" && \"projectSlugOrId\" in toolInputSchema && !(\"projectSlugOrId\" in constraints && constraints.projectSlugOrId)) keys.push(\"projectSlugOrId\");\n\t\treturn keys;\n\t});\n}\n/**\n* Builds the constraint parameters that should be injected into tool calls.\n*\n* Handles parameter aliases: when a projectSlug constraint exists and the tool\n* has a projectSlugOrId parameter, the constraint value will be injected as\n* projectSlugOrId UNLESS projectSlugOrId is explicitly constrained with a truthy value.\n*\n* @param constraints - The active constraints (org, project, region)\n* @param toolInputSchema - The tool's input schema definition\n* @returns Object mapping parameter names to constraint values\n*\n* @example\n* ```typescript\n* const constraints = { projectSlug: \"my-project\", organizationSlug: \"my-org\" };\n* const schema = { organizationSlug: z.string(), projectSlugOrId: z.string() };\n* const params = getConstraintParametersToInject(constraints, schema);\n* // Returns: { organizationSlug: \"my-org\", projectSlugOrId: \"my-project\" }\n* // projectSlug constraint is injected as projectSlugOrId parameter\n* ```\n*/\nfunction getConstraintParametersToInject(constraints, toolInputSchema) {\n\treturn Object.fromEntries(Object.entries(constraints).flatMap(([key, value]) => {\n\t\tif (!value) return [];\n\t\tconst entries = [];\n\t\tif (key in toolInputSchema) entries.push([key, value]);\n\t\tif (key === \"projectSlug\" && \"projectSlugOrId\" in toolInputSchema && !(\"projectSlugOrId\" in constraints && constraints.projectSlugOrId)) entries.push([\"projectSlugOrId\", value]);\n\t\treturn entries;\n\t}));\n}\n\n//#endregion\nexport { getConstraintKeysToFilter, getConstraintParametersToInject };\n//# sourceMappingURL=constraint-helpers-CBddlAo8.js.map","import { hasRequiredSkills } from \"./skills-BmFl7P6V.js\";\nimport { MCP_SERVER_NAME } from \"./constants-D8axTonA.js\";\nimport { isToolAllowed } from \"./permissions-DbIM2Lps.js\";\nimport { defineTool } from \"./define-DUKsI6o0.js\";\nimport { logIssue } from \"./logging-DipAE5VU.js\";\nimport { LIB_VERSION } from \"./version-DmM5pPKz.js\";\nimport { whoami_default } from \"./whoami-BoraVlxR.js\";\nimport { find_organizations_default } from \"./find-organizations-Df_7XcZh.js\";\nimport { find_teams_default } from \"./find-teams-Ci9--JWk.js\";\nimport { find_projects_default } from \"./find-projects-_xE0VUHG.js\";\nimport { find_releases_default } from \"./find-releases-B-2KNnj4.js\";\nimport { get_issue_details_default } from \"./get-issue-details-Dkx3WdXu.js\";\nimport { get_trace_details_default } from \"./get-trace-details-f5XoKmIu.js\";\nimport { get_event_attachment_default } from \"./get-event-attachment-B5GR2cWj.js\";\nimport { update_issue_default } from \"./update-issue-BKnQHYYL.js\";\nimport { handler_default } from \"./handler-DJ0HK96y.js\";\nimport { create_team_default } from \"./create-team-BAdl8A5-.js\";\nimport { create_project_default } from \"./create-project-OSqZHO31.js\";\nimport { update_project_default } from \"./update-project-DUo5F94A.js\";\nimport { create_dsn_default } from \"./create-dsn-cwJCYVxO.js\";\nimport { find_dsns_default } from \"./find-dsns-op9qb46s.js\";\nimport { analyze_issue_with_seer_default } from \"./analyze-issue-with-seer-Bn3h3z1Q.js\";\nimport { search_docs_default } from \"./search-docs-BTxn8zJZ.js\";\nimport { get_doc_default } from \"./get-doc-CkdqvAbH.js\";\nimport { handler_default as handler_default$1 } from \"./handler-BEqYQTaW.js\";\nimport { useSentryAgent } from \"./agent-BH2CU6gS.js\";\nimport { formatErrorForUser } from \"./error-handling-jSzAQs4J.js\";\nimport { getConstraintKeysToFilter, getConstraintParametersToInject } from \"./constraint-helpers-CBddlAo8.js\";\nimport { z } from \"zod\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { getActiveSpan, setTag, setUser, wrapMcpServerWithSentry } from \"@sentry/core\";\nimport { experimental_createMCPClient } from \"ai\";\nimport { InMemoryTransport } from \"@modelcontextprotocol/sdk/inMemory.js\";\n\n//#region src/tools/use-sentry/handler.ts\n/**\n* Format tool calls into a readable trace\n*/\nfunction formatToolCallTrace(toolCalls) {\n\tlet trace = \"\";\n\tfor (let i = 0; i < toolCalls.length; i++) {\n\t\tconst call = toolCalls[i];\n\t\ttrace += `### ${i + 1}. ${call.toolName}\\n\\n`;\n\t\tconst args = call.args;\n\t\tif (Object.keys(args).length === 0) trace += \"_No arguments_\\n\\n\";\n\t\telse {\n\t\t\ttrace += \"**Arguments:**\\n```json\\n\";\n\t\t\ttrace += JSON.stringify(args, null, 2);\n\t\t\ttrace += \"\\n```\\n\\n\";\n\t\t}\n\t}\n\treturn trace;\n}\nvar handler_default$2 = defineTool({\n\tname: \"use_sentry\",\n\trequiredSkills: [],\n\trequiredScopes: [],\n\tdescription: [\n\t\t\"Natural language interface to Sentry via an embedded AI agent.\",\n\t\t\"\",\n\t\t\"Use this tool when you need to:\",\n\t\t\"- Perform complex multi-step operations\",\n\t\t\"- Explore and analyze Sentry data with natural language\",\n\t\t\"- Chain multiple operations automatically\",\n\t\t\"\",\n\t\t\"Capabilities depend on granted skills:\",\n\t\t\"- inspect: Search errors/events, analyze traces, explore issues and projects\",\n\t\t\"- seer: Get AI-powered debugging insights and root cause analysis\",\n\t\t\"- docs: Search and retrieve Sentry documentation\",\n\t\t\"- triage: Resolve, assign, comment on, and update issues\",\n\t\t\"- project-management: Create/modify teams, projects, and configure DSNs\",\n\t\t\"\",\n\t\t\"<examples>\",\n\t\t\"use_sentry(request='find unresolved errors from yesterday')\",\n\t\t\"use_sentry(request='analyze the top 3 performance issues')\",\n\t\t\"use_sentry(request='create a backend team and assign them to API project')\",\n\t\t\"</examples>\",\n\t\t\"\",\n\t\t\"<hints>\",\n\t\t\"- If user asks to 'use Sentry' for something, they always mean to call this tool\",\n\t\t\"- Pass the user's request verbatim - do not interpret or rephrase\",\n\t\t\"- The agent can chain multiple tool calls automatically\",\n\t\t\"- Use trace=true parameter to see which tools were called\",\n\t\t\"- For simple single-tool operations, consider calling tools directly instead\",\n\t\t\"</hints>\"\n\t].join(\"\\n\"),\n\tinputSchema: {\n\t\trequest: z.string().trim().min(1).describe(\"The user's raw input. Do not interpret the prompt in any way. Do not add any additional information to the prompt.\"),\n\t\ttrace: z.boolean().nullable().default(null).describe(\"Enable tracing to see all tool calls made by the agent. Useful for debugging.\")\n\t},\n\tannotations: {\n\t\treadOnlyHint: true,\n\t\topenWorldHint: true\n\t},\n\tasync handler(params, context) {\n\t\tconst [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();\n\t\tconst { use_sentry,...toolsForAgent } = tools_default;\n\t\tconst server = buildServer({\n\t\t\tcontext,\n\t\t\ttools: toolsForAgent\n\t\t});\n\t\tawait server.server.connect(serverTransport);\n\t\tconst mcpClient = await experimental_createMCPClient({\n\t\t\tname: \"mcp.sentry.dev (use-sentry)\",\n\t\t\ttransport: clientTransport\n\t\t});\n\t\ttry {\n\t\t\tconst mcpTools = await mcpClient.tools();\n\t\t\tconst agentResult = await useSentryAgent({\n\t\t\t\trequest: params.request,\n\t\t\t\ttools: mcpTools\n\t\t\t});\n\t\t\tlet output = agentResult.result.result;\n\t\t\tif (params.trace && agentResult.toolCalls.length > 0) {\n\t\t\t\toutput += \"\\n\\n---\\n\\n## Tool Call Trace\\n\\n\";\n\t\t\t\toutput += formatToolCallTrace(agentResult.toolCalls);\n\t\t\t}\n\t\t\treturn output;\n\t\t} finally {\n\t\t\tawait mcpClient.close();\n\t\t\tawait server.server.close();\n\t\t}\n\t}\n});\n\n//#endregion\n//#region src/tools/index.ts\nvar tools_default = {\n\twhoami: whoami_default,\n\tfind_organizations: find_organizations_default,\n\tfind_teams: find_teams_default,\n\tfind_projects: find_projects_default,\n\tfind_releases: find_releases_default,\n\tget_issue_details: get_issue_details_default,\n\tget_trace_details: get_trace_details_default,\n\tget_event_attachment: get_event_attachment_default,\n\tupdate_issue: update_issue_default,\n\tsearch_events: handler_default,\n\tcreate_team: create_team_default,\n\tcreate_project: create_project_default,\n\tupdate_project: update_project_default,\n\tcreate_dsn: create_dsn_default,\n\tfind_dsns: find_dsns_default,\n\tanalyze_issue_with_seer: analyze_issue_with_seer_default,\n\tsearch_docs: search_docs_default,\n\tget_doc: get_doc_default,\n\tsearch_issues: handler_default$1,\n\tuse_sentry: handler_default$2\n};\n\n//#endregion\n//#region src/server.ts\n/**\n* Creates and configures a complete MCP server with Sentry instrumentation.\n*\n* The server is built with tools filtered based on the granted scopes in the context.\n* Context is captured in tool handler closures and passed directly to handlers.\n*\n* @example Usage with stdio transport\n* ```typescript\n* import { buildServer } from \"@sentry/mcp-core/server\";\n* import { startStdio } from \"@sentry/mcp-server/transports/stdio\";\n*\n* const context = {\n* accessToken: process.env.SENTRY_TOKEN,\n* sentryHost: \"sentry.io\",\n* userId: \"user-123\",\n* clientId: \"cursor-ide\",\n* constraints: {}\n* };\n*\n* const server = buildServer({ context });\n* await startStdio(server, context);\n* ```\n*\n* @example Usage with Cloudflare Workers\n* ```typescript\n* import { buildServer } from \"@sentry/mcp-core/server\";\n* import { createMcpHandler } from \"agents/mcp\";\n*\n* const serverContext = buildContextFromOAuth();\n* // Context is captured in closures during buildServer()\n* const server = buildServer({ context: serverContext });\n*\n* // Context already available to tool handlers via closures\n* return createMcpHandler(server, { route: \"/mcp\" })(request, env, ctx);\n* ```\n*/\nfunction buildServer({ context, agentMode = false, tools: customTools }) {\n\tconst server = new McpServer({\n\t\tname: MCP_SERVER_NAME,\n\t\tversion: LIB_VERSION\n\t});\n\tconfigureServer({\n\t\tserver,\n\t\tcontext,\n\t\tagentMode,\n\t\ttools: customTools\n\t});\n\treturn wrapMcpServerWithSentry(server);\n}\n/**\n* Configures an MCP server with tools filtered by granted skills or scopes.\n*\n* Internal function used by buildServer(). Use buildServer() instead for most cases.\n* Tools are filtered at registration time based on grantedSkills OR grantedScopes\n* (either system can grant access), and context is captured in closures for tool handler execution.\n*\n* In agent mode, only the use_sentry tool is registered, bypassing authorization checks.\n*/\nfunction configureServer({ server, context, agentMode = false, tools: customTools }) {\n\tconst toolsToRegister = agentMode ? { use_sentry: tools_default.use_sentry } : customTools ?? tools_default;\n\tconst grantedSkills = context.grantedSkills ? new Set(context.grantedSkills) : void 0;\n\tconst grantedScopes = context.grantedScopes ? new Set(context.grantedScopes) : void 0;\n\tserver.server.onerror = (error) => {\n\t\tconst transportLogOptions = {\n\t\t\tloggerScope: [\"server\", \"transport\"],\n\t\t\tcontexts: { transport: { phase: \"server.onerror\" } }\n\t\t};\n\t\tlogIssue(error, transportLogOptions);\n\t};\n\tfor (const [toolKey, tool$1] of Object.entries(toolsToRegister)) {\n\t\t/**\n\t\t* Authorization System Precedence\n\t\t* ================================\n\t\t*\n\t\t* The server supports two authorization systems:\n\t\t* 1. **Skills System (NEW)** - User-facing permission groups (inspect, triage, etc.)\n\t\t* 2. **Scopes System (LEGACY)** - Low-level API permissions (event:read, project:write, etc.)\n\t\t*\n\t\t* IMPORTANT: These systems are **MUTUALLY EXCLUSIVE** - only one is active per session:\n\t\t*\n\t\t* ## Skills Mode (when grantedSkills is set):\n\t\t* - ONLY skills are checked (scopes are ignored)\n\t\t* - Tool must have non-empty `requiredSkills` array to be exposed\n\t\t* - Empty `requiredSkills: []` means intentionally excluded from skills system\n\t\t* - Authorization: `allowed = hasRequiredSkills(grantedSkills, tool.requiredSkills)`\n\t\t*\n\t\t* ## Scopes Mode (when grantedSkills is NOT set, but grantedScopes is set):\n\t\t* - Falls back to legacy scope checking\n\t\t* - Empty `requiredScopes: []` means no scopes required (always allowed)\n\t\t* - Authorization: `allowed = isToolAllowed(tool.requiredScopes, grantedScopes)`\n\t\t*\n\t\t* ## Tool Visibility:\n\t\t* - If not allowed by active authorization system: tool is NOT registered\n\t\t* - Only registered tools are visible to MCP clients\n\t\t*\n\t\t* ## Examples:\n\t\t* ```typescript\n\t\t* // Tool available in \"triage\" skill only:\n\t\t* { requiredSkills: [\"triage\"], requiredScopes: [\"event:write\"] }\n\t\t*\n\t\t* // Tool available to ALL skills (foundational tool like whoami):\n\t\t* { requiredSkills: ALL_SKILLS, requiredScopes: [] }\n\t\t*\n\t\t* // Tool excluded from skills system (like use_sentry in agent mode):\n\t\t* { requiredSkills: [], requiredScopes: [] }\n\t\t* ```\n\t\t*/\n\t\tlet allowed = false;\n\t\tif (agentMode) allowed = true;\n\t\telse if (grantedSkills) {\n\t\t\tif (tool$1.requiredSkills && tool$1.requiredSkills.length > 0) allowed = hasRequiredSkills(grantedSkills, tool$1.requiredSkills);\n\t\t} else if (grantedScopes) allowed = isToolAllowed(tool$1.requiredScopes, grantedScopes);\n\t\tif (!allowed) continue;\n\t\tif (toolKey === \"find_organizations\" && context.constraints.organizationSlug || toolKey === \"find_projects\" && context.constraints.projectSlug) continue;\n\t\tconst constraintKeysToFilter = new Set(getConstraintKeysToFilter(context.constraints, tool$1.inputSchema));\n\t\tconst filteredInputSchema = Object.fromEntries(Object.entries(tool$1.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));\n\t\tserver.tool(tool$1.name, tool$1.description, filteredInputSchema, tool$1.annotations, async (params, extra) => {\n\t\t\tconst activeSpan = getActiveSpan();\n\t\t\tif (activeSpan) {\n\t\t\t\tif (context.constraints.organizationSlug) activeSpan.setAttribute(\"sentry-mcp.constraint-organization\", context.constraints.organizationSlug);\n\t\t\t\tif (context.constraints.projectSlug) activeSpan.setAttribute(\"sentry-mcp.constraint-project\", context.constraints.projectSlug);\n\t\t\t}\n\t\t\tif (context.userId) setUser({ id: context.userId });\n\t\t\tif (context.clientId) setTag(\"client.id\", context.clientId);\n\t\t\ttry {\n\t\t\t\tconst applicableConstraints = getConstraintParametersToInject(context.constraints, tool$1.inputSchema);\n\t\t\t\tconst paramsWithConstraints = {\n\t\t\t\t\t...params,\n\t\t\t\t\t...applicableConstraints\n\t\t\t\t};\n\t\t\t\tconst output = await tool$1.handler(paramsWithConstraints, context);\n\t\t\t\tif (activeSpan) activeSpan.setStatus({ code: 1 });\n\t\t\t\tif (typeof output === \"string\") return { content: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: output\n\t\t\t\t}] };\n\t\t\t\tif (Array.isArray(output)) return { content: output };\n\t\t\t\tthrow new Error(`Invalid tool output: ${output}`);\n\t\t\t} catch (error) {\n\t\t\t\tif (activeSpan) {\n\t\t\t\t\tactiveSpan.setStatus({ code: 2 });\n\t\t\t\t\tactiveSpan.recordException(error);\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: await formatErrorForUser(error)\n\t\t\t\t\t}],\n\t\t\t\t\tisError: true\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}\n}\n\n//#endregion\nexport { buildServer, handler_default$2 as handler_default, tools_default };\n//# sourceMappingURL=server-8ny70iLt.js.map","//#region src/telem/sentry.ts\nconst SCRUB_PATTERNS = [\n\t{\n\t\tpattern: /\\bsk-[a-zA-Z0-9]{48}\\b/g,\n\t\treplacement: \"[REDACTED_OPENAI_KEY]\",\n\t\tdescription: \"OpenAI API key\"\n\t},\n\t{\n\t\tpattern: /\\bBearer\\s+[a-zA-Z0-9\\-._~+/]+={0,}/g,\n\t\treplacement: \"Bearer [REDACTED_TOKEN]\",\n\t\tdescription: \"Bearer token\"\n\t},\n\t{\n\t\tpattern: /\\bsntrys_[a-zA-Z0-9_]+\\b/g,\n\t\treplacement: \"[REDACTED_SENTRY_TOKEN]\",\n\t\tdescription: \"Sentry access token\"\n\t}\n];\nconst MAX_SCRUB_DEPTH = 20;\n/**\n* Recursively scrub sensitive data from any value.\n* Returns tuple of [scrubbedValue, didScrub, descriptionsOfMatchedPatterns]\n*/\nfunction scrubValue(value, depth = 0) {\n\tif (depth >= MAX_SCRUB_DEPTH) return [\n\t\t\"[MAX_DEPTH_EXCEEDED]\",\n\t\tfalse,\n\t\t[]\n\t];\n\tif (typeof value === \"string\") {\n\t\tlet scrubbed = value;\n\t\tlet didScrub = false;\n\t\tconst matchedDescriptions = [];\n\t\tfor (const { pattern, replacement, description } of SCRUB_PATTERNS) {\n\t\t\tpattern.lastIndex = 0;\n\t\t\tif (pattern.test(scrubbed)) {\n\t\t\t\tdidScrub = true;\n\t\t\t\tmatchedDescriptions.push(description);\n\t\t\t\tpattern.lastIndex = 0;\n\t\t\t\tscrubbed = scrubbed.replace(pattern, replacement);\n\t\t\t}\n\t\t}\n\t\treturn [\n\t\t\tscrubbed,\n\t\t\tdidScrub,\n\t\t\tmatchedDescriptions\n\t\t];\n\t}\n\tif (Array.isArray(value)) {\n\t\tlet arrayDidScrub = false;\n\t\tconst arrayDescriptions = [];\n\t\tconst scrubbedArray = value.map((item) => {\n\t\t\tconst [scrubbed, didScrub, descriptions] = scrubValue(item, depth + 1);\n\t\t\tif (didScrub) {\n\t\t\t\tarrayDidScrub = true;\n\t\t\t\tarrayDescriptions.push(...descriptions);\n\t\t\t}\n\t\t\treturn scrubbed;\n\t\t});\n\t\treturn [\n\t\t\tscrubbedArray,\n\t\t\tarrayDidScrub,\n\t\t\tarrayDescriptions\n\t\t];\n\t}\n\tif (value && typeof value === \"object\") {\n\t\tlet objectDidScrub = false;\n\t\tconst objectDescriptions = [];\n\t\tconst scrubbed = {};\n\t\tfor (const [key, val] of Object.entries(value)) {\n\t\t\tconst [scrubbedVal, didScrub, descriptions] = scrubValue(val, depth + 1);\n\t\t\tif (didScrub) {\n\t\t\t\tobjectDidScrub = true;\n\t\t\t\tobjectDescriptions.push(...descriptions);\n\t\t\t}\n\t\t\tscrubbed[key] = scrubbedVal;\n\t\t}\n\t\treturn [\n\t\t\tscrubbed,\n\t\t\tobjectDidScrub,\n\t\t\tobjectDescriptions\n\t\t];\n\t}\n\treturn [\n\t\tvalue,\n\t\tfalse,\n\t\t[]\n\t];\n}\n/**\n* Sentry beforeSend hook that scrubs sensitive data from events\n*/\nfunction sentryBeforeSend(event, hint) {\n\tconst [scrubbedEvent, didScrub, descriptions] = scrubValue(event);\n\tif (didScrub) {\n\t\tconst uniqueDescriptions = [...new Set(descriptions)];\n\t\tconsole.warn(`[Sentry] Event contained sensitive data: ${uniqueDescriptions.join(\", \")}`);\n\t}\n\treturn scrubbedEvent;\n}\n\n//#endregion\nexport { sentryBeforeSend };\n//# sourceMappingURL=sentry-Bz8KwQu9.js.map","#!/usr/bin/env node\n\n/**\n * Main CLI entry point for the Sentry MCP server.\n *\n * Handles command-line argument parsing, environment configuration, Sentry\n * initialization, and starts the MCP server with stdio transport. Requires\n * a Sentry access token and optionally accepts host and DSN configuration.\n *\n * @example CLI Usage\n * ```bash\n * npx @sentry/mcp-server --access-token=TOKEN --host=sentry.io\n * npx @sentry/mcp-server --access-token=TOKEN --url=https://sentry.example.com\n * ```\n */\n\nimport { buildServer } from \"@sentry/mcp-core/server\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport { buildUsage } from \"./cli/usage\";\nimport { parseArgv, parseEnv, merge } from \"./cli/parse\";\nimport { finalize } from \"./cli/resolve\";\nimport { sentryBeforeSend } from \"@sentry/mcp-core/telem/sentry\";\nimport { ALL_SCOPES } from \"@sentry/mcp-core/permissions\";\nimport { DEFAULT_SCOPES, DEFAULT_SKILLS } from \"@sentry/mcp-core/constants\";\nimport { SKILLS } from \"@sentry/mcp-core/skills\";\nimport { setOpenAIBaseUrl } from \"@sentry/mcp-core/internal/agents/openai-provider\";\n\nconst packageName = \"@sentry/mcp-server\";\nconst allSkills = Object.keys(SKILLS) as ReadonlyArray<\n (typeof SKILLS)[keyof typeof SKILLS][\"id\"]\n>;\nconst usageText = buildUsage(\n packageName,\n DEFAULT_SCOPES,\n ALL_SCOPES,\n DEFAULT_SKILLS,\n allSkills,\n);\n\nfunction die(message: string): never {\n console.error(message);\n console.error(usageText);\n process.exit(1);\n}\nconst cli = parseArgv(process.argv.slice(2));\nif (cli.help) {\n console.log(usageText);\n process.exit(0);\n}\nif (cli.version) {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n}\nif (cli.unknownArgs.length > 0) {\n console.error(\"Error: Invalid argument(s):\", cli.unknownArgs.join(\", \"));\n console.error(usageText);\n process.exit(1);\n}\n\nconst env = parseEnv(process.env);\nconst cfg = (() => {\n try {\n return finalize(merge(cli, env));\n } catch (err) {\n die(err instanceof Error ? err.message : String(err));\n }\n})();\n\n// Check for OpenAI API key and warn if missing\nif (!process.env.OPENAI_API_KEY) {\n console.warn(\"Warning: OPENAI_API_KEY environment variable is not set.\");\n console.warn(\"The following AI-powered search tools will be unavailable:\");\n console.warn(\" - search_events (natural language event search)\");\n console.warn(\" - search_issues (natural language issue search)\");\n console.warn(\n \"All other tools will function normally. To enable AI-powered search, set OPENAI_API_KEY.\",\n );\n console.warn(\"\");\n}\n\n// Configure OpenAI settings from CLI flags\n// Note: baseUrl can only be set via CLI flag, not env var (security: prevents credential theft)\nsetOpenAIBaseUrl(cfg.openaiBaseUrl);\nif (cfg.openaiModel) {\n process.env.OPENAI_MODEL = cfg.openaiModel;\n}\n\nSentry.init({\n dsn: cfg.sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n beforeSend: sentryBeforeSend,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"mcp.agent_mode\": cli.agent ? \"true\" : \"false\",\n \"sentry.host\": cfg.sentryHost,\n \"mcp.mcp-url\": cfg.mcpUrl,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n Sentry.vercelAIIntegration({\n recordInputs: true,\n recordOutputs: true,\n }),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\n// Log agent mode status\nif (cli.agent) {\n console.warn(\"Agent mode enabled: Only use_sentry tool is available.\");\n console.warn(\n \"The use_sentry tool provides access to all Sentry operations through natural language.\",\n );\n console.warn(\"\");\n}\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// Build context once for server configuration and runtime\nconst context = {\n accessToken: cfg.accessToken,\n grantedScopes: cfg.finalScopes,\n grantedSkills: cfg.finalSkills,\n constraints: {\n organizationSlug: cfg.organizationSlug ?? null,\n projectSlug: cfg.projectSlug ?? null,\n },\n sentryHost: cfg.sentryHost,\n mcpUrl: cfg.mcpUrl,\n openaiBaseUrl: cfg.openaiBaseUrl,\n};\n\n// Build server with context to filter tools based on granted scopes\n// Use agentMode when --agent flag is set (only exposes use_sentry tool)\nconst server = buildServer({\n context,\n agentMode: cli.agent,\n});\n\nstartStdio(server, context).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"x_google_ignoreList":[4,5,6,7,8,9,10,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAI,iBAAiB,cAAc,MAAM;CACxC,YAAY,SAAS,SAAS;AAC7B,QAAM,SAAS,QAAQ;AACvB,OAAK,OAAO;CACZ;AACD;;;;;;AAMD,IAAI,qBAAqB,cAAc,MAAM;CAC5C,YAAY,SAAS,SAAS;AAC7B,QAAM,SAAS,QAAQ;AACvB,OAAK,OAAO;CACZ;AACD;;;;;;;ACfD,MAAM,kBAAkB;;;;AAIxB,MAAM,gBAAgB;;;;AAItB,SAAS,YAAY,OAAO;AAC3B,QAAO,QAAQ,KAAK,MAAM;AAC1B;;;;;AAKD,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;AAoB3B,SAAS,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B;AACD;AACD,IAAI,oBAAoB;CACvB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,sBAAsB;EACrB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,wBAAwB;EACvB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,QAAS;CACtB;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,wFAAyF;CACtG;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,OAAQ;CACrB;CACD,mCAAmC;EAClC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,wGAAyG;CACtH;CACD,iCAAiC;EAChC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,wBAAwB;EACvB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,oBAAoB;EACnB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;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AAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,WAAW,IAAK;CAC7B;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;EACA;CACD;CACD,6BAA6B;EAC5B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,QAAQ,MAAO;CAC5B;CACD,kCAAkC;EACjC,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,cAAe;CAC5B;AACD;AACD,IAAI,mBAAmB;CACtB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,kBAAkB;EACjB,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,sBAAsB;EACrB,eAAe;EACf,QAAQ;CACR;CACD,gBAAgB;EACf,eAAe;EACf,QAAQ;CACR;CACD,qBAAqB;EACpB,eAAe;EACf,QAAQ;EACR,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QA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,MAAO;CACpB;CACD,4BAA4B;EAC3B,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,4BAA4B;EAC3B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;EACA;CACD;CACD,oBAAoB;EACnB,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;AACD;AACD,IAAI,oBAAoB;CACvB,WAAW;CACX,aAAa;CACb,YAAY;AACZ;AAID,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;CACnB,uBAAuB;EACtB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,IAAK;CAClB;CACD,uBAAuB;EACtB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,KAAM;CACnB;CACD,uBAAuB;EACtB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,KAAM;CACnB;CACD,wBAAwB;EACvB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,QAAS;CACtB;CACD,8BAA8B;EAC7B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACA;CACD;CACD,2BAA2B;EAC1B,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY;GACX;GACA;GACA;GACA;GACA;EACA;CACD;CACD,yBAAyB;EACxB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,aAAa,cAAe;CACzC;CACD,sBAAsB;EACrB,eAAe;EACf,QAAQ;EACR,aAAa;EACb,YAAY,CAAC,OAAQ;CACrB;CACD,wBAAwB;EACvB,eAAe;EACf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