@sentry/mcp-server 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/{analyze-issue-with-seer-BkVrrh28.cjs → analyze-issue-with-seer-B8ZWokLV.cjs} +50 -10
  2. package/dist/analyze-issue-with-seer-B8ZWokLV.cjs.map +1 -0
  3. package/dist/{analyze-issue-with-seer-CoqsTklL.js → analyze-issue-with-seer-szIqv1_I.js} +50 -10
  4. package/dist/analyze-issue-with-seer-szIqv1_I.js.map +1 -0
  5. package/dist/api-client/client.cjs +2 -1
  6. package/dist/api-client/client.d.cts +3 -3
  7. package/dist/api-client/client.d.ts +3 -3
  8. package/dist/api-client/client.js +2 -1
  9. package/dist/api-client/index.cjs +2 -1
  10. package/dist/api-client/index.d.cts +3 -3
  11. package/dist/api-client/index.d.ts +3 -3
  12. package/dist/api-client/index.js +2 -1
  13. package/dist/api-client/schema.d.cts +1 -1
  14. package/dist/api-client/schema.d.ts +1 -1
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/api-utils-B-9vnzoA.cjs +86 -0
  18. package/dist/api-utils-B-9vnzoA.cjs.map +1 -0
  19. package/dist/api-utils-CHRiLf2Y.js +69 -0
  20. package/dist/api-utils-CHRiLf2Y.js.map +1 -0
  21. package/dist/{client-Dkw5iYu3.cjs → client-C_lwH0jz.cjs} +102 -51
  22. package/dist/client-C_lwH0jz.cjs.map +1 -0
  23. package/dist/{client-VCJp6Kcu.d.ts → client-D8vrUp2k.d.cts} +37 -5
  24. package/dist/client-D8vrUp2k.d.cts.map +1 -0
  25. package/dist/{client-CQ9Xe1aN.d.cts → client-h32L1Hx5.d.ts} +36 -4
  26. package/dist/client-h32L1Hx5.d.ts.map +1 -0
  27. package/dist/{client-DOYWNvVM.js → client-pyNUFaLN.js} +102 -51
  28. package/dist/client-pyNUFaLN.js.map +1 -0
  29. package/dist/{create-dsn-D530I7Lr.js → create-dsn-CEEytIa4.js} +2 -2
  30. package/dist/{create-dsn-D530I7Lr.js.map → create-dsn-CEEytIa4.js.map} +1 -1
  31. package/dist/{create-dsn-Dz8nyTFw.cjs → create-dsn-CI7MSiQu.cjs} +2 -2
  32. package/dist/{create-dsn-Dz8nyTFw.cjs.map → create-dsn-CI7MSiQu.cjs.map} +1 -1
  33. package/dist/{create-project-K1od5Rhx.js → create-project-CoV1e-vp.js} +2 -2
  34. package/dist/{create-project-K1od5Rhx.js.map → create-project-CoV1e-vp.js.map} +1 -1
  35. package/dist/{create-project-BxzRiryg.cjs → create-project-DnLKRG1p.cjs} +2 -2
  36. package/dist/{create-project-BxzRiryg.cjs.map → create-project-DnLKRG1p.cjs.map} +1 -1
  37. package/dist/{create-team-CJhrccc1.cjs → create-team-DKpKxVIY.cjs} +2 -2
  38. package/dist/{create-team-CJhrccc1.cjs.map → create-team-DKpKxVIY.cjs.map} +1 -1
  39. package/dist/{create-team-zHz00C6Q.js → create-team-HWN88CJQ.js} +2 -2
  40. package/dist/{create-team-zHz00C6Q.js.map → create-team-HWN88CJQ.js.map} +1 -1
  41. package/dist/errors-BtJEw2Z-.cjs +38 -0
  42. package/dist/errors-BtJEw2Z-.cjs.map +1 -0
  43. package/dist/errors-D_R568zP.js +26 -0
  44. package/dist/errors-D_R568zP.js.map +1 -0
  45. package/dist/errors.cjs +2 -1
  46. package/dist/errors.d.cts +10 -2
  47. package/dist/errors.d.cts.map +1 -1
  48. package/dist/errors.d.ts +10 -2
  49. package/dist/errors.d.ts.map +1 -1
  50. package/dist/errors.js +2 -2
  51. package/dist/fetch-utils-B0CB5xLM.d.ts +33 -0
  52. package/dist/fetch-utils-B0CB5xLM.d.ts.map +1 -0
  53. package/dist/fetch-utils-CTLoW1R8.d.cts +33 -0
  54. package/dist/fetch-utils-CTLoW1R8.d.cts.map +1 -0
  55. package/dist/fetch-utils-SuGtrQRz.cjs +64 -0
  56. package/dist/fetch-utils-SuGtrQRz.cjs.map +1 -0
  57. package/dist/fetch-utils-gHZdOZV2.js +52 -0
  58. package/dist/fetch-utils-gHZdOZV2.js.map +1 -0
  59. package/dist/{find-dsns-BoEP0N7B.js → find-dsns-BB9dQP0b.js} +2 -2
  60. package/dist/{find-dsns-BoEP0N7B.js.map → find-dsns-BB9dQP0b.js.map} +1 -1
  61. package/dist/{find-dsns-CK59RaUJ.cjs → find-dsns-vriZSwr7.cjs} +2 -2
  62. package/dist/{find-dsns-CK59RaUJ.cjs.map → find-dsns-vriZSwr7.cjs.map} +1 -1
  63. package/dist/{find-errors-CB9NpSxG.cjs → find-errors-BQFHuBHi.cjs} +6 -3
  64. package/dist/find-errors-BQFHuBHi.cjs.map +1 -0
  65. package/dist/{find-errors-C3oUMeRi.js → find-errors-CSPsT-Jp.js} +6 -3
  66. package/dist/find-errors-CSPsT-Jp.js.map +1 -0
  67. package/dist/{find-issues-C3uk59rn.cjs → find-issues-BG80wLZw.cjs} +7 -4
  68. package/dist/find-issues-BG80wLZw.cjs.map +1 -0
  69. package/dist/{find-issues-CAtNGBly.js → find-issues-DoUD8vP0.js} +7 -4
  70. package/dist/find-issues-DoUD8vP0.js.map +1 -0
  71. package/dist/{find-organizations-ojXwWWzk.js → find-organizations-BILg1hUb.js} +3 -3
  72. package/dist/find-organizations-BILg1hUb.js.map +1 -0
  73. package/dist/{find-organizations-BrdMfZRO.cjs → find-organizations-Cx5vCj4j.cjs} +3 -3
  74. package/dist/find-organizations-Cx5vCj4j.cjs.map +1 -0
  75. package/dist/{find-projects-BZWhlYJh.cjs → find-projects-CN99WBex.cjs} +3 -3
  76. package/dist/{find-projects-BZWhlYJh.cjs.map → find-projects-CN99WBex.cjs.map} +1 -1
  77. package/dist/{find-projects-fcLG4KpT.js → find-projects-CgCj2_eq.js} +3 -3
  78. package/dist/{find-projects-fcLG4KpT.js.map → find-projects-CgCj2_eq.js.map} +1 -1
  79. package/dist/{find-releases-BUozr0Z-.js → find-releases-BsQF3wc5.js} +2 -2
  80. package/dist/{find-releases-BUozr0Z-.js.map → find-releases-BsQF3wc5.js.map} +1 -1
  81. package/dist/{find-releases-CZCVEOHZ.cjs → find-releases-Cm11xU5S.cjs} +2 -2
  82. package/dist/{find-releases-CZCVEOHZ.cjs.map → find-releases-Cm11xU5S.cjs.map} +1 -1
  83. package/dist/{find-tags-d-wF1Se8.js → find-tags-BRaa2i-r.js} +2 -2
  84. package/dist/{find-tags-d-wF1Se8.js.map → find-tags-BRaa2i-r.js.map} +1 -1
  85. package/dist/{find-tags-Byk4d3oZ.cjs → find-tags-BjibTJBm.cjs} +2 -2
  86. package/dist/{find-tags-Byk4d3oZ.cjs.map → find-tags-BjibTJBm.cjs.map} +1 -1
  87. package/dist/{find-teams-CnU5x9rQ.cjs → find-teams-CS443jRa.cjs} +3 -3
  88. package/dist/{find-teams-CnU5x9rQ.cjs.map → find-teams-CS443jRa.cjs.map} +1 -1
  89. package/dist/{find-teams-BZ118EIK.js → find-teams-XgUg8Nj5.js} +3 -3
  90. package/dist/{find-teams-BZ118EIK.js.map → find-teams-XgUg8Nj5.js.map} +1 -1
  91. package/dist/{find-transactions-DuZyqjhF.cjs → find-transactions-B0s_rr0H.cjs} +2 -2
  92. package/dist/{find-transactions-DuZyqjhF.cjs.map → find-transactions-B0s_rr0H.cjs.map} +1 -1
  93. package/dist/{find-transactions-BiBgg-AE.js → find-transactions-Cob_B_3u.js} +2 -2
  94. package/dist/{find-transactions-BiBgg-AE.js.map → find-transactions-Cob_B_3u.js.map} +1 -1
  95. package/dist/{formatting-D0Aki7rK.cjs → formatting-AXU4XsjJ.cjs} +2 -2
  96. package/dist/{formatting-D0Aki7rK.cjs.map → formatting-AXU4XsjJ.cjs.map} +1 -1
  97. package/dist/{formatting-vtXxusbn.d.ts → formatting-DnSI0DHf.d.ts} +4 -4
  98. package/dist/{formatting-vtXxusbn.d.ts.map → formatting-DnSI0DHf.d.ts.map} +1 -1
  99. package/dist/{formatting-Bvyded57.js → formatting-WGc5qrhv.js} +2 -2
  100. package/dist/{formatting-Bvyded57.js.map → formatting-WGc5qrhv.js.map} +1 -1
  101. package/dist/{formatting-CcTK2X8V.d.cts → formatting-aGQ7M_2w.d.cts} +4 -4
  102. package/dist/{formatting-CcTK2X8V.d.cts.map → formatting-aGQ7M_2w.d.cts.map} +1 -1
  103. package/dist/{get-doc-DaTCenOE.cjs → get-doc-ByXR3EWc.cjs} +4 -4
  104. package/dist/{get-doc-DaTCenOE.cjs.map → get-doc-ByXR3EWc.cjs.map} +1 -1
  105. package/dist/{get-doc-YTiQznr1.js → get-doc-C1IEG2pH.js} +4 -4
  106. package/dist/{get-doc-YTiQznr1.js.map → get-doc-C1IEG2pH.js.map} +1 -1
  107. package/dist/{get-event-attachment-C-ig2-3F.cjs → get-event-attachment-CuGUfVAD.cjs} +2 -2
  108. package/dist/{get-event-attachment-C-ig2-3F.cjs.map → get-event-attachment-CuGUfVAD.cjs.map} +1 -1
  109. package/dist/{get-event-attachment-DVCPpUMj.js → get-event-attachment-N11gSV23.js} +2 -2
  110. package/dist/{get-event-attachment-DVCPpUMj.js.map → get-event-attachment-N11gSV23.js.map} +1 -1
  111. package/dist/{get-issue-details-Dcmzxknx.js → get-issue-details-BrEGybe0.js} +9 -6
  112. package/dist/get-issue-details-BrEGybe0.js.map +1 -0
  113. package/dist/{get-issue-details-lBrYR9yx.cjs → get-issue-details-EklkHsWi.cjs} +9 -6
  114. package/dist/get-issue-details-EklkHsWi.cjs.map +1 -0
  115. package/dist/index.cjs +34 -34
  116. package/dist/index.js +34 -34
  117. package/dist/internal/fetch-utils.cjs +3 -2
  118. package/dist/internal/fetch-utils.d.cts +2 -2
  119. package/dist/internal/fetch-utils.d.ts +2 -2
  120. package/dist/internal/fetch-utils.js +2 -2
  121. package/dist/internal/formatting.cjs +2 -2
  122. package/dist/internal/formatting.d.cts +4 -4
  123. package/dist/internal/formatting.d.ts +4 -4
  124. package/dist/internal/formatting.js +2 -2
  125. package/dist/internal/issue-helpers.cjs +2 -1
  126. package/dist/internal/issue-helpers.js +2 -1
  127. package/dist/internal/test-fixtures.d.cts +44 -44
  128. package/dist/internal/test-fixtures.d.cts.map +1 -1
  129. package/dist/internal/test-fixtures.d.ts +2 -2
  130. package/dist/issue-helpers-BJffpNoO.d.ts.map +1 -1
  131. package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -1
  132. package/dist/{issue-helpers-CqqYnwYE.js → issue-helpers-D2p1Gkgm.js} +15 -19
  133. package/dist/issue-helpers-D2p1Gkgm.js.map +1 -0
  134. package/dist/{issue-helpers-DyAIO0w6.cjs → issue-helpers-DvsTfq9u.cjs} +14 -19
  135. package/dist/issue-helpers-DvsTfq9u.cjs.map +1 -0
  136. package/dist/{prompts-C8Y9w5c4.js → prompts-Cuwmybyc.js} +2 -2
  137. package/dist/{prompts-C8Y9w5c4.js.map → prompts-Cuwmybyc.js.map} +1 -1
  138. package/dist/{prompts-Df3i1XSB.cjs → prompts-uWAbMvLe.cjs} +2 -2
  139. package/dist/{prompts-Df3i1XSB.cjs.map → prompts-uWAbMvLe.cjs.map} +1 -1
  140. package/dist/prompts.cjs +2 -2
  141. package/dist/prompts.js +2 -2
  142. package/dist/{resources-BM_YQGcb.cjs → resources-BlgeiG6C.cjs} +2 -2
  143. package/dist/{resources-BM_YQGcb.cjs.map → resources-BlgeiG6C.cjs.map} +1 -1
  144. package/dist/{resources-BHF8a1ZB.js → resources-CwWOjB8_.js} +2 -2
  145. package/dist/{resources-BHF8a1ZB.js.map → resources-CwWOjB8_.js.map} +1 -1
  146. package/dist/resources.cjs +2 -2
  147. package/dist/resources.js +2 -2
  148. package/dist/{schema-3NeMWRAm.d.cts → schema-BW_fxx99.d.cts} +157 -157
  149. package/dist/{schema-3NeMWRAm.d.cts.map → schema-BW_fxx99.d.cts.map} +1 -1
  150. package/dist/{schema-B3CzDGJk.d.ts → schema-DkWOa2-c.d.ts} +83 -83
  151. package/dist/{schema-B3CzDGJk.d.ts.map → schema-DkWOa2-c.d.ts.map} +1 -1
  152. package/dist/schema.d.cts.map +1 -1
  153. package/dist/{search-docs-BLbB_GV2.js → search-docs-BKUeMSyn.js} +3 -3
  154. package/dist/{search-docs-BLbB_GV2.js.map → search-docs-BKUeMSyn.js.map} +1 -1
  155. package/dist/{search-docs-D5Foht_0.cjs → search-docs-Cr-gyE5m.cjs} +3 -3
  156. package/dist/{search-docs-D5Foht_0.cjs.map → search-docs-Cr-gyE5m.cjs.map} +1 -1
  157. package/dist/{seer-utils-Cj9DXrow.js → seer-utils-BdE7DddW.js} +4 -2
  158. package/dist/seer-utils-BdE7DddW.js.map +1 -0
  159. package/dist/{seer-utils-CDm5J8ur.cjs → seer-utils-BvdVTH85.cjs} +15 -1
  160. package/dist/seer-utils-BvdVTH85.cjs.map +1 -0
  161. package/dist/{server-Dgkqz8bA.cjs → server-9IEGGN8V.cjs} +40 -24
  162. package/dist/{server-BSRxzYFd.js.map → server-9IEGGN8V.cjs.map} +1 -1
  163. package/dist/{server-BSRxzYFd.js → server-BhNrW6bw.js} +40 -24
  164. package/dist/server-BhNrW6bw.js.map +1 -0
  165. package/dist/server.cjs +31 -31
  166. package/dist/server.d.cts.map +1 -1
  167. package/dist/server.d.ts.map +1 -1
  168. package/dist/server.js +31 -31
  169. package/dist/{stdio-BcihaDjO.js → stdio-CQmibRBR.js} +3 -3
  170. package/dist/{stdio-BcihaDjO.js.map → stdio-CQmibRBR.js.map} +1 -1
  171. package/dist/{stdio-BQAm0Liz.cjs → stdio-mw-fEjO4.cjs} +3 -3
  172. package/dist/{stdio-BQAm0Liz.cjs.map → stdio-mw-fEjO4.cjs.map} +1 -1
  173. package/dist/tools/analyze-issue-with-seer.cjs +8 -7
  174. package/dist/tools/analyze-issue-with-seer.js +8 -7
  175. package/dist/tools/create-dsn.cjs +4 -4
  176. package/dist/tools/create-dsn.js +4 -4
  177. package/dist/tools/create-project.cjs +4 -4
  178. package/dist/tools/create-project.js +4 -4
  179. package/dist/tools/create-team.cjs +4 -4
  180. package/dist/tools/create-team.js +4 -4
  181. package/dist/tools/find-dsns.cjs +4 -4
  182. package/dist/tools/find-dsns.js +4 -4
  183. package/dist/tools/find-errors.cjs +4 -4
  184. package/dist/tools/find-errors.js +4 -4
  185. package/dist/tools/find-issues.cjs +4 -4
  186. package/dist/tools/find-issues.js +4 -4
  187. package/dist/tools/find-organizations.cjs +4 -4
  188. package/dist/tools/find-organizations.js +4 -4
  189. package/dist/tools/find-projects.cjs +4 -4
  190. package/dist/tools/find-projects.js +4 -4
  191. package/dist/tools/find-releases.cjs +4 -4
  192. package/dist/tools/find-releases.js +4 -4
  193. package/dist/tools/find-tags.cjs +4 -4
  194. package/dist/tools/find-tags.js +4 -4
  195. package/dist/tools/find-teams.cjs +4 -4
  196. package/dist/tools/find-teams.js +4 -4
  197. package/dist/tools/find-transactions.cjs +4 -4
  198. package/dist/tools/find-transactions.js +4 -4
  199. package/dist/tools/get-doc.cjs +4 -4
  200. package/dist/tools/get-doc.js +4 -4
  201. package/dist/tools/get-event-attachment.cjs +4 -4
  202. package/dist/tools/get-event-attachment.js +4 -4
  203. package/dist/tools/get-issue-details.cjs +7 -7
  204. package/dist/tools/get-issue-details.js +7 -7
  205. package/dist/tools/index.cjs +28 -28
  206. package/dist/tools/index.d.cts +76 -76
  207. package/dist/tools/index.d.ts +76 -76
  208. package/dist/tools/index.js +28 -28
  209. package/dist/tools/search-docs.cjs +4 -3
  210. package/dist/tools/search-docs.js +4 -3
  211. package/dist/tools/update-issue.cjs +7 -7
  212. package/dist/tools/update-issue.js +7 -7
  213. package/dist/tools/update-project.cjs +4 -4
  214. package/dist/tools/update-project.js +4 -4
  215. package/dist/tools/utils/api-utils.cjs +6 -4
  216. package/dist/tools/utils/api-utils.d.cts +22 -5
  217. package/dist/tools/utils/api-utils.d.cts.map +1 -1
  218. package/dist/tools/utils/api-utils.d.ts +22 -5
  219. package/dist/tools/utils/api-utils.d.ts.map +1 -1
  220. package/dist/tools/utils/api-utils.js +4 -4
  221. package/dist/tools/utils/fetch-utils.cjs +3 -2
  222. package/dist/tools/utils/fetch-utils.d.cts +2 -2
  223. package/dist/tools/utils/fetch-utils.d.ts +2 -2
  224. package/dist/tools/utils/fetch-utils.js +2 -2
  225. package/dist/tools/utils/formatting-utils.d.cts +3 -3
  226. package/dist/tools/utils/formatting-utils.d.ts +3 -3
  227. package/dist/tools/utils/issue-utils.cjs +4 -3
  228. package/dist/tools/utils/issue-utils.d.cts +4 -4
  229. package/dist/tools/utils/issue-utils.d.ts +4 -4
  230. package/dist/tools/utils/issue-utils.js +4 -3
  231. package/dist/tools/utils/seer-utils.cjs +3 -1
  232. package/dist/tools/utils/seer-utils.d.cts +6 -4
  233. package/dist/tools/utils/seer-utils.d.cts.map +1 -1
  234. package/dist/tools/utils/seer-utils.d.ts +6 -4
  235. package/dist/tools/utils/seer-utils.d.ts.map +1 -1
  236. package/dist/tools/utils/seer-utils.js +2 -2
  237. package/dist/tools/whoami.cjs +4 -4
  238. package/dist/tools/whoami.js +4 -4
  239. package/dist/tools-AYbI0sEf.js +48 -0
  240. package/dist/{tools-CdXGgq1W.js.map → tools-AYbI0sEf.js.map} +1 -1
  241. package/dist/{tools-CHnZvVEN.cjs → tools-CwQFlJzn.cjs} +21 -21
  242. package/dist/{tools-CHnZvVEN.cjs.map → tools-CwQFlJzn.cjs.map} +1 -1
  243. package/dist/transports/stdio.cjs +33 -33
  244. package/dist/transports/stdio.js +33 -33
  245. package/dist/{types-BoMP-Ro6.d.cts → types-BAbu4Vzx.d.cts} +2 -2
  246. package/dist/{types-BoMP-Ro6.d.cts.map → types-BAbu4Vzx.d.cts.map} +1 -1
  247. package/dist/{types-DpV1JAZj.d.ts → types-CoY5KVni.d.ts} +2 -2
  248. package/dist/{types-DpV1JAZj.d.ts.map → types-CoY5KVni.d.ts.map} +1 -1
  249. package/dist/{update-issue-DRTQvy6p.js → update-issue-ClbiTLyL.js} +12 -6
  250. package/dist/update-issue-ClbiTLyL.js.map +1 -0
  251. package/dist/{update-issue-DpkxxiNk.cjs → update-issue-_4vzwHfZ.cjs} +12 -6
  252. package/dist/update-issue-_4vzwHfZ.cjs.map +1 -0
  253. package/dist/{update-project-DLDDbcGY.cjs → update-project-2EEnezbZ.cjs} +3 -3
  254. package/dist/{update-project-DLDDbcGY.cjs.map → update-project-2EEnezbZ.cjs.map} +1 -1
  255. package/dist/{update-project-YLxt2ry2.js → update-project-CExfO7tG.js} +3 -3
  256. package/dist/{update-project-YLxt2ry2.js.map → update-project-CExfO7tG.js.map} +1 -1
  257. package/dist/version-3e1twbPm.js +6 -0
  258. package/dist/{version-CcTnFB56.js.map → version-3e1twbPm.js.map} +1 -1
  259. package/dist/{version-rDjaSkPw.cjs → version-Cp9p-38J.cjs} +2 -2
  260. package/dist/{version-rDjaSkPw.cjs.map → version-Cp9p-38J.cjs.map} +1 -1
  261. package/dist/version.cjs +1 -1
  262. package/dist/version.js +1 -1
  263. package/dist/{whoami-DesNZnaQ.js → whoami-DhoaHHY5.js} +2 -2
  264. package/dist/{whoami-DesNZnaQ.js.map → whoami-DhoaHHY5.js.map} +1 -1
  265. package/dist/{whoami-CEgbTUqt.cjs → whoami-m0N5F6BN.cjs} +2 -2
  266. package/dist/{whoami-CEgbTUqt.cjs.map → whoami-m0N5F6BN.cjs.map} +1 -1
  267. package/package.json +3 -3
  268. package/dist/analyze-issue-with-seer-BkVrrh28.cjs.map +0 -1
  269. package/dist/analyze-issue-with-seer-CoqsTklL.js.map +0 -1
  270. package/dist/api-utils-C6QJAzFL.js +0 -31
  271. package/dist/api-utils-C6QJAzFL.js.map +0 -1
  272. package/dist/api-utils-d36iteNO.cjs +0 -36
  273. package/dist/api-utils-d36iteNO.cjs.map +0 -1
  274. package/dist/client-CQ9Xe1aN.d.cts.map +0 -1
  275. package/dist/client-DOYWNvVM.js.map +0 -1
  276. package/dist/client-Dkw5iYu3.cjs.map +0 -1
  277. package/dist/client-VCJp6Kcu.d.ts.map +0 -1
  278. package/dist/errors-CIoxzIug.js +0 -15
  279. package/dist/errors-CIoxzIug.js.map +0 -1
  280. package/dist/errors-YmiXLOyx.cjs +0 -21
  281. package/dist/errors-YmiXLOyx.cjs.map +0 -1
  282. package/dist/fetch-utils-BMKjO-cc.js +0 -29
  283. package/dist/fetch-utils-BMKjO-cc.js.map +0 -1
  284. package/dist/fetch-utils-Bv9WjUp0.d.ts +0 -14
  285. package/dist/fetch-utils-Bv9WjUp0.d.ts.map +0 -1
  286. package/dist/fetch-utils-DzdRW4Yd.d.cts +0 -14
  287. package/dist/fetch-utils-DzdRW4Yd.d.cts.map +0 -1
  288. package/dist/fetch-utils-oab6uNp3.cjs +0 -35
  289. package/dist/fetch-utils-oab6uNp3.cjs.map +0 -1
  290. package/dist/find-errors-C3oUMeRi.js.map +0 -1
  291. package/dist/find-errors-CB9NpSxG.cjs.map +0 -1
  292. package/dist/find-issues-C3uk59rn.cjs.map +0 -1
  293. package/dist/find-issues-CAtNGBly.js.map +0 -1
  294. package/dist/find-organizations-BrdMfZRO.cjs.map +0 -1
  295. package/dist/find-organizations-ojXwWWzk.js.map +0 -1
  296. package/dist/get-issue-details-Dcmzxknx.js.map +0 -1
  297. package/dist/get-issue-details-lBrYR9yx.cjs.map +0 -1
  298. package/dist/issue-helpers-CqqYnwYE.js.map +0 -1
  299. package/dist/issue-helpers-DyAIO0w6.cjs.map +0 -1
  300. package/dist/seer-utils-CDm5J8ur.cjs.map +0 -1
  301. package/dist/seer-utils-Cj9DXrow.js.map +0 -1
  302. package/dist/server-Dgkqz8bA.cjs.map +0 -1
  303. package/dist/tools-CdXGgq1W.js +0 -48
  304. package/dist/update-issue-DRTQvy6p.js.map +0 -1
  305. package/dist/update-issue-DpkxxiNk.cjs.map +0 -1
  306. package/dist/version-CcTnFB56.js +0 -6
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-errors-CB9NpSxG.cjs","names":["ParamOrganizationSlug","context: ServerContext"],"sources":["../src/tools/find-errors.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlugOrAll,\n ParamTransaction,\n ParamQuery,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"find_errors\",\n description: [\n \"Find errors in Sentry using advanced search syntax.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Search for production errors in a specific file.\",\n \"- Analyze error patterns and frequencies.\",\n \"- Find recent or frequently occurring errors.\",\n \"\",\n \"<examples>\",\n \"### Find common errors within a file\",\n \"\",\n \"To find common errors within a file, you can use the `filename` parameter. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename. If you provide generic filenames like `index.js` you're going to end up finding errors that are might be from completely different projects.\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', filename='index.js', sortBy='count')\",\n \"```\",\n \"\",\n \"### Find recent crashes from the 'peated' project\",\n \"\",\n \"```\",\n \"find_errors(organizationSlug='my-organization', query='is:unresolved error.handled:false', projectSlug='peated', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- If only one parameter is provided, and it could be either `organizationSlug` or `projectSlug`, its probably `organizationSlug`, but if you're really uncertain you should call `find_organizations()` first.\",\n \"- If you are looking for issues, in a way that you might be looking for something like 'unresolved errors', you should use the `find_issues()` tool\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlugOrAll.optional(),\n filename: z\n .string()\n .trim()\n .describe(\"The filename to search for errors in.\")\n .optional(),\n transaction: ParamTransaction.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"count\"])\n .optional()\n .default(\"last_seen\")\n .describe(\n \"Sort the results either by the last time they occurred or the count of occurrences.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n if (params.projectSlug) setTag(\"project.slug\", params.projectSlug);\n\n const eventList = await apiService.searchErrors({\n organizationSlug,\n projectSlug: params.projectSlug,\n filename: params.filename,\n query: params.query,\n transaction: params.transaction,\n sortBy: params.sortBy as \"last_seen\" | \"count\" | undefined,\n });\n let output = `# Errors in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These errors match the query \\`${params.query}\\`\\n`;\n if (params.filename)\n output += `These errors are limited to the file suffix \\`${params.filename}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.issue}\\n\\n`;\n output += `**Description**: ${eventSummary.title}\\n`;\n output += `**Issue ID**: ${eventSummary.issue}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, eventSummary.issue)}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**Last Seen**: ${eventSummary[\"last_seen()\"]}\\n`;\n output += `**Occurrences**: ${eventSummary[\"count()\"]}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n});\n"],"mappings":";;;;;;;;AAaA,0BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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W,eAAe,aAAa,QAAQ;AAC/C,cAAW,iBAAiB,aAAa,eAAe;AACxD,cAAW,mBAAmB,aAAa,WAAW;EACvD;AACD,YAAU;AACV,aAAW;AACX,aAAW,qGAAqG,iBAAiB;AACjI,SAAO;CACR;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-issues-C3uk59rn.cjs","names":["ParamOrganizationSlug","context: ServerContext","UserInputError"],"sources":["../src/tools/find-issues.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamQuery,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"find_issues\",\n description: [\n \"Find issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `find_errors()` or `find_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAaA,0BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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ources":["../src/tools/find-issues.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamQuery,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"find_issues\",\n description: [\n \"Find issues in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all issues in a Sentry organization\",\n \"\",\n \"If you're looking for more granular data beyond a summary of identified problems, you should use the `find_errors()` or `find_transactions()` tools instead.\",\n \"\",\n \"<examples>\",\n \"### Find the newest unresolved issues across 'my-organization'\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', query='is:unresolved', sortBy='last_seen')\",\n \"```\",\n \"\",\n \"### Find the most frequently occurring crashes in the 'my-project' project\",\n \"\",\n \"```\",\n \"find_issues(organizationSlug='my-organization', projectSlug='my-project', query='is:unresolved error.handled:false', sortBy='count')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, its likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- You can use the `find_tags()` tool to see what user-defined tags are available.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug.optional(),\n query: ParamQuery.optional(),\n sortBy: z\n .enum([\"last_seen\", \"first_seen\", \"count\", \"userCount\"])\n .describe(\n \"Sort the results either by the last time they occurred, the first time they occurred, the count of occurrences, or the number of users affected.\",\n )\n .optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n});\n"],"mappings":";;;;;;;;AAaA,0BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB;EAClB,WAAW,eAAe,UAAU;EACpC,aAAa,iBAAiB,UAAU;EACxC,OAAO,WAAW,UAAU;EAC5B,QAAQ,EACL,KAAK;GAAC;GAAa;GAAc;GAAS;EAAY,EAAC,CACvD,SACC,mJACD,CACA,UAAU;CACd;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,OAAK,iBACH,OAAM,IAAI,eACR;AAIJ,SAAO,qBAAqB,iBAAiB;EAE7C,MAAM,YAAY;GAChB,WAAW;GACX,YAAY;GACZ,OAAO;GACP,WAAW;EACZ;EACD,MAAM,SAAS,MAAM,WAAW,WAAW;GACzC;GACA,aAAa,OAAO;GACpB,OAAO,OAAO;GACd,QAAQ,OAAO,SACX,UAAU,OAAO;EAEtB,EAAC;EACF,IAAI,UAAU,gBAAgB,mBAAmB,OAAO,eAAe,GAAG,OAAO,gBAAgB,GAAG;AACpG,MAAI,OAAO,WAAW,GAAG;AACvB,aAAU;AACV,UAAO;EACR;AACD,YAAU,OACP,IAAI,CAAC,UACJ;IACG,KAAK,MAAM;GACZ;IACC,mBAAmB,MAAM;IACzB,eAAe,MAAM;IACrB,kBAAkB,IAAI,KAAK,MAAM,WAAW,aAAa;IACzD,iBAAiB,IAAI,KAAK,MAAM,UAAU,aAAa;IACvD,WAAW,WAAW,YAAY,kBAAkB,MAAM,QAAQ;EACpE,EAAC,KAAK,KAAK,CACb,CACA,KAAK,OAAO;AACf,YAAU;AACV,YAAU;AACV,aAAW;AACX,aAAW,6GAA6G,iBAAiB;AACzI,SAAO;CACR;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-organizations-BrdMfZRO.cjs","names":["context: ServerContext"],"sources":["../src/tools/find-organizations.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\n\nexport default defineTool({\n name: \"find_organizations\",\n description: [\n \"Find organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n inputSchema: {},\n async handler(params, context: ServerContext) {\n // User data endpoints (like /users/me/regions/) should never use regionUrl\n // as they must always query the main API server, not region-specific servers\n const apiService = apiServiceFromContext(context);\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links?.organizationUrl || \"Not available\"}`,\n `**Region URL:** ${org.links?.regionUrl || \"\"}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n\n const hasValidRegionUrls = organizations.some((org) =>\n org.links?.regionUrl?.trim(),\n );\n\n if (hasValidRegionUrls) {\n output += `- If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value shown above for each organization.\\n`;\n output += `- For Sentry's Cloud Service (sentry.io), always use the regionUrl to ensure requests go to the correct region.\\n`;\n } else {\n output += `- This appears to be a self-hosted Sentry installation. You can omit the \\`regionUrl\\` parameter when using other tools.\\n`;\n output += `- For self-hosted Sentry, the regionUrl is typically empty and not needed for API calls.\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;AAKA,iCAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa,CAAE;CACf,MAAM,QAAQ,QAAQA,SAAwB;EAG5C,MAAM,aAAa,wCAAsB,QAAQ;EACjD,MAAM,gBAAgB,MAAM,WAAW,mBAAmB;EAE1D,IAAI,SAAS;AAEb,MAAI,cAAc,WAAW,GAAG;AAC9B,aAAU;AACV,UAAO;EACR;AAED,YAAU,cACP,IAAI,CAAC,QACJ;IACG,OAAO,IAAI,KAAK;GACjB;IACC,eAAe,IAAI,OAAO,mBAAmB;IAC7C,kBAAkB,IAAI,OAAO,aAAa;EAC5C,EAAC,KAAK,KAAK,CACb,CACA,KAAK,OAAO;AAEf,YAAU;AACV,aAAW;EAEX,MAAM,qBAAqB,cAAc,KAAK,CAAC,QAC7C,IAAI,OAAO,WAAW,MAAM,CAC7B;AAED,MAAI,oBAAoB;AACtB,cAAW;AACX,cAAW;EACZ,OAAM;AACL,cAAW;AACX,cAAW;EACZ;AAED,SAAO;CACR;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"find-organizations-ojXwWWzk.js","names":["context: ServerContext"],"sources":["../src/tools/find-organizations.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\n\nexport default defineTool({\n name: \"find_organizations\",\n description: [\n \"Find organizations that the user has access to in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all organizations in Sentry\",\n \"- Find an organization's slug to aid other tool requests\",\n ].join(\"\\n\"),\n inputSchema: {},\n async handler(params, context: ServerContext) {\n // User data endpoints (like /users/me/regions/) should never use regionUrl\n // as they must always query the main API server, not region-specific servers\n const apiService = apiServiceFromContext(context);\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links?.organizationUrl || \"Not available\"}`,\n `**Region URL:** ${org.links?.regionUrl || \"\"}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n\n const hasValidRegionUrls = organizations.some((org) =>\n org.links?.regionUrl?.trim(),\n );\n\n if (hasValidRegionUrls) {\n output += `- If a tool supports passing in the \\`regionUrl\\`, you MUST pass in the correct value shown above for each organization.\\n`;\n output += `- For Sentry's Cloud Service (sentry.io), always use the regionUrl to ensure requests go to the correct region.\\n`;\n } else {\n output += `- This appears to be a self-hosted Sentry installation. You can omit the \\`regionUrl\\` parameter when using other tools.\\n`;\n output += `- For self-hosted Sentry, the regionUrl is typically empty and not needed for API calls.\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;AAKA,iCAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa,CAAE;CACf,MAAM,QAAQ,QAAQA,SAAwB;EAG5C,MAAM,aAAa,sBAAsB,QAAQ;EACjD,MAAM,gBAAgB,MAAM,WAAW,mBAAmB;EAE1D,IAAI,SAAS;AAEb,MAAI,cAAc,WAAW,GAAG;AAC9B,aAAU;AACV,UAAO;EACR;AAED,YAAU,cACP,IAAI,CAAC,QACJ;IACG,OAAO,IAAI,KAAK;GACjB;IACC,eAAe,IAAI,OAAO,mBAAmB;IAC7C,kBAAkB,IAAI,OAAO,aAAa;EAC5C,EAAC,KAAK,KAAK,CACb,CACA,KAAK,OAAO;AAEf,YAAU;AACV,aAAW;EAEX,MAAM,qBAAqB,cAAc,KAAK,CAAC,QAC7C,IAAI,OAAO,WAAW,MAAM,CAC7B;AAED,MAAI,oBAAoB;AACtB,cAAW;AACX,cAAW;EACZ,OAAM;AACL,cAAW;AACX,cAAW;EACZ;AAED,SAAO;CACR;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-issue-details-Dcmzxknx.js","names":["context: ServerContext","orgSlug","issue","event","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined"],"sources":["../src/tools/get-issue-details.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams, formatIssueOutput } from \"./utils/issue-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"get_issue_details\",\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View error details, stacktraces, and metadata\",\n \"- Investigate when/where an error occurred\",\n \"- Access raw error information from Sentry\",\n \"- Get comprehensive issue information including any available Seer analysis\",\n \"\",\n \"Do NOT use this tool when:\",\n \"- User wants root cause analysis → Use `analyze_issue_with_seer`\",\n \"\",\n \"<examples>\",\n '### User: \"How do I fix ISSUE-123?\"',\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'\",\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other parameters.\",\n \"- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\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 const issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n const event = await apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n });\n },\n});\n"],"mappings":";;;;;;;;;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O;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,SAAO,qBAAqB,QAAQ;EAEpC,MAAM,QAAQ,MAAM,WAAW,SAAS;GACtC,kBAAkB;GAClB,SAAS;EACV,EAAC;EACF,MAAM,QAAQ,MAAM,WAAW,uBAAuB;GACpD,kBAAkB;GAClB,SAAS,MAAM;EAChB,EAAC;EAGF,IAAII;AAGJ,MAAI;AACF,kBAAe,MAAM,WAAW,gBAAgB;IAC9C,kBAAkB;IAClB,SAAS,MAAM;GAChB,EAAC;EACH,SAAQ,OAAO,CAGf;AAED,SAAO,kBAAkB;GACvB,kBAAkB;GAClB;GACA;GACA;GACA;EACD,EAAC;CACH;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-issue-details-lBrYR9yx.cjs","names":["context: ServerContext","orgSlug","UserInputError","issue","event","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined"],"sources":["../src/tools/get-issue-details.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams, formatIssueOutput } from \"./utils/issue-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"get_issue_details\",\n description: [\n \"Retrieve issue details from Sentry for a specific Issue ID, including the stacktrace and error message if available. Either issueId or issueUrl MUST be provided.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View error details, stacktraces, and metadata\",\n \"- Investigate when/where an error occurred\",\n \"- Access raw error information from Sentry\",\n \"- Get comprehensive issue information including any available Seer analysis\",\n \"\",\n \"Do NOT use this tool when:\",\n \"- User wants root cause analysis → Use `analyze_issue_with_seer`\",\n \"\",\n \"<examples>\",\n '### User: \"How do I fix ISSUE-123?\"',\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\n \"### Get details for event ID 'c49541c747cb4d8aa3efb70ca5aba243'\",\n \"\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other parameters.\",\n \"- If the user provides `issueId` or `eventId` (only one is needed), `organizationSlug` is required.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\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 const issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n const event = await apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n });\n },\n});\n"],"mappings":";;;;;;;;;;;AAcA,gCAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,qCAAsB,UAAU;EAClD,WAAW,8BAAe,UAAU;EACpC,SAAS,iCAAkB,UAAU;EACrC,SAAS,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,uBAAuB,CAAC,UAAU;EACtE,UAAU,6BAAc,UAAU;CACnC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,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@
1
- {"version":3,"file":"issue-helpers-CqqYnwYE.js","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Issue parameter parsing and validation utilities.\n *\n * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),\n * extracts organization and issue identifiers, and validates issue ID formats.\n * Provides robust parsing for LLM-generated parameters that may contain formatting\n * inconsistencies.\n */\n\n/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url || typeof url !== \"string\") {\n throw new Error(\n \"Invalid Sentry issue URL. URL must be a non-empty string.\",\n );\n }\n\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (error) {\n throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n }\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n\n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`,\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(issueId),\n };\n }\n\n throw new Error(\"Either issueId or issueUrl must be provided\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,eAAeA,KAG7B;AACA,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AM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-helpers-DyAIO0w6.cjs","names":["url: string","parsedUrl: URL","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Issue parameter parsing and validation utilities.\n *\n * Handles flexible input formats for Sentry issues (URLs vs explicit parameters),\n * extracts organization and issue identifiers, and validates issue ID formats.\n * Provides robust parsing for LLM-generated parameters that may contain formatting\n * inconsistencies.\n */\n\n/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url || typeof url !== \"string\") {\n throw new Error(\n \"Invalid Sentry issue URL. URL must be a non-empty string.\",\n );\n }\n\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(url);\n } catch (error) {\n throw new Error(`Invalid Sentry issue URL. Unable to parse URL: ${url}`);\n }\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n\n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`,\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(iss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,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"seer-utils-CDm5J8ur.cjs","names":["status: string","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools/utils/seer-utils.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type {\n AutofixRunStepSchema,\n AutofixRunStepRootCauseAnalysisSchema,\n AutofixRunStepSolutionSchema,\n AutofixRunStepDefaultSchema,\n} from \"../../api-client/index\";\n\nexport const SEER_POLLING_INTERVAL = 5000; // 5 seconds\nexport const SEER_TIMEOUT = 5 * 60 * 1000; // 5 minutes\n\nexport function getStatusDisplayName(status: string): string {\n switch (status) {\n case \"COMPLETED\":\n return \"Complete\";\n case \"FAILED\":\n case \"ERROR\":\n return \"Failed\";\n case \"CANCELLED\":\n return \"Cancelled\";\n case \"NEED_MORE_INFORMATION\":\n return \"Needs More Information\";\n case \"WAITING_FOR_USER_RESPONSE\":\n return \"Waiting for Response\";\n case \"PROCESSING\":\n return \"Processing\";\n case \"IN_PROGRESS\":\n return \"In Progress\";\n default:\n return status;\n }\n}\n\n/**\n * Check if an autofix status is terminal (no more updates expected)\n */\nexport function isTerminalStatus(status: string): boolean {\n return [\n \"COMPLETED\",\n \"FAILED\",\n \"ERROR\",\n \"CANCELLED\",\n \"NEED_MORE_INFORMATION\",\n \"WAITING_FOR_USER_RESPONSE\",\n ].includes(status);\n}\n\n/**\n * Check if an autofix status requires human intervention\n */\nexport function isHumanInterventionStatus(status: string): boolean {\n return (\n status === \"NEED_MORE_INFORMATION\" || status === \"WAITING_FOR_USER_RESPONSE\"\n );\n}\n\n/**\n * Get guidance message for human intervention states\n */\nexport function getHumanInterventionGuidance(status: string): string {\n if (status === \"NEED_MORE_INFORMATION\") {\n return \"\\nSeer needs additional information to continue the analysis. Please review the insights above and consider providing more context.\\n\";\n }\n if (status === \"WAITING_FOR_USER_RESPONSE\") {\n return \"\\nSeer is waiting for your response to proceed. Please review the analysis and provide feedback.\\n\";\n }\n return \"\";\n}\n\nexport function getOutputForAutofixStep(\n step: z.infer<typeof AutofixRunStepSchema>,\n) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (cause.description) {\n output += `${cause.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";;AAQA,MAAa,wBAAwB;AACrC,MAAa,eAAe,IAAI,K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M,YAAY;AAClB,KAAI,UAAU,YAAY,UAAU,SAAS,SAAS,EACpD,MAAK,MAAM,SAAS,UAAU,UAAU;AACtC,aAAW,IAAI,MAAM,QAAQ;AAC7B,eAAa,MAAM,cAAc;CAClC;UACQ,KAAK,cACd,cAAa,KAAK,cAAc;AAGlC,QAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"seer-utils-Cj9DXrow.js","names":["status: string","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools/utils/seer-utils.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type {\n AutofixRunStepSchema,\n AutofixRunStepRootCauseAnalysisSchema,\n AutofixRunStepSolutionSchema,\n AutofixRunStepDefaultSchema,\n} from \"../../api-client/index\";\n\nexport const SEER_POLLING_INTERVAL = 5000; // 5 seconds\nexport const SEER_TIMEOUT = 5 * 60 * 1000; // 5 minutes\n\nexport function getStatusDisplayName(status: string): string {\n switch (status) {\n case \"COMPLETED\":\n return \"Complete\";\n case \"FAILED\":\n case \"ERROR\":\n return \"Failed\";\n case \"CANCELLED\":\n return \"Cancelled\";\n case \"NEED_MORE_INFORMATION\":\n return \"Needs More Information\";\n case \"WAITING_FOR_USER_RESPONSE\":\n return \"Waiting for Response\";\n case \"PROCESSING\":\n return \"Processing\";\n case \"IN_PROGRESS\":\n return \"In Progress\";\n default:\n return status;\n }\n}\n\n/**\n * Check if an autofix status is terminal (no more updates expected)\n */\nexport function isTerminalStatus(status: string): boolean {\n return [\n \"COMPLETED\",\n \"FAILED\",\n \"ERROR\",\n \"CANCELLED\",\n \"NEED_MORE_INFORMATION\",\n \"WAITING_FOR_USER_RESPONSE\",\n ].includes(status);\n}\n\n/**\n * Check if an autofix status requires human intervention\n */\nexport function isHumanInterventionStatus(status: string): boolean {\n return (\n status === \"NEED_MORE_INFORMATION\" || status === \"WAITING_FOR_USER_RESPONSE\"\n );\n}\n\n/**\n * Get guidance message for human intervention states\n */\nexport function getHumanInterventionGuidance(status: string): string {\n if (status === \"NEED_MORE_INFORMATION\") {\n return \"\\nSeer needs additional information to continue the analysis. Please review the insights above and consider providing more context.\\n\";\n }\n if (status === \"WAITING_FOR_USER_RESPONSE\") {\n return \"\\nSeer is waiting for your response to proceed. Please review the analysis and provide feedback.\\n\";\n }\n return \"\";\n}\n\nexport function getOutputForAutofixStep(\n step: z.infer<typeof AutofixRunStepSchema>,\n) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (cause.description) {\n output += `${cause.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";AAQA,MAAa,wBAAwB;AACrC,MAAa,eAAe,IAAI,KAAK;AAErC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AClB,KAAI,UAAU,YAAY,UAAU,SAAS,SAAS,EACpD,MAAK,MAAM,SAAS,UAAU,UAAU;AACtC,aAAW,IAAI,MAAM,QAAQ;AAC7B,eAAa,MAAM,cAAc;CAClC;UACQ,KAAK,cACd,cAAa,KAAK,cAAc;AAGlC,QAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-Dgkqz8bA.cjs","names":["error: unknown","ApiError","UserInputError","args: Record<string, unknown>","resource: { name: string; handler: ReadResourceCallback }","context: ServerContext","uri: URL","extra: RequestHandlerExtra<any, any>","variables: Variables","RESOURCES","PROMPT_DEFINITIONS","PROMPT_HANDLERS","tools","params: any","extra: RequestHandlerExtra<ServerRequest, ServerNotification>"],"sources":["../src/server.ts"],"sourcesContent":["/**\n * MCP Server Configuration and Request Handling Infrastructure.\n *\n * This module orchestrates tool execution, prompt handling, resource management,\n * and telemetry collection in a unified server interface for LLMs.\n *\n * **Configuration Example:**\n * ```typescript\n * const server = new McpServer();\n * const context: ServerContext = {\n * accessToken: \"your-sentry-token\",\n * host: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"mcp-client\"\n * };\n *\n * await configureServer({ server, context });\n * ```\n */\nimport type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { RequestHandlerExtra } from \"@modelcontextprotocol/sdk/shared/protocol.js\";\nimport type {\n ServerRequest,\n ServerNotification,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport type {\n ReadResourceCallback,\n ReadResourceTemplateCallback,\n} from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Variables } from \"@modelcontextprotocol/sdk/shared/uriTemplate.js\";\nimport tools from \"./tools/index\";\nimport type { ServerContext } from \"./types\";\nimport { setTag, setUser, startNewTrace, startSpan } from \"@sentry/core\";\nimport { logError } from \"./logging\";\nimport { RESOURCES, isTemplateResource } from \"./resources\";\nimport { PROMPT_DEFINITIONS } from \"./promptDefinitions\";\nimport { PROMPT_HANDLERS } from \"./prompts\";\nimport { ApiError } from \"./api-client\";\nimport { UserInputError } from \"./errors\";\n\n/**\n * Type guard to identify Sentry API errors.\n */\nfunction isApiError(error: unknown): error is ApiError {\n return error instanceof ApiError;\n}\n\n/**\n * Type guard to identify user input validation errors.\n */\nfunction isUserInputError(error: unknown) {\n return error instanceof UserInputError;\n}\n\n/**\n * Formats errors for LLM consumption with appropriate telemetry handling.\n *\n * **Error Types:**\n * - User Input Errors: Clear guidance without telemetry\n * - API Errors: Enhanced messaging with HTTP status context\n * - System Errors: Full telemetry capture with event IDs\n *\n * @example User Input Error Response\n * ```markdown\n * **Input Error**\n *\n * It looks like there was a problem with the input you provided.\n * Organization slug is required. Please provide an organizationSlug parameter.\n * You may be able to resolve the issue by addressing the concern and trying again.\n * ```\n */\nasync function logAndFormatError(error: unknown) {\n if (isUserInputError(error)) {\n const typedError = error as UserInputError;\n return [\n \"**Input Error**\",\n \"It looks like there was a problem with the input you provided.\",\n typedError.message,\n `You may be able to resolve the issue by addressing the concern and trying again.`,\n ].join(\"\\n\\n\");\n }\n\n if (isApiError(error)) {\n const typedError = error as ApiError;\n return [\n \"**Error**\",\n `There was an HTTP ${typedError.status} error with the your request to the Sentry API.`,\n `${typedError.message}`,\n `You may be able to resolve the issue by addressing the concern and trying again.`,\n ].join(\"\\n\\n\");\n }\n\n const eventId = logError(error);\n\n return [\n \"**Error**\",\n \"It looks like there was a problem communicating with the Sentry API.\",\n \"Please report the following to the user for the Sentry team:\",\n `**Event ID**: ${eventId}`,\n process.env.NODE_ENV !== \"production\"\n ? error instanceof Error\n ? error.message\n : String(error)\n : \"\",\n ].join(\"\\n\\n\");\n}\n\n/**\n * Extracts MCP request parameters for OpenTelemetry attributes.\n *\n * @example Parameter Transformation\n * ```typescript\n * const input = { organizationSlug: \"my-org\", query: \"is:unresolved\" };\n * const output = extractMcpParameters(input);\n * // { \"mcp.request.argument.organizationSlug\": \"\\\"my-org\\\"\", \"mcp.request.argument.query\": \"\\\"is:unresolved\\\"\" }\n * ```\n */\nfunction extractMcpParameters(args: Record<string, unknown>) {\n return Object.fromEntries(\n Object.entries(args).map(([key, value]) => {\n return [`mcp.request.argument.${key}`, JSON.stringify(value)];\n }),\n );\n}\n\n/**\n * Creates a telemetry wrapper for regular URI resource handlers.\n * Captures URI access and user context for observability.\n */\nfunction createResourceHandler(\n resource: { name: string; handler: ReadResourceCallback },\n context: ServerContext,\n): ReadResourceCallback {\n return async (uri: URL, extra: RequestHandlerExtra<any, any>) => {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `resources/read ${resource.name}`,\n attributes: {\n \"mcp.resource.name\": resource.name,\n \"mcp.resource.uri\": uri.toString(),\n ...(context.userAgent && {\n \"user_agent.original\": context.userAgent,\n }),\n },\n },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n\n return resource.handler(uri, extra);\n },\n );\n });\n };\n}\n\n/**\n * Creates a telemetry wrapper for URI template resource handlers.\n * Captures template parameters and user context for observability.\n */\nfunction createTemplateResourceHandler(\n resource: { name: string; handler: ReadResourceCallback },\n context: ServerContext,\n): ReadResourceTemplateCallback {\n return async (\n uri: URL,\n variables: Variables,\n extra: RequestHandlerExtra<any, any>,\n ) => {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `resources/read ${resource.name}`,\n attributes: {\n \"mcp.resource.name\": resource.name,\n \"mcp.resource.uri\": uri.toString(),\n ...(context.userAgent && {\n \"user_agent.original\": context.userAgent,\n }),\n ...extractMcpParameters(variables),\n },\n },\n async () => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n\n // The MCP SDK has already constructed the URI from the template and variables\n // We just need to call the handler with the constructed URI\n return resource.handler(uri, extra);\n },\n );\n });\n };\n}\n\n/**\n * Configures an MCP server with all tools, prompts, resources, and telemetry.\n *\n * Transforms a bare MCP server instance into a fully-featured Sentry integration\n * with comprehensive observability, error handling, and handler registration.\n *\n * @example Basic Configuration\n * ```typescript\n * const server = new McpServer();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\"\n * };\n *\n * await configureServer({ server, context });\n * ```\n */\nexport async function configureServer({\n server,\n context,\n onToolComplete,\n}: { server: McpServer; context: ServerContext; onToolComplete?: () => void }) {\n server.server.onerror = (error) => {\n logError(error);\n };\n\n for (const resource of RESOURCES) {\n if (isTemplateResource(resource)) {\n // Handle URI template resources\n server.registerResource(\n resource.name,\n resource.template,\n {\n description: resource.description,\n mimeType: resource.mimeType,\n },\n createTemplateResourceHandler(resource, context),\n );\n } else {\n // Handle regular URI resources\n server.registerResource(\n resource.name,\n resource.uri,\n {\n description: resource.description,\n mimeType: resource.mimeType,\n },\n createResourceHandler(resource, context),\n );\n }\n }\n\n for (const prompt of PROMPT_DEFINITIONS) {\n const handler = PROMPT_HANDLERS[prompt.name];\n\n server.prompt(\n prompt.name,\n prompt.description,\n prompt.paramsSchema ? prompt.paramsSchema : {},\n async (...args) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `prompts/get ${prompt.name}`,\n attributes: {\n \"mcp.prompt.name\": prompt.name,\n ...(context.userAgent && {\n \"user_agent.original\": context.userAgent,\n }),\n ...extractMcpParameters(args[0] || {}),\n },\n },\n async (span) => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n try {\n // TODO(dcramer): I'm too dumb to figure this out\n // @ts-ignore\n const output = await handler(context, ...args);\n span.setStatus({\n code: 1, // ok\n });\n return {\n messages: [\n {\n role: \"user\" as const,\n content: {\n type: \"text\" as const,\n text: output,\n },\n },\n ],\n };\n } catch (error) {\n span.setStatus({\n code: 2, // error\n });\n throw error;\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n\n for (const [toolKey, tool] of Object.entries(tools)) {\n server.tool(\n tool.name,\n tool.description,\n tool.inputSchema,\n async (\n params: any,\n extra: RequestHandlerExtra<ServerRequest, ServerNotification>,\n ) => {\n try {\n return await startNewTrace(async () => {\n return await startSpan(\n {\n name: `tools/call ${tool.name}`,\n attributes: {\n \"mcp.tool.name\": tool.name,\n ...(context.userAgent && {\n \"user_agent.original\": context.userAgent,\n }),\n ...extractMcpParameters(params || {}),\n },\n },\n async (span) => {\n if (context.userId) {\n setUser({\n id: context.userId,\n });\n }\n if (context.clientId) {\n setTag(\"client.id\", context.clientId);\n }\n\n try {\n const output = await tool.handler(params, context);\n span.setStatus({\n code: 1, // ok\n });\n // if the tool returns a string, assume it's a message\n if (typeof output === \"string\") {\n return {\n content: [\n {\n type: \"text\" as const,\n text: output,\n },\n ],\n };\n }\n // if the tool returns a list, assume it's a content list\n if (Array.isArray(output)) {\n return {\n content: output,\n };\n }\n throw new Error(`Invalid tool output: ${output}`);\n } catch (error) {\n span.setStatus({\n code: 2, // error\n });\n\n // CRITICAL: Tool errors MUST be returned as formatted text responses,\n // NOT thrown as exceptions. This ensures consistent error handling\n // and prevents the MCP client from receiving raw error objects.\n //\n // The logAndFormatError function provides user-friendly error messages\n // with appropriate formatting for different error types:\n // - UserInputError: Clear guidance for fixing input problems\n // - ApiError: HTTP status context with helpful messaging\n // - System errors: Sentry event IDs for debugging\n //\n // DO NOT change this to throw error - it breaks error handling!\n return {\n content: [\n {\n type: \"text\" as const,\n text: await logAndFormatError(error),\n },\n ],\n isError: true,\n };\n }\n },\n );\n });\n } finally {\n onToolComplete?.();\n }\n },\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AA2CA,SAAS,WAAWA,OAAmC;AACrD,QAAO,iBAAiBC;AACzB;;;;AAKD,SAAS,iBAAiBD,OAAgB;AACxC,QAAO,iBAAiBE;AACzB;;;;;;;;;;;;;;;;;;AAmBD,eAAe,kBAAkBF,OAAgB;AAC/C,KAAI,iBAAiB,MAAM,EAAE;EAC3B,MAAM,aAAa;AACnB,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AAS;MACV;KACF;IACF,EACF;GACF,EAAC;EACH,UAAS;AACR,qBAAkB;EACnB;CACF,EACF;AAEJ"}
@@ -1,48 +0,0 @@
1
- import { whoami_default } from "./whoami-DesNZnaQ.js";
2
- import { find_organizations_default } from "./find-organizations-ojXwWWzk.js";
3
- import { find_teams_default } from "./find-teams-BZ118EIK.js";
4
- import { find_projects_default } from "./find-projects-fcLG4KpT.js";
5
- import { find_issues_default } from "./find-issues-CAtNGBly.js";
6
- import { find_releases_default } from "./find-releases-BUozr0Z-.js";
7
- import { find_tags_default } from "./find-tags-d-wF1Se8.js";
8
- import { get_issue_details_default } from "./get-issue-details-Dcmzxknx.js";
9
- import { get_event_attachment_default } from "./get-event-attachment-DVCPpUMj.js";
10
- import { update_issue_default } from "./update-issue-DRTQvy6p.js";
11
- import { find_errors_default } from "./find-errors-C3oUMeRi.js";
12
- import { find_transactions_default } from "./find-transactions-BiBgg-AE.js";
13
- import { create_team_default } from "./create-team-zHz00C6Q.js";
14
- import { create_project_default } from "./create-project-K1od5Rhx.js";
15
- import { update_project_default } from "./update-project-YLxt2ry2.js";
16
- import { create_dsn_default } from "./create-dsn-D530I7Lr.js";
17
- import { find_dsns_default } from "./find-dsns-BoEP0N7B.js";
18
- import { analyze_issue_with_seer_default } from "./analyze-issue-with-seer-CoqsTklL.js";
19
- import { search_docs_default } from "./search-docs-BLbB_GV2.js";
20
- import { get_doc_default } from "./get-doc-YTiQznr1.js";
21
-
22
- //#region src/tools/index.ts
23
- var tools_default = {
24
- whoami: whoami_default,
25
- find_organizations: find_organizations_default,
26
- find_teams: find_teams_default,
27
- find_projects: find_projects_default,
28
- find_issues: find_issues_default,
29
- find_releases: find_releases_default,
30
- find_tags: find_tags_default,
31
- get_issue_details: get_issue_details_default,
32
- get_event_attachment: get_event_attachment_default,
33
- update_issue: update_issue_default,
34
- find_errors: find_errors_default,
35
- find_transactions: find_transactions_default,
36
- create_team: create_team_default,
37
- create_project: create_project_default,
38
- update_project: update_project_default,
39
- create_dsn: create_dsn_default,
40
- find_dsns: find_dsns_default,
41
- analyze_issue_with_seer: analyze_issue_with_seer_default,
42
- search_docs: search_docs_default,
43
- get_doc: get_doc_default
44
- };
45
-
46
- //#endregion
47
- export { tools_default };
48
- //# sourceMappingURL=tools-CdXGgq1W.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-issue-DRTQvy6p.js","names":["context: ServerContext"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='john.doe')\",\n \"```\",\n \"\",\n \"### Resolve an issue and assign it to yourself\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved', assignedTo='me')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- Use 'me' as the value for `assignedTo` to assign the issue to the authenticated user.\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\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 // Get current issue details first\n const currentIssue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n\n // Update the issue\n const updatedIssue = await apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n });\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAiBA,2BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,QAAQ,iBAAiB,UAAU;EACnC,YAAY,gBAAgB,UAAU;CACvC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,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,SAAO;CACR;AACF,EAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-issue-DpkxxiNk.cjs","names":["context: ServerContext","UserInputError"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='john.doe')\",\n \"```\",\n \"\",\n \"### Resolve an issue and assign it to yourself\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved', assignedTo='me')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- Use 'me' as the value for `assignedTo` to assign the issue to the authenticated user.\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\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 // Get current issue details first\n const currentIssue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n\n // Update the issue\n const updatedIssue = await apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n });\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;AAiBA,2BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,qCAAsB,UAAU;EAClD,WAAW,8BAAe,UAAU;EACpC,SAAS,iCAAkB,UAAU;EACrC,UAAU,6BAAc,UAAU;EAClC,QAAQ,gCAAiB,UAAU;EACnC,YAAY,+BAAgB,UAAU;CACvC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;AAGF,OAAK,OAAO,aAAa,OAAO,QAC9B,OAAM,IAAIC,8BACR;AAIJ,OAAK,OAAO,aAAa,OAAO,i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ERSION };
6
- //# sourceMappingURL=version-CcTnFB56.js.map