@sentry/mcp-server 0.7.1 → 0.9.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 (192) hide show
  1. package/README.md +13 -5
  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 +3 -3
  7. package/dist/api-client/client.test.js +3 -3
  8. package/dist/api-client/index.cjs +3 -2
  9. package/dist/api-client/index.d.cts +4 -4
  10. package/dist/api-client/index.d.ts +4 -4
  11. package/dist/api-client/index.js +3 -3
  12. package/dist/api-client/schema.cjs +2 -1
  13. package/dist/api-client/schema.d.cts +2 -2
  14. package/dist/api-client/schema.d.ts +2 -2
  15. package/dist/api-client/schema.js +2 -2
  16. package/dist/api-client/types.d.cts +2 -2
  17. package/dist/api-client/types.d.ts +2 -2
  18. package/dist/{client-7aaWrjcF.d.ts → client-1dRfG57H.d.ts} +2 -2
  19. package/dist/{client-7aaWrjcF.d.ts.map → client-1dRfG57H.d.ts.map} +1 -1
  20. package/dist/{client-Ch0w22UE.d.cts → client-BsYOQsEI.d.cts} +6 -6
  21. package/dist/{client-Ch0w22UE.d.cts.map → client-BsYOQsEI.d.cts.map} +1 -1
  22. package/dist/{client-D9mOWh6s.js → client-CTm4cvI7.js} +2 -3
  23. package/dist/client-CTm4cvI7.js.map +1 -0
  24. package/dist/{client-CLuQEpjg.cjs → client-DQ837FXP.cjs} +2 -3
  25. package/dist/client-DQ837FXP.cjs.map +1 -0
  26. package/dist/{formatting-C6Py2iOz.js → formatting-BQRAzO5v.js} +25 -11
  27. package/dist/formatting-BQRAzO5v.js.map +1 -0
  28. package/dist/{formatting-BmbJ5-Uh.cjs → formatting-C-0bHtbh.cjs} +25 -11
  29. package/dist/formatting-C-0bHtbh.cjs.map +1 -0
  30. package/dist/index.cjs +15 -14
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +15 -14
  33. package/dist/index.js.map +1 -1
  34. package/dist/internal/formatting.cjs +1 -1
  35. package/dist/internal/formatting.d.cts +3 -3
  36. package/dist/internal/formatting.d.cts.map +1 -1
  37. package/dist/internal/formatting.d.ts +3 -3
  38. package/dist/internal/formatting.d.ts.map +1 -1
  39. package/dist/internal/formatting.js +1 -1
  40. package/dist/internal/issue-helpers.cjs +1 -1
  41. package/dist/internal/issue-helpers.d.cts.map +1 -1
  42. package/dist/internal/issue-helpers.d.ts.map +1 -1
  43. package/dist/internal/issue-helpers.js +1 -1
  44. package/dist/internal/issue-helpers.test.cjs +2 -2
  45. package/dist/internal/issue-helpers.test.js +2 -2
  46. package/dist/{issue-helpers-Cx6bFCUv.js → issue-helpers-CyoHu5j4.js} +3 -1
  47. package/dist/issue-helpers-CyoHu5j4.js.map +1 -0
  48. package/dist/{issue-helpers-CdWMhVWJ.cjs → issue-helpers-DbsECZFq.cjs} +3 -1
  49. package/dist/issue-helpers-DbsECZFq.cjs.map +1 -0
  50. package/dist/{promptDefinitions-OnJHLqrZ.cjs → promptDefinitions-5jiZMBg5.cjs} +10 -2
  51. package/dist/promptDefinitions-5jiZMBg5.cjs.map +1 -0
  52. package/dist/promptDefinitions-CPTadtuI.js +24 -0
  53. package/dist/promptDefinitions-CPTadtuI.js.map +1 -0
  54. package/dist/promptDefinitions-Dcz3d9wL.d.cts +26 -0
  55. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +1 -0
  56. package/dist/promptDefinitions-DrGK-v8n.d.ts +26 -0
  57. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +1 -0
  58. package/dist/promptDefinitions.cjs +2 -2
  59. package/dist/promptDefinitions.d.cts +1 -1
  60. package/dist/promptDefinitions.d.ts +1 -1
  61. package/dist/promptDefinitions.js +2 -2
  62. package/dist/prompts-DgWOD2rU.js +32 -0
  63. package/dist/prompts-DgWOD2rU.js.map +1 -0
  64. package/dist/prompts-nfFU-zY-.cjs +39 -0
  65. package/dist/prompts-nfFU-zY-.cjs.map +1 -0
  66. package/dist/prompts.cjs +1 -1
  67. package/dist/prompts.d.cts +21 -11
  68. package/dist/prompts.d.cts.map +1 -1
  69. package/dist/prompts.d.ts +21 -11
  70. package/dist/prompts.d.ts.map +1 -1
  71. package/dist/prompts.js +1 -1
  72. package/dist/{schema-_xqdSRLo.cjs → schema-BCkBPgjj.cjs} +6 -6
  73. package/dist/schema-BCkBPgjj.cjs.map +1 -0
  74. package/dist/schema-CJrk_GUH.js +15 -0
  75. package/dist/schema-CJrk_GUH.js.map +1 -0
  76. package/dist/{schema-BbqVXLZS.d.cts → schema-CaJV2aIO.d.cts} +572 -562
  77. package/dist/schema-CaJV2aIO.d.cts.map +1 -0
  78. package/dist/{schema-BnIwkBRb.d.ts → schema-DwPOkoSP.d.ts} +520 -510
  79. package/dist/{schema-BnIwkBRb.d.ts.map → schema-DwPOkoSP.d.ts.map} +1 -1
  80. package/dist/{schema-BnXdl41H.cjs → schema-KEMqYaQn.cjs} +15 -2
  81. package/dist/schema-KEMqYaQn.cjs.map +1 -0
  82. package/dist/{schema-BzPfPMq7.js → schema-nyYqVk4Y.js} +10 -3
  83. package/dist/schema-nyYqVk4Y.js.map +1 -0
  84. package/dist/schema.cjs +1 -1
  85. package/dist/schema.d.cts.map +1 -1
  86. package/dist/schema.d.ts.map +1 -1
  87. package/dist/schema.js +1 -1
  88. package/dist/{server-D35uvgO3.cjs → server-BWoJZj5B.cjs} +40 -10
  89. package/dist/server-BWoJZj5B.cjs.map +1 -0
  90. package/dist/{server-zkB6OPEz.js → server-DtNbD1c-.js} +40 -10
  91. package/dist/server-DtNbD1c-.js.map +1 -0
  92. package/dist/server.cjs +10 -10
  93. package/dist/server.d.cts +3 -3
  94. package/dist/server.d.cts.map +1 -1
  95. package/dist/server.d.ts +3 -3
  96. package/dist/server.d.ts.map +1 -1
  97. package/dist/server.js +10 -10
  98. package/dist/{stdio-Be17vc2M.cjs → stdio-BLzMxGqU.cjs} +2 -2
  99. package/dist/{stdio-Be17vc2M.cjs.map → stdio-BLzMxGqU.cjs.map} +1 -1
  100. package/dist/{stdio-DQcBQF6y.js → stdio-D4oW-qT6.js} +2 -2
  101. package/dist/{stdio-DQcBQF6y.js.map → stdio-D4oW-qT6.js.map} +1 -1
  102. package/dist/test-setup.cjs +2 -2
  103. package/dist/test-setup.cjs.map +1 -1
  104. package/dist/test-setup.js +2 -2
  105. package/dist/test-setup.js.map +1 -1
  106. package/dist/{toolDefinitions-CfNXEIaX.js → toolDefinitions-BF-D81bS.js} +12 -34
  107. package/dist/toolDefinitions-BF-D81bS.js.map +1 -0
  108. package/dist/{toolDefinitions-abNbVXb5.d.ts → toolDefinitions-CCscRQoM.d.ts} +14 -32
  109. package/dist/toolDefinitions-CCscRQoM.d.ts.map +1 -0
  110. package/dist/{toolDefinitions-CRtHauHJ.cjs → toolDefinitions-CO65cU86.cjs} +12 -34
  111. package/dist/toolDefinitions-CO65cU86.cjs.map +1 -0
  112. package/dist/{toolDefinitions-DPePAe0y.d.cts → toolDefinitions-K_TVqaLU.d.cts} +14 -32
  113. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +1 -0
  114. package/dist/toolDefinitions.cjs +2 -2
  115. package/dist/toolDefinitions.d.cts +1 -1
  116. package/dist/toolDefinitions.d.ts +1 -1
  117. package/dist/toolDefinitions.js +2 -2
  118. package/dist/toolDefinitions.test.cjs +2 -2
  119. package/dist/toolDefinitions.test.js +2 -2
  120. package/dist/{tools-DtHRkHKh.js → tools-B8ufMRZx.js} +11 -36
  121. package/dist/tools-B8ufMRZx.js.map +1 -0
  122. package/dist/{tools-LuDiLnAX.cjs → tools-BYt-G6p2.cjs} +11 -36
  123. package/dist/tools-BYt-G6p2.cjs.map +1 -0
  124. package/dist/tools.cjs +5 -5
  125. package/dist/tools.d.cts +16 -31
  126. package/dist/tools.d.cts.map +1 -1
  127. package/dist/tools.d.ts +16 -31
  128. package/dist/tools.d.ts.map +1 -1
  129. package/dist/tools.js +5 -5
  130. package/dist/tools.test.cjs +33 -70
  131. package/dist/tools.test.cjs.map +1 -1
  132. package/dist/tools.test.js +33 -70
  133. package/dist/tools.test.js.map +1 -1
  134. package/dist/transports/stdio.cjs +11 -11
  135. package/dist/transports/stdio.d.cts +3 -3
  136. package/dist/transports/stdio.d.ts +3 -3
  137. package/dist/transports/stdio.js +11 -11
  138. package/dist/{types-BqMKv2m7.d.cts → types-CPuN4Qmi.d.cts} +2 -2
  139. package/dist/{types-BqMKv2m7.d.cts.map → types-CPuN4Qmi.d.cts.map} +1 -1
  140. package/dist/{types-RxedZjnY.d.ts → types-Ds7qzCBB.d.ts} +2 -2
  141. package/dist/{types-RxedZjnY.d.ts.map → types-Ds7qzCBB.d.ts.map} +1 -1
  142. package/dist/{types-X3ot7x0d.d.ts → types-DyM4kaGZ.d.ts} +7 -6
  143. package/dist/types-DyM4kaGZ.d.ts.map +1 -0
  144. package/dist/{types-DFKY4nvR.d.cts → types-TaJcaAVg.d.cts} +7 -6
  145. package/dist/types-TaJcaAVg.d.cts.map +1 -0
  146. package/dist/types.d.cts +4 -4
  147. package/dist/types.d.ts +4 -4
  148. package/dist/{version-BkjSM_wB.cjs → version-B0O4KvZ9.cjs} +2 -2
  149. package/dist/{version-BkjSM_wB.cjs.map → version-B0O4KvZ9.cjs.map} +1 -1
  150. package/dist/version-dTEKpaGt.js +6 -0
  151. package/dist/{version-BMRCgO0F.js.map → version-dTEKpaGt.js.map} +1 -1
  152. package/dist/version.cjs +1 -1
  153. package/dist/version.js +1 -1
  154. package/dist/{vi.ClIskdbk-TqmAThAO.cjs → vi.ClIskdbk-Bs263gvI.cjs} +5 -5
  155. package/dist/{vi.ClIskdbk-TqmAThAO.cjs.map → vi.ClIskdbk-Bs263gvI.cjs.map} +1 -1
  156. package/dist/{vi.ClIskdbk-BbUmO3mx.js → vi.ClIskdbk-De9q3829.js} +5 -5
  157. package/dist/{vi.ClIskdbk-BbUmO3mx.js.map → vi.ClIskdbk-De9q3829.js.map} +1 -1
  158. package/package.json +6 -6
  159. package/dist/client-CLuQEpjg.cjs.map +0 -1
  160. package/dist/client-D9mOWh6s.js.map +0 -1
  161. package/dist/formatting-BmbJ5-Uh.cjs.map +0 -1
  162. package/dist/formatting-C6Py2iOz.js.map +0 -1
  163. package/dist/issue-helpers-CdWMhVWJ.cjs.map +0 -1
  164. package/dist/issue-helpers-Cx6bFCUv.js.map +0 -1
  165. package/dist/promptDefinitions-C85r2wAk.d.ts +0 -15
  166. package/dist/promptDefinitions-C85r2wAk.d.ts.map +0 -1
  167. package/dist/promptDefinitions-C9aGYWZ6.js +0 -16
  168. package/dist/promptDefinitions-C9aGYWZ6.js.map +0 -1
  169. package/dist/promptDefinitions-CkGJr3c4.d.cts +0 -15
  170. package/dist/promptDefinitions-CkGJr3c4.d.cts.map +0 -1
  171. package/dist/promptDefinitions-OnJHLqrZ.cjs.map +0 -1
  172. package/dist/prompts--QCiXmR2.cjs +0 -26
  173. package/dist/prompts--QCiXmR2.cjs.map +0 -1
  174. package/dist/prompts-Tz-qECa0.js +0 -19
  175. package/dist/prompts-Tz-qECa0.js.map +0 -1
  176. package/dist/schema-BbqVXLZS.d.cts.map +0 -1
  177. package/dist/schema-BnXdl41H.cjs.map +0 -1
  178. package/dist/schema-BzPfPMq7.js.map +0 -1
  179. package/dist/schema-_xqdSRLo.cjs.map +0 -1
  180. package/dist/schema-pZrPEvtp.js +0 -15
  181. package/dist/schema-pZrPEvtp.js.map +0 -1
  182. package/dist/server-D35uvgO3.cjs.map +0 -1
  183. package/dist/server-zkB6OPEz.js.map +0 -1
  184. package/dist/toolDefinitions-CRtHauHJ.cjs.map +0 -1
  185. package/dist/toolDefinitions-CfNXEIaX.js.map +0 -1
  186. package/dist/toolDefinitions-DPePAe0y.d.cts.map +0 -1
  187. package/dist/toolDefinitions-abNbVXb5.d.ts.map +0 -1
  188. package/dist/tools-DtHRkHKh.js.map +0 -1
  189. package/dist/tools-LuDiLnAX.cjs.map +0 -1
  190. package/dist/types-DFKY4nvR.d.cts.map +0 -1
  191. package/dist/types-X3ot7x0d.d.ts.map +0 -1
  192. package/dist/version-BMRCgO0F.js +0 -6
@@ -11,25 +11,39 @@ function formatFrameHeader(frame, platform) {
11
11
  }
12
12
  function formatEventOutput(event) {
13
13
  let output = "";
14
- for (const entry of event.entries) if (entry.type === "exception") {
15
- const data = entry.data;
16
- const firstError = data.value ?? data.values[0];
17
- if (!firstError) continue;
18
- output += `**Error:**\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
19
- if (!firstError.stacktrace || !firstError.stacktrace.frames) continue;
20
- output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
21
- const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
22
- return `${formatFrameHeader(frame, event.platform)}${context}`;
23
- }).join("\n")}\n\`\`\`\n\n`;
14
+ for (const entry of event.entries) {
15
+ if (entry.type === "exception") output += formatExceptionInterfaceOutput(event, entry.data);
16
+ if (entry.type === "request") output += formatRequestInterfaceOutput(event, entry.data);
24
17
  }
25
18
  return output;
26
19
  }
20
+ function formatExceptionInterfaceOutput(event, data) {
21
+ let output = "";
22
+ const firstError = data.value ?? data.values[0];
23
+ if (!firstError) return "";
24
+ output += `**Error:**\n\`\`\`\n${firstError.type}: ${firstError.value}\n\`\`\`\n\n`;
25
+ if (!firstError.stacktrace || !firstError.stacktrace.frames) return output;
26
+ output += `**Stacktrace:**\n\`\`\`\n${firstError.stacktrace.frames.map((frame) => {
27
+ const context = frame.context?.length ? `${frame.context.filter(([lineno, _]) => lineno === frame.lineNo).map(([_, code]) => `\n${code}`).join("")}` : "";
28
+ return `${formatFrameHeader(frame, event.platform)}${context}`;
29
+ }).join("\n")}\n\`\`\`\n\n`;
30
+ return output;
31
+ }
32
+ function formatRequestInterfaceOutput(event, data) {
33
+ if (!data.method || !data.url) return "";
34
+ return `**HTTP Method:** ${data.method}\n**URL:** ${data.url}\n`;
35
+ }
27
36
  function formatIssueOutput({ organizationSlug, issue, event, apiService }) {
28
37
  let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
29
38
  output += `**Description**: ${issue.title}\n`;
30
39
  output += `**Culprit**: ${issue.culprit}\n`;
31
40
  output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
32
41
  output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
42
+ output += `**Occurrences**: ${issue.count}\n`;
43
+ output += `**Users Impacted**: ${issue.userCount}\n`;
44
+ output += `**Status**: ${issue.status}\n`;
45
+ output += `**Platform**: ${issue.platform}\n`;
46
+ output += `**Project**: ${issue.project.name}\n`;
33
47
  output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
34
48
  output += "\n";
35
49
  output += "## Event Details\n\n";
@@ -62,4 +76,4 @@ Object.defineProperty(exports, 'formatIssueOutput', {
62
76
  return formatIssueOutput;
63
77
  }
64
78
  });
65
- //# sourceMappingURL=formatting-BmbJ5-Uh.cjs.map
79
+ //# sourceMappingURL=formatting-C-0bHtbh.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatting-C-0bHtbh.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>"],"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 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 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${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 Method:** ${data.method}\\n**URL:** ${data.url}\\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 += 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":";;;AAUA,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,MAAM,SAAS,UACjB,WAAU,6BACR,OACA,MAAM,KACP;CAEJ;AACD,QAAO;AACR;AAED,SAAS,+BACPA,OACAC,MACA;CACA,IAAI,SAAS;CAEb,MAAM,aAAa,KAAK,SAAS,KAAK,OAAO;AAC7C,MAAK,WACH,QAAO;AAET,YAAW,sBAAwB,WAAW,KAAK,IACjD,WAAW,MACZ;AACD,MAAK,WAAW,eAAe,WAAW,WAAW,OACnD,QAAO;AAET,YAAW,2BAA6B,WAAW,WAAW,OAC3D,IAAI,CAAC,UAAU;EACd,MAAM,UAAU,MAAM,SAAS,UAC1B,EAAE,MAAM,QACN,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,WAAW,MAAM,OAAO,CAChD,IAAI,CAAC,CAAC,GAAG,KAAK,MAAM,IAAI,KAAK,EAAE,CAC/B,KAAK,GAAG,CAAC,IACZ;AAEJ,UAAQ,EAAE,kBAAkB,OAAO,MAAM,SAAS,CAAC,EAAE,QAAQ;CAC9D,EAAC,CACD,KAAK,KAAK,CAAC;AACd,QAAO;AACR;AAED,SAAS,6BACPD,OACAE,MACA;AACA,MAAK,KAAK,WAAW,KAAK,IACxB,QAAO;AAET,SAAQ,mBAAmB,KAAK,OAAO,aAAa,KAAK,IAAI;AAC9D;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,kBAAkB,MAAM;AAClC,WAAU;AACV,YAAW,mEAAmE,MAAM,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  const require_chunk = require('./chunk-BtT13l48.cjs');
4
- require('./schema-BnXdl41H.cjs');
5
- require('./client-CLuQEpjg.cjs');
4
+ require('./schema-KEMqYaQn.cjs');
5
+ require('./client-DQ837FXP.cjs');
6
6
  require('./types-o3zWarRp.cjs');
7
7
  require('./api-client-CEBuz3Zu.cjs');
8
- require('./formatting-BmbJ5-Uh.cjs');
9
- require('./issue-helpers-CdWMhVWJ.cjs');
8
+ require('./formatting-C-0bHtbh.cjs');
9
+ require('./issue-helpers-DbsECZFq.cjs');
10
10
  require('./logging-BEMgC5SA.cjs');
11
- require('./tools-LuDiLnAX.cjs');
12
- require('./schema-_xqdSRLo.cjs');
13
- require('./toolDefinitions-CRtHauHJ.cjs');
11
+ require('./tools-BYt-G6p2.cjs');
12
+ require('./schema-BCkBPgjj.cjs');
13
+ require('./toolDefinitions-CO65cU86.cjs');
14
14
  require('./resources-BAE7VVZZ.cjs');
15
- require('./promptDefinitions-OnJHLqrZ.cjs');
16
- require('./prompts--QCiXmR2.cjs');
17
- require('./server-D35uvgO3.cjs');
18
- const require_stdio = require('./stdio-Be17vc2M.cjs');
19
- const require_version = require('./version-BkjSM_wB.cjs');
15
+ require('./promptDefinitions-5jiZMBg5.cjs');
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');
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
 
23
23
  //#region src/index.ts
24
- let accessToken = process.env.SENTRY_AUTH_TOKEN;
24
+ let accessToken = process.env.SENTRY_ACCESS_TOKEN ?? process.env.SENTRY_AUTH_TOKEN;
25
25
  let host = process.env.SENTRY_HOST;
26
26
  let sentryDsn = process.env.SENTRY_DSN || "https://d0805acebb937435abcb5958da99cdab@o1.ingest.us.sentry.io/4509062593708032";
27
27
  const packageName = "@sentry/mcp-server";
@@ -43,7 +43,7 @@ for (const arg of process.argv.slice(2)) {
43
43
  }
44
44
  }
45
45
  if (!accessToken) {
46
- console.error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.");
46
+ console.error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.");
47
47
  console.error(getUsage());
48
48
  process.exit(1);
49
49
  }
@@ -56,6 +56,7 @@ __sentry_node.init({
56
56
  "mcp.transport": "stdio",
57
57
  "sentry.host": host
58
58
  } },
59
+ release: "0.9.0",
59
60
  integrations: [__sentry_node.consoleLoggingIntegration(), __sentry_node.zodErrorsIntegration()],
60
61
  environment: "stdio"
61
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAGC,4BAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsBA;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD,cAAc,CACZ,cAAO,2BAA2B,EAClC,cAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,cAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,yBAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,eAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,cAAO,MAAM,eAAe"}
1
+ {"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cACF,QAAQ,IAAI,uBAAuB,QAAQ,IAAI;AACjD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAGC,4BAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,oGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsBA;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD;CACA,cAAc,CACZ,cAAO,2BAA2B,EAClC,cAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,cAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,yBAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,eAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,cAAO,MAAM,eAAe"}
package/dist/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
- import "./schema-BzPfPMq7.js";
3
- import "./client-D9mOWh6s.js";
2
+ import "./schema-nyYqVk4Y.js";
3
+ import "./client-CTm4cvI7.js";
4
4
  import "./types-H-TSmRpm.js";
5
5
  import "./api-client-9mzrj2HY.js";
6
- import "./formatting-C6Py2iOz.js";
7
- import "./issue-helpers-Cx6bFCUv.js";
6
+ import "./formatting-BQRAzO5v.js";
7
+ import "./issue-helpers-CyoHu5j4.js";
8
8
  import "./logging-Cxm8lQvg.js";
9
- import "./tools-DtHRkHKh.js";
10
- import "./schema-pZrPEvtp.js";
11
- import "./toolDefinitions-CfNXEIaX.js";
9
+ import "./tools-B8ufMRZx.js";
10
+ import "./schema-CJrk_GUH.js";
11
+ import "./toolDefinitions-BF-D81bS.js";
12
12
  import "./resources-OM3EAnnj.js";
13
- import "./promptDefinitions-C9aGYWZ6.js";
14
- import "./prompts-Tz-qECa0.js";
15
- import "./server-zkB6OPEz.js";
16
- import { startStdio } from "./stdio-DQcBQF6y.js";
17
- import { LIB_VERSION } from "./version-BMRCgO0F.js";
13
+ import "./promptDefinitions-CPTadtuI.js";
14
+ import "./prompts-DgWOD2rU.js";
15
+ import "./server-DtNbD1c-.js";
16
+ import { startStdio } from "./stdio-D4oW-qT6.js";
17
+ import { LIB_VERSION } from "./version-dTEKpaGt.js";
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
19
  import * as Sentry from "@sentry/node";
20
20
 
21
21
  //#region src/index.ts
22
- let accessToken = process.env.SENTRY_AUTH_TOKEN;
22
+ let accessToken = process.env.SENTRY_ACCESS_TOKEN ?? process.env.SENTRY_AUTH_TOKEN;
23
23
  let host = process.env.SENTRY_HOST;
24
24
  let sentryDsn = process.env.SENTRY_DSN || "https://d0805acebb937435abcb5958da99cdab@o1.ingest.us.sentry.io/4509062593708032";
25
25
  const packageName = "@sentry/mcp-server";
@@ -41,7 +41,7 @@ for (const arg of process.argv.slice(2)) {
41
41
  }
42
42
  }
43
43
  if (!accessToken) {
44
- console.error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.");
44
+ console.error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.");
45
45
  console.error(getUsage());
46
46
  process.exit(1);
47
47
  }
@@ -54,6 +54,7 @@ Sentry.init({
54
54
  "mcp.transport": "stdio",
55
55
  "sentry.host": host
56
56
  } },
57
+ release: "0.9.0",
57
58
  integrations: [Sentry.consoleLoggingIntegration(), Sentry.zodErrorsIntegration()],
58
59
  environment: "stdio"
59
60
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsB;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD,cAAc,CACZ,OAAO,2BAA2B,EAClC,OAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,OAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,WAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
1
+ {"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cACF,QAAQ,IAAI,uBAAuB,QAAQ,IAAI;AACjD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,oGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsB;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD;CACA,cAAc,CACZ,OAAO,2BAA2B,EAClC,OAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,OAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,WAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
@@ -1,4 +1,4 @@
1
- const require_formatting = require('../formatting-BmbJ5-Uh.cjs');
1
+ const require_formatting = require('../formatting-C-0bHtbh.cjs');
2
2
 
3
3
  exports.formatEventOutput = require_formatting.formatEventOutput
4
4
  exports.formatFrameHeader = require_formatting.formatFrameHeader
@@ -1,6 +1,6 @@
1
- import { FrameInterface } from "../schema-BbqVXLZS.cjs";
2
- import { Event, Issue } from "../types-BqMKv2m7.cjs";
3
- import { SentryApiService } from "../client-Ch0w22UE.cjs";
1
+ import { FrameInterface } from "../schema-CaJV2aIO.cjs";
2
+ import { Event, Issue } from "../types-CPuN4Qmi.cjs";
3
+ import { SentryApiService } from "../client-BsYOQsEI.cjs";
4
4
  import "../index-BPSCxsMC.cjs";
5
5
  import { z } from "zod";
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBASgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgCzB,iBAAA;;;;;;;EAhDA,KAAA,EAuDP,KAvDO;EAAiB,KAAA,EAwDxB,KAxDwB;EAAA,UACT,EAwDV,gBAxDU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
1
+ {"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBAUgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBA4DzB,iBAAA;;;;;;;EA5EA,KAAA,EAmFP,KAnFO;EAAiB,KAAA,EAoFxB,KApFwB;EAAA,UACT,EAoFV,gBApFU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
@@ -1,6 +1,6 @@
1
- import { FrameInterface$1 as FrameInterface } from "../schema-BnIwkBRb.js";
2
- import { Event, Issue } from "../types-RxedZjnY.js";
3
- import { SentryApiService$1 as SentryApiService } from "../client-7aaWrjcF.js";
1
+ import { FrameInterface$1 as FrameInterface } from "../schema-DwPOkoSP.js";
2
+ import { Event, Issue } from "../types-Ds7qzCBB.js";
3
+ import { SentryApiService$1 as SentryApiService } from "../client-1dRfG57H.js";
4
4
  import "../index-h64gcVNJ.js";
5
5
  import { z } from "zod";
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBASgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgCzB,iBAAA;;;;;;;EAhDA,KAAA,EAuDP,KAvDO;EAAiB,KAAA,EAwDxB,KAxDwB;EAAA,UACT,EAwDV,gBAxDU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
1
+ {"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBAUgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBA4DzB,iBAAA;;;;;;;EA5EA,KAAA,EAmFP,KAnFO;EAAiB,KAAA,EAoFxB,KApFwB;EAAA,UACT,EAoFV,gBApFU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
@@ -1,3 +1,3 @@
1
- import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-C6Py2iOz.js";
1
+ import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-BQRAzO5v.js";
2
2
 
3
3
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
@@ -1,4 +1,4 @@
1
- const require_issue_helpers = require('../issue-helpers-CdWMhVWJ.cjs');
1
+ const require_issue_helpers = require('../issue-helpers-DbsECZFq.cjs');
2
2
 
3
3
  exports.extractIssueId = require_issue_helpers.extractIssueId
4
4
  exports.parseIssueId = require_issue_helpers.parseIssueId
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA;;;;;;;;;AAwDhB;;iBAAgB,YAAA;;;;;;AAehB;;AACE,iBADc,gBAAA,CACd;EAAA,QAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EAAQ,QACR,CAAA,EAAA,MAAA,GAAA,IAAA;EAAO,OACP,CAAA,EAAA,MAAA,GAAA,IAAA;EAAgB,gBAAA,CAAA,EAAA,MAAA,GAAA,IAAA"}
1
+ {"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA;;;;;;;;;AAwDhB;;iBAAgB,YAAA;;;;;;AAyBhB;;AACE,iBADc,gBAAA,CACd;EAAA,QAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EAAQ,QACR,CAAA,EAAA,MAAA,GAAA,IAAA;EAAO,OACP,CAAA,EAAA,MAAA,GAAA,IAAA;EAAgB,gBAAA,CAAA,EAAA,MAAA,GAAA,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA;;;;;;;;;AAwDhB;;iBAAgB,YAAA;;;;;;AAehB;;AACE,iBADc,gBAAA,CACd;EAAA,QAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EAAQ,QACR,CAAA,EAAA,MAAA,GAAA,IAAA;EAAO,OACP,CAAA,EAAA,MAAA,GAAA,IAAA;EAAgB,gBAAA,CAAA,EAAA,MAAA,GAAA,IAAA"}
1
+ {"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA;;;;;;;;;AAwDhB;;iBAAgB,YAAA;;;;;;AAyBhB;;AACE,iBADc,gBAAA,CACd;EAAA,QAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EAAQ,QACR,CAAA,EAAA,MAAA,GAAA,IAAA;EAAO,OACP,CAAA,EAAA,MAAA,GAAA,IAAA;EAAgB,gBAAA,CAAA,EAAA,MAAA,GAAA,IAAA"}
@@ -1,3 +1,3 @@
1
- import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-Cx6bFCUv.js";
1
+ import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-CyoHu5j4.js";
2
2
 
3
3
  export { extractIssueId, parseIssueId, parseIssueParams };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- const require_issue_helpers = require('../issue-helpers-CdWMhVWJ.cjs');
2
+ const require_issue_helpers = require('../issue-helpers-DbsECZFq.cjs');
3
3
  const require_dist = require('../dist-wiyJYfAH.cjs');
4
- const require_vi_ClIskdbk = require('../vi.ClIskdbk-TqmAThAO.cjs');
4
+ const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bs263gvI.cjs');
5
5
 
6
6
  //#region src/internal/issue-helpers.test.ts
7
7
  require_dist.describe("extractIssueId", () => {
@@ -1,6 +1,6 @@
1
- import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-Cx6bFCUv.js";
1
+ import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-CyoHu5j4.js";
2
2
  import { describe, it } from "../dist-BKh-M1A1.js";
3
- import { globalExpect } from "../vi.ClIskdbk-BbUmO3mx.js";
3
+ import { globalExpect } from "../vi.ClIskdbk-De9q3829.js";
4
4
 
5
5
  //#region src/internal/issue-helpers.test.ts
6
6
  describe("extractIssueId", () => {
@@ -37,6 +37,8 @@ function extractIssueId(url) {
37
37
  function parseIssueId(issueId) {
38
38
  let finalIssueId = issueId;
39
39
  finalIssueId = finalIssueId.replace(/[^\w-]/g, "");
40
+ const validFormatRegex = /^(\d+|[A-Za-z][\w-]*-[A-Za-z0-9]+)$/;
41
+ if (!validFormatRegex.test(finalIssueId)) throw new Error(`Invalid issue ID format: "${finalIssueId}". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., "PROJECT-ABC123").`);
40
42
  return finalIssueId;
41
43
  }
42
44
  /**
@@ -65,4 +67,4 @@ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
65
67
 
66
68
  //#endregion
67
69
  export { extractIssueId, parseIssueId, parseIssueParams };
68
- //# sourceMappingURL=issue-helpers-Cx6bFCUv.js.map
70
+ //# sourceMappingURL=issue-helpers-CyoHu5j4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-CyoHu5j4.js","names":["url: string","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n const parsedUrl = new URL(url);\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n \n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(issueId),\n };\n }\n\n throw new Error(\"Either issueId or issueUrl must be provided\");\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,eAAeA,KAG7B;AACA,MAAK,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;CAIJ,MAAM,YAAY,IAAI,IAAI;CAE1B,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AAC/D,KAAI,UAAU,SAAS,MAAM,UAAU,SAAS,SAAS,CACvD,OAAM,IAAI,MACR;CAIJ,MAAM,UAAU,UAAU,UAAU,QAAQ,SAAS,GAAG;AACxD,MAAK,QACH,OAAM,IAAI,MAAM;CAIlB,IAAIC;AACJ,KAAI,UAAU,SAAS,gBAAgB,CACrC,oBAAmB,UAAU,UAAU,QAAQ,gBAAgB,GAAG;UACzD,UAAU,SAAS,KAAK,UAAU,OAAO,SAElD,oBAAmB,UAAU;MACxB;EAEL,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI;AAC/C,MAAI,UAAU,SAAS,KAAK,UAAU,OAAO,MAC3C,oBAAmB,UAAU;CAEhC;AAED,MAAK,iBACH,OAAM,IAAI,MACR;AAIJ,QAAO;EAAE;EAAS;CAAkB;AACrC;;;;;;;;;AAUD,SAAgB,aAAaC,SAAiB;CAC5C,IAAI,eAAe;AAEnB,gBAAe,aAAa,QAAQ,WAAW,GAAG;CAIlD,MAAM,mBAAmB;AAEzB,MAAK,iBAAiB,KAAK,aAAa,CACtC,OAAM,IAAI,OACP,4BAA4B,aAAa;AAI9C,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -39,6 +39,8 @@ function extractIssueId(url) {
39
39
  function parseIssueId(issueId) {
40
40
  let finalIssueId = issueId;
41
41
  finalIssueId = finalIssueId.replace(/[^\w-]/g, "");
42
+ const validFormatRegex = /^(\d+|[A-Za-z][\w-]*-[A-Za-z0-9]+)$/;
43
+ if (!validFormatRegex.test(finalIssueId)) throw new Error(`Invalid issue ID format: "${finalIssueId}". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., "PROJECT-ABC123").`);
42
44
  return finalIssueId;
43
45
  }
44
46
  /**
@@ -84,4 +86,4 @@ Object.defineProperty(exports, 'parseIssueParams', {
84
86
  return parseIssueParams;
85
87
  }
86
88
  });
87
- //# sourceMappingURL=issue-helpers-CdWMhVWJ.cjs.map
89
+ //# sourceMappingURL=issue-helpers-DbsECZFq.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-DbsECZFq.cjs","names":["url: string","organizationSlug: string | undefined","issueId: string"],"sources":["../src/internal/issue-helpers.ts"],"sourcesContent":["/**\n * Extracts the Sentry issue ID and organization slug from a full URL\n *\n * @param url - A full Sentry issue URL\n * @returns Object containing the numeric issue ID and organization slug (if found)\n * @throws Error if the input is invalid\n */\nexport function extractIssueId(url: string): {\n issueId: string;\n organizationSlug: string;\n} {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Must start with http:// or https://\",\n );\n }\n\n const parsedUrl = new URL(url);\n\n const pathParts = parsedUrl.pathname.split(\"/\").filter(Boolean);\n if (pathParts.length < 2 || !pathParts.includes(\"issues\")) {\n throw new Error(\n \"Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'\",\n );\n }\n\n const issueId = pathParts[pathParts.indexOf(\"issues\") + 1];\n if (!issueId) {\n throw new Error(\"Unable to determine issue ID from URL.\");\n }\n\n // Extract organization slug from either the path or subdomain\n let organizationSlug: string | undefined;\n if (pathParts.includes(\"organizations\")) {\n organizationSlug = pathParts[pathParts.indexOf(\"organizations\") + 1];\n } else if (pathParts.length > 1 && pathParts[0] !== \"issues\") {\n // If URL is like sentry.io/sentry/issues/123\n organizationSlug = pathParts[0];\n } else {\n // Check for subdomain\n const hostParts = parsedUrl.hostname.split(\".\");\n if (hostParts.length > 2 && hostParts[0] !== \"www\") {\n organizationSlug = hostParts[0];\n }\n }\n\n if (!organizationSlug) {\n throw new Error(\n \"Invalid Sentry issue URL. Could not determine organization.\",\n );\n }\n\n return { issueId, organizationSlug };\n}\n\n/**\n * Sometimes the LLM will pass in a funky issue shortId. For example it might pass\n * in \"CLOUDFLARE-MCP-41.\" instead of \"CLOUDFLARE-MCP-41\". This function attempts to\n * fix common issues.\n *\n * @param issueId - The issue ID to parse\n * @returns The parsed issue ID\n */\nexport function parseIssueId(issueId: string) {\n let finalIssueId = issueId;\n // remove trailing punctuation\n finalIssueId = finalIssueId.replace(/[^\\w-]/g, \"\");\n\n // Validate against common Sentry issue ID patterns\n // Either numeric IDs or PROJECT-ABC123 format\n const validFormatRegex = /^(\\d+|[A-Za-z][\\w-]*-[A-Za-z0-9]+)$/;\n \n if (!validFormatRegex.test(finalIssueId)) {\n throw new Error(\n `Invalid issue ID format: \"${finalIssueId}\". Expected either a numeric ID or a project code followed by an alphanumeric identifier (e.g., \"PROJECT-ABC123\").`\n );\n }\n\n return finalIssueId;\n}\n\n/**\n * Parses issue parameters from a variety of formats.\n *\n * @param params - Object containing issue URL, issue ID, and organization slug\n * @returns Object containing the parsed organization slug and issue ID\n * @throws Error if the input is invalid\n */\nexport function parseIssueParams({\n issueUrl,\n issueId,\n organizationSlug,\n}: {\n issueUrl?: string | null;\n issueId?: string | null;\n organizationSlug?: string | null;\n}): {\n organizationSlug: string;\n issueId: string;\n} {\n if (issueUrl) {\n const resolved = extractIssueId(issueUrl);\n if (!resolved) {\n throw new Error(\n \"Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'\",\n );\n }\n return {\n ...resolved,\n issueId: parseIssueId(resolved.issueId),\n };\n }\n\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n\n if (issueId) {\n return {\n organizationSlug,\n issueId: parseIssueId(issueId),\n };\n }\n\n throw new Error(\"Either issueId or issueUrl must be provided\");\n}\n"],"mappings":";;;;;;;;;;AAOA,SAAgB,eAAeA,KAG7B;AACA,MAAK,IAAI,WAAW,UAAU,KAAK,IAAI,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;CAIJ,MAAM,YAAY,IAAI,IAAI;CAE1B,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI,CAAC,OAAO,QAAQ;AAC/D,KAAI,UAAU,SAAS,MAAM,UAAU,SAAS,SAAS,CACvD,OAAM,IAAI,MACR;CAIJ,MAAM,UAAU,UAAU,UAAU,QAAQ,SAAS,GAAG;AACxD,MAAK,QACH,OAAM,IAAI,MAAM;CAIlB,IAAIC;AACJ,KAAI,UAAU,SAAS,gBAAgB,CACrC,oBAAmB,UAAU,UAAU,QAAQ,gBAAgB,GAAG;UACzD,UAAU,SAAS,KAAK,UAAU,OAAO,SAElD,oBAAmB,UAAU;MACxB;EAEL,MAAM,YAAY,UAAU,SAAS,MAAM,IAAI;AAC/C,MAAI,UAAU,SAAS,KAAK,UAAU,OAAO,MAC3C,oBAAmB,UAAU;CAEhC;AAED,MAAK,iBACH,OAAM,IAAI,MACR;AAIJ,QAAO;EAAE;EAAS;CAAkB;AACrC;;;;;;;;;AAUD,SAAgB,aAAaC,SAAiB;CAC5C,IAAI,eAAe;AAEnB,gBAAe,aAAa,QAAQ,WAAW,GAAG;CAIlD,MAAM,mBAAmB;AAEzB,MAAK,iBAAiB,KAAK,aAAa,CACtC,OAAM,IAAI,OACP,4BAA4B,aAAa;AAI9C,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-BtT13l48.cjs');
3
- const require_schema = require('./schema-_xqdSRLo.cjs');
3
+ const require_schema = require('./schema-BCkBPgjj.cjs');
4
4
  const zod = require_chunk.__toESM(require("zod"));
5
5
 
6
6
  //#region src/promptDefinitions.ts
@@ -11,6 +11,14 @@ const PROMPT_DEFINITIONS = [{
11
11
  organizationSlug: require_schema.ParamOrganizationSlug,
12
12
  filename: zod.z.string()
13
13
  }
14
+ }, {
15
+ name: "fix_issue_with_seer",
16
+ description: ["Use this prompt when you need to fix an issue with Seer.", "You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`."].join("\n"),
17
+ paramsSchema: {
18
+ organizationSlug: require_schema.ParamOrganizationSlug.optional(),
19
+ issueId: zod.z.string().optional(),
20
+ issueUrl: zod.z.string().optional()
21
+ }
14
22
  }];
15
23
 
16
24
  //#endregion
@@ -20,4 +28,4 @@ Object.defineProperty(exports, 'PROMPT_DEFINITIONS', {
20
28
  return PROMPT_DEFINITIONS;
21
29
  }
22
30
  });
23
- //# sourceMappingURL=promptDefinitions-OnJHLqrZ.cjs.map
31
+ //# sourceMappingURL=promptDefinitions-5jiZMBg5.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-5jiZMBg5.cjs","names":["ParamOrganizationSlug"],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ParamOrganizationSlug } from \"./schema\";\n\nexport const PROMPT_DEFINITIONS = [\n {\n name: \"find_errors_in_file\" as const,\n description: [\n \"Use this prompt when you need to find errors in Sentry for a given file.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n filename: z.string(),\n },\n },\n {\n name: \"fix_issue_with_seer\" as const,\n description: [\n \"Use this prompt when you need to fix an issue with Seer.\",\n \"You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n issueId: z.string().optional(),\n issueUrl: z.string().optional(),\n },\n },\n];\n"],"mappings":";;;;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkBA;EAClB,UAAU,MAAE,QAAQ;CACrB;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,qCAAsB,UAAU;EAClD,SAAS,MAAE,QAAQ,CAAC,UAAU;EAC9B,UAAU,MAAE,QAAQ,CAAC,UAAU;CAChC;AACF,CACF"}
@@ -0,0 +1,24 @@
1
+ import { ParamOrganizationSlug } from "./schema-CJrk_GUH.js";
2
+ import { z } from "zod";
3
+
4
+ //#region src/promptDefinitions.ts
5
+ const PROMPT_DEFINITIONS = [{
6
+ name: "find_errors_in_file",
7
+ description: ["Use this prompt when you need to find errors in Sentry for a given file."].join("\n"),
8
+ paramsSchema: {
9
+ organizationSlug: ParamOrganizationSlug,
10
+ filename: z.string()
11
+ }
12
+ }, {
13
+ name: "fix_issue_with_seer",
14
+ description: ["Use this prompt when you need to fix an issue with Seer.", "You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`."].join("\n"),
15
+ paramsSchema: {
16
+ organizationSlug: ParamOrganizationSlug.optional(),
17
+ issueId: z.string().optional(),
18
+ issueUrl: z.string().optional()
19
+ }
20
+ }];
21
+
22
+ //#endregion
23
+ export { PROMPT_DEFINITIONS };
24
+ //# sourceMappingURL=promptDefinitions-CPTadtuI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-CPTadtuI.js","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ParamOrganizationSlug } from \"./schema\";\n\nexport const PROMPT_DEFINITIONS = [\n {\n name: \"find_errors_in_file\" as const,\n description: [\n \"Use this prompt when you need to find errors in Sentry for a given file.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n filename: z.string(),\n },\n },\n {\n name: \"fix_issue_with_seer\" as const,\n description: [\n \"Use this prompt when you need to fix an issue with Seer.\",\n \"You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n issueId: z.string().optional(),\n issueUrl: z.string().optional(),\n },\n },\n];\n"],"mappings":";;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB;EAClB,UAAU,EAAE,QAAQ;CACrB;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,sBAAsB,UAAU;EAClD,SAAS,EAAE,QAAQ,CAAC,UAAU;EAC9B,UAAU,EAAE,QAAQ,CAAC,UAAU;CAChC;AACF,CACF"}
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/promptDefinitions.d.ts
4
+ declare const PROMPT_DEFINITIONS: ({
5
+ name: "find_errors_in_file";
6
+ description: string;
7
+ paramsSchema: {
8
+ organizationSlug: z.ZodString;
9
+ filename: z.ZodString;
10
+ issueId?: undefined;
11
+ issueUrl?: undefined;
12
+ };
13
+ } | {
14
+ name: "fix_issue_with_seer";
15
+ description: string;
16
+ paramsSchema: {
17
+ organizationSlug: z.ZodOptional<z.ZodString>;
18
+ issueId: z.ZodOptional<z.ZodString>;
19
+ issueUrl: z.ZodOptional<z.ZodString>;
20
+ filename?: undefined;
21
+ };
22
+ })[]; //#endregion
23
+
24
+ //# sourceMappingURL=promptDefinitions.d.ts.map
25
+ export { PROMPT_DEFINITIONS };
26
+ //# sourceMappingURL=promptDefinitions-Dcz3d9wL.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-Dcz3d9wL.d.cts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAGa;;EAAA,WAAA,EAAA,MAAA;EAuBZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/promptDefinitions.d.ts
4
+ declare const PROMPT_DEFINITIONS: ({
5
+ name: "find_errors_in_file";
6
+ description: string;
7
+ paramsSchema: {
8
+ organizationSlug: z.ZodString;
9
+ filename: z.ZodString;
10
+ issueId?: undefined;
11
+ issueUrl?: undefined;
12
+ };
13
+ } | {
14
+ name: "fix_issue_with_seer";
15
+ description: string;
16
+ paramsSchema: {
17
+ organizationSlug: z.ZodOptional<z.ZodString>;
18
+ issueId: z.ZodOptional<z.ZodString>;
19
+ issueUrl: z.ZodOptional<z.ZodString>;
20
+ filename?: undefined;
21
+ };
22
+ })[]; //#endregion
23
+
24
+ //# sourceMappingURL=promptDefinitions.d.ts.map
25
+ export { PROMPT_DEFINITIONS as PROMPT_DEFINITIONS$1 };
26
+ //# sourceMappingURL=promptDefinitions-DrGK-v8n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-DrGK-v8n.d.ts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAGa;;EAAA,WAAA,EAAA,MAAA;EAuBZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -1,4 +1,4 @@
1
- require('./schema-_xqdSRLo.cjs');
2
- const require_promptDefinitions = require('./promptDefinitions-OnJHLqrZ.cjs');
1
+ require('./schema-BCkBPgjj.cjs');
2
+ const require_promptDefinitions = require('./promptDefinitions-5jiZMBg5.cjs');
3
3
 
4
4
  exports.PROMPT_DEFINITIONS = require_promptDefinitions.PROMPT_DEFINITIONS
@@ -1,2 +1,2 @@
1
- import { PROMPT_DEFINITIONS } from "./promptDefinitions-CkGJr3c4.cjs";
1
+ import { PROMPT_DEFINITIONS } from "./promptDefinitions-Dcz3d9wL.cjs";
2
2
  export { PROMPT_DEFINITIONS };
@@ -1,2 +1,2 @@
1
- import { PROMPT_DEFINITIONS$1 as PROMPT_DEFINITIONS } from "./promptDefinitions-C85r2wAk.js";
1
+ import { PROMPT_DEFINITIONS$1 as PROMPT_DEFINITIONS } from "./promptDefinitions-DrGK-v8n.js";
2
2
  export { PROMPT_DEFINITIONS };
@@ -1,4 +1,4 @@
1
- import "./schema-pZrPEvtp.js";
2
- import { PROMPT_DEFINITIONS } from "./promptDefinitions-C9aGYWZ6.js";
1
+ import "./schema-CJrk_GUH.js";
2
+ import { PROMPT_DEFINITIONS } from "./promptDefinitions-CPTadtuI.js";
3
3
 
4
4
  export { PROMPT_DEFINITIONS };
@@ -0,0 +1,32 @@
1
+ //#region src/prompts.ts
2
+ const PROMPT_HANDLERS = {
3
+ find_errors_in_file: async (context, { organizationSlug, filename }) => [
4
+ `I want to find errors in Sentry, within the organization ${organizationSlug}, for the file ${filename}`,
5
+ "",
6
+ "You should use the tool `search_errors` to find errors in Sentry.",
7
+ "",
8
+ "If the filename is ambiguous, such as something like `index.ts`, and in most cases, you should pass it in with its direct parent.",
9
+ "For example: if the file is `app/utils/index.ts`, you should pass in `utils/index.ts` or `app/utils/index.ts` depending on if the file is actually part of the applications source path."
10
+ ].join("\n"),
11
+ fix_issue_with_seer: async (context, { organizationSlug, issueId, issueUrl }) => {
12
+ let issueMessage;
13
+ if (issueUrl) issueMessage = `The Sentry issue is ${issueUrl}`;
14
+ else if (organizationSlug && issueId) issueMessage = `The Sentry issue is ${issueId} in the organization ${organizationSlug}`;
15
+ else throw new Error("Either issueUrl or organizationSlug and issueId must be provided");
16
+ return [
17
+ `I want to use Seer to fix an issue in Sentry.`,
18
+ "",
19
+ issueMessage,
20
+ "",
21
+ "1. Call the tool `get_seer_issue_fix_status` to see if its already in progress.",
22
+ "2a. If it isn't, you can start it with the tool `begin_seer_issue_fix`.",
23
+ "2b. If it is, you can call the tool `get_seer_issue_fix_status` to check the status of the analysis.",
24
+ "3. Repeat step 2b until the task has completed.",
25
+ "4. Help me apply the fix to my application, if you are able to. Think carefully when doing this."
26
+ ].join("\n");
27
+ }
28
+ };
29
+
30
+ //#endregion
31
+ export { PROMPT_HANDLERS };
32
+ //# sourceMappingURL=prompts-DgWOD2rU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts-DgWOD2rU.js","names":["issueMessage: string"],"sources":["../src/prompts.ts"],"sourcesContent":["import type { PromptHandlers } from \"./types\";\n\nexport const PROMPT_HANDLERS = {\n find_errors_in_file: async (context, { organizationSlug, filename }) =>\n [\n `I want to find errors in Sentry, within the organization ${organizationSlug}, for the file ${filename}`,\n \"\",\n \"You should use the tool `search_errors` to find errors in Sentry.\",\n \"\",\n \"If the filename is ambiguous, such as something like `index.ts`, and in most cases, you should pass it in with its direct parent.\",\n \"For example: if the file is `app/utils/index.ts`, you should pass in `utils/index.ts` or `app/utils/index.ts` depending on if the file is actually part of the applications source path.\",\n ].join(\"\\n\"),\n fix_issue_with_seer: async (\n context,\n { organizationSlug, issueId, issueUrl },\n ) => {\n let issueMessage: string;\n if (issueUrl) {\n issueMessage = `The Sentry issue is ${issueUrl}`;\n } else if (organizationSlug && issueId) {\n issueMessage = `The Sentry issue is ${issueId} in the organization ${organizationSlug}`;\n } else {\n // TODO: this should be some kind of error message I imagine...\n throw new Error(\n \"Either issueUrl or organizationSlug and issueId must be provided\",\n );\n }\n return [\n `I want to use Seer to fix an issue in Sentry.`,\n \"\",\n issueMessage,\n \"\",\n \"1. Call the tool `get_seer_issue_fix_status` to see if its already in progress.\",\n \"2a. If it isn't, you can start it with the tool `begin_seer_issue_fix`.\",\n \"2b. If it is, you can call the tool `get_seer_issue_fix_status` to check the status of the analysis.\",\n \"3. Repeat step 2b until the task has completed.\",\n \"4. Help me apply the fix to my application, if you are able to. Think carefully when doing this.\",\n ].join(\"\\n\");\n },\n} satisfies PromptHandlers;\n"],"mappings":";AAEA,MAAa,kBAAkB;CAC7B,qBAAqB,OAAO,SAAS,EAAE,kBAAkB,UAAU,KACjE;GACG,2DAA2D,iBAAiB,iBAAiB,SAAS;EACvG;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACd,qBAAqB,OACnB,SACA,EAAE,kBAAkB,SAAS,UAAU,KACpC;EACH,IAAIA;AACJ,MAAI,SACF,iBAAgB,sBAAsB,SAAS;WACtC,oBAAoB,QAC7B,iBAAgB,sBAAsB,QAAQ,uBAAuB,iBAAiB;MAGtF,OAAM,IAAI,MACR;AAGJ,SAAO;IACJ;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;CACb;AACF"}