@sentry/mcp-server 0.9.0 → 0.10.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 (161) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client/client.cjs +2 -2
  3. package/dist/api-client/client.d.cts +3 -3
  4. package/dist/api-client/client.d.ts +3 -3
  5. package/dist/api-client/client.js +2 -2
  6. package/dist/api-client/client.test.cjs +2 -2
  7. package/dist/api-client/client.test.js +2 -2
  8. package/dist/api-client/index.cjs +2 -2
  9. package/dist/api-client/index.d.cts +3 -3
  10. package/dist/api-client/index.d.ts +3 -3
  11. package/dist/api-client/index.js +2 -2
  12. package/dist/api-client/schema.cjs +1 -1
  13. package/dist/api-client/schema.d.cts +1 -1
  14. package/dist/api-client/schema.d.ts +1 -1
  15. package/dist/api-client/schema.js +1 -1
  16. package/dist/api-client/types.d.cts +2 -2
  17. package/dist/api-client/types.d.ts +2 -2
  18. package/dist/{client-DQ837FXP.cjs → client-B4Ux5Zdg.cjs} +7 -4
  19. package/dist/client-B4Ux5Zdg.cjs.map +1 -0
  20. package/dist/{client-CTm4cvI7.js → client-Bz_PNC8o.js} +7 -4
  21. package/dist/client-Bz_PNC8o.js.map +1 -0
  22. package/dist/{client-1dRfG57H.d.ts → client-J6VSRmQS.d.ts} +5 -3
  23. package/dist/client-J6VSRmQS.d.ts.map +1 -0
  24. package/dist/{client-BsYOQsEI.d.cts → client-tE6FD__9.d.cts} +5 -3
  25. package/dist/client-tE6FD__9.d.cts.map +1 -0
  26. package/dist/{formatting-C-0bHtbh.cjs → formatting-B0SJqiqX.cjs} +11 -3
  27. package/dist/formatting-B0SJqiqX.cjs.map +1 -0
  28. package/dist/{formatting-BQRAzO5v.js → formatting-ggD6YRYR.js} +11 -3
  29. package/dist/formatting-ggD6YRYR.js.map +1 -0
  30. package/dist/index.cjs +11 -11
  31. package/dist/index.js +11 -11
  32. package/dist/internal/formatting.cjs +1 -1
  33. package/dist/internal/formatting.d.cts +3 -3
  34. package/dist/internal/formatting.d.cts.map +1 -1
  35. package/dist/internal/formatting.d.ts +3 -3
  36. package/dist/internal/formatting.d.ts.map +1 -1
  37. package/dist/internal/formatting.js +1 -1
  38. package/dist/internal/issue-helpers.test.cjs +2 -2
  39. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  40. package/dist/internal/issue-helpers.test.js +2 -2
  41. package/dist/internal/issue-helpers.test.js.map +1 -1
  42. package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-BR7PxWcH.d.cts} +3 -3
  43. package/dist/promptDefinitions-BR7PxWcH.d.cts.map +1 -0
  44. package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-DBNOeSg-.js} +5 -5
  45. package/dist/promptDefinitions-DBNOeSg-.js.map +1 -0
  46. package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-pHRpPOpJ.cjs} +5 -5
  47. package/dist/promptDefinitions-pHRpPOpJ.cjs.map +1 -0
  48. package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-tpKruPny.d.ts} +3 -3
  49. package/dist/promptDefinitions-tpKruPny.d.ts.map +1 -0
  50. package/dist/promptDefinitions.cjs +2 -2
  51. package/dist/promptDefinitions.d.cts +1 -1
  52. package/dist/promptDefinitions.d.ts +1 -1
  53. package/dist/promptDefinitions.js +2 -2
  54. package/dist/prompts.d.cts +5 -5
  55. package/dist/prompts.d.ts +5 -5
  56. package/dist/{schema-KEMqYaQn.cjs → schema-3VLYcf4D.cjs} +9 -2
  57. package/dist/schema-3VLYcf4D.cjs.map +1 -0
  58. package/dist/{schema-DwPOkoSP.d.ts → schema-B7A-FyIi.d.ts} +341 -263
  59. package/dist/{schema-DwPOkoSP.d.ts.map → schema-B7A-FyIi.d.ts.map} +1 -1
  60. package/dist/schema-BKa41TQ4.js +17 -0
  61. package/dist/schema-BKa41TQ4.js.map +1 -0
  62. package/dist/{schema-nyYqVk4Y.js → schema-Dltbjui7.js} +9 -2
  63. package/dist/schema-Dltbjui7.js.map +1 -0
  64. package/dist/{schema-CaJV2aIO.d.cts → schema-PvgLrC1b.d.cts} +339 -261
  65. package/dist/{schema-CaJV2aIO.d.cts.map → schema-PvgLrC1b.d.cts.map} +1 -1
  66. package/dist/schema-jk88gqOu.cjs +78 -0
  67. package/dist/schema-jk88gqOu.cjs.map +1 -0
  68. package/dist/schema.cjs +3 -1
  69. package/dist/schema.d.cts +3 -1
  70. package/dist/schema.d.cts.map +1 -1
  71. package/dist/schema.d.ts +3 -1
  72. package/dist/schema.d.ts.map +1 -1
  73. package/dist/schema.js +2 -2
  74. package/dist/{server-BWoJZj5B.cjs → server-VwFSUPQn.cjs} +5 -5
  75. package/dist/{server-BWoJZj5B.cjs.map → server-VwFSUPQn.cjs.map} +1 -1
  76. package/dist/{server-DtNbD1c-.js → server-yb4PkNyo.js} +5 -5
  77. package/dist/{server-DtNbD1c-.js.map → server-yb4PkNyo.js.map} +1 -1
  78. package/dist/server.cjs +8 -8
  79. package/dist/server.d.cts +3 -3
  80. package/dist/server.d.ts +3 -3
  81. package/dist/server.js +8 -8
  82. package/dist/{stdio-BLzMxGqU.cjs → stdio-65sYKLOk.cjs} +2 -2
  83. package/dist/{stdio-BLzMxGqU.cjs.map → stdio-65sYKLOk.cjs.map} +1 -1
  84. package/dist/{stdio-D4oW-qT6.js → stdio-DkU2-spy.js} +2 -2
  85. package/dist/{stdio-D4oW-qT6.js.map → stdio-DkU2-spy.js.map} +1 -1
  86. package/dist/test-setup.cjs +1338 -1142
  87. package/dist/test-setup.cjs.map +1 -1
  88. package/dist/test-setup.js +1338 -1141
  89. package/dist/test-setup.js.map +1 -1
  90. package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-B94CNDbt.d.cts} +22 -22
  91. package/dist/toolDefinitions-B94CNDbt.d.cts.map +1 -0
  92. package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-Bb_1ejkl.js} +83 -78
  93. package/dist/toolDefinitions-Bb_1ejkl.js.map +1 -0
  94. package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-DIhvw3vk.cjs} +83 -78
  95. package/dist/toolDefinitions-DIhvw3vk.cjs.map +1 -0
  96. package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-q_1-70fG.d.ts} +22 -22
  97. package/dist/toolDefinitions-q_1-70fG.d.ts.map +1 -0
  98. package/dist/toolDefinitions.cjs +2 -2
  99. package/dist/toolDefinitions.d.cts +1 -1
  100. package/dist/toolDefinitions.d.ts +1 -1
  101. package/dist/toolDefinitions.js +2 -2
  102. package/dist/toolDefinitions.test.cjs +2 -2
  103. package/dist/toolDefinitions.test.js +2 -2
  104. package/dist/{tools-BYt-G6p2.cjs → tools-BdkmyaZo.cjs} +36 -52
  105. package/dist/tools-BdkmyaZo.cjs.map +1 -0
  106. package/dist/{tools-B8ufMRZx.js → tools-CMFpMPpD.js} +36 -52
  107. package/dist/tools-CMFpMPpD.js.map +1 -0
  108. package/dist/tools.cjs +4 -4
  109. package/dist/tools.d.cts +24 -24
  110. package/dist/tools.d.cts.map +1 -1
  111. package/dist/tools.d.ts +24 -24
  112. package/dist/tools.d.ts.map +1 -1
  113. package/dist/tools.js +4 -4
  114. package/dist/tools.test.cjs +111 -34
  115. package/dist/tools.test.cjs.map +1 -1
  116. package/dist/tools.test.js +111 -34
  117. package/dist/tools.test.js.map +1 -1
  118. package/dist/transports/stdio.cjs +9 -9
  119. package/dist/transports/stdio.d.cts +3 -3
  120. package/dist/transports/stdio.d.ts +3 -3
  121. package/dist/transports/stdio.js +9 -9
  122. package/dist/{types-CPuN4Qmi.d.cts → types-B03G337q.d.cts} +2 -2
  123. package/dist/{types-CPuN4Qmi.d.cts.map → types-B03G337q.d.cts.map} +1 -1
  124. package/dist/{types-Ds7qzCBB.d.ts → types-CN4NEway.d.ts} +2 -2
  125. package/dist/{types-Ds7qzCBB.d.ts.map → types-CN4NEway.d.ts.map} +1 -1
  126. package/dist/{types-TaJcaAVg.d.cts → types-OeoNXRm-.d.cts} +3 -3
  127. package/dist/{types-TaJcaAVg.d.cts.map → types-OeoNXRm-.d.cts.map} +1 -1
  128. package/dist/{types-DyM4kaGZ.d.ts → types-jftb-CP9.d.ts} +3 -3
  129. package/dist/{types-DyM4kaGZ.d.ts.map → types-jftb-CP9.d.ts.map} +1 -1
  130. package/dist/types.d.cts +3 -3
  131. package/dist/types.d.ts +3 -3
  132. package/dist/{version-B0O4KvZ9.cjs → version-CDnh7DyW.cjs} +2 -2
  133. package/dist/{version-B0O4KvZ9.cjs.map → version-CDnh7DyW.cjs.map} +1 -1
  134. package/dist/version-TjO7fHpC.js +6 -0
  135. package/dist/{version-dTEKpaGt.js.map → version-TjO7fHpC.js.map} +1 -1
  136. package/dist/version.cjs +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/client-1dRfG57H.d.ts.map +0 -1
  140. package/dist/client-BsYOQsEI.d.cts.map +0 -1
  141. package/dist/client-CTm4cvI7.js.map +0 -1
  142. package/dist/client-DQ837FXP.cjs.map +0 -1
  143. package/dist/formatting-BQRAzO5v.js.map +0 -1
  144. package/dist/formatting-C-0bHtbh.cjs.map +0 -1
  145. package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
  146. package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
  147. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
  148. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
  149. package/dist/schema-BCkBPgjj.cjs +0 -64
  150. package/dist/schema-BCkBPgjj.cjs.map +0 -1
  151. package/dist/schema-CJrk_GUH.js +0 -15
  152. package/dist/schema-CJrk_GUH.js.map +0 -1
  153. package/dist/schema-KEMqYaQn.cjs.map +0 -1
  154. package/dist/schema-nyYqVk4Y.js.map +0 -1
  155. package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
  156. package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
  157. package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
  158. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
  159. package/dist/tools-B8ufMRZx.js.map +0 -1
  160. package/dist/tools-BYt-G6p2.cjs.map +0 -1
  161. package/dist/version-dTEKpaGt.js +0 -6
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # sentry-mcp
2
2
 
3
- This is a prototype of an MCP sever, acting as a middleware to the upstream Sentry API provider.
3
+ This is a prototype of an MCP server, acting as a middleware to the upstream Sentry API provider.
4
4
 
5
5
  This package is primarily for running the `stdio` MCP server. If you do not know what that is, or do not need it, we suggest using the public remote service:
6
6
 
@@ -1,5 +1,5 @@
1
- require('../schema-KEMqYaQn.cjs');
2
- const require_client = require('../client-DQ837FXP.cjs');
1
+ require('../schema-3VLYcf4D.cjs');
2
+ const require_client = require('../client-B4Ux5Zdg.cjs');
3
3
 
4
4
  exports.ApiError = require_client.ApiError
5
5
  exports.SentryApiService = require_client.SentryApiService
@@ -1,4 +1,4 @@
1
- import "../schema-CaJV2aIO.cjs";
2
- import "../types-CPuN4Qmi.cjs";
3
- import { ApiError, SentryApiService } from "../client-BsYOQsEI.cjs";
1
+ import "../schema-PvgLrC1b.cjs";
2
+ import "../types-B03G337q.cjs";
3
+ import { ApiError, SentryApiService } from "../client-tE6FD__9.cjs";
4
4
  export { ApiError, SentryApiService };
@@ -1,4 +1,4 @@
1
- import "../schema-DwPOkoSP.js";
2
- import "../types-Ds7qzCBB.js";
3
- import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-1dRfG57H.js";
1
+ import "../schema-B7A-FyIi.js";
2
+ import "../types-CN4NEway.js";
3
+ import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-J6VSRmQS.js";
4
4
  export { ApiError, SentryApiService };
@@ -1,4 +1,4 @@
1
- import "../schema-nyYqVk4Y.js";
2
- import { ApiError, SentryApiService } from "../client-CTm4cvI7.js";
1
+ import "../schema-Dltbjui7.js";
2
+ import { ApiError, SentryApiService } from "../client-Bz_PNC8o.js";
3
3
 
4
4
  export { ApiError, SentryApiService };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- require('../schema-KEMqYaQn.cjs');
3
- const require_client = require('../client-DQ837FXP.cjs');
2
+ require('../schema-3VLYcf4D.cjs');
3
+ const require_client = require('../client-B4Ux5Zdg.cjs');
4
4
  const require_dist = require('../dist-wiyJYfAH.cjs');
5
5
  const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bs263gvI.cjs');
6
6
 
@@ -1,5 +1,5 @@
1
- import "../schema-nyYqVk4Y.js";
2
- import { SentryApiService } from "../client-CTm4cvI7.js";
1
+ import "../schema-Dltbjui7.js";
2
+ import { SentryApiService } from "../client-Bz_PNC8o.js";
3
3
  import { describe, it } from "../dist-BKh-M1A1.js";
4
4
  import { globalExpect } from "../vi.ClIskdbk-De9q3829.js";
5
5
 
@@ -1,5 +1,5 @@
1
- const require_schema = require('../schema-KEMqYaQn.cjs');
2
- const require_client = require('../client-DQ837FXP.cjs');
1
+ const require_schema = require('../schema-3VLYcf4D.cjs');
2
+ const require_client = require('../client-B4Ux5Zdg.cjs');
3
3
  require('../types-o3zWarRp.cjs');
4
4
  require('../api-client-CEBuz3Zu.cjs');
5
5
 
@@ -1,5 +1,5 @@
1
- import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-CaJV2aIO.cjs";
2
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-CPuN4Qmi.cjs";
3
- import { ApiError, SentryApiService } from "../client-BsYOQsEI.cjs";
1
+ import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-PvgLrC1b.cjs";
2
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-B03G337q.cjs";
3
+ import { ApiError, SentryApiService } from "../client-tE6FD__9.cjs";
4
4
  import "../index-BPSCxsMC.cjs";
5
5
  export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
@@ -1,5 +1,5 @@
1
- import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, RequestEntrySchema$1 as RequestEntrySchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-DwPOkoSP.js";
2
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-Ds7qzCBB.js";
3
- import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-1dRfG57H.js";
1
+ import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, RequestEntrySchema$1 as RequestEntrySchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-B7A-FyIi.js";
2
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-CN4NEway.js";
3
+ import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-J6VSRmQS.js";
4
4
  import "../index-h64gcVNJ.js";
5
5
  export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
@@ -1,5 +1,5 @@
1
- import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-nyYqVk4Y.js";
2
- import { ApiError, SentryApiService } from "../client-CTm4cvI7.js";
1
+ import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-Dltbjui7.js";
2
+ import { ApiError, SentryApiService } from "../client-Bz_PNC8o.js";
3
3
  import "../types-H-TSmRpm.js";
4
4
  import "../api-client-9mzrj2HY.js";
5
5
 
@@ -1,4 +1,4 @@
1
- const require_schema = require('../schema-KEMqYaQn.cjs');
1
+ const require_schema = require('../schema-3VLYcf4D.cjs');
2
2
 
3
3
  exports.ApiErrorSchema = require_schema.ApiErrorSchema
4
4
  exports.AutofixRunSchema = require_schema.AutofixRunSchema
@@ -1,2 +1,2 @@
1
- import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-CaJV2aIO.cjs";
1
+ import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-PvgLrC1b.cjs";
2
2
  export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
@@ -1,2 +1,2 @@
1
- import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, RequestEntrySchema$1 as RequestEntrySchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-DwPOkoSP.js";
1
+ import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, RequestEntrySchema$1 as RequestEntrySchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-B7A-FyIi.js";
2
2
  export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
@@ -1,3 +1,3 @@
1
- import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-nyYqVk4Y.js";
1
+ import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-Dltbjui7.js";
2
2
 
3
3
  export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
@@ -1,3 +1,3 @@
1
- import "../schema-CaJV2aIO.cjs";
2
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-CPuN4Qmi.cjs";
1
+ import "../schema-PvgLrC1b.cjs";
2
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-B03G337q.cjs";
3
3
  export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
@@ -1,3 +1,3 @@
1
- import "../schema-DwPOkoSP.js";
2
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-Ds7qzCBB.js";
1
+ import "../schema-B7A-FyIi.js";
2
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-CN4NEway.js";
3
3
  export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_schema = require('./schema-KEMqYaQn.cjs');
2
+ const require_schema = require('./schema-3VLYcf4D.cjs');
3
3
 
4
4
  //#region src/api-client/client.ts
5
5
  var ApiError = class extends Error {
@@ -97,8 +97,11 @@ var SentryApiService = class {
97
97
  const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);
98
98
  return require_schema.ClientKeyListSchema.parse(await response.json());
99
99
  }
100
- async listReleases({ organizationSlug, projectSlug }, opts) {
101
- const response = await this.request(projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`, void 0, opts);
100
+ async listReleases({ organizationSlug, projectSlug, query }, opts) {
101
+ const searchQuery = new URLSearchParams();
102
+ if (query) searchQuery.set("query", query);
103
+ const path = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`;
104
+ const response = await this.request(`${path}${searchQuery.toString()}`, void 0, opts);
102
105
  const body = await response.json();
103
106
  return require_schema.ReleaseListSchema.parse(body);
104
107
  }
@@ -221,4 +224,4 @@ Object.defineProperty(exports, 'SentryApiService', {
221
224
  return SentryApiService;
222
225
  }
223
226
  });
224
- //# sourceMappingURL=client-DQ837FXP.cjs.map
227
+ //# sourceMappingURL=client-B4Ux5Zdg.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-B4Ux5Zdg.cjs","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n// TODO: this is shared - so ideally, for safety, it uses @sentry/core, but currently\n// logger isnt exposed (or rather, it is, but its not the right logger)\n// import { logger } from \"@sentry/node\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n // logger.info(logger.fmt`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n query,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const searchQuery = new URLSearchParams();\n if (query) {\n searchQuery.set(\"query\", query);\n }\n\n const path = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`;\n\n const response = await this.request(\n `${path}${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId,\n }: {\n organizationSlug: string;\n issueId: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n return this.getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId: \"latest\",\n },\n opts,\n );\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;;AAuCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAojBtB,KAjkBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,MACd,OAAO,QAAQ,IAAI,aAIpB,EAAE;AACD,OAAK,cAAc;AACnB,OAAK,OAAO,QAAQ;AACpB,OAAK,YAAY,IAAI,IAAI,WAAW,UAAU,KAAK,KAAK,GAAG;CAC5D;CAED,QAAQC,MAAc;AACpB,OAAK,OAAO;AACZ,OAAK,YAAY,IAAI,IAAI,WAAW,UAAU,KAAK,KAAK,GAAG;CAC5D;CAED,MAAc,QACZC,MACAC,UAAuB,CAAE,GACzB,EAAE,MAAyB,GAAG,CAAE,GACb;EACnB,MAAM,MAAM,OACR,IAAI,KAAK,QAAQ,KAAK,IAAI,UAAU,KAAK,GAAG,QAC3C,EAAE,KAAK,UAAU,EAAE,KAAK;EAE7B,MAAMC,UAAkC,EACtC,gBAAgB,mBACjB;AACD,MAAI,KAAK,YACP,SAAQ,iBAAiB,SAAS,KAAK,YAAY;EAIrD,MAAM,WAAW,MAAM,MAAM,KAAK;GAChC,GAAG;GACH;EACD,EAAC;AAEF,OAAK,SAAS,IAAI;GAChB,M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B;EAC1B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,qCAAsB,MAAM,KAAK;CACzC;AACF"}
@@ -1,4 +1,4 @@
1
- import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema } from "./schema-nyYqVk4Y.js";
1
+ import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema } from "./schema-Dltbjui7.js";
2
2
 
3
3
  //#region src/api-client/client.ts
4
4
  var ApiError = class extends Error {
@@ -96,8 +96,11 @@ var SentryApiService = class {
96
96
  const response = await this.request(`/projects/${organizationSlug}/${projectSlug}/keys/`, void 0, opts);
97
97
  return ClientKeyListSchema.parse(await response.json());
98
98
  }
99
- async listReleases({ organizationSlug, projectSlug }, opts) {
100
- const response = await this.request(projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`, void 0, opts);
99
+ async listReleases({ organizationSlug, projectSlug, query }, opts) {
100
+ const searchQuery = new URLSearchParams();
101
+ if (query) searchQuery.set("query", query);
102
+ const path = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/releases/` : `/organizations/${organizationSlug}/releases/`;
103
+ const response = await this.request(`${path}${searchQuery.toString()}`, void 0, opts);
101
104
  const body = await response.json();
102
105
  return ReleaseListSchema.parse(body);
103
106
  }
@@ -209,4 +212,4 @@ var SentryApiService = class {
209
212
 
210
213
  //#endregion
211
214
  export { ApiError, SentryApiService };
212
- //# sourceMappingURL=client-CTm4cvI7.js.map
215
+ //# sourceMappingURL=client-Bz_PNC8o.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-Bz_PNC8o.js","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n// TODO: this is shared - so ideally, for safety, it uses @sentry/core, but currently\n// logger isnt exposed (or rather, it is, but its not the right logger)\n// import { logger } from \"@sentry/node\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n // logger.info(logger.fmt`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n query,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const searchQuery = new URLSearchParams();\n if (query) {\n searchQuery.set(\"query\", query);\n }\n\n const path = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`;\n\n const response = await this.request(\n `${path}${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId,\n }: {\n organizationSlug: string;\n issueId: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n return this.getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId: \"latest\",\n },\n opts,\n );\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;AAuCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EAojBtB,KAjkBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,MACd,OAAO,QAAQ,IAAI,aAIpB,EAAE;AACD,OAAK,cAAc;AACnB,OAAK,OAAO,QAAQ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K,IAAI,CAAC;EAG/C,MAAM,UAAU,iBAAiB,iBAAiB,WAAW,YAAY,UAAU,CAAC;EAEpF,MAAM,WAAW,MAAM,KAAK,QAAQ,gBAAmB,KAAK;EAE5D,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,0BAA0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aACJ,EACE,kBACA,SACA,SACA,cAAc,IAMf,EACDD,MACqB;EACrB,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,GACD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,iBAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBACJ,EACE,kBACA,SAID,EACDA,MAC0B;EAC1B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,sBAAsB,MAAM,KAAK;CACzC;AACF"}
@@ -1,4 +1,4 @@
1
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-Ds7qzCBB.js";
1
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-CN4NEway.js";
2
2
 
3
3
  //#region src/api-client/client.d.ts
4
4
  declare class ApiError extends Error {
@@ -62,10 +62,12 @@ declare class SentryApiService {
62
62
  }, opts?: RequestOptions): Promise<ClientKeyList>;
63
63
  listReleases({
64
64
  organizationSlug,
65
- projectSlug
65
+ projectSlug,
66
+ query
66
67
  }: {
67
68
  organizationSlug: string;
68
69
  projectSlug?: string;
70
+ query?: string;
69
71
  }, opts?: RequestOptions): Promise<ReleaseList>;
70
72
  listTags({
71
73
  organizationSlug,
@@ -172,4 +174,4 @@ declare class SentryApiService {
172
174
  }, opts?: RequestOptions): Promise<AutofixRunState>;
173
175
  } //#endregion
174
176
  export { ApiError as ApiError$1, SentryApiService as SentryApiService$1 };
175
- //# sourceMappingURL=client-1dRfG57H.d.ts.map
177
+ //# sourceMappingURL=client-J6VSRmQS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-J6VSRmQS.d.ts","names":[],"sources":["../src/api-client/client.ts"],"sourcesContent":null,"mappings":";;;cAuCa,QAAA,SAAiB,KAAK;;EAAtB,WAAS,CAAA,OAAA,EAAA,MAAa,EAAA,MAAA,EAAA,MAAA;AAkBlC;AAMD,KAJK,cAAA,GAIQ;EAAgB,IAAA,CAAA,EAAA,MAAA;CAAA;AAOzB,cAPS,gBAAA,CAOT;EAA8B,QAkFD,WAAA;EAAc,UAAW,IAAA,EAAA,MAAA;EAAgB,UAAxB,SAAA,EAAA,MAAA;EAAO,WAS9C,CAAA;IAAA,WAAA;IAAA;EACC,CADD,EAAA;IACE,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA;IAAR,IAAA,CAAA,EAAA,MAAA;EAAO,CAAA;EAaU,OAChB,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAI,QAKC,OAAA;EAAc,WACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAI,WAAZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAO,iBAeD,CAAA,IAAA,CAAA,EA7CsB,cA6CtB,CAAA,EA7CuC,OA6CvC,CA7C+C,gBA6C/C,CAAA;EAAc,SACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EArCF,cAqCE,CAAA,EApCR,OAoCQ,CApCA,QAoCA,CAAA;EAAW,UAAnB,CAAA;IAAA,gBAAA;IAAA;EAcS,CA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CAAA,EAAA,MAAA;IA6BC,KAAA,CAAA,EAAA,MAAA;IACA,MAAA,CAAA,EAAA,WAAA,GAAA,OAAA;EAAW,CAAA,EACX,IAAA,CAAA,EAYK,cAZL,CAAA,EAYmB,OAZnB,CAAA;IACA,KAAA,EAAA,MAAA;IACA,OAAA,EAAA,MAAA;IACA,KAAA,EAAA,MAAA;IASK,UAAA,EAAA,MAAA,GAAA,MAAA;IAAc,SAAA,EAAA,MAAA;IA6CnB,aAAA,EAAA,MAAA;EAAgB,CAAA,EAChB,CAAA;EAAW,WACX,CAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,WAAA;IAAA,KAAA;IAAA;EAuDgB,CAvDhB,EAAA;IACA,gBAAA,EAAA,MAAA;IACA,WAAA,CAAA,EAAA,MAAA;IAQK,WAAA,CAAA,EAAA,MAAA;IAAc,KAAA,CAAA,EAAA,MAAA;IA6CnB,MAAA,CAAA,EAAA,WAAA,GAAA,UAAA;EAAgB,CAAA,EAChB,IAAA,CAAA,EA9CK,cA8CL,CAAA,EA9CmB,OA8CnB,CAAA;IACA,SAAA,EAAA,MAAA;IACA,WAAA,EAAA,MAAA;IAOK,EAAA,EAAA,MAAA;IACE,OAAA,EAAA,MAAA;IAAR,KAAA,EAAA,MAAA;IAmBC,SAAA,EAAA,MAAA;IACA,kBAAA,EAAA,MAAA;IAKK,eAAA,EAAA,MAAA;EAAc,CAAA,EACZ,CAAA;EAAe,YAAvB,CAAA;IAAA,gBAAA;IAAA,OAAA;IAAA,OAAA;IAAA;GAAA,EAAA;IAAO,gBAAA,EAAA,MAAA;;;;YA3BD,iBACN,QAAQ;;;;;;;YAyBF,iBACN,QAAQ"}
@@ -1,4 +1,4 @@
1
- import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-CPuN4Qmi.cjs";
1
+ import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-B03G337q.cjs";
2
2
 
3
3
  //#region src/api-client/client.d.ts
4
4
  declare class ApiError extends Error {
@@ -62,10 +62,12 @@ declare class SentryApiService {
62
62
  }, opts?: RequestOptions): Promise<ClientKeyList>;
63
63
  listReleases({
64
64
  organizationSlug,
65
- projectSlug
65
+ projectSlug,
66
+ query
66
67
  }: {
67
68
  organizationSlug: string;
68
69
  projectSlug?: string;
70
+ query?: string;
69
71
  }, opts?: RequestOptions): Promise<ReleaseList>;
70
72
  listTags({
71
73
  organizationSlug,
@@ -172,4 +174,4 @@ declare class SentryApiService {
172
174
  }, opts?: RequestOptions): Promise<AutofixRunState>;
173
175
  } //#endregion
174
176
  export { ApiError, SentryApiService };
175
- //# sourceMappingURL=client-BsYOQsEI.d.cts.map
177
+ //# sourceMappingURL=client-tE6FD__9.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-tE6FD__9.d.cts","names":[],"sources":["../src/api-client/client.ts"],"sourcesContent":null,"mappings":";;;cAuCa,QAAA,SAAiB,KAAK;;EAAtB,WAAS,CAAA,OAAA,EAAA,MAAa,EAAA,MAAA,EAAA,MAAA;AAkBlC;AAMD,KAJK,cAAA,GAIQ;EAAgB,IAAA,CAAA,EAAA,MAAA;CAAA;AAOzB,cAPS,gBAAA,CAOT;EAA8B,QAkFD,WAAA;EAAc,UAAW,IAAA,EAAA,MAAA;EAAgB,UAAxB,SAAA,EAAA,MAAA;EAAO,WAS9C,CAAA;IAAA,WAAA;IAAA;EACC,CADD,EAAA;IACE,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA;IAAR,IAAA,CAAA,EAAA,MAAA;EAAO,CAAA;EAaU,OAChB,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAI,QAKC,OAAA;EAAc,WACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAI,WAAZ,CAAA,g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;IAAA,OAAA;IAAA;GAAA,EAAA;IAAO,gBAAA,EAAA,MAAA;;;;YA3BD,iBACN,QAAQ;;;;;;;YAyBF,iBACN,QAAQ"}
@@ -15,13 +15,14 @@ function formatEventOutput(event) {
15
15
  if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
16
16
  if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
17
17
  }
18
+ output += formatContexts(event.contexts);
18
19
  return output;
19
20
  }
20
21
  function formatExceptionInterfaceOutput(event, data) {
21
22
  let output = "";
22
23
  const firstError = data.value ?? data.values[0];
23
24
  if (!firstError) return "";
24
- output += `**Error:**\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
25
+ output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
25
26
  if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
26
27
  output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
27
28
  const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
@@ -31,7 +32,13 @@ function formatExceptionInterfaceOutput(event, data) {
31
32
  }
32
33
  function formatRequestInterfaceOutput(event, data) {
33
34
  if (!data.method || !data.url) return "";
34
- return `**HTTP Method:** ${data.method}\n**URL:** ${data.url}\n`;
35
+ return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
36
+ }
37
+ function formatContexts(contexts) {
38
+ if (!contexts) return "";
39
+ return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
40
+ return `${key}: ${JSON.stringify(value, void 0, 2)}`;
41
+ }).join("\n")}`).join("\n\n")}\n\n`;
35
42
  }
36
43
  function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
37
44
  let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
@@ -50,6 +57,7 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
50
57
  output += `**Event ID**: ${event.id}\n`;
51
58
  if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
52
59
  if (event.message) output += `**Message**:\n${event.message}\n`;
60
+ output += "\n";
53
61
  output += formatEventOutput(event);
54
62
  output += "# Using this information\n\n";
55
63
  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`;
@@ -76,4 +84,4 @@ Object.defineProperty(exports, 'formatIssueOutput', {
76
84
  return formatIssueOutput;
77
85
  }
78
86
  });
79
- //# sourceMappingURL=formatting-C-0bHtbh.cjs.map
87
+ //# sourceMappingURL=formatting-B0SJqiqX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-B0SJqiqX.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\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 formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\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\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\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 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":";;;AAWA,SAAgB,kBACdA,OACAC,UACA;AACA,KAAI,UAAU,WAAW,aAAa,CACpC,SAAQ,EAAE;EAAC,MAAM;EAAU,MAAM;EAAQ,MAAM;CAAM,EAClD,OAAO,CAAC,QAAQ,EAAE,CAClB,KAAK,IAAI,CAAC,EAAE,MAAM,YAAY,IAAI,MAAM,SAAS,KAAK,GAAG;AAE9D,SAAQ,EAAE,MAAM,YAAY,GAAG,MAAM,SAAS,KAAK,mBAAmB,OAAO,MAAM,YAAY,MA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,KAAK,CACjC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,QAAQ,OAAO,CACpC,IAAI,CAAC,CAAC,KAAK,MAAM,KAAK;AACrB,UAAQ,EAAE,IAAI,IAAI,KAAK,UAAU,eAAkB,EAAE,CAAC;CACvD,EAAC,CACD,KAAK,KAAK,CAAC,EACjB,CACA,KAAK,OAAO,CAAC;AACjB;AAED,SAAgB,kBAAkB,EAChC,kBACA,OACA,OACA,YAMD,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;AAClC,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
@@ -13,13 +13,14 @@ function formatEventOutput(event) {
13
13
  if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
14
14
  if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
15
15
  }
16
+ output += formatContexts(event.contexts);
16
17
  return output;
17
18
  }
18
19
  function formatExceptionInterfaceOutput(event, data) {
19
20
  let output = "";
20
21
  const firstError = data.value ?? data.values[0];
21
22
  if (!firstError) return "";
22
- output += `**Error:**\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
23
+ output += `### Error\n\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
23
24
  if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
24
25
  output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
25
26
  const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
@@ -29,7 +30,13 @@ function formatExceptionInterfaceOutput(event, data) {
29
30
  }
30
31
  function formatRequestInterfaceOutput(event, data) {
31
32
  if (!data.method || !data.url) return "";
32
- return `**HTTP Method:** ${data.method}\n**URL:** ${data.url}\n`;
33
+ return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
34
+ }
35
+ function formatContexts(contexts) {
36
+ if (!contexts) return "";
37
+ return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
38
+ return `${key}: ${JSON.stringify(value, void 0, 2)}`;
39
+ }).join("\n")}`).join("\n\n")}\n\n`;
33
40
  }
34
41
  function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
35
42
  let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
@@ -48,6 +55,7 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
48
55
  output += `**Event ID**: ${event.id}\n`;
49
56
  if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
50
57
  if (event.message) output += `**Message**:\n${event.message}\n`;
58
+ output += "\n";
51
59
  output += formatEventOutput(event);
52
60
  output += "# Using this information\n\n";
53
61
  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`;
@@ -57,4 +65,4 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
57
65
 
58
66
  //#endregion
59
67
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
60
- //# sourceMappingURL=formatting-BQRAzO5v.js.map
68
+ //# sourceMappingURL=formatting-ggD6YRYR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-ggD6YRYR.js","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\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 formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\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\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\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 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":";AAWA,SAAgB,kBACdA,OACAC,UACA;AACA,KAAI,UAAU,WAAW,aAAa,CACpC,SAAQ,EAAE;EAAC,MAAM;EAAU,MAAM;EAAQ,MAAM;CAAM,EAClD,OAAO,CAAC,QAAQ,EAAE,CAClB,KAAK,IAAI,CAAC,EAAE,MAAM,YAAY,IAAI,MAAM,SAAS,KAAK,GAAG;AAE9D,SAAQ,EAAE,MAAM,YAAY,GAAG,MAAM,SAAS,KAAK,mBAAmB,OAAO,MAAM,YAAY,MAAM,OAAO,GAC1G,MAAM,UACD,WAAW,MAAM,OAAO,EAAE,MAAM,UAAU,QAAQ,GAAG,MAAM,MAAM,IAAI,GAAG,IACzE,GACL;AACF;AAED,SAAgB,kBAAkBC,OAAc;CAC9C,IAAI,SAAS;AACb,MAAK,MAAM,SAAS,MAAM,SAAS;AACjC,MAAI,MAAM,SAAS,YACjB,WAAU,+BACR,OACA,MAAM,KACP;AAEH,MAAI,MA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ACA,OACA,YAMD,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;AAClC,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
package/dist/index.cjs CHANGED
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  const require_chunk = require('./chunk-BtT13l48.cjs');
4
- require('./schema-KEMqYaQn.cjs');
5
- require('./client-DQ837FXP.cjs');
4
+ require('./schema-3VLYcf4D.cjs');
5
+ require('./client-B4Ux5Zdg.cjs');
6
6
  require('./types-o3zWarRp.cjs');
7
7
  require('./api-client-CEBuz3Zu.cjs');
8
- require('./formatting-C-0bHtbh.cjs');
8
+ require('./formatting-B0SJqiqX.cjs');
9
9
  require('./issue-helpers-DbsECZFq.cjs');
10
10
  require('./logging-BEMgC5SA.cjs');
11
- require('./tools-BYt-G6p2.cjs');
12
- require('./schema-BCkBPgjj.cjs');
13
- require('./toolDefinitions-CO65cU86.cjs');
11
+ require('./tools-BdkmyaZo.cjs');
12
+ require('./schema-jk88gqOu.cjs');
13
+ require('./toolDefinitions-DIhvw3vk.cjs');
14
14
  require('./resources-BAE7VVZZ.cjs');
15
- require('./promptDefinitions-5jiZMBg5.cjs');
15
+ require('./promptDefinitions-pHRpPOpJ.cjs');
16
16
  require('./prompts-nfFU-zY-.cjs');
17
- require('./server-BWoJZj5B.cjs');
18
- const require_stdio = require('./stdio-BLzMxGqU.cjs');
19
- const require_version = require('./version-B0O4KvZ9.cjs');
17
+ require('./server-VwFSUPQn.cjs');
18
+ const require_stdio = require('./stdio-65sYKLOk.cjs');
19
+ const require_version = require('./version-CDnh7DyW.cjs');
20
20
  const __modelcontextprotocol_sdk_server_mcp_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/mcp.js"));
21
21
  const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
22
22
 
@@ -56,7 +56,7 @@ __sentry_node.init({
56
56
  "mcp.transport": "stdio",
57
57
  "sentry.host": host
58
58
  } },
59
- release: "0.9.0",
59
+ release: "0.10.0",
60
60
  integrations: [__sentry_node.consoleLoggingIntegration(), __sentry_node.zodErrorsIntegration()],
61
61
  environment: "stdio"
62
62
  });