@sentry/mcp-server 0.15.0 → 0.17.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 (612) hide show
  1. package/dist/agent-COgY789I.js +225 -0
  2. package/dist/agent-COgY789I.js.map +1 -0
  3. package/dist/agent-Cody_f0d.cjs +59 -0
  4. package/dist/agent-Cody_f0d.cjs.map +1 -0
  5. package/dist/agent-DZRRChrO.js +53 -0
  6. package/dist/agent-DZRRChrO.js.map +1 -0
  7. package/dist/agent-DpCCnhh5.cjs +231 -0
  8. package/dist/agent-DpCCnhh5.cjs.map +1 -0
  9. package/dist/agent-tools/discover-dataset-fields.cjs +6 -0
  10. package/dist/agent-tools/discover-dataset-fields.d.cts +59 -0
  11. package/dist/agent-tools/discover-dataset-fields.d.cts.map +1 -0
  12. package/dist/agent-tools/discover-dataset-fields.d.ts +59 -0
  13. package/dist/agent-tools/discover-dataset-fields.d.ts.map +1 -0
  14. package/dist/agent-tools/discover-dataset-fields.js +3 -0
  15. package/dist/agent-tools/lookup-otel-semantics.cjs +5 -0
  16. package/dist/agent-tools/lookup-otel-semantics.d.cts +38 -0
  17. package/dist/agent-tools/lookup-otel-semantics.d.cts.map +1 -0
  18. package/dist/agent-tools/lookup-otel-semantics.d.ts +38 -0
  19. package/dist/agent-tools/lookup-otel-semantics.d.ts.map +1 -0
  20. package/dist/agent-tools/lookup-otel-semantics.js +4 -0
  21. package/dist/agent-tools/whoami.cjs +4 -0
  22. package/dist/agent-tools/whoami.d.cts +28 -0
  23. package/dist/agent-tools/whoami.d.cts.map +1 -0
  24. package/dist/agent-tools/whoami.d.ts +28 -0
  25. package/dist/agent-tools/whoami.d.ts.map +1 -0
  26. package/dist/agent-tools/whoami.js +3 -0
  27. package/dist/{analyze-issue-with-seer-CoqsTklL.js → analyze-issue-with-seer-DcSwrWrs.js} +51 -11
  28. package/dist/analyze-issue-with-seer-DcSwrWrs.js.map +1 -0
  29. package/dist/{analyze-issue-with-seer-BkVrrh28.cjs → analyze-issue-with-seer-Dw9iqvSk.cjs} +51 -11
  30. package/dist/analyze-issue-with-seer-Dw9iqvSk.cjs.map +1 -0
  31. package/dist/api-client/client.cjs +4 -2
  32. package/dist/api-client/client.d.cts +3 -3
  33. package/dist/api-client/client.d.ts +3 -3
  34. package/dist/api-client/client.js +4 -2
  35. package/dist/api-client/index.cjs +6 -4
  36. package/dist/api-client/index.d.cts +3 -3
  37. package/dist/api-client/index.d.ts +4 -4
  38. package/dist/api-client/index.js +6 -4
  39. package/dist/api-client/schema.cjs +1 -1
  40. package/dist/api-client/schema.d.cts +1 -1
  41. package/dist/api-client/schema.d.ts +1 -1
  42. package/dist/api-client/schema.js +1 -1
  43. package/dist/api-client/types.cjs +1 -1
  44. package/dist/api-client/types.d.cts +2 -2
  45. package/dist/api-client/types.d.ts +2 -2
  46. package/dist/api-client/types.js +1 -1
  47. package/dist/api-utils-BlUSO8xh.js +68 -0
  48. package/dist/api-utils-BlUSO8xh.js.map +1 -0
  49. package/dist/api-utils-DFWUfQ83.cjs +85 -0
  50. package/dist/api-utils-DFWUfQ83.cjs.map +1 -0
  51. package/dist/{client-Dkw5iYu3.cjs → client-CPrEfAwa.cjs} +403 -58
  52. package/dist/client-CPrEfAwa.cjs.map +1 -0
  53. package/dist/{client-CQ9Xe1aN.d.cts → client-C_dDreKj.d.ts} +198 -11
  54. package/dist/client-C_dDreKj.d.ts.map +1 -0
  55. package/dist/{client-VCJp6Kcu.d.ts → client-CgS3tjJG.d.cts} +198 -11
  56. package/dist/client-CgS3tjJG.d.cts.map +1 -0
  57. package/dist/{client-DOYWNvVM.js → client-MaVV1gVC.js} +403 -58
  58. package/dist/client-MaVV1gVC.js.map +1 -0
  59. package/dist/config-BUmDxVLS.js +52 -0
  60. package/dist/config-BUmDxVLS.js.map +1 -0
  61. package/dist/config-BvtWiL3I.js +449 -0
  62. package/dist/config-BvtWiL3I.js.map +1 -0
  63. package/dist/config-CD-5FpOO.cjs +479 -0
  64. package/dist/config-CD-5FpOO.cjs.map +1 -0
  65. package/dist/config-FWsgDbm7.cjs +58 -0
  66. package/dist/config-FWsgDbm7.cjs.map +1 -0
  67. package/dist/{create-dsn-Dz8nyTFw.cjs → create-dsn-C6IPwoVO.cjs} +12 -10
  68. package/dist/create-dsn-C6IPwoVO.cjs.map +1 -0
  69. package/dist/{create-dsn-D530I7Lr.js → create-dsn-QDLdwhDO.js} +12 -10
  70. package/dist/create-dsn-QDLdwhDO.js.map +1 -0
  71. package/dist/{create-project-K1od5Rhx.js → create-project-Cax3fWey.js} +14 -11
  72. package/dist/create-project-Cax3fWey.js.map +1 -0
  73. package/dist/{create-project-BxzRiryg.cjs → create-project-DdSF58TR.cjs} +14 -11
  74. package/dist/create-project-DdSF58TR.cjs.map +1 -0
  75. package/dist/{create-team-CJhrccc1.cjs → create-team-CXaLcylp.cjs} +14 -5
  76. package/dist/{create-team-CJhrccc1.cjs.map → create-team-CXaLcylp.cjs.map} +1 -1
  77. package/dist/{create-team-zHz00C6Q.js → create-team-nm06goO5.js} +14 -5
  78. package/dist/{create-team-zHz00C6Q.js.map → create-team-nm06goO5.js.map} +1 -1
  79. package/dist/discover-dataset-fields-BEnyqPSq.js +156 -0
  80. package/dist/discover-dataset-fields-BEnyqPSq.js.map +1 -0
  81. package/dist/discover-dataset-fields-Cl7HpVkm.cjs +180 -0
  82. package/dist/discover-dataset-fields-Cl7HpVkm.cjs.map +1 -0
  83. package/dist/errors-BtJEw2Z-.cjs +38 -0
  84. package/dist/errors-BtJEw2Z-.cjs.map +1 -0
  85. package/dist/errors-D_R568zP.js +26 -0
  86. package/dist/errors-D_R568zP.js.map +1 -0
  87. package/dist/errors.cjs +2 -1
  88. package/dist/errors.d.cts +10 -2
  89. package/dist/errors.d.cts.map +1 -1
  90. package/dist/errors.d.ts +10 -2
  91. package/dist/errors.d.ts.map +1 -1
  92. package/dist/errors.js +2 -2
  93. package/dist/fetch-utils-CTLoW1R8.d.cts +33 -0
  94. package/dist/fetch-utils-CTLoW1R8.d.cts.map +1 -0
  95. package/dist/fetch-utils-C_Xj921x.js +52 -0
  96. package/dist/fetch-utils-C_Xj921x.js.map +1 -0
  97. package/dist/fetch-utils-DkcYwqBo.cjs +64 -0
  98. package/dist/fetch-utils-DkcYwqBo.cjs.map +1 -0
  99. package/dist/fetch-utils-JDZw4XaU.d.ts +33 -0
  100. package/dist/fetch-utils-JDZw4XaU.d.ts.map +1 -0
  101. package/dist/{find-dsns-BoEP0N7B.js → find-dsns-C3G5aBm1.js} +3 -3
  102. package/dist/{find-dsns-BoEP0N7B.js.map → find-dsns-C3G5aBm1.js.map} +1 -1
  103. package/dist/{find-dsns-CK59RaUJ.cjs → find-dsns-vQolGM7e.cjs} +3 -3
  104. package/dist/{find-dsns-CK59RaUJ.cjs.map → find-dsns-vQolGM7e.cjs.map} +1 -1
  105. package/dist/{find-organizations-BrdMfZRO.cjs → find-organizations-BDtHkcFV.cjs} +3 -3
  106. package/dist/find-organizations-BDtHkcFV.cjs.map +1 -0
  107. package/dist/{find-organizations-ojXwWWzk.js → find-organizations-Cs1GvZtJ.js} +3 -3
  108. package/dist/find-organizations-Cs1GvZtJ.js.map +1 -0
  109. package/dist/{find-projects-fcLG4KpT.js → find-projects-B0NdOjBO.js} +4 -4
  110. package/dist/{find-projects-fcLG4KpT.js.map → find-projects-B0NdOjBO.js.map} +1 -1
  111. package/dist/{find-projects-BZWhlYJh.cjs → find-projects-xM2L0U1W.cjs} +4 -4
  112. package/dist/{find-projects-BZWhlYJh.cjs.map → find-projects-xM2L0U1W.cjs.map} +1 -1
  113. package/dist/{find-releases-CZCVEOHZ.cjs → find-releases-BBTYr5Bx.cjs} +3 -3
  114. package/dist/{find-releases-CZCVEOHZ.cjs.map → find-releases-BBTYr5Bx.cjs.map} +1 -1
  115. package/dist/{find-releases-BUozr0Z-.js → find-releases-BO2OF_uR.js} +3 -3
  116. package/dist/{find-releases-BUozr0Z-.js.map → find-releases-BO2OF_uR.js.map} +1 -1
  117. package/dist/{find-teams-CnU5x9rQ.cjs → find-teams-B237Aq8U.cjs} +4 -4
  118. package/dist/{find-teams-CnU5x9rQ.cjs.map → find-teams-B237Aq8U.cjs.map} +1 -1
  119. package/dist/{find-teams-BZ118EIK.js → find-teams-CqUwp0EI.js} +4 -4
  120. package/dist/{find-teams-BZ118EIK.js.map → find-teams-CqUwp0EI.js.map} +1 -1
  121. package/dist/formatters-B3ONbRhI.js +79 -0
  122. package/dist/formatters-B3ONbRhI.js.map +1 -0
  123. package/dist/formatters-CfeBjhXZ.cjs +235 -0
  124. package/dist/formatters-CfeBjhXZ.cjs.map +1 -0
  125. package/dist/formatters-DSYXBiQx.js +217 -0
  126. package/dist/formatters-DSYXBiQx.js.map +1 -0
  127. package/dist/formatters-DbqofIoy.cjs +85 -0
  128. package/dist/formatters-DbqofIoy.cjs.map +1 -0
  129. package/dist/{formatting-CcTK2X8V.d.cts → formatting-BxyhA4G3.d.cts} +4 -4
  130. package/dist/formatting-BxyhA4G3.d.cts.map +1 -0
  131. package/dist/{formatting-D0Aki7rK.cjs → formatting-C180PVwd.cjs} +3 -3
  132. package/dist/formatting-C180PVwd.cjs.map +1 -0
  133. package/dist/{formatting-vtXxusbn.d.ts → formatting-C80LN9iK.d.ts} +4 -4
  134. package/dist/formatting-C80LN9iK.d.ts.map +1 -0
  135. package/dist/{formatting-Bvyded57.js → formatting-DIvCVunN.js} +3 -3
  136. package/dist/formatting-DIvCVunN.js.map +1 -0
  137. package/dist/{formatting-utils-DgOyTl-m.js → formatting-utils-C3sej5ER.js} +1 -1
  138. package/dist/{formatting-utils-DgOyTl-m.js.map → formatting-utils-C3sej5ER.js.map} +1 -1
  139. package/dist/{formatting-utils-m9R5bsRU.cjs → formatting-utils-DDz14xeB.cjs} +1 -1
  140. package/dist/{formatting-utils-m9R5bsRU.cjs.map → formatting-utils-DDz14xeB.cjs.map} +1 -1
  141. package/dist/{get-doc-DaTCenOE.cjs → get-doc-BfMg0GIa.cjs} +4 -4
  142. package/dist/{get-doc-DaTCenOE.cjs.map → get-doc-BfMg0GIa.cjs.map} +1 -1
  143. package/dist/{get-doc-YTiQznr1.js → get-doc-DyqJe6TP.js} +4 -4
  144. package/dist/{get-doc-YTiQznr1.js.map → get-doc-DyqJe6TP.js.map} +1 -1
  145. package/dist/{get-event-attachment-DVCPpUMj.js → get-event-attachment-B-ElqztF.js} +3 -3
  146. package/dist/{get-event-attachment-DVCPpUMj.js.map → get-event-attachment-B-ElqztF.js.map} +1 -1
  147. package/dist/{get-event-attachment-C-ig2-3F.cjs → get-event-attachment-o0oH43Tv.cjs} +3 -3
  148. package/dist/{get-event-attachment-C-ig2-3F.cjs.map → get-event-attachment-o0oH43Tv.cjs.map} +1 -1
  149. package/dist/{get-issue-details-lBrYR9yx.cjs → get-issue-details-CP_RyCpt.cjs} +27 -20
  150. package/dist/get-issue-details-CP_RyCpt.cjs.map +1 -0
  151. package/dist/{get-issue-details-Dcmzxknx.js → get-issue-details-CzroF7HR.js} +27 -20
  152. package/dist/get-issue-details-CzroF7HR.js.map +1 -0
  153. package/dist/handler-BGhr9FJM.d.cts +15 -0
  154. package/dist/handler-BGhr9FJM.d.cts.map +1 -0
  155. package/dist/handler-BH_OLIbD.cjs +152 -0
  156. package/dist/handler-BH_OLIbD.cjs.map +1 -0
  157. package/dist/handler-BPPTAi7I.d.ts +15 -0
  158. package/dist/handler-BPPTAi7I.d.ts.map +1 -0
  159. package/dist/handler-BZ3hKPb8.d.cts +15 -0
  160. package/dist/handler-BZ3hKPb8.d.cts.map +1 -0
  161. package/dist/handler-O9fYgC9a.cjs +114 -0
  162. package/dist/handler-O9fYgC9a.cjs.map +1 -0
  163. package/dist/handler-aE_8mEm7.js +146 -0
  164. package/dist/handler-aE_8mEm7.js.map +1 -0
  165. package/dist/handler-cUB6XcUV.d.ts +15 -0
  166. package/dist/handler-cUB6XcUV.d.ts.map +1 -0
  167. package/dist/handler-ykkULTZ-.js +108 -0
  168. package/dist/handler-ykkULTZ-.js.map +1 -0
  169. package/dist/index.cjs +54 -44
  170. package/dist/index.cjs.map +1 -1
  171. package/dist/index.js +54 -44
  172. package/dist/index.js.map +1 -1
  173. package/dist/internal/fetch-utils.cjs +3 -2
  174. package/dist/internal/fetch-utils.d.cts +2 -2
  175. package/dist/internal/fetch-utils.d.ts +2 -2
  176. package/dist/internal/fetch-utils.js +2 -2
  177. package/dist/internal/formatting.cjs +2 -2
  178. package/dist/internal/formatting.d.cts +4 -4
  179. package/dist/internal/formatting.d.ts +5 -5
  180. package/dist/internal/formatting.js +2 -2
  181. package/dist/internal/issue-helpers.cjs +2 -1
  182. package/dist/internal/issue-helpers.d.ts +1 -1
  183. package/dist/internal/issue-helpers.js +2 -1
  184. package/dist/internal/test-fixtures.d.cts +164 -164
  185. package/dist/internal/test-fixtures.d.cts.map +1 -1
  186. package/dist/internal/test-fixtures.d.ts +38 -38
  187. package/dist/internal/test-fixtures.d.ts.map +1 -1
  188. package/dist/{issue-helpers-CqqYnwYE.js → issue-helpers-CRx45FYG.js} +15 -19
  189. package/dist/issue-helpers-CRx45FYG.js.map +1 -0
  190. package/dist/issue-helpers-Cz01Ipvl.d.cts.map +1 -1
  191. package/dist/{issue-helpers-BJffpNoO.d.ts → issue-helpers-D1_Uqr-F.d.ts} +1 -1
  192. package/dist/issue-helpers-D1_Uqr-F.d.ts.map +1 -0
  193. package/dist/{issue-helpers-DyAIO0w6.cjs → issue-helpers-s5fKLwJZ.cjs} +14 -19
  194. package/dist/issue-helpers-s5fKLwJZ.cjs.map +1 -0
  195. package/dist/{logging-CX2buXiG.cjs → logging-BpL53bY6.cjs} +1 -1
  196. package/dist/{logging-CX2buXiG.cjs.map → logging-BpL53bY6.cjs.map} +1 -1
  197. package/dist/{logging-DzxYBMrn.js → logging-tGU_SYcA.js} +1 -1
  198. package/dist/{logging-DzxYBMrn.js.map → logging-tGU_SYcA.js.map} +1 -1
  199. package/dist/logging.cjs +1 -1
  200. package/dist/logging.js +1 -1
  201. package/dist/lookup-otel-semantics-BbriXZAx.cjs +5088 -0
  202. package/dist/lookup-otel-semantics-BbriXZAx.cjs.map +1 -0
  203. package/dist/lookup-otel-semantics-Dt667kdR.js +5076 -0
  204. package/dist/lookup-otel-semantics-Dt667kdR.js.map +1 -0
  205. package/dist/{promptDefinitions-C29BWGYg.cjs → promptDefinitions-5V4-M69A.cjs} +2 -2
  206. package/dist/{promptDefinitions-C29BWGYg.cjs.map → promptDefinitions-5V4-M69A.cjs.map} +1 -1
  207. package/dist/{promptDefinitions-D3GTBGLr.d.ts → promptDefinitions-DehpwJfn.d.ts} +1 -1
  208. package/dist/promptDefinitions-DehpwJfn.d.ts.map +1 -0
  209. package/dist/{promptDefinitions-CSKE8T0a.js → promptDefinitions-DyshsF51.js} +2 -2
  210. package/dist/{promptDefinitions-CSKE8T0a.js.map → promptDefinitions-DyshsF51.js.map} +1 -1
  211. package/dist/promptDefinitions.cjs +2 -2
  212. package/dist/promptDefinitions.d.ts +1 -1
  213. package/dist/promptDefinitions.js +2 -2
  214. package/dist/{prompts-Df3i1XSB.cjs → prompts-BTtNbKQR.cjs} +7 -5
  215. package/dist/prompts-BTtNbKQR.cjs.map +1 -0
  216. package/dist/{prompts-C8Y9w5c4.js → prompts-CYcvIxWR.js} +7 -5
  217. package/dist/prompts-CYcvIxWR.js.map +1 -0
  218. package/dist/prompts.cjs +2 -2
  219. package/dist/prompts.d.cts +1 -1
  220. package/dist/prompts.d.cts.map +1 -1
  221. package/dist/prompts.d.ts +2 -2
  222. package/dist/prompts.d.ts.map +1 -1
  223. package/dist/prompts.js +2 -2
  224. package/dist/resources-CSxBC9gs.js +60 -0
  225. package/dist/resources-CSxBC9gs.js.map +1 -0
  226. package/dist/resources-TCvijqOA.cjs +72 -0
  227. package/dist/resources-TCvijqOA.cjs.map +1 -0
  228. package/dist/resources.cjs +2 -2
  229. package/dist/resources.d.cts.map +1 -1
  230. package/dist/resources.d.ts.map +1 -1
  231. package/dist/resources.js +2 -2
  232. package/dist/{schema-3NeMWRAm.d.cts → schema-BlkWypl3.d.ts} +155 -155
  233. package/dist/schema-BlkWypl3.d.ts.map +1 -0
  234. package/dist/{schema-DtsnsxMl.js → schema-Bv2fvxgy.js} +2 -2
  235. package/dist/{schema-DtsnsxMl.js.map → schema-Bv2fvxgy.js.map} +1 -1
  236. package/dist/{schema-B_cMyyJJ.cjs → schema-C0LznFvu.cjs} +4 -4
  237. package/dist/schema-C0LznFvu.cjs.map +1 -0
  238. package/dist/{schema-WDk5Yqww.js → schema-CcFmBoEf.js} +4 -4
  239. package/dist/schema-CcFmBoEf.js.map +1 -0
  240. package/dist/{schema-B3CzDGJk.d.ts → schema-CdDcpvrp.d.cts} +375 -375
  241. package/dist/schema-CdDcpvrp.d.cts.map +1 -0
  242. package/dist/{schema-BpJVmev8.cjs → schema-DPL_hZXP.cjs} +2 -2
  243. package/dist/{schema-BpJVmev8.cjs.map → schema-DPL_hZXP.cjs.map} +1 -1
  244. package/dist/schema.cjs +1 -1
  245. package/dist/schema.js +1 -1
  246. package/dist/{search-docs-D5Foht_0.cjs → search-docs-CjIZDaD1.cjs} +4 -4
  247. package/dist/{search-docs-D5Foht_0.cjs.map → search-docs-CjIZDaD1.cjs.map} +1 -1
  248. package/dist/{search-docs-BLbB_GV2.js → search-docs-ss09Dt0F.js} +4 -4
  249. package/dist/{search-docs-BLbB_GV2.js.map → search-docs-ss09Dt0F.js.map} +1 -1
  250. package/dist/search-issues-BFgCvRYe.js +0 -0
  251. package/dist/search-issues-Biu64RkQ.cjs +0 -0
  252. package/dist/{seer-utils-CDm5J8ur.cjs → seer-utils-C7Kv0gr8.cjs} +15 -1
  253. package/dist/seer-utils-C7Kv0gr8.cjs.map +1 -0
  254. package/dist/{seer-utils-Cj9DXrow.js → seer-utils-NPHv8KYY.js} +4 -2
  255. package/dist/seer-utils-NPHv8KYY.js.map +1 -0
  256. package/dist/{server-BSRxzYFd.js → server-D78x_7Vz.js} +80 -26
  257. package/dist/server-D78x_7Vz.js.map +1 -0
  258. package/dist/{server-Dgkqz8bA.cjs → server-DYFiTMLB.cjs} +80 -26
  259. package/dist/server-DYFiTMLB.cjs.map +1 -0
  260. package/dist/server.cjs +52 -40
  261. package/dist/server.d.cts +4 -2
  262. package/dist/server.d.cts.map +1 -1
  263. package/dist/server.d.ts +5 -3
  264. package/dist/server.d.ts.map +1 -1
  265. package/dist/server.js +52 -40
  266. package/dist/{stdio-BQAm0Liz.cjs → stdio-Be01KQkA.cjs} +3 -3
  267. package/dist/{stdio-BQAm0Liz.cjs.map → stdio-Be01KQkA.cjs.map} +1 -1
  268. package/dist/{stdio-BcihaDjO.js → stdio-CDb2NHHD.js} +3 -3
  269. package/dist/{stdio-BcihaDjO.js.map → stdio-CDb2NHHD.js.map} +1 -1
  270. package/dist/test-setup.cjs +371 -0
  271. package/dist/test-setup.cjs.map +1 -1
  272. package/dist/test-setup.js +371 -0
  273. package/dist/test-setup.js.map +1 -1
  274. package/dist/toolDefinitions.cjs +184 -0
  275. package/dist/toolDefinitions.cjs.map +1 -0
  276. package/dist/toolDefinitions.d.cts +13 -0
  277. package/dist/toolDefinitions.d.cts.map +1 -0
  278. package/dist/toolDefinitions.d.ts +8 -20
  279. package/dist/toolDefinitions.d.ts.map +1 -0
  280. package/dist/toolDefinitions.js +183 -1059
  281. package/dist/toolDefinitions.js.map +1 -0
  282. package/dist/tools/analyze-issue-with-seer.cjs +14 -12
  283. package/dist/tools/analyze-issue-with-seer.d.cts +2 -2
  284. package/dist/tools/analyze-issue-with-seer.d.ts +3 -3
  285. package/dist/tools/analyze-issue-with-seer.js +14 -12
  286. package/dist/tools/create-dsn.cjs +9 -8
  287. package/dist/tools/create-dsn.d.cts +2 -2
  288. package/dist/tools/create-dsn.d.ts +3 -3
  289. package/dist/tools/create-dsn.js +9 -8
  290. package/dist/tools/create-project.cjs +10 -9
  291. package/dist/tools/create-project.d.cts +2 -2
  292. package/dist/tools/create-project.d.ts +3 -3
  293. package/dist/tools/create-project.js +10 -9
  294. package/dist/tools/create-team.cjs +9 -8
  295. package/dist/tools/create-team.d.cts +2 -2
  296. package/dist/tools/create-team.d.ts +3 -3
  297. package/dist/tools/create-team.js +9 -8
  298. package/dist/tools/find-dsns.cjs +9 -8
  299. package/dist/tools/find-dsns.d.cts +2 -2
  300. package/dist/tools/find-dsns.d.ts +3 -3
  301. package/dist/tools/find-dsns.js +9 -8
  302. package/dist/tools/find-organizations.cjs +8 -7
  303. package/dist/tools/find-organizations.d.cts +2 -2
  304. package/dist/tools/find-organizations.d.ts +3 -3
  305. package/dist/tools/find-organizations.js +8 -7
  306. package/dist/tools/find-projects.cjs +9 -8
  307. package/dist/tools/find-projects.d.cts +2 -2
  308. package/dist/tools/find-projects.d.ts +3 -3
  309. package/dist/tools/find-projects.js +9 -8
  310. package/dist/tools/find-releases.cjs +9 -8
  311. package/dist/tools/find-releases.d.cts +2 -2
  312. package/dist/tools/find-releases.d.ts +3 -3
  313. package/dist/tools/find-releases.js +9 -8
  314. package/dist/tools/find-teams.cjs +9 -8
  315. package/dist/tools/find-teams.d.cts +2 -2
  316. package/dist/tools/find-teams.d.ts +3 -3
  317. package/dist/tools/find-teams.js +9 -8
  318. package/dist/tools/get-doc.cjs +9 -8
  319. package/dist/tools/get-doc.d.cts +2 -2
  320. package/dist/tools/get-doc.d.ts +3 -3
  321. package/dist/tools/get-doc.js +9 -8
  322. package/dist/tools/get-event-attachment.cjs +9 -8
  323. package/dist/tools/get-event-attachment.d.cts +2 -2
  324. package/dist/tools/get-event-attachment.d.ts +3 -3
  325. package/dist/tools/get-event-attachment.js +9 -8
  326. package/dist/tools/get-issue-details.cjs +13 -12
  327. package/dist/tools/get-issue-details.d.cts +2 -2
  328. package/dist/tools/get-issue-details.d.ts +3 -3
  329. package/dist/tools/get-issue-details.js +13 -12
  330. package/dist/tools/index.cjs +47 -36
  331. package/dist/tools/index.d.cts +74 -86
  332. package/dist/tools/index.d.cts.map +1 -1
  333. package/dist/tools/index.d.ts +15 -27
  334. package/dist/tools/index.d.ts.map +1 -1
  335. package/dist/tools/index.js +47 -36
  336. package/dist/tools/search-docs.cjs +10 -8
  337. package/dist/tools/search-docs.d.cts +2 -2
  338. package/dist/tools/search-docs.d.ts +3 -3
  339. package/dist/tools/search-docs.js +10 -8
  340. package/dist/tools/search-events/agent.cjs +8 -0
  341. package/dist/tools/search-events/agent.d.cts +43 -0
  342. package/dist/tools/search-events/agent.d.cts.map +1 -0
  343. package/dist/tools/search-events/agent.d.ts +43 -0
  344. package/dist/tools/search-events/agent.d.ts.map +1 -0
  345. package/dist/tools/search-events/agent.js +8 -0
  346. package/dist/tools/search-events/config.cjs +7 -0
  347. package/dist/tools/search-events/config.d.cts +131 -0
  348. package/dist/tools/search-events/config.d.cts.map +1 -0
  349. package/dist/tools/search-events/config.d.ts +131 -0
  350. package/dist/tools/search-events/config.d.ts.map +1 -0
  351. package/dist/tools/search-events/config.js +3 -0
  352. package/dist/tools/search-events/formatters.cjs +8 -0
  353. package/dist/tools/search-events/formatters.d.cts +32 -0
  354. package/dist/tools/search-events/formatters.d.cts.map +1 -0
  355. package/dist/tools/search-events/formatters.d.ts +32 -0
  356. package/dist/tools/search-events/formatters.d.ts.map +1 -0
  357. package/dist/tools/search-events/formatters.js +6 -0
  358. package/dist/tools/search-events/handler.cjs +20 -0
  359. package/dist/tools/search-events/handler.d.cts +5 -0
  360. package/dist/tools/search-events/handler.d.ts +5 -0
  361. package/dist/tools/search-events/handler.js +20 -0
  362. package/dist/tools/search-events/index.cjs +21 -0
  363. package/dist/tools/search-events/index.d.cts +5 -0
  364. package/dist/tools/search-events/index.d.ts +5 -0
  365. package/dist/tools/search-events/index.js +21 -0
  366. package/dist/tools/search-events/utils.cjs +9 -0
  367. package/dist/tools/search-events/utils.d.cts +6 -0
  368. package/dist/tools/search-events/utils.d.ts +6 -0
  369. package/dist/tools/search-events/utils.js +5 -0
  370. package/dist/tools/search-issues/agent.cjs +7 -0
  371. package/dist/tools/search-issues/agent.d.cts +33 -0
  372. package/dist/tools/search-issues/agent.d.cts.map +1 -0
  373. package/dist/tools/search-issues/agent.d.ts +33 -0
  374. package/dist/tools/search-issues/agent.d.ts.map +1 -0
  375. package/dist/tools/search-issues/agent.js +7 -0
  376. package/dist/tools/search-issues/config.cjs +3 -0
  377. package/dist/tools/search-issues/config.d.cts +9 -0
  378. package/dist/tools/search-issues/config.d.cts.map +1 -0
  379. package/dist/tools/search-issues/config.d.ts +9 -0
  380. package/dist/tools/search-issues/config.d.ts.map +1 -0
  381. package/dist/tools/search-issues/config.js +3 -0
  382. package/dist/tools/search-issues/formatters.cjs +4 -0
  383. package/dist/tools/search-issues/formatters.d.cts +15 -0
  384. package/dist/tools/search-issues/formatters.d.cts.map +1 -0
  385. package/dist/tools/search-issues/formatters.d.ts +15 -0
  386. package/dist/tools/search-issues/formatters.d.ts.map +1 -0
  387. package/dist/tools/search-issues/formatters.js +4 -0
  388. package/dist/tools/search-issues/handler.cjs +18 -0
  389. package/dist/tools/search-issues/handler.d.cts +5 -0
  390. package/dist/tools/search-issues/handler.d.ts +5 -0
  391. package/dist/tools/search-issues/handler.js +18 -0
  392. package/dist/tools/search-issues/index.cjs +19 -0
  393. package/dist/tools/search-issues/index.d.cts +5 -0
  394. package/dist/tools/search-issues/index.d.ts +5 -0
  395. package/dist/tools/search-issues/index.js +19 -0
  396. package/dist/tools/types.d.cts +2 -2
  397. package/dist/tools/types.d.ts +3 -3
  398. package/dist/tools/update-issue.cjs +14 -13
  399. package/dist/tools/update-issue.d.cts +2 -2
  400. package/dist/tools/update-issue.d.ts +3 -3
  401. package/dist/tools/update-issue.js +14 -13
  402. package/dist/tools/update-project.cjs +10 -9
  403. package/dist/tools/update-project.d.cts +2 -2
  404. package/dist/tools/update-project.d.ts +3 -3
  405. package/dist/tools/update-project.js +10 -9
  406. package/dist/tools/utils/api-utils.cjs +10 -7
  407. package/dist/tools/utils/api-utils.d.cts +23 -6
  408. package/dist/tools/utils/api-utils.d.cts.map +1 -1
  409. package/dist/tools/utils/api-utils.d.ts +25 -8
  410. package/dist/tools/utils/api-utils.d.ts.map +1 -1
  411. package/dist/tools/utils/api-utils.js +8 -7
  412. package/dist/tools/utils/defineTool.d.cts +2 -2
  413. package/dist/tools/utils/defineTool.d.ts +3 -3
  414. package/dist/tools/utils/fetch-utils.cjs +4 -3
  415. package/dist/tools/utils/fetch-utils.d.cts +2 -2
  416. package/dist/tools/utils/fetch-utils.d.ts +2 -2
  417. package/dist/tools/utils/fetch-utils.js +3 -3
  418. package/dist/tools/utils/formatting-utils.cjs +1 -1
  419. package/dist/tools/utils/formatting-utils.d.cts +3 -3
  420. package/dist/tools/utils/formatting-utils.d.ts +4 -4
  421. package/dist/tools/utils/formatting-utils.js +1 -1
  422. package/dist/tools/utils/issue-utils.cjs +5 -4
  423. package/dist/tools/utils/issue-utils.d.cts +4 -4
  424. package/dist/tools/utils/issue-utils.d.ts +6 -6
  425. package/dist/tools/utils/issue-utils.js +5 -4
  426. package/dist/tools/utils/seer-utils.cjs +3 -1
  427. package/dist/tools/utils/seer-utils.d.cts +6 -4
  428. package/dist/tools/utils/seer-utils.d.cts.map +1 -1
  429. package/dist/tools/utils/seer-utils.d.ts +7 -5
  430. package/dist/tools/utils/seer-utils.d.ts.map +1 -1
  431. package/dist/tools/utils/seer-utils.js +2 -2
  432. package/dist/tools/whoami.cjs +8 -7
  433. package/dist/tools/whoami.d.cts +2 -2
  434. package/dist/tools/whoami.d.ts +3 -3
  435. package/dist/tools/whoami.js +8 -7
  436. package/dist/tools-DvKm5uMs.js +44 -0
  437. package/dist/tools-DvKm5uMs.js.map +1 -0
  438. package/dist/tools-sQ2wM3Pi.cjs +49 -0
  439. package/dist/tools-sQ2wM3Pi.cjs.map +1 -0
  440. package/dist/transports/stdio.cjs +53 -42
  441. package/dist/transports/stdio.d.cts +1 -1
  442. package/dist/transports/stdio.d.ts +2 -2
  443. package/dist/transports/stdio.js +53 -42
  444. package/dist/types-6zHoEWAx.js +0 -0
  445. package/dist/{types-DpV1JAZj.d.ts → types-B-8S69No.d.ts} +2 -2
  446. package/dist/{types-DpV1JAZj.d.ts.map → types-B-8S69No.d.ts.map} +1 -1
  447. package/dist/{types-qB8a4WQT.d.ts → types-BOcoP3Na.d.ts} +2 -2
  448. package/dist/{types-qB8a4WQT.d.ts.map → types-BOcoP3Na.d.ts.map} +1 -1
  449. package/dist/{types-CUN-2OSS.d.cts → types-BV-G5sBp.d.cts} +4 -2
  450. package/dist/{types-CUN-2OSS.d.cts.map → types-BV-G5sBp.d.cts.map} +1 -1
  451. package/dist/{types-BoMP-Ro6.d.cts → types-BYtO24VE.d.cts} +2 -2
  452. package/dist/{types-BoMP-Ro6.d.cts.map → types-BYtO24VE.d.cts.map} +1 -1
  453. package/dist/{types-DkJtNDXU.d.ts → types-C1Fih0eQ.d.ts} +5 -3
  454. package/dist/{types-DkJtNDXU.d.ts.map → types-C1Fih0eQ.d.ts.map} +1 -1
  455. package/dist/types-DdloOYgD.cjs +0 -0
  456. package/dist/{types-D_mx318Q.d.cts → types-aOEJ0KgQ.d.cts} +2 -2
  457. package/dist/{types-D_mx318Q.d.cts.map → types-aOEJ0KgQ.d.cts.map} +1 -1
  458. package/dist/types.d.cts +1 -1
  459. package/dist/types.d.ts +2 -2
  460. package/dist/{update-issue-DpkxxiNk.cjs → update-issue-D77PudUi.cjs} +20 -13
  461. package/dist/update-issue-D77PudUi.cjs.map +1 -0
  462. package/dist/{update-issue-DRTQvy6p.js → update-issue-ndy2PF5G.js} +20 -13
  463. package/dist/update-issue-ndy2PF5G.js.map +1 -0
  464. package/dist/{update-project-YLxt2ry2.js → update-project-Bxsi-BG_.js} +5 -5
  465. package/dist/{update-project-YLxt2ry2.js.map → update-project-Bxsi-BG_.js.map} +1 -1
  466. package/dist/{update-project-DLDDbcGY.cjs → update-project-DqECtbDA.cjs} +5 -5
  467. package/dist/{update-project-DLDDbcGY.cjs.map → update-project-DqECtbDA.cjs.map} +1 -1
  468. package/dist/url-utils-IqgSmI-B.js +152 -0
  469. package/dist/url-utils-IqgSmI-B.js.map +1 -0
  470. package/dist/url-utils-vJo2ER5v.cjs +206 -0
  471. package/dist/url-utils-vJo2ER5v.cjs.map +1 -0
  472. package/dist/utils/url-utils.cjs +6 -1
  473. package/dist/utils/url-utils.d.cts +43 -1
  474. package/dist/utils/url-utils.d.cts.map +1 -1
  475. package/dist/utils/url-utils.d.ts +43 -1
  476. package/dist/utils/url-utils.d.ts.map +1 -1
  477. package/dist/utils/url-utils.js +2 -2
  478. package/dist/utils-BwXbSgEI.d.ts +35 -0
  479. package/dist/utils-BwXbSgEI.d.ts.map +1 -0
  480. package/dist/utils-CqbeJfE1.cjs +138 -0
  481. package/dist/utils-CqbeJfE1.cjs.map +1 -0
  482. package/dist/utils-CtBGHj_N.d.cts +35 -0
  483. package/dist/utils-CtBGHj_N.d.cts.map +1 -0
  484. package/dist/utils-OgYE-imr.js +108 -0
  485. package/dist/utils-OgYE-imr.js.map +1 -0
  486. package/dist/version-Bj68uyCt.js +6 -0
  487. package/dist/{version-CcTnFB56.js.map → version-Bj68uyCt.js.map} +1 -1
  488. package/dist/{version-rDjaSkPw.cjs → version-CMS1IOUV.cjs} +2 -2
  489. package/dist/{version-rDjaSkPw.cjs.map → version-CMS1IOUV.cjs.map} +1 -1
  490. package/dist/version.cjs +1 -1
  491. package/dist/version.js +1 -1
  492. package/dist/{whoami-CEgbTUqt.cjs → whoami-BOJHfdih.cjs} +2 -2
  493. package/dist/{whoami-CEgbTUqt.cjs.map → whoami-BOJHfdih.cjs.map} +1 -1
  494. package/dist/{whoami-DesNZnaQ.js → whoami-Bswhb72a.js} +2 -2
  495. package/dist/{whoami-DesNZnaQ.js.map → whoami-Bswhb72a.js.map} +1 -1
  496. package/dist/whoami-CoZJKpys.cjs +44 -0
  497. package/dist/whoami-CoZJKpys.cjs.map +1 -0
  498. package/dist/whoami-xBAWvzG4.js +32 -0
  499. package/dist/whoami-xBAWvzG4.js.map +1 -0
  500. package/package.json +14 -7
  501. package/dist/analyze-issue-with-seer-BkVrrh28.cjs.map +0 -1
  502. package/dist/analyze-issue-with-seer-CoqsTklL.js.map +0 -1
  503. package/dist/api-utils-C6QJAzFL.js +0 -31
  504. package/dist/api-utils-C6QJAzFL.js.map +0 -1
  505. package/dist/api-utils-d36iteNO.cjs +0 -36
  506. package/dist/api-utils-d36iteNO.cjs.map +0 -1
  507. package/dist/client-CQ9Xe1aN.d.cts.map +0 -1
  508. package/dist/client-DOYWNvVM.js.map +0 -1
  509. package/dist/client-Dkw5iYu3.cjs.map +0 -1
  510. package/dist/client-VCJp6Kcu.d.ts.map +0 -1
  511. package/dist/create-dsn-D530I7Lr.js.map +0 -1
  512. package/dist/create-dsn-Dz8nyTFw.cjs.map +0 -1
  513. package/dist/create-project-BxzRiryg.cjs.map +0 -1
  514. package/dist/create-project-K1od5Rhx.js.map +0 -1
  515. package/dist/errors-CIoxzIug.js +0 -15
  516. package/dist/errors-CIoxzIug.js.map +0 -1
  517. package/dist/errors-YmiXLOyx.cjs +0 -21
  518. package/dist/errors-YmiXLOyx.cjs.map +0 -1
  519. package/dist/fetch-utils-BMKjO-cc.js +0 -29
  520. package/dist/fetch-utils-BMKjO-cc.js.map +0 -1
  521. package/dist/fetch-utils-Bv9WjUp0.d.ts +0 -14
  522. package/dist/fetch-utils-Bv9WjUp0.d.ts.map +0 -1
  523. package/dist/fetch-utils-DzdRW4Yd.d.cts +0 -14
  524. package/dist/fetch-utils-DzdRW4Yd.d.cts.map +0 -1
  525. package/dist/fetch-utils-oab6uNp3.cjs +0 -35
  526. package/dist/fetch-utils-oab6uNp3.cjs.map +0 -1
  527. package/dist/find-errors-C3oUMeRi.js +0 -91
  528. package/dist/find-errors-C3oUMeRi.js.map +0 -1
  529. package/dist/find-errors-CB9NpSxG.cjs +0 -97
  530. package/dist/find-errors-CB9NpSxG.cjs.map +0 -1
  531. package/dist/find-issues-C3uk59rn.cjs +0 -98
  532. package/dist/find-issues-C3uk59rn.cjs.map +0 -1
  533. package/dist/find-issues-CAtNGBly.js +0 -92
  534. package/dist/find-issues-CAtNGBly.js.map +0 -1
  535. package/dist/find-organizations-BrdMfZRO.cjs.map +0 -1
  536. package/dist/find-organizations-ojXwWWzk.js.map +0 -1
  537. package/dist/find-tags-Byk4d3oZ.cjs +0 -45
  538. package/dist/find-tags-Byk4d3oZ.cjs.map +0 -1
  539. package/dist/find-tags-d-wF1Se8.js +0 -39
  540. package/dist/find-tags-d-wF1Se8.js.map +0 -1
  541. package/dist/find-transactions-BiBgg-AE.js +0 -83
  542. package/dist/find-transactions-BiBgg-AE.js.map +0 -1
  543. package/dist/find-transactions-DuZyqjhF.cjs +0 -89
  544. package/dist/find-transactions-DuZyqjhF.cjs.map +0 -1
  545. package/dist/formatting-Bvyded57.js.map +0 -1
  546. package/dist/formatting-CcTK2X8V.d.cts.map +0 -1
  547. package/dist/formatting-D0Aki7rK.cjs.map +0 -1
  548. package/dist/formatting-vtXxusbn.d.ts.map +0 -1
  549. package/dist/get-issue-details-Dcmzxknx.js.map +0 -1
  550. package/dist/get-issue-details-lBrYR9yx.cjs.map +0 -1
  551. package/dist/issue-helpers-BJffpNoO.d.ts.map +0 -1
  552. package/dist/issue-helpers-CqqYnwYE.js.map +0 -1
  553. package/dist/issue-helpers-DyAIO0w6.cjs.map +0 -1
  554. package/dist/promptDefinitions-D3GTBGLr.d.ts.map +0 -1
  555. package/dist/prompts-C8Y9w5c4.js.map +0 -1
  556. package/dist/prompts-Df3i1XSB.cjs.map +0 -1
  557. package/dist/resources-BHF8a1ZB.js +0 -92
  558. package/dist/resources-BHF8a1ZB.js.map +0 -1
  559. package/dist/resources-BM_YQGcb.cjs +0 -104
  560. package/dist/resources-BM_YQGcb.cjs.map +0 -1
  561. package/dist/schema-3NeMWRAm.d.cts.map +0 -1
  562. package/dist/schema-B3CzDGJk.d.ts.map +0 -1
  563. package/dist/schema-B_cMyyJJ.cjs.map +0 -1
  564. package/dist/schema-WDk5Yqww.js.map +0 -1
  565. package/dist/seer-utils-CDm5J8ur.cjs.map +0 -1
  566. package/dist/seer-utils-Cj9DXrow.js.map +0 -1
  567. package/dist/server-BSRxzYFd.js.map +0 -1
  568. package/dist/server-Dgkqz8bA.cjs.map +0 -1
  569. package/dist/tools/find-errors.cjs +0 -12
  570. package/dist/tools/find-errors.d.cts +0 -18
  571. package/dist/tools/find-errors.d.cts.map +0 -1
  572. package/dist/tools/find-errors.d.ts +0 -18
  573. package/dist/tools/find-errors.d.ts.map +0 -1
  574. package/dist/tools/find-errors.js +0 -12
  575. package/dist/tools/find-issues.cjs +0 -12
  576. package/dist/tools/find-issues.d.cts +0 -16
  577. package/dist/tools/find-issues.d.cts.map +0 -1
  578. package/dist/tools/find-issues.d.ts +0 -16
  579. package/dist/tools/find-issues.d.ts.map +0 -1
  580. package/dist/tools/find-issues.js +0 -12
  581. package/dist/tools/find-tags.cjs +0 -12
  582. package/dist/tools/find-tags.d.cts +0 -13
  583. package/dist/tools/find-tags.d.cts.map +0 -1
  584. package/dist/tools/find-tags.d.ts +0 -13
  585. package/dist/tools/find-tags.d.ts.map +0 -1
  586. package/dist/tools/find-tags.js +0 -12
  587. package/dist/tools/find-transactions.cjs +0 -12
  588. package/dist/tools/find-transactions.d.cts +0 -17
  589. package/dist/tools/find-transactions.d.cts.map +0 -1
  590. package/dist/tools/find-transactions.d.ts +0 -17
  591. package/dist/tools/find-transactions.d.ts.map +0 -1
  592. package/dist/tools/find-transactions.js +0 -12
  593. package/dist/tools-CHnZvVEN.cjs +0 -53
  594. package/dist/tools-CHnZvVEN.cjs.map +0 -1
  595. package/dist/tools-CdXGgq1W.js +0 -48
  596. package/dist/tools-CdXGgq1W.js.map +0 -1
  597. package/dist/update-issue-DRTQvy6p.js.map +0 -1
  598. package/dist/update-issue-DpkxxiNk.cjs.map +0 -1
  599. package/dist/url-utils-C9hykWmk.cjs +0 -106
  600. package/dist/url-utils-C9hykWmk.cjs.map +0 -1
  601. package/dist/url-utils-DvZYfzPM.js +0 -82
  602. package/dist/url-utils-DvZYfzPM.js.map +0 -1
  603. package/dist/version-CcTnFB56.js +0 -6
  604. /package/dist/{api-client-CL1WDkw9.cjs → api-client-BWt6M7ij.cjs} +0 -0
  605. /package/dist/{api-client-ChL_0F2u.js → api-client-CNv_hbPO.js} +0 -0
  606. /package/dist/{fetch-utils-C0F4eH6S.cjs → fetch-utils-BqMx2KQr.js} +0 -0
  607. /package/dist/{fetch-utils-DlPjrSk2.js → fetch-utils-DeZcERfe.cjs} +0 -0
  608. /package/dist/{index-DVGDAddE.d.ts → index-DE1muTvw.d.ts} +0 -0
  609. /package/dist/{issue-utils-BbCfbiY8.js → issue-utils-BVAB6I-Z.js} +0 -0
  610. /package/dist/{issue-utils-DMKiif6C.cjs → issue-utils-pdbo-5LW.cjs} +0 -0
  611. /package/dist/{types-CCHsZshF.js → search-events-BBFPuvRq.cjs} +0 -0
  612. /package/dist/{types-MYBaygjr.cjs → search-events-bV3-kK78.js} +0 -0
@@ -0,0 +1,217 @@
1
+ import { getStringValue, isAggregateQuery } from "./utils-OgYE-imr.js";
2
+ import * as Sentry from "@sentry/node";
3
+
4
+ //#region src/tools/search-events/formatters.ts
5
+ /**
6
+ * Format error event results for display
7
+ */
8
+ function formatErrorResults(eventData, params, apiService, organizationSlug, explorerUrl, sentryQuery, fields) {
9
+ let output = `# Search Results for "${params.naturalLanguageQuery}"\n\n`;
10
+ if (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\n\n`;
11
+ else output += `⚠️ **IMPORTANT**: Display these errors as highlighted alert cards with color-coded severity levels and clickable Event IDs.\n\n`;
12
+ if (params.includeExplanation) {
13
+ output += `## Query Translation\n`;
14
+ output += `Natural language: "${params.naturalLanguageQuery}"\n`;
15
+ output += `Sentry query: \`${sentryQuery}\`\n\n`;
16
+ }
17
+ output += `**📊 View these results in Sentry**: ${explorerUrl}\n`;
18
+ output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
19
+ if (eventData.length === 0) {
20
+ Sentry.logger.info(Sentry.logger.fmt`No error events found for query: ${params.naturalLanguageQuery}`, {
21
+ query: sentryQuery,
22
+ fields,
23
+ organizationSlug,
24
+ dataset: "errors"
25
+ });
26
+ output += `No results found.\n\n`;
27
+ output += `Try being more specific or using different terms in your search.\n`;
28
+ return output;
29
+ }
30
+ output += `Found ${eventData.length} ${isAggregateQuery(fields) ? "aggregate result" : "error"}${eventData.length === 1 ? "" : "s"}:\n\n`;
31
+ if (isAggregateQuery(fields)) {
32
+ output += "```json\n";
33
+ output += JSON.stringify(eventData, null, 2);
34
+ output += "\n```\n\n";
35
+ } else {
36
+ const priorityFields = [
37
+ "title",
38
+ "issue",
39
+ "project",
40
+ "level",
41
+ "error.type",
42
+ "message",
43
+ "culprit",
44
+ "timestamp",
45
+ "last_seen()",
46
+ "count()"
47
+ ];
48
+ for (const event of eventData) {
49
+ const title = getStringValue(event, "title") || getStringValue(event, "message") || getStringValue(event, "error.value") || "Error Event";
50
+ output += `## ${title}\n\n`;
51
+ for (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {
52
+ const value = event[field];
53
+ if (field === "issue" && typeof value === "string") {
54
+ output += `**Issue ID**: ${value}\n`;
55
+ output += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\n`;
56
+ } else output += `**${field}**: ${value}\n`;
57
+ }
58
+ const displayedFields = new Set([...priorityFields, "id"]);
59
+ for (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `**${key}**: ${value}\n`;
60
+ output += "\n";
61
+ }
62
+ }
63
+ output += "## Next Steps\n\n";
64
+ output += "- Get more details about a specific error: Use the Issue ID\n";
65
+ output += "- View error groups: Navigate to the Issues page in Sentry\n";
66
+ output += "- Set up alerts: Configure alert rules for these error patterns\n";
67
+ return output;
68
+ }
69
+ /**
70
+ * Format log event results for display
71
+ */
72
+ function formatLogResults(eventData, params, apiService, organizationSlug, explorerUrl, sentryQuery, fields) {
73
+ let output = `# Search Results for "${params.naturalLanguageQuery}"\n\n`;
74
+ if (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\n\n`;
75
+ else output += `⚠️ **IMPORTANT**: Display these logs in console format with monospace font, color-coded severity (🔴 ERROR, 🟡 WARN, 🔵 INFO), and preserve timestamps.\n\n`;
76
+ if (params.includeExplanation) {
77
+ output += `## Query Translation\n`;
78
+ output += `Natural language: "${params.naturalLanguageQuery}"\n`;
79
+ output += `Sentry query: \`${sentryQuery}\`\n\n`;
80
+ }
81
+ output += `**📊 View these results in Sentry**: ${explorerUrl}\n`;
82
+ output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
83
+ if (eventData.length === 0) {
84
+ Sentry.logger.info(Sentry.logger.fmt`No log events found for query: ${params.naturalLanguageQuery}`, {
85
+ query: sentryQuery,
86
+ fields,
87
+ organizationSlug,
88
+ dataset: "logs"
89
+ });
90
+ output += `No results found.\n\n`;
91
+ output += `Try being more specific or using different terms in your search.\n`;
92
+ return output;
93
+ }
94
+ output += `Found ${eventData.length} ${isAggregateQuery(fields) ? "aggregate result" : "log"}${eventData.length === 1 ? "" : "s"}:\n\n`;
95
+ if (isAggregateQuery(fields)) {
96
+ output += "```json\n";
97
+ output += JSON.stringify(eventData, null, 2);
98
+ output += "\n```\n\n";
99
+ } else {
100
+ output += "```console\n";
101
+ for (const event of eventData) {
102
+ const timestamp = getStringValue(event, "timestamp", "N/A");
103
+ const severity = getStringValue(event, "severity", "info");
104
+ const message = getStringValue(event, "message", "No message");
105
+ const severityUpper = severity.toUpperCase();
106
+ const severityEmojis = {
107
+ ERROR: "🔴",
108
+ FATAL: "🔴",
109
+ WARN: "🟡",
110
+ WARNING: "🟡",
111
+ INFO: "🔵",
112
+ DEBUG: "⚫",
113
+ TRACE: "⚫"
114
+ };
115
+ const severityEmoji = severityEmojis[severityUpper] || "🔵";
116
+ output += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\n`;
117
+ }
118
+ output += "```\n\n";
119
+ output += "## Log Details\n\n";
120
+ const priorityFields = [
121
+ "message",
122
+ "severity",
123
+ "severity_number",
124
+ "timestamp",
125
+ "project",
126
+ "trace",
127
+ "sentry.item_id"
128
+ ];
129
+ for (let i = 0; i < eventData.length; i++) {
130
+ const event = eventData[i];
131
+ output += `### Log ${i + 1}\n`;
132
+ for (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {
133
+ const value = event[field];
134
+ if (field === "trace" && typeof value === "string") {
135
+ output += `- **Trace ID**: ${value}\n`;
136
+ output += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\n`;
137
+ } else output += `- **${field}**: ${value}\n`;
138
+ }
139
+ const displayedFields = new Set([...priorityFields, "id"]);
140
+ for (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `- **${key}**: ${value}\n`;
141
+ output += "\n";
142
+ }
143
+ }
144
+ output += "## Next Steps\n\n";
145
+ output += "- View related traces: Click on the Trace URL if available\n";
146
+ output += "- Filter by severity: Adjust your query to focus on specific log levels\n";
147
+ output += "- Export logs: Use the Sentry web interface for bulk export\n";
148
+ return output;
149
+ }
150
+ /**
151
+ * Format span/trace event results for display
152
+ */
153
+ function formatSpanResults(eventData, params, apiService, organizationSlug, explorerUrl, sentryQuery, fields) {
154
+ let output = `# Search Results for "${params.naturalLanguageQuery}"\n\n`;
155
+ if (isAggregateQuery(fields)) output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\n\n`;
156
+ else output += `⚠️ **IMPORTANT**: Display these traces as a performance timeline with duration bars and hierarchical span relationships.\n\n`;
157
+ if (params.includeExplanation) {
158
+ output += `## Query Translation\n`;
159
+ output += `Natural language: "${params.naturalLanguageQuery}"\n`;
160
+ output += `Sentry query: \`${sentryQuery}\`\n\n`;
161
+ }
162
+ output += `**📊 View these results in Sentry**: ${explorerUrl}\n`;
163
+ output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
164
+ if (eventData.length === 0) {
165
+ Sentry.logger.info(Sentry.logger.fmt`No span events found for query: ${params.naturalLanguageQuery}`, {
166
+ query: sentryQuery,
167
+ fields,
168
+ organizationSlug,
169
+ dataset: "spans"
170
+ });
171
+ output += `No results found.\n\n`;
172
+ output += `Try being more specific or using different terms in your search.\n`;
173
+ return output;
174
+ }
175
+ output += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? "" : "s"}` : `trace${eventData.length === 1 ? "" : "s"}/span${eventData.length === 1 ? "" : "s"}`}:\n\n`;
176
+ if (isAggregateQuery(fields)) {
177
+ output += "```json\n";
178
+ output += JSON.stringify(eventData, null, 2);
179
+ output += "\n```\n\n";
180
+ } else {
181
+ const priorityFields = [
182
+ "id",
183
+ "span.op",
184
+ "span.description",
185
+ "transaction",
186
+ "span.duration",
187
+ "span.status",
188
+ "trace",
189
+ "project",
190
+ "timestamp"
191
+ ];
192
+ for (const event of eventData) {
193
+ const title = getStringValue(event, "span.description") || getStringValue(event, "transaction") || getStringValue(event, "span.op") || "Span";
194
+ output += `## ${title}\n\n`;
195
+ for (const field of priorityFields) if (field in event && event[field] !== null && event[field] !== void 0) {
196
+ const value = event[field];
197
+ if (field === "trace" && typeof value === "string") {
198
+ output += `**Trace ID**: ${value}\n`;
199
+ output += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\n`;
200
+ } else if (field === "span.duration" && typeof value === "number") output += `**${field}**: ${value}ms\n`;
201
+ else output += `**${field}**: ${value}\n`;
202
+ }
203
+ const displayedFields = new Set([...priorityFields, "id"]);
204
+ for (const [key, value] of Object.entries(event)) if (!displayedFields.has(key) && value !== null && value !== void 0) output += `**${key}**: ${value}\n`;
205
+ output += "\n";
206
+ }
207
+ }
208
+ output += "## Next Steps\n\n";
209
+ output += "- View the full trace: Click on the Trace URL above\n";
210
+ output += "- Search for related spans: Modify your query to be more specific\n";
211
+ output += "- Export data: Use the Sentry web interface for advanced analysis\n";
212
+ return output;
213
+ }
214
+
215
+ //#endregion
216
+ export { formatErrorResults, formatLogResults, formatSpanResults };
217
+ //# sourceMappingURL=formatters-DSYXBiQx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters-DSYXBiQx.js","names":["eventData: FlexibleEventData[]","params: { naturalLanguageQuery: string; includeExplanation?: boolean }","apiService: SentryApiService","organizationSlug: string","explorerUrl: string","sentryQuery: string","fields: string[]","severityEmojis: Record<string, string>"],"sources":["../src/tools/search-events/formatters.ts"],"sourcesContent":["import type { SentryApiService } from \"../../api-client\";\nimport {\n type FlexibleEventData,\n getStringValue,\n getNumberValue,\n isAggregateQuery,\n} from \"./utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format error event results for display\n */\nexport function formatErrorResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these errors as highlighted alert cards with color-coded severity levels and clickable Event IDs.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No error events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"errors\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"error\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual errors, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"title\",\n \"issue\",\n \"project\",\n \"level\",\n \"error.type\",\n \"message\",\n \"culprit\",\n \"timestamp\",\n \"last_seen()\", // Aggregate field - when the issue was last seen\n \"count()\", // Aggregate field - total occurrences of this issue\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"title\") ||\n getStringValue(event, \"message\") ||\n getStringValue(event, \"error.value\") ||\n \"Error Event\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first if they exist\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"issue\" && typeof value === \"string\") {\n output += `**Issue ID**: ${value}\\n`;\n output += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields that weren't in the priority list\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- Get more details about a specific error: Use the Issue ID\\n\";\n output += \"- View error groups: Navigate to the Issues page in Sentry\\n\";\n output += \"- Set up alerts: Configure alert rules for these error patterns\\n\";\n\n return output;\n}\n\n/**\n * Format log event results for display\n */\nexport function formatLogResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these logs in console format with monospace font, color-coded severity (🔴 ERROR, 🟡 WARN, 🔵 INFO), and preserve timestamps.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No log events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"logs\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"log\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual logs, format as console output\n output += \"```console\\n\";\n\n for (const event of eventData) {\n const timestamp = getStringValue(event, \"timestamp\", \"N/A\");\n const severity = getStringValue(event, \"severity\", \"info\");\n const message = getStringValue(event, \"message\", \"No message\");\n\n // Safely uppercase the severity\n const severityUpper = severity.toUpperCase();\n\n // Get severity emoji with proper typing\n const severityEmojis: Record<string, string> = {\n ERROR: \"🔴\",\n FATAL: \"🔴\",\n WARN: \"🟡\",\n WARNING: \"🟡\",\n INFO: \"🔵\",\n DEBUG: \"⚫\",\n TRACE: \"⚫\",\n };\n const severityEmoji = severityEmojis[severityUpper] || \"🔵\";\n\n // Standard log format with emoji and proper spacing\n output += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\\n`;\n }\n\n output += \"```\\n\\n\";\n\n // Add detailed metadata for each log entry\n output += \"## Log Details\\n\\n\";\n\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"message\",\n \"severity\",\n \"severity_number\",\n \"timestamp\",\n \"project\",\n \"trace\",\n \"sentry.item_id\",\n ];\n\n for (let i = 0; i < eventData.length; i++) {\n const event = eventData[i];\n\n output += `### Log ${i + 1}\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `- **Trace ID**: ${value}\\n`;\n output += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else {\n output += `- **${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `- **${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View related traces: Click on the Trace URL if available\\n\";\n output +=\n \"- Filter by severity: Adjust your query to focus on specific log levels\\n\";\n output += \"- Export logs: Use the Sentry web interface for bulk export\\n\";\n\n return output;\n}\n\n/**\n * Format span/trace event results for display\n */\nexport function formatSpanResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these traces as a performance timeline with duration bars and hierarchical span relationships.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No span events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"spans\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `trace${eventData.length === 1 ? \"\" : \"s\"}/span${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual spans, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"transaction\",\n \"span.duration\",\n \"span.status\",\n \"trace\",\n \"project\",\n \"timestamp\",\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"span.description\") ||\n getStringValue(event, \"transaction\") ||\n getStringValue(event, \"span.op\") ||\n \"Span\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `**Trace ID**: ${value}\\n`;\n output += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else if (field === \"span.duration\" && typeof value === \"number\") {\n output += `**${field}**: ${value}ms\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View the full trace: Click on the Trace URL above\\n\";\n output +=\n \"- Search for related spans: Modify your query to be more specific\\n\";\n output +=\n \"- Export data: Use the Sentry web interface for advanced analysis\\n\";\n\n return output;\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,mBACdA,WACAC,QACAC,YACAC,kBACAC,aACAC,aACAC,QACQ;CACR,IAAI,UAAU,wBAAwB,OAAO,qBAAqB;AAGlE,KAAI,iBAAiB,OAAO,CAC1B,YAAW;KAEX,YAAW;AAGb,KAAI,OAAO,oBAAoB;AAC7B,aAAW;AACX,aAAW,qBAAqB,OAAO,qBAAqB;AAC5D,aAAW,kBAAkB,YAAY;CAC1C;AAED,YAAW,uCAAuC,YAAY;AAC9D,YAAW;AAEX,KAAI,UAAU,WAAW,GAAG;AAC1B,SAAO,OAAO,KACZ,OAAO,OACJ,IAAI,mCAAmC,OAAO,wBACjD;GACE,OAAO;GACC;GACU;GAClB,SAAS;EACV,EACF;AACD,aAAW;AACX,aAAW;AACX,SAAO;CACR;AAED,YAAW,QAAQ,UAAU,OAAO,GAAG,iBAAiB,OAAO,GAAG,qBAAqB,UAAU,UAAU,WAAW,IAAI,KAAK,IAAI;AAGnI,KAAI,iBAAiB,OAAO,EAAE;AAC5B,YAAU;AACV,YAAU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B,QAAK,MAAM,SAAS,eAClB,KACE,SAAS,SACT,MAAM,WAAW,QACjB,MAAM,mBACN;IACA,MAAM,QAAQ,MAAM;AAEpB,QAAI,UAAU,kBAAkB,UAAU,UAAU;AAClD,gBAAW,gBAAgB,MAAM;AACjC,gBAAW,iBAAiB,WAAW,YAAY,kBAAkB,MAAM,CAAC;IAC7E,WAAU,UAAU,0BAA0B,UAAU,SACvD,YAAW,IAAI,MAAM,MAAM,MAAM;QAEjC,YAAW,IAAI,MAAM,MAAM,MAAM;GAEpC;GAIH,MAAM,kBAAkB,IAAI,IAAI,CAAC,GAAG,gBAAgB,IAAK;AACzD,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,CAC9C,MACG,gBAAgB,IAAI,IAAI,IACzB,UAAU,QACV,iBAEA,YAAW,IAAI,IAAI,MAAM,MAAM;AAInC,aAAU;EACX;CACF;AAED,WAAU;AACV,WAAU;AACV,WACE;AACF,WACE;AAEF,QAAO;AACR"}
@@ -0,0 +1,85 @@
1
+ const require_chunk = require('./chunk-DWy1uDak.cjs');
2
+ const require_url_utils = require('./url-utils-vJo2ER5v.cjs');
3
+ const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
4
+
5
+ //#region src/tools/search-issues/formatters.ts
6
+ /**
7
+ * Format issue search results for display
8
+ */
9
+ function formatIssueResults(issues, organizationSlug, projectSlugOrId, query, regionUrl, naturalLanguageQuery, skipHeader = false) {
10
+ const host = regionUrl ? new URL(regionUrl).host : "sentry.io";
11
+ let output = "";
12
+ if (!skipHeader) {
13
+ if (naturalLanguageQuery) output = `# Search Results for "${naturalLanguageQuery}"\n\n`;
14
+ else {
15
+ output = `# Issues in **${organizationSlug}`;
16
+ if (projectSlugOrId) output += `/${projectSlugOrId}`;
17
+ output += "**\n\n";
18
+ }
19
+ output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\n\n`;
20
+ }
21
+ if (issues.length === 0) {
22
+ __sentry_node.logger.info(__sentry_node.logger.fmt`No issues found for query: ${naturalLanguageQuery || query}`, {
23
+ query,
24
+ organizationSlug,
25
+ projectSlug: projectSlugOrId,
26
+ naturalLanguageQuery
27
+ });
28
+ output += "No issues found matching your search criteria.\n\n";
29
+ output += "Try adjusting your search criteria or time range.";
30
+ return output;
31
+ }
32
+ const searchUrl = require_url_utils.getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId);
33
+ output += `**📊 View these results in Sentry**: ${searchUrl}\n`;
34
+ output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
35
+ output += `Found **${issues.length}** issue${issues.length === 1 ? "" : "s"}:\n\n`;
36
+ issues.forEach((issue, index) => {
37
+ const issueUrl = require_url_utils.getIssueUrl(host, organizationSlug, issue.shortId);
38
+ output += `## ${index + 1}. [${issue.shortId}](${issueUrl})\n\n`;
39
+ output += `**${issue.title}**\n\n`;
40
+ output += `- **Status**: ${issue.status}\n`;
41
+ output += `- **Users**: ${issue.userCount || 0}\n`;
42
+ output += `- **Events**: ${issue.count || 0}\n`;
43
+ if (issue.assignedTo) {
44
+ const assignee = issue.assignedTo;
45
+ if (typeof assignee === "string") output += `- **Assigned to**: ${assignee}\n`;
46
+ else if (assignee && typeof assignee === "object" && "name" in assignee) output += `- **Assigned to**: ${assignee.name}\n`;
47
+ }
48
+ output += `- **First seen**: ${formatDate(issue.firstSeen)}\n`;
49
+ output += `- **Last seen**: ${formatDate(issue.lastSeen)}\n`;
50
+ if (issue.culprit) output += `- **Culprit**: \`${issue.culprit}\`\n`;
51
+ output += "\n";
52
+ });
53
+ output += "## Next Steps\n\n";
54
+ output += "- Get more details about a specific issue: Use the Issue ID with get_issue_details\n";
55
+ output += "- Update issue status: Use update_issue to resolve or assign issues\n";
56
+ output += "- View event counts: Use search_events for aggregated statistics\n";
57
+ return output;
58
+ }
59
+ /**
60
+ * Format date for display
61
+ */
62
+ function formatDate(dateString) {
63
+ if (!dateString) return "N/A";
64
+ const date = new Date(dateString);
65
+ const now = /* @__PURE__ */ new Date();
66
+ const diffMs = now.getTime() - date.getTime();
67
+ const diffHours = Math.floor(diffMs / (1e3 * 60 * 60));
68
+ if (diffHours < 1) {
69
+ const diffMinutes = Math.floor(diffMs / (1e3 * 60));
70
+ return `${diffMinutes} minute${diffMinutes === 1 ? "" : "s"} ago`;
71
+ }
72
+ if (diffHours < 24) return `${diffHours} hour${diffHours === 1 ? "" : "s"} ago`;
73
+ const diffDays = Math.floor(diffHours / 24);
74
+ if (diffDays < 30) return `${diffDays} day${diffDays === 1 ? "" : "s"} ago`;
75
+ return date.toLocaleDateString();
76
+ }
77
+
78
+ //#endregion
79
+ Object.defineProperty(exports, 'formatIssueResults', {
80
+ enumerable: true,
81
+ get: function () {
82
+ return formatIssueResults;
83
+ }
84
+ });
85
+ //# sourceMappingURL=formatters-DbqofIoy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters-DbqofIoy.cjs","names":["issues: Issue[]","organizationSlug: string","projectSlugOrId: string | undefined","query: string","regionUrl?: string","naturalLanguageQuery?: string","dateString?: string | null"],"sources":["../src/tools/search-issues/formatters.ts"],"sourcesContent":["import type { Issue } from \"../../api-client\";\nimport { getIssueUrl, getIssuesSearchUrl } from \"../../utils/url-utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format issue search results for display\n */\nexport function formatIssueResults(\n issues: Issue[],\n organizationSlug: string,\n projectSlugOrId: string | undefined,\n query: string,\n regionUrl?: string,\n naturalLanguageQuery?: string,\n skipHeader = false,\n): string {\n const host = regionUrl ? new URL(regionUrl).host : \"sentry.io\";\n\n let output = \"\";\n\n // Skip header section if requested (when called from handler with includeExplanation)\n if (!skipHeader) {\n // Use natural language query in title if provided, otherwise fall back to org/project\n if (naturalLanguageQuery) {\n output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n } else {\n output = `# Issues in **${organizationSlug}`;\n if (projectSlugOrId) {\n output += `/${projectSlugOrId}`;\n }\n output += \"**\\n\\n\";\n }\n\n // Add display instructions for UI\n output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\\n\\n`;\n }\n\n if (issues.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No issues found for query: ${naturalLanguageQuery || query}`,\n {\n query: query,\n organizationSlug: organizationSlug,\n projectSlug: projectSlugOrId,\n naturalLanguageQuery: naturalLanguageQuery,\n },\n );\n output += \"No issues found matching your search criteria.\\n\\n\";\n output += \"Try adjusting your search criteria or time range.\";\n return output;\n }\n\n // Generate search URL for viewing results\n const searchUrl = getIssuesSearchUrl(\n host,\n organizationSlug,\n query,\n projectSlugOrId,\n );\n\n // Add view link with emoji and guidance text (like search_events)\n output += `**📊 View these results in Sentry**: ${searchUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n output += `Found **${issues.length}** issue${issues.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // Format each issue\n issues.forEach((issue, index) => {\n // Generate issue URL using the utility function\n const issueUrl = getIssueUrl(host, organizationSlug, issue.shortId);\n\n output += `## ${index + 1}. [${issue.shortId}](${issueUrl})\\n\\n`;\n output += `**${issue.title}**\\n\\n`;\n\n // Issue metadata\n // Issues don't have a level field in the API response\n output += `- **Status**: ${issue.status}\\n`;\n output += `- **Users**: ${issue.userCount || 0}\\n`;\n output += `- **Events**: ${issue.count || 0}\\n`;\n\n if (issue.assignedTo) {\n const assignee = issue.assignedTo;\n if (typeof assignee === \"string\") {\n output += `- **Assigned to**: ${assignee}\\n`;\n } else if (\n assignee &&\n typeof assignee === \"object\" &&\n \"name\" in assignee\n ) {\n output += `- **Assigned to**: ${assignee.name}\\n`;\n }\n }\n\n output += `- **First seen**: ${formatDate(issue.firstSeen)}\\n`;\n output += `- **Last seen**: ${formatDate(issue.lastSeen)}\\n`;\n\n if (issue.culprit) {\n output += `- **Culprit**: \\`${issue.culprit}\\`\\n`;\n }\n\n output += \"\\n\";\n });\n\n // Add next steps section (like search_events)\n output += \"## Next Steps\\n\\n\";\n output +=\n \"- Get more details about a specific issue: Use the Issue ID with get_issue_details\\n\";\n output +=\n \"- Update issue status: Use update_issue to resolve or assign issues\\n\";\n output +=\n \"- View event counts: Use search_events for aggregated statistics\\n\";\n\n return output;\n}\n\n/**\n * Format date for display\n */\nfunction formatDate(dateString?: string | null): string {\n if (!dateString) return \"N/A\";\n\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\n if (diffHours < 1) {\n const diffMinutes = Math.floor(diffMs / (1000 * 60));\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n return date.toLocaleDateString();\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,mBACdA,QACAC,kBACAC,iBACAC,OACAC,WACAC,sBACA,aAAa,OACL;CACR,MAAM,OAAO,YAAY,IAAI,IAAI,WAAW,OAAO;CAEnD,IAAI,SAAS;AAGb,MAAK,YAAY;AAEf,MAAI,qBACF,WAAU,wBAAwB,qBAAqB;OAClD;AACL,aAAU,gBAAgB;AAC1B,OAAI,gBACF,YAAW,GAAG;AAEhB,aAAU;EACX;AAGD,aAAW;CACZ;AAED,KAAI,OAAO,WAAW,GAAG;AACvB,gBAAO,OAAO,KACZ,cAAO,OACJ,IAAI,6BAA6B,wBAAwB,SAC5D;GACS;GACW;GAClB,aAAa;GACS;EACvB,EACF;AACD,YAAU;AACV,YAAU;AACV,SAAO;CACR;CAGD,MAAM,YAAY,qCAChB,MACA,kBACA,OACA,gBACD;AAGD,YAAW,uCAAuC,UAAU;AAC5D,YAAW;AAEX,YAAW,UAAU,OAAO,OAAO,UAAU,OAAO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QAAO,KAAK,oBAAoB;AACjC"}
@@ -1,6 +1,6 @@
1
- import { FrameInterface } from "./schema-3NeMWRAm.cjs";
2
- import { AutofixRunState, Event, Issue } from "./types-BoMP-Ro6.cjs";
3
- import { SentryApiService } from "./client-CQ9Xe1aN.cjs";
1
+ import { FrameInterface } from "./schema-CdDcpvrp.cjs";
2
+ import { AutofixRunState, Event, Issue } from "./types-BYtO24VE.cjs";
3
+ import { SentryApiService } from "./client-CgS3tjJG.cjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/internal/formatting.d.ts
@@ -46,4 +46,4 @@ declare function formatIssueOutput({
46
46
  //# sourceMappingURL=formatting.d.ts.map
47
47
  //#endregion
48
48
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
49
- //# sourceMappingURL=formatting-CcTK2X8V.d.cts.map
49
+ //# sourceMappingURL=formatting-BxyhA4G3.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-BxyhA4G3.d.cts","names":[],"sources":["../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;AAoFgB;AAoEhB;AA+gBA;;;;;;;AAQS,iBA5lBO,iBAAA,CA4lBP,KAAA,EA3lBA,CAAA,CAAE,KA2lBF,CAAA,OA3lBe,cA2lBf,CAAA,EAAA,UAAA,CAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAAA,IAAA,CAAA,EAAA,MAAA;;;;AAGuB;;;;iBA1hBhB,iBAAA,QAAyB;;;;;;;;iBA+gBzB,iBAAA;;;;;;;;SAQP;SACA;cACK;iBACG"}
@@ -1,4 +1,4 @@
1
- const require_seer_utils = require('./seer-utils-CDm5J8ur.cjs');
1
+ const require_seer_utils = require('./seer-utils-C7Kv0gr8.cjs');
2
2
 
3
3
  //#region src/internal/formatting.ts
4
4
  const LANGUAGE_EXTENSIONS = {
@@ -151,7 +151,7 @@ function formatExceptionInterfaceOutput(event, data) {
151
151
  if (!exception) return;
152
152
  if (isChained && index > 0) {
153
153
  parts.push("");
154
- parts.push(getExceptionChainMessage(event.platform, index, exceptions.length));
154
+ parts.push(getExceptionChainMessage(event.platform || null, index, exceptions.length));
155
155
  parts.push("");
156
156
  }
157
157
  const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : ""}`;
@@ -416,4 +416,4 @@ Object.defineProperty(exports, 'formatIssueOutput', {
416
416
  return formatIssueOutput;
417
417
  }
418
418
  });
419
- //# sourceMappingURL=formatting-D0Aki7rK.cjs.map
419
+ //# sourceMappingURL=formatting-C180PVwd.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-C180PVwd.cjs","names":["LANGUAGE_EXTENSIONS: Record<string, string>","LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]>","frame: z.infer<typeof FrameInterface>","platform?: string | null","frameIndex?: number","event: Event","parts: string[]","data: z.infer<typeof ErrorEntrySchema>","platform: string | null","index: number","totalExceptions: number","data: z.infer<typeof RequestEntrySchema>","data: z.infer<typeof MessageEntrySchema>","data: z.infer<typeof ThreadsEntrySchema>","lines: string[]","value: unknown","vars: Record<string, unknown>","frames: z.infer<typeof FrameInterface>[]","contexts: z.infer<typeof EventSchema>[\"contexts\"]","autofixState: AutofixRunState"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue, AutofixRunState } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n MessageEntrySchema,\n ThreadsEntrySchema,\n SentryApiService,\n} from \"../api-client\";\nimport {\n getOutputForAutofixStep,\n getStatusDisplayName,\n isTerminalStatus,\n} from \"../tools/utils/seer-utils\";\n\n// Language detection mappings\nconst LANGUAGE_EXTENSIONS: Record<string, string> = {\n \".java\": \"java\",\n \".py\": \"python\",\n \".js\": \"javascript\",\n \".jsx\": \"javascript\",\n \".ts\": \"javascript\",\n \".tsx\": \"javascript\",\n \".rb\": \"ruby\",\n \".php\": \"php\",\n};\n\nconst LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]> = [\n [/^(java\\.|com\\.|org\\.)/, \"java\"],\n];\n\n/**\n * Detects the programming language of a stack frame based on the file extension.\n * Falls back to the platform parameter if no filename is available or extension is unrecognized.\n *\n * @param frame - The stack frame containing file and location information\n * @param platform - Optional platform hint to use as fallback\n * @returns The detected language or platform fallback or \"unknown\"\n */\nfunction detectLanguage(\n frame: z.infer<typeof FrameInterface>,\n platform?: string | null,\n): string {\n // Check filename extensions\n if (frame.filename) {\n const ext = frame.filename.toLowerCase().match(/\\.[^.]+$/)?.[0];\n if (ext && LANGUAGE_EXTENSIONS[ext]) {\n return LANGUAGE_EXTENSIONS[ext];\n }\n }\n\n // Check module patterns\n if (frame.module) {\n for (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) {\n if (pattern.test(frame.module)) {\n return language;\n }\n }\n }\n\n // Fallback to platform or unknown\n return platform || \"unknown\";\n}\n\n/**\n * Formats a stack frame into a language-specific string representation.\n * Different languages have different conventions for displaying stack traces.\n *\n * @param frame - The stack frame to format\n * @param frameIndex - Optional frame index for languages that display frame numbers\n * @param platform - Optional platform hint for language detection fallback\n * @returns Formatted stack frame string\n */\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n frameIndex?: number,\n platform?: string | null,\n) {\n const language = detectLanguage(frame, platform);\n\n switch (language) {\n case \"java\": {\n // at com.example.ClassName.methodName(FileName.java:123)\n const className = frame.module || \"UnknownClass\";\n const method = frame.function || \"<unknown>\";\n const source = frame.filename || \"Unknown Source\";\n const location = frame.lineNo ? `:${frame.lineNo}` : \"\";\n return `at ${className}.${method}(${source}${location})`;\n }\n\n case \"python\": {\n // File \"/path/to/file.py\", line 42, in function_name\n const file =\n frame.filename || frame.absPath || frame.module || \"<unknown>\";\n const func = frame.function || \"<module>\";\n const line = frame.lineNo ? `, line ${frame.lineNo}` : \"\";\n return ` File \"${file}\"${line}, in ${func}`;\n }\n\n case \"javascript\": {\n // Original compact format: filename:line:col (function)\n // This preserves backward compatibility\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n\n case \"ruby\": {\n // from /path/to/file.rb:42:in `method_name'\n const file = frame.filename || frame.module || \"<unknown>\";\n const func = frame.function ? ` \\`${frame.function}\\`` : \"\";\n const line = frame.lineNo ? `:${frame.lineNo}:in` : \"\";\n return ` from ${file}${line}${func}`;\n }\n\n case \"php\": {\n // #0 /path/to/file.php(42): functionName()\n const file = frame.filename || \"<unknown>\";\n const line = frame.lineNo ? `(${frame.lineNo})` : \"\";\n const func = frame.function || \"<unknown>\";\n const prefix = frameIndex !== undefined ? `#${frameIndex} ` : \"\";\n return `${prefix}${file}${line}: ${func}()`;\n }\n\n default: {\n // Generic format for unknown languages\n const func = frame.function || \"<unknown>\";\n const location = frame.filename || frame.module || \"<unknown>\";\n const line = frame.lineNo ? `:${frame.lineNo}` : \"\";\n const col = frame.colNo != null ? `:${frame.colNo}` : \"\";\n return ` at ${func} (${location}${line}${col})`;\n }\n }\n}\n\n/**\n * Formats a Sentry event into a structured markdown output.\n * Includes error messages, stack traces, request info, and contextual data.\n *\n * @param event - The Sentry event to format\n * @returns Formatted markdown string\n */\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n\n // Look for the primary error information\n const messageEntry = event.entries.find((e) => e.type === \"message\");\n const exceptionEntry = event.entries.find((e) => e.type === \"exception\");\n const threadsEntry = event.entries.find((e) => e.type === \"threads\");\n const requestEntry = event.entries.find((e) => e.type === \"request\");\n\n // Error message (if present)\n if (messageEntry) {\n output += formatMessageInterfaceOutput(\n event,\n messageEntry.data as z.infer<typeof MessageEntrySchema>,\n );\n }\n\n // Stack trace (from exception or threads)\n if (exceptionEntry) {\n output += formatExceptionInterfaceOutput(\n event,\n exceptionEntry.data as z.infer<typeof ErrorEntrySchema>,\n );\n } else if (threadsEntry) {\n output += formatThreadsInterfaceOutput(\n event,\n threadsEntry.data as z.infer<typeof ThreadsEntrySchema>,\n );\n }\n\n // Request info (if HTTP error)\n if (requestEntry) {\n output += formatRequestInterfaceOutput(\n event,\n requestEntry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n\n output += formatContexts(event.contexts);\n return output;\n}\n\n/**\n * Extracts the context line matching the frame's line number for inline display.\n * This is used in the full stacktrace view to show the actual line of code\n * that caused the error inline with the stack frame.\n *\n * @param frame - The stack frame containing context lines\n * @returns The line of code at the frame's line number, or empty string if not available\n */\nfunction renderInlineContext(frame: z.infer<typeof FrameInterface>): string {\n if (!frame.context?.length || !frame.lineNo) {\n return \"\";\n }\n\n const contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);\n return contextLine ? `\\n${contextLine[1]}` : \"\";\n}\n\n/**\n * Renders an enhanced view of a stack frame with context lines and variables.\n * Used for the \"Most Relevant Frame\" section to provide detailed information\n * about the most relevant application frame where the error occurred.\n *\n * @param frame - The stack frame to render with enhanced information\n * @param event - The Sentry event containing platform information for language detection\n * @returns Formatted string with frame header, context lines, and variables table\n */\nfunction renderEnhancedFrame(\n frame: z.infer<typeof FrameInterface>,\n event: Event,\n): string {\n const parts: string[] = [];\n\n parts.push(\"**Most Relevant Frame:**\");\n parts.push(\"─────────────────────\");\n parts.push(formatFrameHeader(frame, undefined, event.platform));\n\n // Add context lines if available\n if (frame.context?.length) {\n const contextLines = renderContextLines(frame);\n if (contextLines) {\n parts.push(\"\");\n parts.push(contextLines);\n }\n }\n\n // Add variables table if available\n if (frame.vars && Object.keys(frame.vars).length > 0) {\n parts.push(\"\");\n parts.push(renderVariablesTable(frame.vars));\n }\n\n return parts.join(\"\\n\");\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n const parts: string[] = [];\n\n // Handle both single exception (value) and chained exceptions (values)\n const exceptions = data.values || (data.value ? [data.value] : []);\n\n if (exceptions.length === 0) {\n return \"\";\n }\n\n // For chained exceptions, they are typically ordered from innermost to outermost\n // We'll render them in reverse order (outermost first) to match how they occurred\n const isChained = exceptions.length > 1;\n\n // Create a copy before reversing to avoid mutating the original array\n [...exceptions].reverse().forEach((exception, index) => {\n if (!exception) return;\n\n // Add language-specific chain indicator for multiple exceptions\n if (isChained && index > 0) {\n parts.push(\"\");\n parts.push(\n getExceptionChainMessage(\n event.platform || null,\n index,\n exceptions.length,\n ),\n );\n parts.push(\"\");\n }\n\n // Use the actual exception type and value as the heading\n const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : \"\"}`;\n\n parts.push(index === 0 ? \"### Error\" : `### ${exceptionTitle}`);\n parts.push(\"\");\n\n // Add the error details in a code block for the first exception\n // to maintain backward compatibility\n if (index === 0) {\n parts.push(\"```\");\n parts.push(exceptionTitle);\n parts.push(\"```\");\n parts.push(\"\");\n }\n\n if (!exception.stacktrace || !exception.stacktrace.frames) {\n parts.push(\"**Stacktrace:**\");\n parts.push(\"```\");\n parts.push(\"No stacktrace available\");\n parts.push(\"```\");\n return;\n }\n\n const frames = exception.stacktrace.frames;\n\n // Only show enhanced frame for the first (outermost) exception to avoid overwhelming output\n if (index === 0) {\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n });\n\n parts.push(\"\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Get the appropriate exception chain message based on the platform\n */\nfunction getExceptionChainMessage(\n platform: string | null,\n index: number,\n totalExceptions: number,\n): string {\n // Default message for unknown platforms\n const defaultMessage =\n \"**During handling of the above exception, another exception occurred:**\";\n\n if (!platform) {\n return defaultMessage;\n }\n\n switch (platform.toLowerCase()) {\n case \"python\":\n // Python has two distinct messages, but without additional metadata\n // we default to the implicit chaining message\n return \"**During handling of the above exception, another exception occurred:**\";\n\n case \"java\":\n return \"**Caused by:**\";\n\n case \"csharp\":\n case \"dotnet\":\n return \"**---> Inner Exception:**\";\n\n case \"ruby\":\n return \"**Caused by:**\";\n\n case \"go\":\n return \"**Wrapped error:**\";\n\n case \"rust\":\n return `**Caused by (${index}):**`;\n\n default:\n return defaultMessage;\n }\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatMessageInterfaceOutput(\n event: Event,\n data: z.infer<typeof MessageEntrySchema>,\n) {\n if (!data.formatted && !data.message) {\n return \"\";\n }\n const message = data.formatted || data.message || \"\";\n return `### Error\\n\\n${\"```\"}\\n${message}\\n${\"```\"}\\n\\n`;\n}\n\nfunction formatThreadsInterfaceOutput(\n event: Event,\n data: z.infer<typeof ThreadsEntrySchema>,\n) {\n if (!data.values || data.values.length === 0) {\n return \"\";\n }\n\n // Find the crashed thread only\n const crashedThread = data.values.find((t) => t.crashed);\n\n if (!crashedThread?.stacktrace?.frames) {\n return \"\";\n }\n\n const parts: string[] = [];\n\n // Include thread name if available\n if (crashedThread.name) {\n parts.push(`**Thread** (${crashedThread.name})`);\n parts.push(\"\");\n }\n\n const frames = crashedThread.stacktrace.frames;\n\n // Find and format the first in-app frame with enhanced view\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Renders surrounding source code context for a stack frame.\n * Shows a window of code lines around the error line with visual indicators.\n *\n * @param frame - The stack frame containing context lines\n * @param contextSize - Number of lines to show before and after the error line (default: 3)\n * @returns Formatted context lines with line numbers and arrow indicator for the error line\n */\nfunction renderContextLines(\n frame: z.infer<typeof FrameInterface>,\n contextSize = 3,\n): string {\n if (!frame.context || frame.context.length === 0 || !frame.lineNo) {\n return \"\";\n }\n\n const lines: string[] = [];\n const errorLine = frame.lineNo;\n const maxLineNoWidth = Math.max(\n ...frame.context.map(([lineNo]) => lineNo.toString().length),\n );\n\n for (const [lineNo, code] of frame.context) {\n const isErrorLine = lineNo === errorLine;\n const lineNoStr = lineNo.toString().padStart(maxLineNoWidth, \" \");\n\n if (Math.abs(lineNo - errorLine) <= contextSize) {\n if (isErrorLine) {\n lines.push(` → ${lineNoStr} │ ${code}`);\n } else {\n lines.push(` ${lineNoStr} │ ${code}`);\n }\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Formats a variable value for display in the variables table.\n * Handles different types appropriately and safely, converting complex objects\n * to readable representations and handling edge cases like circular references.\n *\n * @param value - The variable value to format (can be any type)\n * @param maxLength - Maximum length for stringified objects/arrays (default: 80)\n * @returns Human-readable string representation of the value\n */\nfunction formatVariableValue(value: unknown, maxLength = 80): string {\n try {\n if (typeof value === \"string\") {\n return `\"${value}\"`;\n }\n if (value === null) {\n return \"null\";\n }\n if (value === undefined) {\n return \"undefined\";\n }\n if (typeof value === \"object\") {\n const stringified = JSON.stringify(value);\n if (stringified.length > maxLength) {\n // Leave room for \", ...]\" or \", ...}\"\n const truncateAt = maxLength - 6;\n let truncated = stringified.substring(0, truncateAt);\n\n // Find the last complete element by looking for the last comma\n const lastComma = truncated.lastIndexOf(\",\");\n if (lastComma > 0) {\n truncated = truncated.substring(0, lastComma);\n }\n\n // Add the appropriate ending\n if (Array.isArray(value)) {\n return `${truncated}, ...]`;\n }\n return `${truncated}, ...}`;\n }\n return stringified;\n }\n return String(value);\n } catch {\n // Handle circular references or other stringify errors\n return `<${typeof value}>`;\n }\n}\n\n/**\n * Renders a table of local variables in a tree-like format.\n * Uses box-drawing characters to create a visual hierarchy of variables\n * and their values at the point where the error occurred.\n *\n * @param vars - Object containing variable names as keys and their values\n * @returns Formatted variables table with tree-style prefix characters\n */\nfunction renderVariablesTable(vars: Record<string, unknown>): string {\n const entries = Object.entries(vars);\n if (entries.length === 0) {\n return \"\";\n }\n\n const lines: string[] = [\"Local Variables:\"];\n const lastIndex = entries.length - 1;\n\n entries.forEach(([key, value], index) => {\n const prefix = index === lastIndex ? \"└─\" : \"├─\";\n const valueStr = formatVariableValue(value);\n lines.push(`${prefix} ${key}: ${valueStr}`);\n });\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Finds the first application frame (in_app) in a stack trace.\n * Searches from the bottom of the stack (oldest frame) to find the first\n * frame that belongs to the user's application code rather than libraries.\n *\n * @param frames - Array of stack frames, typically in reverse chronological order\n * @returns The first in-app frame found, or undefined if none exist\n */\nfunction findFirstInAppFrame(\n frames: z.infer<typeof FrameInterface>[],\n): z.infer<typeof FrameInterface> | undefined {\n // Frames are usually in reverse order (most recent first)\n // We want the first in-app frame from the bottom\n for (let i = frames.length - 1; i >= 0; i--) {\n if (frames[i].inApp === true) {\n return frames[i];\n }\n }\n return undefined;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts || Object.keys(contexts).length === 0) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\n/**\n * Formats Seer AI analysis context for inclusion in issue details.\n * Provides a minimal summary showing just the key solution when available.\n *\n * @param autofixState - The autofix state containing Seer analysis data\n * @returns Formatted markdown string with Seer context, or empty string if no analysis exists\n */\nfunction formatSeerContext(autofixState: AutofixRunState): string {\n if (!autofixState.autofix) {\n return \"\";\n }\n\n const { autofix } = autofixState;\n const parts: string[] = [];\n\n parts.push(\"## Seer AI Analysis\");\n parts.push(\"\");\n\n // For completed analyses, show just the key solution\n if (isTerminalStatus(autofix.status) && autofix.steps.length > 0) {\n const completedSteps = autofix.steps.filter(\n (step) => step.status === \"COMPLETED\",\n );\n\n // Find the solution step and show its description directly\n const solutionStep = completedSteps.find(\n (step) => step.type === \"solution\",\n );\n\n if (solutionStep) {\n // For solution steps, use the description directly\n const solutionDescription = solutionStep.description;\n if (\n solutionDescription &&\n typeof solutionDescription === \"string\" &&\n solutionDescription.trim()\n ) {\n parts.push(solutionDescription.trim());\n } else {\n // Fallback to extracting from output if no description\n const solutionOutput = getOutputForAutofixStep(solutionStep);\n const lines = solutionOutput.split(\"\\n\");\n const firstParagraph = lines.find(\n (line) =>\n line.trim().length > 50 &&\n !line.startsWith(\"#\") &&\n !line.startsWith(\"*\"),\n );\n if (firstParagraph) {\n parts.push(firstParagraph.trim());\n }\n }\n }\n }\n return `${parts.join(\"\\n\")}\\n\\n`;\n}\n\n/**\n * Formats a Sentry issue with its latest event into comprehensive markdown output.\n * Includes issue metadata, event details, and usage instructions.\n *\n * @param params - Object containing organization slug, issue, event, and API service\n * @returns Formatted markdown string with complete issue information\n */\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n autofixState,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n autofixState?: AutofixRunState;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n\n // Add Seer context if available\n if (autofixState) {\n output += formatSeerContext(autofixState);\n }\n\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":";;;AA0BA,MAAMA,sBAA8C;CAClD,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;AACT;AAED,MAAMC,2BAAoD,CACxD,CAAC,yBAAyB,MAAO,CAClC;;;;;;;;;AAUD,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,SAAS,OACpB,KAAK,WAAW,IAAI,KACpB,KAAK,WAAW,IAAI,CACxB;AACD,QAAI,eACF,OAAM,KAAK,eAAe,MAAM,CAAC;GAEpC;EACF;CACF;AACD,WAAU,MAAM,KAAK,KAAK,CAAC;AAC5B;;;;;;;;AASD,SAAgB,kBAAkB,EAChC,kBACA,OACA,OACA,YACA,cAOD,EAAE;CACD,IAAI,UAAU,UAAU,MAAM,QAAQ,QAAQ,iBAAiB;AAC/D,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,eAAe,MAAM,QAAQ;AACxC,YAAW,kBAAkB,IAAI,KAAK,MAAM,WAAW,aAAa,CAAC;AACrE,YAAW,iBAAiB,IAAI,KAAK,MAAM,UAAU,aAAa,CAAC;AACnE,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,sBAAsB,MAAM,UAAU;AACjD,YAAW,cAAc,MAAM,OAAO;AACtC,YAAW,gBAAgB,MAAM,SAAS;AAC1C,YAAW,eAAe,MAAM,QAAQ,KAAK;AAC7C,YAAW,WAAW,WAAW,YAAY,kBAAkB,MAAM,QAAQ,CAAC;AAC9E,WAAU;AACV,WAAU;AACV,YAAW,gBAAgB,MAAM,GAAG;AACpC,KAAI,MAAM,SAAS,QACjB,YAAW,mBAAmB,IAAI,KAAM,MAA2C,aAAa,aAAa,CAAC;AAEhH,KAAI,MAAM,QACR,YAAW,gBAAgB,MAAM,QAAQ;AAE3C,WAAU;AACV,WAAU,kBAAkB,MAAM;AAGlC,KAAI,aACF,WAAU,kBAAkB,aAAa;AAG3C,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
@@ -1,6 +1,6 @@
1
- import { FrameInterface } from "./schema-B3CzDGJk.js";
2
- import { AutofixRunState, Event, Issue } from "./types-DpV1JAZj.js";
3
- import { SentryApiService } from "./client-VCJp6Kcu.js";
1
+ import { FrameInterface } from "./schema-BlkWypl3.js";
2
+ import { AutofixRunState, Event, Issue } from "./types-B-8S69No.js";
3
+ import { SentryApiService } from "./client-C_dDreKj.js";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/internal/formatting.d.ts
@@ -46,4 +46,4 @@ declare function formatIssueOutput({
46
46
  //# sourceMappingURL=formatting.d.ts.map
47
47
  //#endregion
48
48
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
49
- //# sourceMappingURL=formatting-vtXxusbn.d.ts.map
49
+ //# sourceMappingURL=formatting-C80LN9iK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-C80LN9iK.d.ts","names":[],"sources":["../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;AAoFgB;AAoEhB;AA+gBA;;;;;;;AAQS,iBA5lBO,iBAAA,CA4lBP,KAAA,EA3lBA,CAAA,CAAE,KA2lBF,CAAA,OA3lBe,cA2lBf,CAAA,EAAA,UAAA,CAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAAA,IAAA,CAAA,EAAA,MAAA;;;;AAGuB;;;;iBA1hBhB,iBAAA,QAAyB;;;;;;;;iBA+gBzB,iBAAA;;;;;;;;SAQP;SACA;cACK;iBACG"}
@@ -1,4 +1,4 @@
1
- import { getOutputForAutofixStep, isTerminalStatus } from "./seer-utils-Cj9DXrow.js";
1
+ import { getOutputForAutofixStep, isTerminalStatus } from "./seer-utils-NPHv8KYY.js";
2
2
 
3
3
  //#region src/internal/formatting.ts
4
4
  const LANGUAGE_EXTENSIONS = {
@@ -151,7 +151,7 @@ function formatExceptionInterfaceOutput(event, data) {
151
151
  if (!exception) return;
152
152
  if (isChained && index > 0) {
153
153
  parts.push("");
154
- parts.push(getExceptionChainMessage(event.platform, index, exceptions.length));
154
+ parts.push(getExceptionChainMessage(event.platform || null, index, exceptions.length));
155
155
  parts.push("");
156
156
  }
157
157
  const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : ""}`;
@@ -399,4 +399,4 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
399
399
 
400
400
  //#endregion
401
401
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
402
- //# sourceMappingURL=formatting-Bvyded57.js.map
402
+ //# sourceMappingURL=formatting-DIvCVunN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-DIvCVunN.js","names":["LANGUAGE_EXTENSIONS: Record<string, string>","LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]>","frame: z.infer<typeof FrameInterface>","platform?: string | null","frameIndex?: number","event: Event","parts: string[]","data: z.infer<typeof ErrorEntrySchema>","platform: string | null","index: number","totalExceptions: number","data: z.infer<typeof RequestEntrySchema>","data: z.infer<typeof MessageEntrySchema>","data: z.infer<typeof ThreadsEntrySchema>","lines: string[]","value: unknown","vars: Record<string, unknown>","frames: z.infer<typeof FrameInterface>[]","contexts: z.infer<typeof EventSchema>[\"contexts\"]","autofixState: AutofixRunState"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue, AutofixRunState } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n MessageEntrySchema,\n ThreadsEntrySchema,\n SentryApiService,\n} from \"../api-client\";\nimport {\n getOutputForAutofixStep,\n getStatusDisplayName,\n isTerminalStatus,\n} from \"../tools/utils/seer-utils\";\n\n// Language detection mappings\nconst LANGUAGE_EXTENSIONS: Record<string, string> = {\n \".java\": \"java\",\n \".py\": \"python\",\n \".js\": \"javascript\",\n \".jsx\": \"javascript\",\n \".ts\": \"javascript\",\n \".tsx\": \"javascript\",\n \".rb\": \"ruby\",\n \".php\": \"php\",\n};\n\nconst LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]> = [\n [/^(java\\.|com\\.|org\\.)/, \"java\"],\n];\n\n/**\n * Detects the programming language of a stack frame based on the file extension.\n * Falls back to the platform parameter if no filename is available or extension is unrecognized.\n *\n * @param frame - The stack frame containing file and location information\n * @param platform - Optional platform hint to use as fallback\n * @returns The detected language or platform fallback or \"unknown\"\n */\nfunction detectLanguage(\n frame: z.infer<typeof FrameInterface>,\n platform?: string | null,\n): string {\n // Check filename extensions\n if (frame.filename) {\n const ext = frame.filename.toLowerCase().match(/\\.[^.]+$/)?.[0];\n if (ext && LANGUAGE_EXTENSIONS[ext]) {\n return LANGUAGE_EXTENSIONS[ext];\n }\n }\n\n // Check module patterns\n if (frame.module) {\n for (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) {\n if (pattern.test(frame.module)) {\n return language;\n }\n }\n }\n\n // Fallback to platform or unknown\n return platform || \"unknown\";\n}\n\n/**\n * Formats a stack frame into a language-specific string representation.\n * Different languages have different conventions for displaying stack traces.\n *\n * @param frame - The stack frame to format\n * @param frameIndex - Optional frame index for languages that display frame numbers\n * @param platform - Optional platform hint for language detection fallback\n * @returns Formatted stack frame string\n */\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n frameIndex?: number,\n platform?: string | null,\n) {\n const language = detectLanguage(frame, platform);\n\n switch (language) {\n case \"java\": {\n // at com.example.ClassName.methodName(FileName.java:123)\n const className = frame.module || \"UnknownClass\";\n const method = frame.function || \"<unknown>\";\n const source = frame.filename || \"Unknown Source\";\n const location = frame.lineNo ? `:${frame.lineNo}` : \"\";\n return `at ${className}.${method}(${source}${location})`;\n }\n\n case \"python\": {\n // File \"/path/to/file.py\", line 42, in function_name\n const file =\n frame.filename || frame.absPath || frame.module || \"<unknown>\";\n const func = frame.function || \"<module>\";\n const line = frame.lineNo ? `, line ${frame.lineNo}` : \"\";\n return ` File \"${file}\"${line}, in ${func}`;\n }\n\n case \"javascript\": {\n // Original compact format: filename:line:col (function)\n // This preserves backward compatibility\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n\n case \"ruby\": {\n // from /path/to/file.rb:42:in `method_name'\n const file = frame.filename || frame.module || \"<unknown>\";\n const func = frame.function ? ` \\`${frame.function}\\`` : \"\";\n const line = frame.lineNo ? `:${frame.lineNo}:in` : \"\";\n return ` from ${file}${line}${func}`;\n }\n\n case \"php\": {\n // #0 /path/to/file.php(42): functionName()\n const file = frame.filename || \"<unknown>\";\n const line = frame.lineNo ? `(${frame.lineNo})` : \"\";\n const func = frame.function || \"<unknown>\";\n const prefix = frameIndex !== undefined ? `#${frameIndex} ` : \"\";\n return `${prefix}${file}${line}: ${func}()`;\n }\n\n default: {\n // Generic format for unknown languages\n const func = frame.function || \"<unknown>\";\n const location = frame.filename || frame.module || \"<unknown>\";\n const line = frame.lineNo ? `:${frame.lineNo}` : \"\";\n const col = frame.colNo != null ? `:${frame.colNo}` : \"\";\n return ` at ${func} (${location}${line}${col})`;\n }\n }\n}\n\n/**\n * Formats a Sentry event into a structured markdown output.\n * Includes error messages, stack traces, request info, and contextual data.\n *\n * @param event - The Sentry event to format\n * @returns Formatted markdown string\n */\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n\n // Look for the primary error information\n const messageEntry = event.entries.find((e) => e.type === \"message\");\n const exceptionEntry = event.entries.find((e) => e.type === \"exception\");\n const threadsEntry = event.entries.find((e) => e.type === \"threads\");\n const requestEntry = event.entries.find((e) => e.type === \"request\");\n\n // Error message (if present)\n if (messageEntry) {\n output += formatMessageInterfaceOutput(\n event,\n messageEntry.data as z.infer<typeof MessageEntrySchema>,\n );\n }\n\n // Stack trace (from exception or threads)\n if (exceptionEntry) {\n output += formatExceptionInterfaceOutput(\n event,\n exceptionEntry.data as z.infer<typeof ErrorEntrySchema>,\n );\n } else if (threadsEntry) {\n output += formatThreadsInterfaceOutput(\n event,\n threadsEntry.data as z.infer<typeof ThreadsEntrySchema>,\n );\n }\n\n // Request info (if HTTP error)\n if (requestEntry) {\n output += formatRequestInterfaceOutput(\n event,\n requestEntry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n\n output += formatContexts(event.contexts);\n return output;\n}\n\n/**\n * Extracts the context line matching the frame's line number for inline display.\n * This is used in the full stacktrace view to show the actual line of code\n * that caused the error inline with the stack frame.\n *\n * @param frame - The stack frame containing context lines\n * @returns The line of code at the frame's line number, or empty string if not available\n */\nfunction renderInlineContext(frame: z.infer<typeof FrameInterface>): string {\n if (!frame.context?.length || !frame.lineNo) {\n return \"\";\n }\n\n const contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);\n return contextLine ? `\\n${contextLine[1]}` : \"\";\n}\n\n/**\n * Renders an enhanced view of a stack frame with context lines and variables.\n * Used for the \"Most Relevant Frame\" section to provide detailed information\n * about the most relevant application frame where the error occurred.\n *\n * @param frame - The stack frame to render with enhanced information\n * @param event - The Sentry event containing platform information for language detection\n * @returns Formatted string with frame header, context lines, and variables table\n */\nfunction renderEnhancedFrame(\n frame: z.infer<typeof FrameInterface>,\n event: Event,\n): string {\n const parts: string[] = [];\n\n parts.push(\"**Most Relevant Frame:**\");\n parts.push(\"─────────────────────\");\n parts.push(formatFrameHeader(frame, undefined, event.platform));\n\n // Add context lines if available\n if (frame.context?.length) {\n const contextLines = renderContextLines(frame);\n if (contextLines) {\n parts.push(\"\");\n parts.push(contextLines);\n }\n }\n\n // Add variables table if available\n if (frame.vars && Object.keys(frame.vars).length > 0) {\n parts.push(\"\");\n parts.push(renderVariablesTable(frame.vars));\n }\n\n return parts.join(\"\\n\");\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n const parts: string[] = [];\n\n // Handle both single exception (value) and chained exceptions (values)\n const exceptions = data.values || (data.value ? [data.value] : []);\n\n if (exceptions.length === 0) {\n return \"\";\n }\n\n // For chained exceptions, they are typically ordered from innermost to outermost\n // We'll render them in reverse order (outermost first) to match how they occurred\n const isChained = exceptions.length > 1;\n\n // Create a copy before reversing to avoid mutating the original array\n [...exceptions].reverse().forEach((exception, index) => {\n if (!exception) return;\n\n // Add language-specific chain indicator for multiple exceptions\n if (isChained && index > 0) {\n parts.push(\"\");\n parts.push(\n getExceptionChainMessage(\n event.platform || null,\n index,\n exceptions.length,\n ),\n );\n parts.push(\"\");\n }\n\n // Use the actual exception type and value as the heading\n const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : \"\"}`;\n\n parts.push(index === 0 ? \"### Error\" : `### ${exceptionTitle}`);\n parts.push(\"\");\n\n // Add the error details in a code block for the first exception\n // to maintain backward compatibility\n if (index === 0) {\n parts.push(\"```\");\n parts.push(exceptionTitle);\n parts.push(\"```\");\n parts.push(\"\");\n }\n\n if (!exception.stacktrace || !exception.stacktrace.frames) {\n parts.push(\"**Stacktrace:**\");\n parts.push(\"```\");\n parts.push(\"No stacktrace available\");\n parts.push(\"```\");\n return;\n }\n\n const frames = exception.stacktrace.frames;\n\n // Only show enhanced frame for the first (outermost) exception to avoid overwhelming output\n if (index === 0) {\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n });\n\n parts.push(\"\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Get the appropriate exception chain message based on the platform\n */\nfunction getExceptionChainMessage(\n platform: string | null,\n index: number,\n totalExceptions: number,\n): string {\n // Default message for unknown platforms\n const defaultMessage =\n \"**During handling of the above exception, another exception occurred:**\";\n\n if (!platform) {\n return defaultMessage;\n }\n\n switch (platform.toLowerCase()) {\n case \"python\":\n // Python has two distinct messages, but without additional metadata\n // we default to the implicit chaining message\n return \"**During handling of the above exception, another exception occurred:**\";\n\n case \"java\":\n return \"**Caused by:**\";\n\n case \"csharp\":\n case \"dotnet\":\n return \"**---> Inner Exception:**\";\n\n case \"ruby\":\n return \"**Caused by:**\";\n\n case \"go\":\n return \"**Wrapped error:**\";\n\n case \"rust\":\n return `**Caused by (${index}):**`;\n\n default:\n return defaultMessage;\n }\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatMessageInterfaceOutput(\n event: Event,\n data: z.infer<typeof MessageEntrySchema>,\n) {\n if (!data.formatted && !data.message) {\n return \"\";\n }\n const message = data.formatted || data.message || \"\";\n return `### Error\\n\\n${\"```\"}\\n${message}\\n${\"```\"}\\n\\n`;\n}\n\nfunction formatThreadsInterfaceOutput(\n event: Event,\n data: z.infer<typeof ThreadsEntrySchema>,\n) {\n if (!data.values || data.values.length === 0) {\n return \"\";\n }\n\n // Find the crashed thread only\n const crashedThread = data.values.find((t) => t.crashed);\n\n if (!crashedThread?.stacktrace?.frames) {\n return \"\";\n }\n\n const parts: string[] = [];\n\n // Include thread name if available\n if (crashedThread.name) {\n parts.push(`**Thread** (${crashedThread.name})`);\n parts.push(\"\");\n }\n\n const frames = crashedThread.stacktrace.frames;\n\n // Find and format the first in-app frame with enhanced view\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Renders surrounding source code context for a stack frame.\n * Shows a window of code lines around the error line with visual indicators.\n *\n * @param frame - The stack frame containing context lines\n * @param contextSize - Number of lines to show before and after the error line (default: 3)\n * @returns Formatted context lines with line numbers and arrow indicator for the error line\n */\nfunction renderContextLines(\n frame: z.infer<typeof FrameInterface>,\n contextSize = 3,\n): string {\n if (!frame.context || frame.context.length === 0 || !frame.lineNo) {\n return \"\";\n }\n\n const lines: string[] = [];\n const errorLine = frame.lineNo;\n const maxLineNoWidth = Math.max(\n ...frame.context.map(([lineNo]) => lineNo.toString().length),\n );\n\n for (const [lineNo, code] of frame.context) {\n const isErrorLine = lineNo === errorLine;\n const lineNoStr = lineNo.toString().padStart(maxLineNoWidth, \" \");\n\n if (Math.abs(lineNo - errorLine) <= contextSize) {\n if (isErrorLine) {\n lines.push(` → ${lineNoStr} │ ${code}`);\n } else {\n lines.push(` ${lineNoStr} │ ${code}`);\n }\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Formats a variable value for display in the variables table.\n * Handles different types appropriately and safely, converting complex objects\n * to readable representations and handling edge cases like circular references.\n *\n * @param value - The variable value to format (can be any type)\n * @param maxLength - Maximum length for stringified objects/arrays (default: 80)\n * @returns Human-readable string representation of the value\n */\nfunction formatVariableValue(value: unknown, maxLength = 80): string {\n try {\n if (typeof value === \"string\") {\n return `\"${value}\"`;\n }\n if (value === null) {\n return \"null\";\n }\n if (value === undefined) {\n return \"undefined\";\n }\n if (typeof value === \"object\") {\n const stringified = JSON.stringify(value);\n if (stringified.length > maxLength) {\n // Leave room for \", ...]\" or \", ...}\"\n const truncateAt = maxLength - 6;\n let truncated = stringified.substring(0, truncateAt);\n\n // Find the last complete element by looking for the last comma\n const lastComma = truncated.lastIndexOf(\",\");\n if (lastComma > 0) {\n truncated = truncated.substring(0, lastComma);\n }\n\n // Add the appropriate ending\n if (Array.isArray(value)) {\n return `${truncated}, ...]`;\n }\n return `${truncated}, ...}`;\n }\n return stringified;\n }\n return String(value);\n } catch {\n // Handle circular references or other stringify errors\n return `<${typeof value}>`;\n }\n}\n\n/**\n * Renders a table of local variables in a tree-like format.\n * Uses box-drawing characters to create a visual hierarchy of variables\n * and their values at the point where the error occurred.\n *\n * @param vars - Object containing variable names as keys and their values\n * @returns Formatted variables table with tree-style prefix characters\n */\nfunction renderVariablesTable(vars: Record<string, unknown>): string {\n const entries = Object.entries(vars);\n if (entries.length === 0) {\n return \"\";\n }\n\n const lines: string[] = [\"Local Variables:\"];\n const lastIndex = entries.length - 1;\n\n entries.forEach(([key, value], index) => {\n const prefix = index === lastIndex ? \"└─\" : \"├─\";\n const valueStr = formatVariableValue(value);\n lines.push(`${prefix} ${key}: ${valueStr}`);\n });\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Finds the first application frame (in_app) in a stack trace.\n * Searches from the bottom of the stack (oldest frame) to find the first\n * frame that belongs to the user's application code rather than libraries.\n *\n * @param frames - Array of stack frames, typically in reverse chronological order\n * @returns The first in-app frame found, or undefined if none exist\n */\nfunction findFirstInAppFrame(\n frames: z.infer<typeof FrameInterface>[],\n): z.infer<typeof FrameInterface> | undefined {\n // Frames are usually in reverse order (most recent first)\n // We want the first in-app frame from the bottom\n for (let i = frames.length - 1; i >= 0; i--) {\n if (frames[i].inApp === true) {\n return frames[i];\n }\n }\n return undefined;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts || Object.keys(contexts).length === 0) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\n/**\n * Formats Seer AI analysis context for inclusion in issue details.\n * Provides a minimal summary showing just the key solution when available.\n *\n * @param autofixState - The autofix state containing Seer analysis data\n * @returns Formatted markdown string with Seer context, or empty string if no analysis exists\n */\nfunction formatSeerContext(autofixState: AutofixRunState): string {\n if (!autofixState.autofix) {\n return \"\";\n }\n\n const { autofix } = autofixState;\n const parts: string[] = [];\n\n parts.push(\"## Seer AI Analysis\");\n parts.push(\"\");\n\n // For completed analyses, show just the key solution\n if (isTerminalStatus(autofix.status) && autofix.steps.length > 0) {\n const completedSteps = autofix.steps.filter(\n (step) => step.status === \"COMPLETED\",\n );\n\n // Find the solution step and show its description directly\n const solutionStep = completedSteps.find(\n (step) => step.type === \"solution\",\n );\n\n if (solutionStep) {\n // For solution steps, use the description directly\n const solutionDescription = solutionStep.description;\n if (\n solutionDescription &&\n typeof solutionDescription === \"string\" &&\n solutionDescription.trim()\n ) {\n parts.push(solutionDescription.trim());\n } else {\n // Fallback to extracting from output if no description\n const solutionOutput = getOutputForAutofixStep(solutionStep);\n const lines = solutionOutput.split(\"\\n\");\n const firstParagraph = lines.find(\n (line) =>\n line.trim().length > 50 &&\n !line.startsWith(\"#\") &&\n !line.startsWith(\"*\"),\n );\n if (firstParagraph) {\n parts.push(firstParagraph.trim());\n }\n }\n }\n }\n return `${parts.join(\"\\n\")}\\n\\n`;\n}\n\n/**\n * Formats a Sentry issue with its latest event into comprehensive markdown output.\n * Includes issue metadata, event details, and usage instructions.\n *\n * @param params - Object containing organization slug, issue, event, and API service\n * @returns Formatted markdown string with complete issue information\n */\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n autofixState,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n autofixState?: AutofixRunState;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n\n // Add Seer context if available\n if (autofixState) {\n output += formatSeerContext(autofixState);\n }\n\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":";;;AA0BA,MAAMA,sBAA8C;CAClD,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;AACT;AAED,MAAMC,2BAAoD,CACxD,CAAC,yBAAyB,MAAO,CAClC;;;;;;;;;AAUD,SAAS,eACPC,OACAC,UACQ;AAER,KAAI,MAAM,UAAU;EAClB,MAAM,MAAM,MAAM,SAAS,aAAa,CAAC,MAAM,WAAW,GAAG;AAC7D,MAAI,OAAO,oBAAoB,KAC7B,QAAO,oBAAoB;CAE9B;AAGD,KAAI,MAAM,QACR;OAAK,MAAM,C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,kBACA,OACA,OACA,YACA,cAOD,EAAE;CACD,IAAI,UAAU,UAAU,MAAM,QAAQ,QAAQ,iBAAiB;AAC/D,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,eAAe,MAAM,QAAQ;AACxC,YAAW,kBAAkB,IAAI,KAAK,MAAM,WAAW,aAAa,CAAC;AACrE,YAAW,iBAAiB,IAAI,KAAK,MAAM,UAAU,aAAa,CAAC;AACnE,YAAW,mBAAmB,MAAM,MAAM;AAC1C,YAAW,sBAAsB,MAAM,UAAU;AACjD,YAAW,cAAc,MAAM,OAAO;AACtC,YAAW,gBAAgB,MAAM,SAAS;AAC1C,YAAW,eAAe,MAAM,QAAQ,KAAK;AAC7C,YAAW,WAAW,WAAW,YAAY,kBAAkB,MAAM,QAAQ,CAAC;AAC9E,WAAU;AACV,WAAU;AACV,YAAW,gBAAgB,MAAM,GAAG;AACpC,KAAI,MAAM,SAAS,QACjB,YAAW,mBAAmB,IAAI,KAAM,MAA2C,aAAa,aAAa,CAAC;AAEhH,KAAI,MAAM,QACR,YAAW,gBAAgB,MAAM,QAAQ;AAE3C,WAAU;AACV,WAAU,kBAAkB,MAAM;AAGlC,KAAI,aACF,WAAU,kBAAkB,aAAa;AAG3C,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
@@ -11,4 +11,4 @@ function formatAssignedTo(assignedTo) {
11
11
 
12
12
  //#endregion
13
13
  export { formatAssignedTo };
14
- //# sourceMappingURL=formatting-utils-DgOyTl-m.js.map
14
+ //# sourceMappingURL=formatting-utils-C3sej5ER.js.map