@sentry/mcp-server 0.7.0 → 0.8.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 (178) hide show
  1. package/dist/api-client/client.cjs +2 -2
  2. package/dist/api-client/client.d.cts +3 -3
  3. package/dist/api-client/client.d.ts +3 -3
  4. package/dist/api-client/client.js +2 -2
  5. package/dist/api-client/client.test.cjs +2 -2
  6. package/dist/api-client/client.test.js +2 -2
  7. package/dist/api-client/index.cjs +2 -2
  8. package/dist/api-client/index.d.cts +3 -3
  9. package/dist/api-client/index.d.ts +3 -3
  10. package/dist/api-client/index.js +2 -2
  11. package/dist/api-client/schema.cjs +1 -1
  12. package/dist/api-client/schema.d.cts +1 -1
  13. package/dist/api-client/schema.d.ts +1 -1
  14. package/dist/api-client/schema.js +1 -1
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/{client-7aaWrjcF.d.ts → client-CRlGzHly.d.ts} +7 -7
  18. package/dist/{client-7aaWrjcF.d.ts.map → client-CRlGzHly.d.ts.map} +1 -1
  19. package/dist/{client-D9mOWh6s.js → client-CXUzhM1I.js} +2 -3
  20. package/dist/client-CXUzhM1I.js.map +1 -0
  21. package/dist/{client-CLuQEpjg.cjs → client-Cp-Y1PHr.cjs} +2 -3
  22. package/dist/client-Cp-Y1PHr.cjs.map +1 -0
  23. package/dist/{client-D1qv6QT3.d.cts → client-TjRMJC41.d.cts} +3 -3
  24. package/dist/{client-D1qv6QT3.d.cts.map → client-TjRMJC41.d.cts.map} +1 -1
  25. package/dist/index.cjs +12 -11
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +12 -11
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal/formatting.d.cts +3 -3
  30. package/dist/internal/formatting.d.ts +3 -3
  31. package/dist/internal/issue-helpers.cjs +1 -1
  32. package/dist/internal/issue-helpers.d.cts.map +1 -1
  33. package/dist/internal/issue-helpers.d.ts.map +1 -1
  34. package/dist/internal/issue-helpers.js +1 -1
  35. package/dist/internal/issue-helpers.test.cjs +1 -1
  36. package/dist/internal/issue-helpers.test.js +1 -1
  37. package/dist/{issue-helpers-Cx6bFCUv.js → issue-helpers-CyoHu5j4.js} +3 -1
  38. package/dist/issue-helpers-CyoHu5j4.js.map +1 -0
  39. package/dist/{issue-helpers-CdWMhVWJ.cjs → issue-helpers-DbsECZFq.cjs} +3 -1
  40. package/dist/issue-helpers-DbsECZFq.cjs.map +1 -0
  41. package/dist/{promptDefinitions-OnJHLqrZ.cjs → promptDefinitions-5jiZMBg5.cjs} +10 -2
  42. package/dist/promptDefinitions-5jiZMBg5.cjs.map +1 -0
  43. package/dist/promptDefinitions-CPTadtuI.js +24 -0
  44. package/dist/promptDefinitions-CPTadtuI.js.map +1 -0
  45. package/dist/promptDefinitions-Dcz3d9wL.d.cts +26 -0
  46. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +1 -0
  47. package/dist/promptDefinitions-DrGK-v8n.d.ts +26 -0
  48. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +1 -0
  49. package/dist/promptDefinitions.cjs +2 -2
  50. package/dist/promptDefinitions.d.cts +1 -1
  51. package/dist/promptDefinitions.d.ts +1 -1
  52. package/dist/promptDefinitions.js +2 -2
  53. package/dist/prompts-DgWOD2rU.js +32 -0
  54. package/dist/prompts-DgWOD2rU.js.map +1 -0
  55. package/dist/prompts-nfFU-zY-.cjs +39 -0
  56. package/dist/prompts-nfFU-zY-.cjs.map +1 -0
  57. package/dist/prompts.cjs +1 -1
  58. package/dist/prompts.d.cts +21 -11
  59. package/dist/prompts.d.cts.map +1 -1
  60. package/dist/prompts.d.ts +21 -11
  61. package/dist/prompts.d.ts.map +1 -1
  62. package/dist/prompts.js +1 -1
  63. package/dist/{schema-_xqdSRLo.cjs → schema-BCkBPgjj.cjs} +6 -6
  64. package/dist/schema-BCkBPgjj.cjs.map +1 -0
  65. package/dist/{schema-BnXdl41H.cjs → schema-BuByiEkr.cjs} +5 -2
  66. package/dist/schema-BuByiEkr.cjs.map +1 -0
  67. package/dist/{schema-BnIwkBRb.d.ts → schema-BzLH7LPa.d.ts} +335 -335
  68. package/dist/schema-BzLH7LPa.d.ts.map +1 -0
  69. package/dist/schema-CJrk_GUH.js +15 -0
  70. package/dist/schema-CJrk_GUH.js.map +1 -0
  71. package/dist/{schema-aits0AJg.d.cts → schema-DpID9ztC.d.cts} +351 -351
  72. package/dist/schema-DpID9ztC.d.cts.map +1 -0
  73. package/dist/{schema-BzPfPMq7.js → schema-Drnljuwf.js} +5 -2
  74. package/dist/schema-Drnljuwf.js.map +1 -0
  75. package/dist/schema.cjs +1 -1
  76. package/dist/schema.d.cts.map +1 -1
  77. package/dist/schema.d.ts.map +1 -1
  78. package/dist/schema.js +1 -1
  79. package/dist/{server-0pTMWBNO.js → server-BCmPE_Kt.js} +40 -10
  80. package/dist/server-BCmPE_Kt.js.map +1 -0
  81. package/dist/{server-C9hKLN_c.cjs → server-fYrkDOmy.cjs} +40 -10
  82. package/dist/server-fYrkDOmy.cjs.map +1 -0
  83. package/dist/server.cjs +9 -9
  84. package/dist/server.d.cts +3 -3
  85. package/dist/server.d.cts.map +1 -1
  86. package/dist/server.d.ts +3 -3
  87. package/dist/server.d.ts.map +1 -1
  88. package/dist/server.js +9 -9
  89. package/dist/{stdio-BsM7bvfc.cjs → stdio-BxJq3OU7.cjs} +2 -2
  90. package/dist/{stdio-BsM7bvfc.cjs.map → stdio-BxJq3OU7.cjs.map} +1 -1
  91. package/dist/{stdio-8gK912aj.js → stdio-QBN7-Am6.js} +2 -2
  92. package/dist/{stdio-8gK912aj.js.map → stdio-QBN7-Am6.js.map} +1 -1
  93. package/dist/test-setup.cjs +2 -2
  94. package/dist/test-setup.cjs.map +1 -1
  95. package/dist/test-setup.js +2 -2
  96. package/dist/test-setup.js.map +1 -1
  97. package/dist/{toolDefinitions-CRtHauHJ.cjs → toolDefinitions-1SnflztE.cjs} +12 -12
  98. package/dist/toolDefinitions-1SnflztE.cjs.map +1 -0
  99. package/dist/{toolDefinitions-CfNXEIaX.js → toolDefinitions-D13S3vQE.js} +12 -12
  100. package/dist/toolDefinitions-D13S3vQE.js.map +1 -0
  101. package/dist/{toolDefinitions-abNbVXb5.d.ts → toolDefinitions-DkO9-iEg.d.ts} +3 -3
  102. package/dist/toolDefinitions-DkO9-iEg.d.ts.map +1 -0
  103. package/dist/{toolDefinitions-DPePAe0y.d.cts → toolDefinitions-Z-JGBEIN.d.cts} +3 -3
  104. package/dist/toolDefinitions-Z-JGBEIN.d.cts.map +1 -0
  105. package/dist/toolDefinitions.cjs +2 -2
  106. package/dist/toolDefinitions.d.cts +1 -1
  107. package/dist/toolDefinitions.d.ts +1 -1
  108. package/dist/toolDefinitions.js +2 -2
  109. package/dist/toolDefinitions.test.cjs +2 -2
  110. package/dist/toolDefinitions.test.js +2 -2
  111. package/dist/{tools-2PgtFQ7q.cjs → tools-BgrGdS8I.cjs} +11 -11
  112. package/dist/tools-BgrGdS8I.cjs.map +1 -0
  113. package/dist/{tools-D5yXarBR.js → tools-CnVttgaS.js} +11 -11
  114. package/dist/tools-CnVttgaS.js.map +1 -0
  115. package/dist/tools.cjs +4 -4
  116. package/dist/tools.d.cts +5 -5
  117. package/dist/tools.d.cts.map +1 -1
  118. package/dist/tools.d.ts +8 -8
  119. package/dist/tools.d.ts.map +1 -1
  120. package/dist/tools.js +4 -4
  121. package/dist/tools.test.cjs +12 -12
  122. package/dist/tools.test.cjs.map +1 -1
  123. package/dist/tools.test.js +12 -12
  124. package/dist/tools.test.js.map +1 -1
  125. package/dist/transports/stdio.cjs +10 -10
  126. package/dist/transports/stdio.d.cts +3 -3
  127. package/dist/transports/stdio.d.ts +3 -3
  128. package/dist/transports/stdio.js +10 -10
  129. package/dist/{types-DFKY4nvR.d.cts → types-BO0mZ8vj.d.cts} +7 -6
  130. package/dist/types-BO0mZ8vj.d.cts.map +1 -0
  131. package/dist/{types-Dg6ARePW.d.cts → types-CczA6AH1.d.cts} +2 -2
  132. package/dist/{types-Dg6ARePW.d.cts.map → types-CczA6AH1.d.cts.map} +1 -1
  133. package/dist/{types-X3ot7x0d.d.ts → types-Cis1PiVW.d.ts} +7 -6
  134. package/dist/types-Cis1PiVW.d.ts.map +1 -0
  135. package/dist/{types-RxedZjnY.d.ts → types-X5Epdrlo.d.ts} +2 -2
  136. package/dist/{types-RxedZjnY.d.ts.map → types-X5Epdrlo.d.ts.map} +1 -1
  137. package/dist/types.d.cts +4 -4
  138. package/dist/types.d.ts +4 -4
  139. package/dist/version-DtWIv-x9.js +6 -0
  140. package/dist/{version-psBzsZ8-.js.map → version-DtWIv-x9.js.map} +1 -1
  141. package/dist/{version-B3dZ0aPQ.cjs → version-sY-gY_s6.cjs} +2 -2
  142. package/dist/{version-B3dZ0aPQ.cjs.map → version-sY-gY_s6.cjs.map} +1 -1
  143. package/dist/version.cjs +1 -1
  144. package/dist/version.js +1 -1
  145. package/package.json +5 -5
  146. package/dist/client-CLuQEpjg.cjs.map +0 -1
  147. package/dist/client-D9mOWh6s.js.map +0 -1
  148. package/dist/issue-helpers-CdWMhVWJ.cjs.map +0 -1
  149. package/dist/issue-helpers-Cx6bFCUv.js.map +0 -1
  150. package/dist/promptDefinitions-C85r2wAk.d.ts +0 -15
  151. package/dist/promptDefinitions-C85r2wAk.d.ts.map +0 -1
  152. package/dist/promptDefinitions-C9aGYWZ6.js +0 -16
  153. package/dist/promptDefinitions-C9aGYWZ6.js.map +0 -1
  154. package/dist/promptDefinitions-CkGJr3c4.d.cts +0 -15
  155. package/dist/promptDefinitions-CkGJr3c4.d.cts.map +0 -1
  156. package/dist/promptDefinitions-OnJHLqrZ.cjs.map +0 -1
  157. package/dist/prompts--QCiXmR2.cjs +0 -26
  158. package/dist/prompts--QCiXmR2.cjs.map +0 -1
  159. package/dist/prompts-Tz-qECa0.js +0 -19
  160. package/dist/prompts-Tz-qECa0.js.map +0 -1
  161. package/dist/schema-BnIwkBRb.d.ts.map +0 -1
  162. package/dist/schema-BnXdl41H.cjs.map +0 -1
  163. package/dist/schema-BzPfPMq7.js.map +0 -1
  164. package/dist/schema-_xqdSRLo.cjs.map +0 -1
  165. package/dist/schema-aits0AJg.d.cts.map +0 -1
  166. package/dist/schema-pZrPEvtp.js +0 -15
  167. package/dist/schema-pZrPEvtp.js.map +0 -1
  168. package/dist/server-0pTMWBNO.js.map +0 -1
  169. package/dist/server-C9hKLN_c.cjs.map +0 -1
  170. package/dist/toolDefinitions-CRtHauHJ.cjs.map +0 -1
  171. package/dist/toolDefinitions-CfNXEIaX.js.map +0 -1
  172. package/dist/toolDefinitions-DPePAe0y.d.cts.map +0 -1
  173. package/dist/toolDefinitions-abNbVXb5.d.ts.map +0 -1
  174. package/dist/tools-2PgtFQ7q.cjs.map +0 -1
  175. package/dist/tools-D5yXarBR.js.map +0 -1
  176. package/dist/types-DFKY4nvR.d.cts.map +0 -1
  177. package/dist/types-X3ot7x0d.d.ts.map +0 -1
  178. package/dist/version-psBzsZ8-.js +0 -6
@@ -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,5 +1,5 @@
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
4
  const require_vi_ClIskdbk = require('../vi.ClIskdbk-TqmAThAO.cjs');
5
5
 
@@ -1,4 +1,4 @@
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
3
  import { globalExpect } from "../vi.ClIskdbk-BbUmO3mx.js";
4
4
 
@@ -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,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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"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ //#region src/prompts.ts
4
+ const PROMPT_HANDLERS = {
5
+ find_errors_in_file: async (context, { organizationSlug, filename }) => [
6
+ `I want to find errors in Sentry, within the organization ${organizationSlug}, for the file ${filename}`,
7
+ "",
8
+ "You should use the tool `search_errors` to find errors in Sentry.",
9
+ "",
10
+ "If the filename is ambiguous, such as something like `index.ts`, and in most cases, you should pass it in with its direct parent.",
11
+ "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."
12
+ ].join("\n"),
13
+ fix_issue_with_seer: async (context, { organizationSlug, issueId, issueUrl }) => {
14
+ let issueMessage;
15
+ if (issueUrl) issueMessage = `The Sentry issue is ${issueUrl}`;
16
+ else if (organizationSlug && issueId) issueMessage = `The Sentry issue is ${issueId} in the organization ${organizationSlug}`;
17
+ else throw new Error("Either issueUrl or organizationSlug and issueId must be provided");
18
+ return [
19
+ `I want to use Seer to fix an issue in Sentry.`,
20
+ "",
21
+ issueMessage,
22
+ "",
23
+ "1. Call the tool `get_seer_issue_fix_status` to see if its already in progress.",
24
+ "2a. If it isn't, you can start it with the tool `begin_seer_issue_fix`.",
25
+ "2b. If it is, you can call the tool `get_seer_issue_fix_status` to check the status of the analysis.",
26
+ "3. Repeat step 2b until the task has completed.",
27
+ "4. Help me apply the fix to my application, if you are able to. Think carefully when doing this."
28
+ ].join("\n");
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ Object.defineProperty(exports, 'PROMPT_HANDLERS', {
34
+ enumerable: true,
35
+ get: function () {
36
+ return PROMPT_HANDLERS;
37
+ }
38
+ });
39
+ //# sourceMappingURL=prompts-nfFU-zY-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts-nfFU-zY-.cjs","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"}
package/dist/prompts.cjs CHANGED
@@ -1,3 +1,3 @@
1
- const require_prompts = require('./prompts--QCiXmR2.cjs');
1
+ const require_prompts = require('./prompts-nfFU-zY-.cjs');
2
2
 
3
3
  exports.PROMPT_HANDLERS = require_prompts.PROMPT_HANDLERS
@@ -1,22 +1,32 @@
1
+ import "./promptDefinitions-Dcz3d9wL.cjs";
2
+ import "./toolDefinitions-Z-JGBEIN.cjs";
3
+ import { ServerContext } from "./types-BO0mZ8vj.cjs";
4
+
1
5
  //#region src/prompts.d.ts
2
6
  declare const PROMPT_HANDLERS: {
3
- find_errors_in_file: ({
7
+ find_errors_in_file: (context: ServerContext, {
4
8
  organizationSlug,
5
9
  filename
6
10
  }: {
7
11
  organizationSlug: string;
8
12
  filename: string;
9
- }) => Promise<{
10
- messages: {
11
- role: "user";
12
- content: {
13
- type: "text";
14
- text: string;
15
- };
16
- }[];
17
- }>;
18
- }; //#endregion
13
+ issueId?: unknown;
14
+ issueUrl?: unknown;
15
+ }) => Promise<string>;
16
+ fix_issue_with_seer: (context: ServerContext, {
17
+ organizationSlug,
18
+ issueId,
19
+ issueUrl
20
+ }: {
21
+ organizationSlug: string | undefined;
22
+ issueId: string | undefined;
23
+ issueUrl: string | undefined;
24
+ filename?: unknown;
25
+ }) => Promise<string>;
26
+ };
19
27
 
28
+ //#endregion
20
29
  //# sourceMappingURL=prompts.d.ts.map
30
+
21
31
  export { PROMPT_HANDLERS };
22
32
  //# sourceMappingURL=prompts.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.cts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":null,"mappings":";cAEa;EAAA,mBAmBa,EAAA,CAAA;IAAA,gBAAA;IAAA;GAAA,EAAA;IAAA,gBAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA"}
1
+ {"version":3,"file":"prompts.d.cts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":null,"mappings":";;;;;cAEa;iCAqCa;;;EAAA;;;;IArCb,QAAA,CAAA,EAAA,OAqCa;EAAA,CAAA,EAAA,UAAA,CAAA,MAAA,CAAA;EAAA,mBAAA,EAAA,CAAA,OAAA,eAAA,EAAA;IAAA,gBAAA;IAAA,OAAA;IAAA;GAAA,EAAA"}
package/dist/prompts.d.ts CHANGED
@@ -1,22 +1,32 @@
1
+ import "./promptDefinitions-DrGK-v8n.js";
2
+ import "./toolDefinitions-DkO9-iEg.js";
3
+ import { ServerContext } from "./types-Cis1PiVW.js";
4
+
1
5
  //#region src/prompts.d.ts
2
6
  declare const PROMPT_HANDLERS: {
3
- find_errors_in_file: ({
7
+ find_errors_in_file: (context: ServerContext, {
4
8
  organizationSlug,
5
9
  filename
6
10
  }: {
7
11
  organizationSlug: string;
8
12
  filename: string;
9
- }) => Promise<{
10
- messages: {
11
- role: "user";
12
- content: {
13
- type: "text";
14
- text: string;
15
- };
16
- }[];
17
- }>;
18
- }; //#endregion
13
+ issueId?: unknown;
14
+ issueUrl?: unknown;
15
+ }) => Promise<string>;
16
+ fix_issue_with_seer: (context: ServerContext, {
17
+ organizationSlug,
18
+ issueId,
19
+ issueUrl
20
+ }: {
21
+ organizationSlug: string | undefined;
22
+ issueId: string | undefined;
23
+ issueUrl: string | undefined;
24
+ filename?: unknown;
25
+ }) => Promise<string>;
26
+ };
19
27
 
28
+ //#endregion
20
29
  //# sourceMappingURL=prompts.d.ts.map
30
+
21
31
  export { PROMPT_HANDLERS };
22
32
  //# sourceMappingURL=prompts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":null,"mappings":";cAEa;EAAA,mBAmBa,EAAA,CAAA;IAAA,gBAAA;IAAA;GAAA,EAAA;IAAA,gBAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA"}
1
+ {"version":3,"file":"prompts.d.ts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":null,"mappings":";;;;;cAEa;iCAqCa;;;EAAA;;;;IArCb,QAAA,CAAA,EAAA,OAqCa;EAAA,CAAA,EAAA,UAAA,CAAA,MAAA,CAAA;EAAA,mBAAA,EAAA,CAAA,OAAA,eAAA,EAAA;IAAA,gBAAA;IAAA,OAAA;IAAA;GAAA,EAAA"}
package/dist/prompts.js CHANGED
@@ -1,3 +1,3 @@
1
- import { PROMPT_HANDLERS } from "./prompts-Tz-qECa0.js";
1
+ import { PROMPT_HANDLERS } from "./prompts-DgWOD2rU.js";
2
2
 
3
3
  export { PROMPT_HANDLERS };
@@ -3,11 +3,11 @@ const require_chunk = require('./chunk-BtT13l48.cjs');
3
3
  const zod = require_chunk.__toESM(require("zod"));
4
4
 
5
5
  //#region src/schema.ts
6
- const ParamOrganizationSlug = zod.z.string().describe("The organization's slug. This will default to the first org you have access to.");
7
- const ParamTeamSlug = zod.z.string().describe("The team's slug. This will default to the first team you have access to.");
8
- const ParamProjectSlug = zod.z.string().describe("The project's slug. This will default to all projects you have access to. It is encouraged to specify this when possible.");
9
- const ParamIssueShortId = zod.z.string().describe("The Issue ID. e.g. `PROJECT-1Z43`");
10
- const ParamPlatform = zod.z.string().describe("The platform for the project (e.g., python, javascript, react, etc.)");
6
+ const ParamOrganizationSlug = zod.z.string().toLowerCase().describe("The organization's slug. This will default to the first org you have access to.");
7
+ const ParamTeamSlug = zod.z.string().toLowerCase().describe("The team's slug. This will default to the first team you have access to.");
8
+ const ParamProjectSlug = zod.z.string().toLowerCase().describe("The project's slug. This will default to all projects you have access to. It is encouraged to specify this when possible.");
9
+ const ParamIssueShortId = zod.z.string().toUpperCase().describe("The Issue ID. e.g. `PROJECT-1Z43`");
10
+ const ParamPlatform = zod.z.string().toLowerCase().describe("The platform for the project (e.g., python, javascript, react, etc.)");
11
11
  const ParamTransaction = zod.z.string().describe("The transaction name (also known as the endpoint, or route name).");
12
12
  const ParamQuery = zod.z.string().describe(`The search query to apply. Use the \`help(subject="query_syntax")\` tool to get more information about the query syntax rather than guessing.`);
13
13
  const ParamRegionUrl = zod.z.string().describe("The region URL for the organization you're querying, if known.");
@@ -61,4 +61,4 @@ Object.defineProperty(exports, 'ParamTransaction', {
61
61
  return ParamTransaction;
62
62
  }
63
63
  });
64
- //# sourceMappingURL=schema-_xqdSRLo.cjs.map
64
+ //# sourceMappingURL=schema-BCkBPgjj.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-BCkBPgjj.cjs","names":[],"sources":["../src/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ParamOrganizationSlug = z\n .string()\n .toLowerCase()\n .describe(\n \"The organization's slug. This will default to the first org you have access to.\",\n );\n\nexport const ParamTeamSlug = z\n .string()\n .toLowerCase()\n .describe(\n \"The team's slug. This will default to the first team you have access to.\",\n );\n\nexport const ParamProjectSlug = z\n .string()\n .toLowerCase()\n .describe(\n \"The project's slug. This will default to all projects you have access to. It is encouraged to specify this when possible.\",\n );\n\nexport const ParamIssueShortId = z\n .string()\n .toUpperCase()\n .describe(\"The Issue ID. e.g. `PROJECT-1Z43`\");\n\nexport const ParamPlatform = z\n .string()\n .toLowerCase()\n .describe(\n \"The platform for the project (e.g., python, javascript, react, etc.)\",\n );\n\nexport const ParamTransaction = z\n .string()\n .describe(\n \"The transaction name (also known as the endpoint, or route name).\",\n );\n\nexport const ParamQuery = z\n .string()\n .describe(\n `The search query to apply. Use the \\`help(subject=\"query_syntax\")\\` tool to get more information about the query syntax rather than guessing.`,\n );\n\nexport const ParamRegionUrl = z\n .string()\n .describe(\"The region URL for the organization you're querying, if known.\");\n"],"mappings":";;;;;AAEA,MAAa,wBAAwB,MAClC,QAAQ,CACR,aAAa,CACb,SACC,kFACD;AAEH,MAAa,gBAAgB,MAC1B,QAAQ,CACR,aAAa,CACb,SACC,2EACD;AAEH,MAAa,mBAAmB,MAC7B,QAAQ,CACR,aAAa,CACb,SACC,4HACD;AAEH,MAAa,oBAAoB,MAC9B,QAAQ,CACR,aAAa,CACb,SAAS,oCAAoC;AAEhD,MAAa,gBAAgB,MAC1B,QAAQ,CACR,aAAa,CACb,SACC,uEACD;AAEH,MAAa,mBAAmB,MAC7B,QAAQ,CACR,SACC,oEACD;AAEH,MAAa,aAAa,MACvB,QAAQ,CACR,UACE,+IACF;AAEH,MAAa,iBAAiB,MAC3B,QAAQ,CACR,SAAS,iEAAiE"}
@@ -185,7 +185,10 @@ const AutofixStatusSchema = zod.z.enum([
185
185
  "IN_PROGRESS",
186
186
  "NEED_MORE_INFORMATION",
187
187
  "COMPLETED",
188
- "FAILED"
188
+ "FAILED",
189
+ "ERROR",
190
+ "CANCELLED",
191
+ "WAITING_FOR_USER_RESPONSE"
189
192
  ]);
190
193
  const AutofixRunStepBaseSchema = zod.z.object({
191
194
  type: zod.z.string(),
@@ -444,4 +447,4 @@ Object.defineProperty(exports, 'UnknownEventSchema', {
444
447
  return UnknownEventSchema;
445
448
  }
446
449
  });
447
- //# sourceMappingURL=schema-BnXdl41H.cjs.map
450
+ //# sourceMappingURL=schema-BuByiEkr.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-BuByiEkr.cjs","names":[],"sources":["../src/api-client/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ApiErrorSchema = z\n .object({\n detail: z.string(),\n })\n .passthrough();\n\nexport const OrganizationSchema = z.object({\n id: z.union([z.string(), z.number()]),\n slug: z.string(),\n name: z.string(),\n links: z.object({\n regionUrl: z.string().url(),\n organizationUrl: z.string().url(),\n }),\n});\n\nexport const OrganizationListSchema = z.array(OrganizationSchema);\n\nexport const TeamSchema = z.object({\n id: z.union([z.string(), z.number()]),\n slug: z.string(),\n name: z.string(),\n});\n\nexport const TeamListSchema = z.array(TeamSchema);\n\nexport const ProjectSchema = z.object({\n id: z.union([z.string(), z.number()]),\n slug: z.string(),\n name: z.string(),\n});\n\nexport const ProjectListSchema = z.array(ProjectSchema);\n\nexport const ClientKeySchema = z.object({\n id: z.union([z.string(), z.number()]),\n name: z.string(),\n dsn: z.object({\n public: z.string(),\n }),\n isActive: z.boolean(),\n dateCreated: z.string().datetime(),\n});\n\nexport const ClientKeyListSchema = z.array(ClientKeySchema);\n\nexport const ReleaseSchema = z.object({\n id: z.union([z.string(), z.number()]),\n version: z.string(),\n shortVersion: z.string(),\n dateCreated: z.string().datetime(),\n dateReleased: z.string().datetime().nullable(),\n firstEvent: z.string().datetime().nullable(),\n lastEvent: z.string().datetime().nullable(),\n newGroups: z.number(),\n lastCommit: z\n .object({\n id: z.union([z.string(), z.number()]),\n message: z.string(),\n dateCreated: z.string().datetime(),\n author: z.object({\n name: z.string(),\n email: z.string(),\n }),\n })\n .nullable(),\n lastDeploy: z\n .object({\n id: z.union([z.string(), z.number()]),\n environment: z.string(),\n dateStarted: z.string().datetime().nullable(),\n dateFinished: z.string().datetime().nullable(),\n })\n .nullable(),\n projects: z.array(ProjectSchema),\n});\n\nexport const ReleaseListSchema = z.array(ReleaseSchema);\n\nexport const TagSchema = z.object({\n key: z.string(),\n name: z.string(),\n totalValues: z.number(),\n});\n\nexport const TagListSchema = z.array(TagSchema);\n\nexport const IssueSchema = z.object({\n id: z.union([z.string(), z.number()]),\n shortId: z.string(),\n title: z.string(),\n firstSeen: z.string().datetime(),\n lastSeen: z.string().datetime(),\n count: z.union([z.string(), z.number()]),\n userCount: z.union([z.string(), z.number()]),\n permalink: z.string().url(),\n project: ProjectSchema,\n platform: z.string(),\n status: z.string(),\n culprit: z.string(),\n type: z.union([z.literal(\"error\"), z.literal(\"transaction\"), z.unknown()]),\n});\n\nexport const IssueListSchema = z.array(IssueSchema);\n\nexport const FrameInterface = z\n .object({\n filename: z.string().nullable(),\n function: z.string().nullable(),\n lineNo: z.number().nullable(),\n colNo: z.number().nullable(),\n absPath: z.string().nullable(),\n module: z.string().nullable(),\n // lineno, source code\n context: z.array(z.tuple([z.number(), z.string()])),\n })\n .partial();\n\n// XXX: Sentry's schema generally speaking is \"assume all user input is missing\"\n// so we need to handle effectively every field being optional or nullable.\nexport const ExceptionInterface = z\n .object({\n mechanism: z\n .object({\n type: z.string().nullable(),\n handled: z.boolean().nullable(),\n })\n .partial(),\n type: z.string().nullable(),\n value: z.string().nullable(),\n stacktrace: z.object({\n frames: z.array(FrameInterface),\n }),\n })\n .partial();\n\nexport const ErrorEntrySchema = z.object({\n // XXX: Sentry can return either of these. Not sure why we never normalized it.\n values: z.array(ExceptionInterface.optional()),\n value: ExceptionInterface.nullable().optional(),\n});\n\nconst BaseEventSchema = z.object({\n id: z.string(),\n title: z.string(),\n message: z.string().nullable(),\n platform: z.string().nullable(),\n type: z.unknown(),\n entries: z.array(\n z.union([\n // TODO: there are other types\n z.object({\n type: z.literal(\"exception\"),\n data: ErrorEntrySchema,\n }),\n z.object({\n type: z.literal(\"spans\"),\n data: z.unknown(),\n }),\n z.object({\n type: z.literal(\"request\"),\n data: z.unknown(),\n }),\n z.object({\n type: z.literal(\"breadcrumbs\"),\n data: z.unknown(),\n }),\n z.object({\n type: z.string(),\n data: z.unknown(),\n }),\n ]),\n ),\n});\n\nexport const ErrorEventSchema = BaseEventSchema.omit({\n type: true,\n}).extend({\n type: z.literal(\"error\"),\n culprit: z.string().nullable(),\n dateCreated: z.string().datetime(),\n});\n\nexport const TransactionEventSchema = BaseEventSchema.omit({\n type: true,\n}).extend({\n type: z.literal(\"transaction\"),\n occurrence: z.object({\n issueTitle: z.string(),\n culprit: z.string().nullable(),\n }),\n});\n\nexport const UnknownEventSchema = BaseEventSchema.omit({\n type: true,\n}).extend({\n type: z.unknown(),\n});\n\n// XXX: This API response is kind of a disaster. We are not propagating the appropriate\n// columns and it makes this really hard to work with. Errors and Transaction-based issues\n// are completely different, for example.\nexport const EventSchema = z.union([\n ErrorEventSchema,\n TransactionEventSchema,\n UnknownEventSchema,\n]);\n\nexport const EventsResponseSchema = z.object({\n data: z.array(z.unknown()),\n meta: z\n .object({\n fields: z.record(z.string(), z.string()),\n })\n .passthrough(),\n});\n\n// https://us.sentry.io/api/0/organizations/sentry/events/?dataset=errors&field=issue&field=title&field=project&field=timestamp&field=trace&per_page=5&query=event.type%3Aerror&referrer=sentry-mcp&sort=-timestamp&statsPeriod=1w\nexport const ErrorsSearchResponseSchema = EventsResponseSchema.extend({\n data: z.array(\n z.object({\n issue: z.string(),\n \"issue.id\": z.union([z.string(), z.number()]),\n project: z.string(),\n title: z.string(),\n \"count()\": z.number(),\n \"last_seen()\": z.string(),\n }),\n ),\n});\n\nexport const SpansSearchResponseSchema = EventsResponseSchema.extend({\n data: z.array(\n z.object({\n id: z.string(),\n trace: z.string(),\n \"span.op\": z.string(),\n \"span.description\": z.string(),\n \"span.duration\": z.number(),\n transaction: z.string(),\n project: z.string(),\n timestamp: z.string(),\n }),\n ),\n});\n\nexport const AutofixRunSchema = z\n .object({\n run_id: z.union([z.string(), z.number()]),\n })\n .passthrough();\n\nconst AutofixStatusSchema = z.enum([\n \"PENDING\",\n \"PROCESSING\",\n \"IN_PROGRESS\",\n \"NEED_MORE_INFORMATION\",\n \"COMPLETED\",\n \"FAILED\",\n \"ERROR\",\n \"CANCELLED\",\n \"WAITING_FOR_USER_RESPONSE\",\n]);\n\nconst AutofixRunStepBaseSchema = z.object({\n type: z.string(),\n key: z.string(),\n index: z.number(),\n status: AutofixStatusSchema,\n title: z.string(),\n output_stream: z.string().nullable(),\n progress: z.array(\n z.object({\n data: z.unknown().nullable(),\n message: z.string(),\n timestamp: z.string(),\n type: z.enum([\"INFO\", \"WARNING\", \"ERROR\"]),\n }),\n ),\n});\n\nexport const AutofixRunStepDefaultSchema = AutofixRunStepBaseSchema.extend({\n type: z.literal(\"default\"),\n insights: z\n .array(\n z.object({\n change_diff: z.unknown().nullable(),\n generated_at_memory_index: z.number(),\n insight: z.string(),\n justification: z.string(),\n type: z.literal(\"insight\"),\n }),\n )\n .nullable(),\n}).passthrough();\n\nexport const AutofixRunStepRootCauseAnalysisSchema =\n AutofixRunStepBaseSchema.extend({\n type: z.literal(\"root_cause_analysis\"),\n causes: z.array(\n z.object({\n description: z.string(),\n id: z.number(),\n root_cause_reproduction: z.array(\n z.object({\n code_snippet_and_analysis: z.string(),\n is_most_important_event: z.boolean(),\n relevant_code_file: z\n .object({\n file_path: z.string(),\n repo_name: z.string(),\n })\n .nullable(),\n timeline_item_type: z.string(),\n title: z.string(),\n }),\n ),\n }),\n ),\n }).passthrough();\n\nexport const AutofixRunStepSolutionSchema = AutofixRunStepBaseSchema.extend({\n type: z.literal(\"solution\"),\n solution: z.array(\n z.object({\n code_snippet_and_analysis: z.string().nullable(),\n is_active: z.boolean(),\n is_most_important_event: z.boolean(),\n relevant_code_file: z.null(),\n timeline_item_type: z.union([\n z.literal(\"internal_code\"),\n z.literal(\"repro_test\"),\n ]),\n title: z.string(),\n }),\n ),\n}).passthrough();\n\nexport const AutofixRunStepSchema = z.union([\n AutofixRunStepDefaultSchema,\n AutofixRunStepRootCauseAnalysisSchema,\n AutofixRunStepSolutionSchema,\n AutofixRunStepBaseSchema.passthrough(),\n]);\n\nexport const AutofixRunStateSchema = z.object({\n autofix: z\n .object({\n run_id: z.number(),\n request: z.unknown(),\n updated_at: z.string(),\n status: AutofixStatusSchema,\n steps: z.array(AutofixRunStepSchema),\n })\n .passthrough()\n .nullable(),\n});\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,MAC3B,OAAO,EACN,QAAQ,MAAE,QAAQ,CACnB,EAAC,CACD,a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