@sentry/mcp-server 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +21355 -77
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +21379 -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-232a22j4.js} +7 -3
  39. package/dist/stdio-232a22j4.js.map +1 -0
  40. package/dist/{stdio-DL-ID7Q4.cjs → stdio-aCI9XyaI.cjs} +20 -4
  41. package/dist/stdio-aCI9XyaI.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 +19 -104
  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
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-DaUNg6Ut.cjs","names":["options: UseSentryAgentOptions","ConfigurationError","systemPrompt"],"sources":["../src/tools/use-sentry/agent.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { Tool } from \"ai\";\nimport { ConfigurationError } from \"../../errors\";\nimport {\n callEmbeddedAgent,\n type ToolCall,\n} from \"../../internal/agents/callEmbeddedAgent\";\nimport { systemPrompt } from \"./config\";\n\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({\n result: z\n .string()\n .describe(\n \"The final result from your tool calls that answers the user's request\",\n ),\n});\n\nexport interface UseSentryAgentOptions {\n request: string;\n tools: Record<string, Tool>;\n}\n\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 */\nexport async function useSentryAgent(options: UseSentryAgentOptions): Promise<{\n result: z.infer<typeof outputSchema>;\n toolCalls: ToolCall[];\n}> {\n if (!process.env.OPENAI_API_KEY) {\n throw new ConfigurationError(\n \"OPENAI_API_KEY environment variable is required for use_sentry tool\",\n );\n }\n\n // Frame the request to make clear we're asking the agent to use tools\n // Don't just pass the raw request as it might trigger safety responses\n const prompt = options.request;\n\n // Use callEmbeddedAgent with all pre-wrapped MCP tools\n return await callEmbeddedAgent({\n system: systemPrompt,\n prompt: prompt,\n tools: options.tools,\n schema: outputSchema,\n });\n}\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,eAAe,MAAE,OAAO,EAC5B,QAAQ,MACL,QAAQ,CACR,SACC,wEACD,CACJ,EAAC;;;;;AAWF,eAAsB,eAAeA,SAGlC;AACD,MAAK,QAAQ,IAAI,eACf,OAAM,IAAIC,kCACR;CAMJ,MAAM,SAAS,QAAQ;AAGvB,QAAO,MAAM,4CAAkB;EAC7B,QAAQC;EACA;EACR,OAAO,QAAQ;EACf,QAAQ;CACT,EAAC;AACH"}
@@ -1,200 +0,0 @@
1
- import { defineTool } from "./define-vA6uuVue.js";
2
- import { ApiError, ApiServerError } from "./errors-DUEMWOr1.js";
3
- import { apiServiceFromContext } from "./api-BCICbJoI.js";
4
- import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from "./schema-ChlpIaqA.js";
5
- import { parseIssueParams } from "./issue-helpers-DtCbXiRZ.js";
6
- import { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getHumanInterventionGuidance, getOutputForAutofixStep, getStatusDisplayName, isTerminalStatus } from "./seer-CSFgx4AP.js";
7
- import { retryWithBackoff } from "./fetch-utils-C6qSgZai.js";
8
- import { setTag } from "@sentry/core";
9
- import { z } from "zod";
10
-
11
- //#region src/tools/analyze-issue-with-seer.ts
12
- var analyze_issue_with_seer_default = defineTool({
13
- name: "analyze_issue_with_seer",
14
- requiredSkills: ["seer"],
15
- requiredScopes: [],
16
- description: [
17
- "Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.",
18
- "",
19
- "Use this tool when you need:",
20
- "- Detailed AI-powered root cause analysis",
21
- "- Specific code fixes and implementation guidance",
22
- "- Step-by-step troubleshooting for complex issues",
23
- "- Understanding why an error is happening in production",
24
- "",
25
- "What this tool provides:",
26
- "- Root cause analysis with code-level explanations",
27
- "- Specific file locations and line numbers where errors occur",
28
- "- Concrete code fixes you can apply",
29
- "- Step-by-step implementation guidance",
30
- "",
31
- "This tool automatically:",
32
- "1. Checks if analysis already exists (instant results)",
33
- "2. Starts new AI analysis if needed (~2-5 minutes)",
34
- "3. Returns complete fix recommendations",
35
- "",
36
- "<examples>",
37
- "### User: \"What's causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"",
38
- "",
39
- "```",
40
- "analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')",
41
- "```",
42
- "",
43
- "### User: \"Can you help me understand why this is failing in production?\"",
44
- "",
45
- "```",
46
- "analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')",
47
- "```",
48
- "</examples>",
49
- "",
50
- "<hints>",
51
- "- Use this tool when you need deeper analysis beyond basic issue details",
52
- "- If the user provides an issueUrl, extract it and use that parameter alone",
53
- "- The analysis includes actual code snippets and fixes, not just error descriptions",
54
- "- Results are cached - subsequent calls return instantly",
55
- "</hints>"
56
- ].join("\n"),
57
- inputSchema: {
58
- organizationSlug: ParamOrganizationSlug.optional(),
59
- regionUrl: ParamRegionUrl.nullable().default(null),
60
- issueId: ParamIssueShortId.optional(),
61
- issueUrl: ParamIssueUrl.optional(),
62
- instruction: z.string().describe("Optional custom instruction for the AI analysis").optional()
63
- },
64
- annotations: {
65
- readOnlyHint: false,
66
- destructiveHint: false,
67
- openWorldHint: true
68
- },
69
- async handler(params, context) {
70
- const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
71
- const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
72
- organizationSlug: params.organizationSlug,
73
- issueId: params.issueId,
74
- issueUrl: params.issueUrl
75
- });
76
- setTag("organization.slug", orgSlug);
77
- let output = `# Seer Analysis for Issue ${parsedIssueId}\n\n`;
78
- let autofixState = await retryWithBackoff(() => apiService.getAutofixState({
79
- organizationSlug: orgSlug,
80
- issueId: parsedIssueId
81
- }), {
82
- maxRetries: SEER_MAX_RETRIES,
83
- initialDelay: SEER_INITIAL_RETRY_DELAY,
84
- shouldRetry: (error) => {
85
- return error instanceof ApiServerError || !(error instanceof ApiError);
86
- }
87
- });
88
- if (!autofixState.autofix) {
89
- output += `Starting new analysis...\n\n`;
90
- const startResult = await apiService.startAutofix({
91
- organizationSlug: orgSlug,
92
- issueId: parsedIssueId,
93
- instruction: params.instruction
94
- });
95
- output += `Analysis started with Run ID: ${startResult.run_id}\n\n`;
96
- await new Promise((resolve) => setTimeout(resolve, 1e3));
97
- autofixState = await retryWithBackoff(() => apiService.getAutofixState({
98
- organizationSlug: orgSlug,
99
- issueId: parsedIssueId
100
- }), {
101
- maxRetries: SEER_MAX_RETRIES,
102
- initialDelay: SEER_INITIAL_RETRY_DELAY,
103
- shouldRetry: (error) => {
104
- return error instanceof ApiServerError || !(error instanceof ApiError);
105
- }
106
- });
107
- } else {
108
- output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\n\n`;
109
- const existingStatus = autofixState.autofix.status;
110
- if (isTerminalStatus(existingStatus)) {
111
- output += `## Analysis ${getStatusDisplayName(existingStatus)}\n\n`;
112
- for (const step of autofixState.autofix.steps) {
113
- output += getOutputForAutofixStep(step);
114
- output += "\n";
115
- }
116
- if (existingStatus !== "COMPLETED") {
117
- output += `\n**Status**: ${existingStatus}\n`;
118
- output += getHumanInterventionGuidance(existingStatus);
119
- output += "\n";
120
- }
121
- return output;
122
- }
123
- }
124
- const startTime = Date.now();
125
- let lastStatus = "";
126
- let consecutiveErrors = 0;
127
- while (Date.now() - startTime < SEER_TIMEOUT) {
128
- if (!autofixState.autofix) {
129
- output += `Error: Analysis state lost. Please try again by running:\n`;
130
- output += `\`\`\`\n`;
131
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
132
- output += `\n\`\`\`\n`;
133
- return output;
134
- }
135
- const status = autofixState.autofix.status;
136
- if (isTerminalStatus(status)) {
137
- output += `## Analysis ${getStatusDisplayName(status)}\n\n`;
138
- for (const step of autofixState.autofix.steps) {
139
- output += getOutputForAutofixStep(step);
140
- output += "\n";
141
- }
142
- if (status !== "COMPLETED") {
143
- output += `\n**Status**: ${status}\n`;
144
- output += getHumanInterventionGuidance(status);
145
- }
146
- return output;
147
- }
148
- if (status !== lastStatus) {
149
- const activeStep = autofixState.autofix.steps.find((step) => step.status === "PROCESSING" || step.status === "IN_PROGRESS");
150
- if (activeStep) output += `Processing: ${activeStep.title}...\n`;
151
- lastStatus = status;
152
- }
153
- await new Promise((resolve) => setTimeout(resolve, SEER_POLLING_INTERVAL));
154
- try {
155
- autofixState = await retryWithBackoff(() => apiService.getAutofixState({
156
- organizationSlug: orgSlug,
157
- issueId: parsedIssueId
158
- }), {
159
- maxRetries: SEER_MAX_RETRIES,
160
- initialDelay: SEER_INITIAL_RETRY_DELAY,
161
- shouldRetry: (error) => {
162
- return error instanceof ApiServerError || !(error instanceof ApiError);
163
- }
164
- });
165
- consecutiveErrors = 0;
166
- } catch (error) {
167
- consecutiveErrors++;
168
- if (consecutiveErrors >= 3) {
169
- output += `\n## Error During Analysis\n\n`;
170
- output += `Unable to retrieve analysis status after multiple attempts.\n`;
171
- output += `Error: ${error instanceof Error ? error.message : String(error)}\n\n`;
172
- output += `You can check the status later by running the same command again:\n`;
173
- output += `\`\`\`\n`;
174
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
175
- output += `\n\`\`\`\n`;
176
- return output;
177
- }
178
- output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\n`;
179
- }
180
- }
181
- if (autofixState.autofix) {
182
- output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\n\n`;
183
- for (const step of autofixState.autofix.steps) {
184
- output += getOutputForAutofixStep(step);
185
- output += "\n";
186
- }
187
- }
188
- output += `\n## Analysis Timed Out\n\n`;
189
- output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1e3}s).\n\n`;
190
- output += `\nYou can check the status later by running the same command again:\n`;
191
- output += `\`\`\`\n`;
192
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
193
- output += `\n\`\`\`\n`;
194
- return output;
195
- }
196
- });
197
-
198
- //#endregion
199
- export { analyze_issue_with_seer_default };
200
- //# sourceMappingURL=analyze-issue-with-seer-6OwT1RJP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyze-issue-with-seer-6OwT1RJP.js","names":["context: ServerContext"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.nullable().default(null),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":"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"}
@@ -1,206 +0,0 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_define = require('./define-CLp6EtpZ.cjs');
3
- const require_errors = require('./errors-DWysOIMw.cjs');
4
- const require_api = require('./api-CfzBwheo.cjs');
5
- const require_schema = require('./schema-BGVOjcD7.cjs');
6
- const require_issue_helpers = require('./issue-helpers-D-hBnXTk.cjs');
7
- const require_seer = require('./seer-sA1asAZs.cjs');
8
- const require_fetch_utils = require('./fetch-utils-DRgOJp3e.cjs');
9
- const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
10
- const zod = require_chunk.__toESM(require("zod"));
11
-
12
- //#region src/tools/analyze-issue-with-seer.ts
13
- var analyze_issue_with_seer_default = require_define.defineTool({
14
- name: "analyze_issue_with_seer",
15
- requiredSkills: ["seer"],
16
- requiredScopes: [],
17
- description: [
18
- "Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.",
19
- "",
20
- "Use this tool when you need:",
21
- "- Detailed AI-powered root cause analysis",
22
- "- Specific code fixes and implementation guidance",
23
- "- Step-by-step troubleshooting for complex issues",
24
- "- Understanding why an error is happening in production",
25
- "",
26
- "What this tool provides:",
27
- "- Root cause analysis with code-level explanations",
28
- "- Specific file locations and line numbers where errors occur",
29
- "- Concrete code fixes you can apply",
30
- "- Step-by-step implementation guidance",
31
- "",
32
- "This tool automatically:",
33
- "1. Checks if analysis already exists (instant results)",
34
- "2. Starts new AI analysis if needed (~2-5 minutes)",
35
- "3. Returns complete fix recommendations",
36
- "",
37
- "<examples>",
38
- "### User: \"What's causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"",
39
- "",
40
- "```",
41
- "analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')",
42
- "```",
43
- "",
44
- "### User: \"Can you help me understand why this is failing in production?\"",
45
- "",
46
- "```",
47
- "analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')",
48
- "```",
49
- "</examples>",
50
- "",
51
- "<hints>",
52
- "- Use this tool when you need deeper analysis beyond basic issue details",
53
- "- If the user provides an issueUrl, extract it and use that parameter alone",
54
- "- The analysis includes actual code snippets and fixes, not just error descriptions",
55
- "- Results are cached - subsequent calls return instantly",
56
- "</hints>"
57
- ].join("\n"),
58
- inputSchema: {
59
- organizationSlug: require_schema.ParamOrganizationSlug.optional(),
60
- regionUrl: require_schema.ParamRegionUrl.nullable().default(null),
61
- issueId: require_schema.ParamIssueShortId.optional(),
62
- issueUrl: require_schema.ParamIssueUrl.optional(),
63
- instruction: zod.z.string().describe("Optional custom instruction for the AI analysis").optional()
64
- },
65
- annotations: {
66
- readOnlyHint: false,
67
- destructiveHint: false,
68
- openWorldHint: true
69
- },
70
- async handler(params, context) {
71
- const apiService = require_api.apiServiceFromContext(context, { regionUrl: params.regionUrl });
72
- const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
73
- organizationSlug: params.organizationSlug,
74
- issueId: params.issueId,
75
- issueUrl: params.issueUrl
76
- });
77
- (0, __sentry_core.setTag)("organization.slug", orgSlug);
78
- let output = `# Seer Analysis for Issue ${parsedIssueId}\n\n`;
79
- let autofixState = await require_fetch_utils.retryWithBackoff(() => apiService.getAutofixState({
80
- organizationSlug: orgSlug,
81
- issueId: parsedIssueId
82
- }), {
83
- maxRetries: require_seer.SEER_MAX_RETRIES,
84
- initialDelay: require_seer.SEER_INITIAL_RETRY_DELAY,
85
- shouldRetry: (error) => {
86
- return error instanceof require_errors.ApiServerError || !(error instanceof require_errors.ApiError);
87
- }
88
- });
89
- if (!autofixState.autofix) {
90
- output += `Starting new analysis...\n\n`;
91
- const startResult = await apiService.startAutofix({
92
- organizationSlug: orgSlug,
93
- issueId: parsedIssueId,
94
- instruction: params.instruction
95
- });
96
- output += `Analysis started with Run ID: ${startResult.run_id}\n\n`;
97
- await new Promise((resolve) => setTimeout(resolve, 1e3));
98
- autofixState = await require_fetch_utils.retryWithBackoff(() => apiService.getAutofixState({
99
- organizationSlug: orgSlug,
100
- issueId: parsedIssueId
101
- }), {
102
- maxRetries: require_seer.SEER_MAX_RETRIES,
103
- initialDelay: require_seer.SEER_INITIAL_RETRY_DELAY,
104
- shouldRetry: (error) => {
105
- return error instanceof require_errors.ApiServerError || !(error instanceof require_errors.ApiError);
106
- }
107
- });
108
- } else {
109
- output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\n\n`;
110
- const existingStatus = autofixState.autofix.status;
111
- if (require_seer.isTerminalStatus(existingStatus)) {
112
- output += `## Analysis ${require_seer.getStatusDisplayName(existingStatus)}\n\n`;
113
- for (const step of autofixState.autofix.steps) {
114
- output += require_seer.getOutputForAutofixStep(step);
115
- output += "\n";
116
- }
117
- if (existingStatus !== "COMPLETED") {
118
- output += `\n**Status**: ${existingStatus}\n`;
119
- output += require_seer.getHumanInterventionGuidance(existingStatus);
120
- output += "\n";
121
- }
122
- return output;
123
- }
124
- }
125
- const startTime = Date.now();
126
- let lastStatus = "";
127
- let consecutiveErrors = 0;
128
- while (Date.now() - startTime < require_seer.SEER_TIMEOUT) {
129
- if (!autofixState.autofix) {
130
- output += `Error: Analysis state lost. Please try again by running:\n`;
131
- output += `\`\`\`\n`;
132
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
133
- output += `\n\`\`\`\n`;
134
- return output;
135
- }
136
- const status = autofixState.autofix.status;
137
- if (require_seer.isTerminalStatus(status)) {
138
- output += `## Analysis ${require_seer.getStatusDisplayName(status)}\n\n`;
139
- for (const step of autofixState.autofix.steps) {
140
- output += require_seer.getOutputForAutofixStep(step);
141
- output += "\n";
142
- }
143
- if (status !== "COMPLETED") {
144
- output += `\n**Status**: ${status}\n`;
145
- output += require_seer.getHumanInterventionGuidance(status);
146
- }
147
- return output;
148
- }
149
- if (status !== lastStatus) {
150
- const activeStep = autofixState.autofix.steps.find((step) => step.status === "PROCESSING" || step.status === "IN_PROGRESS");
151
- if (activeStep) output += `Processing: ${activeStep.title}...\n`;
152
- lastStatus = status;
153
- }
154
- await new Promise((resolve) => setTimeout(resolve, require_seer.SEER_POLLING_INTERVAL));
155
- try {
156
- autofixState = await require_fetch_utils.retryWithBackoff(() => apiService.getAutofixState({
157
- organizationSlug: orgSlug,
158
- issueId: parsedIssueId
159
- }), {
160
- maxRetries: require_seer.SEER_MAX_RETRIES,
161
- initialDelay: require_seer.SEER_INITIAL_RETRY_DELAY,
162
- shouldRetry: (error) => {
163
- return error instanceof require_errors.ApiServerError || !(error instanceof require_errors.ApiError);
164
- }
165
- });
166
- consecutiveErrors = 0;
167
- } catch (error) {
168
- consecutiveErrors++;
169
- if (consecutiveErrors >= 3) {
170
- output += `\n## Error During Analysis\n\n`;
171
- output += `Unable to retrieve analysis status after multiple attempts.\n`;
172
- output += `Error: ${error instanceof Error ? error.message : String(error)}\n\n`;
173
- output += `You can check the status later by running the same command again:\n`;
174
- output += `\`\`\`\n`;
175
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
176
- output += `\n\`\`\`\n`;
177
- return output;
178
- }
179
- output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\n`;
180
- }
181
- }
182
- if (autofixState.autofix) {
183
- output += `**Current Status**: ${require_seer.getStatusDisplayName(autofixState.autofix.status)}\n\n`;
184
- for (const step of autofixState.autofix.steps) {
185
- output += require_seer.getOutputForAutofixStep(step);
186
- output += "\n";
187
- }
188
- }
189
- output += `\n## Analysis Timed Out\n\n`;
190
- output += `The analysis is taking longer than expected (>${require_seer.SEER_TIMEOUT / 1e3}s).\n\n`;
191
- output += `\nYou can check the status later by running the same command again:\n`;
192
- output += `\`\`\`\n`;
193
- output += params.issueUrl ? `analyze_issue_with_seer(issueUrl="${params.issueUrl}")` : `analyze_issue_with_seer(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`;
194
- output += `\n\`\`\`\n`;
195
- return output;
196
- }
197
- });
198
-
199
- //#endregion
200
- Object.defineProperty(exports, 'analyze_issue_with_seer_default', {
201
- enumerable: true,
202
- get: function () {
203
- return analyze_issue_with_seer_default;
204
- }
205
- });
206
- //# sourceMappingURL=analyze-issue-with-seer-wsCEFdZs.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyze-issue-with-seer-wsCEFdZs.cjs","names":["context: ServerContext","SEER_MAX_RETRIES","SEER_INITIAL_RETRY_DELAY","ApiServerError","ApiError","SEER_TIMEOUT","SEER_POLLING_INTERVAL"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.nullable().default(null),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":"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"}
@@ -1,63 +0,0 @@
1
- import { UserInputError } from "./errors-BXmNwD2K.js";
2
- import { ApiClientError, ApiNotFoundError } from "./errors-DUEMWOr1.js";
3
- import { SentryApiService } from "./client-Be1DR1al.js";
4
- import { validateRegionUrl } from "./validate-region-url-Bdokgz65.js";
5
-
6
- //#region src/internal/tool-helpers/api.ts
7
- /**
8
- * Create a Sentry API service from server context with optional region override
9
- * @param context - Server context containing host and access token
10
- * @param opts - Options object containing optional regionUrl override
11
- * @returns Configured SentryApiService instance (always uses HTTPS)
12
- * @throws {UserInputError} When regionUrl is provided but invalid
13
- */
14
- function apiServiceFromContext(context, opts = {}) {
15
- let host = context.sentryHost;
16
- if (opts.regionUrl?.trim()) {
17
- const baseHost = context.sentryHost || "sentry.io";
18
- host = validateRegionUrl(opts.regionUrl.trim(), baseHost);
19
- }
20
- return new SentryApiService({
21
- host,
22
- accessToken: context.accessToken
23
- });
24
- }
25
- /**
26
- * Maps API errors to user-friendly errors based on context
27
- * @param error - The error to handle
28
- * @param params - The parameters that were used in the API call
29
- * @returns Never - always throws an error
30
- * @throws {UserInputError} For 4xx errors that are likely user input issues
31
- * @throws {Error} For other errors
32
- */
33
- function handleApiError(error, params) {
34
- if (error instanceof ApiClientError) {
35
- let message = `API error (${error.status}): ${error.message}`;
36
- if (error instanceof ApiNotFoundError && params) {
37
- const paramsList = [];
38
- for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") paramsList.push(`${key}: '${value}'`);
39
- if (paramsList.length > 0) message = `Resource not found (404): ${error.message}\nPlease verify these parameters are correct:\n${paramsList.map((p) => ` - ${p}`).join("\n")}`;
40
- }
41
- throw new UserInputError(message, { cause: error });
42
- }
43
- throw error;
44
- }
45
- /**
46
- * Wraps an async API call with automatic error handling
47
- * @param fn - The async function to execute
48
- * @param params - The parameters that were used in the API call
49
- * @returns The result of the function
50
- * @throws {UserInputError} For user input errors
51
- * @throws {Error} For other errors
52
- */
53
- async function withApiErrorHandling(fn, params) {
54
- try {
55
- return await fn();
56
- } catch (error) {
57
- handleApiError(error, params);
58
- }
59
- }
60
-
61
- //#endregion
62
- export { apiServiceFromContext, handleApiError, withApiErrorHandling };
63
- //# sourceMappingURL=api-BCICbJoI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-BCICbJoI.js","names":["context: ServerContext","opts: { regionUrl?: string }","error: unknown","params?: Record<string, unknown>","paramsList: string[]","fn: () => Promise<T>"],"sources":["../src/internal/tool-helpers/api.ts"],"sourcesContent":["import {\n SentryApiService,\n ApiClientError,\n ApiNotFoundError,\n} from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\nimport { validateRegionUrl } from \"./validate-region-url\";\n\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 */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n // Validate the regionUrl against the base host to prevent SSRF\n // Use default host if context.sentryHost is not set\n const baseHost = context.sentryHost || \"sentry.io\";\n host = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\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 */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n // Use the new error hierarchy - all 4xx errors extend ApiClientError\n if (error instanceof ApiClientError) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // Special handling for 404s with parameter context\n if (error instanceof ApiNotFoundError && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n\n // All other errors bubble up (including ApiServerError for 5xx)\n throw error;\n}\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 */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,EAAE;EAG1B,MAAM,WAAW,QAAQ,cAAc;AACvC,SAAO,kBAAkB,KAAK,UAAU,MAAM,EAAE,SAAS;CAC1D;AAED,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AAEP,KAAI,iBAAiB,gBAAgB;EACnC,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,MAAI,iBAAiB,oBAAoB,QAAQ;GAC/C,MAAMC,aAAuB,CAAE;AAC/B,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,OAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;EAErJ;AAED,QAAM,IAAI,eAAe,SAAS,EAAE,OAAO,MAAO;CACnD;AAGD,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAF,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
@@ -1,80 +0,0 @@
1
- const require_errors = require('./errors-umQzF_vW.cjs');
2
- const require_errors$1 = require('./errors-DWysOIMw.cjs');
3
- const require_client = require('./client-DSxCsnqO.cjs');
4
- const require_validate_region_url = require('./validate-region-url-BvT-IgKg.cjs');
5
-
6
- //#region src/internal/tool-helpers/api.ts
7
- /**
8
- * Create a Sentry API service from server context with optional region override
9
- * @param context - Server context containing host and access token
10
- * @param opts - Options object containing optional regionUrl override
11
- * @returns Configured SentryApiService instance (always uses HTTPS)
12
- * @throws {UserInputError} When regionUrl is provided but invalid
13
- */
14
- function apiServiceFromContext(context, opts = {}) {
15
- let host = context.sentryHost;
16
- if (opts.regionUrl?.trim()) {
17
- const baseHost = context.sentryHost || "sentry.io";
18
- host = require_validate_region_url.validateRegionUrl(opts.regionUrl.trim(), baseHost);
19
- }
20
- return new require_client.SentryApiService({
21
- host,
22
- accessToken: context.accessToken
23
- });
24
- }
25
- /**
26
- * Maps API errors to user-friendly errors based on context
27
- * @param error - The error to handle
28
- * @param params - The parameters that were used in the API call
29
- * @returns Never - always throws an error
30
- * @throws {UserInputError} For 4xx errors that are likely user input issues
31
- * @throws {Error} For other errors
32
- */
33
- function handleApiError(error, params) {
34
- if (error instanceof require_errors$1.ApiClientError) {
35
- let message = `API error (${error.status}): ${error.message}`;
36
- if (error instanceof require_errors$1.ApiNotFoundError && params) {
37
- const paramsList = [];
38
- for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== null && value !== "") paramsList.push(`${key}: '${value}'`);
39
- if (paramsList.length > 0) message = `Resource not found (404): ${error.message}\nPlease verify these parameters are correct:\n${paramsList.map((p) => ` - ${p}`).join("\n")}`;
40
- }
41
- throw new require_errors.UserInputError(message, { cause: error });
42
- }
43
- throw error;
44
- }
45
- /**
46
- * Wraps an async API call with automatic error handling
47
- * @param fn - The async function to execute
48
- * @param params - The parameters that were used in the API call
49
- * @returns The result of the function
50
- * @throws {UserInputError} For user input errors
51
- * @throws {Error} For other errors
52
- */
53
- async function withApiErrorHandling(fn, params) {
54
- try {
55
- return await fn();
56
- } catch (error) {
57
- handleApiError(error, params);
58
- }
59
- }
60
-
61
- //#endregion
62
- Object.defineProperty(exports, 'apiServiceFromContext', {
63
- enumerable: true,
64
- get: function () {
65
- return apiServiceFromContext;
66
- }
67
- });
68
- Object.defineProperty(exports, 'handleApiError', {
69
- enumerable: true,
70
- get: function () {
71
- return handleApiError;
72
- }
73
- });
74
- Object.defineProperty(exports, 'withApiErrorHandling', {
75
- enumerable: true,
76
- get: function () {
77
- return withApiErrorHandling;
78
- }
79
- });
80
- //# sourceMappingURL=api-CfzBwheo.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-CfzBwheo.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","SentryApiService","error: unknown","params?: Record<string, unknown>","ApiClientError","ApiNotFoundError","paramsList: string[]","UserInputError","fn: () => Promise<T>"],"sources":["../src/internal/tool-helpers/api.ts"],"sourcesContent":["import {\n SentryApiService,\n ApiClientError,\n ApiNotFoundError,\n} from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\nimport { validateRegionUrl } from \"./validate-region-url\";\n\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 */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n // Validate the regionUrl against the base host to prevent SSRF\n // Use default host if context.sentryHost is not set\n const baseHost = context.sentryHost || \"sentry.io\";\n host = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\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 */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n // Use the new error hierarchy - all 4xx errors extend ApiClientError\n if (error instanceof ApiClientError) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // Special handling for 404s with parameter context\n if (error instanceof ApiNotFoundError && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n\n // All other errors bubble up (including ApiServerError for 5xx)\n throw error;\n}\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 */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,EAAE;EAG1B,MAAM,WAAW,QAAQ,cAAc;AACvC,SAAO,8CAAkB,KAAK,UAAU,MAAM,EAAE,SAAS;CAC1D;AAED,QAAO,IAAIC,gCAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AAEP,KAAI,iBAAiBC,iCAAgB;EACnC,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,MAAI,iBAAiBC,qCAAoB,QAAQ;GAC/C,MAAMC,aAAuB,CAAE;AAC/B,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,OAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;EAErJ;AAED,QAAM,IAAIC,8BAAe,SAAS,EAAE,OAAO,MAAO;CACnD;AAGD,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAL,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}