@sentry/mcp-server 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +1 -1
  2. package/dist/api-client/client.cjs +2 -2
  3. package/dist/api-client/client.d.cts +3 -3
  4. package/dist/api-client/client.d.ts +3 -3
  5. package/dist/api-client/client.js +2 -2
  6. package/dist/api-client/client.test.cjs +2 -2
  7. package/dist/api-client/client.test.js +2 -2
  8. package/dist/api-client/index.cjs +2 -2
  9. package/dist/api-client/index.d.cts +3 -3
  10. package/dist/api-client/index.d.ts +3 -3
  11. package/dist/api-client/index.js +2 -2
  12. package/dist/api-client/schema.cjs +1 -1
  13. package/dist/api-client/schema.d.cts +1 -1
  14. package/dist/api-client/schema.d.ts +1 -1
  15. package/dist/api-client/schema.js +1 -1
  16. package/dist/api-client/types.d.cts +2 -2
  17. package/dist/api-client/types.d.ts +2 -2
  18. package/dist/{client-DQ837FXP.cjs → client-B4Ux5Zdg.cjs} +7 -4
  19. package/dist/client-B4Ux5Zdg.cjs.map +1 -0
  20. package/dist/{client-CTm4cvI7.js → client-Bz_PNC8o.js} +7 -4
  21. package/dist/client-Bz_PNC8o.js.map +1 -0
  22. package/dist/{client-1dRfG57H.d.ts → client-J6VSRmQS.d.ts} +5 -3
  23. package/dist/client-J6VSRmQS.d.ts.map +1 -0
  24. package/dist/{client-BsYOQsEI.d.cts → client-tE6FD__9.d.cts} +5 -3
  25. package/dist/client-tE6FD__9.d.cts.map +1 -0
  26. package/dist/{formatting-C-0bHtbh.cjs → formatting-B0SJqiqX.cjs} +11 -3
  27. package/dist/formatting-B0SJqiqX.cjs.map +1 -0
  28. package/dist/{formatting-BQRAzO5v.js → formatting-ggD6YRYR.js} +11 -3
  29. package/dist/formatting-ggD6YRYR.js.map +1 -0
  30. package/dist/index.cjs +11 -11
  31. package/dist/index.js +11 -11
  32. package/dist/internal/formatting.cjs +1 -1
  33. package/dist/internal/formatting.d.cts +3 -3
  34. package/dist/internal/formatting.d.cts.map +1 -1
  35. package/dist/internal/formatting.d.ts +3 -3
  36. package/dist/internal/formatting.d.ts.map +1 -1
  37. package/dist/internal/formatting.js +1 -1
  38. package/dist/internal/issue-helpers.test.cjs +2 -2
  39. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  40. package/dist/internal/issue-helpers.test.js +2 -2
  41. package/dist/internal/issue-helpers.test.js.map +1 -1
  42. package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-BR7PxWcH.d.cts} +3 -3
  43. package/dist/promptDefinitions-BR7PxWcH.d.cts.map +1 -0
  44. package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-DBNOeSg-.js} +5 -5
  45. package/dist/promptDefinitions-DBNOeSg-.js.map +1 -0
  46. package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-pHRpPOpJ.cjs} +5 -5
  47. package/dist/promptDefinitions-pHRpPOpJ.cjs.map +1 -0
  48. package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-tpKruPny.d.ts} +3 -3
  49. package/dist/promptDefinitions-tpKruPny.d.ts.map +1 -0
  50. package/dist/promptDefinitions.cjs +2 -2
  51. package/dist/promptDefinitions.d.cts +1 -1
  52. package/dist/promptDefinitions.d.ts +1 -1
  53. package/dist/promptDefinitions.js +2 -2
  54. package/dist/prompts.d.cts +5 -5
  55. package/dist/prompts.d.ts +5 -5
  56. package/dist/{schema-KEMqYaQn.cjs → schema-3VLYcf4D.cjs} +9 -2
  57. package/dist/schema-3VLYcf4D.cjs.map +1 -0
  58. package/dist/{schema-DwPOkoSP.d.ts → schema-B7A-FyIi.d.ts} +341 -263
  59. package/dist/{schema-DwPOkoSP.d.ts.map → schema-B7A-FyIi.d.ts.map} +1 -1
  60. package/dist/schema-BKa41TQ4.js +17 -0
  61. package/dist/schema-BKa41TQ4.js.map +1 -0
  62. package/dist/{schema-nyYqVk4Y.js → schema-Dltbjui7.js} +9 -2
  63. package/dist/schema-Dltbjui7.js.map +1 -0
  64. package/dist/{schema-CaJV2aIO.d.cts → schema-PvgLrC1b.d.cts} +339 -261
  65. package/dist/{schema-CaJV2aIO.d.cts.map → schema-PvgLrC1b.d.cts.map} +1 -1
  66. package/dist/schema-jk88gqOu.cjs +78 -0
  67. package/dist/schema-jk88gqOu.cjs.map +1 -0
  68. package/dist/schema.cjs +3 -1
  69. package/dist/schema.d.cts +3 -1
  70. package/dist/schema.d.cts.map +1 -1
  71. package/dist/schema.d.ts +3 -1
  72. package/dist/schema.d.ts.map +1 -1
  73. package/dist/schema.js +2 -2
  74. package/dist/{server-BWoJZj5B.cjs → server-VwFSUPQn.cjs} +5 -5
  75. package/dist/{server-BWoJZj5B.cjs.map → server-VwFSUPQn.cjs.map} +1 -1
  76. package/dist/{server-DtNbD1c-.js → server-yb4PkNyo.js} +5 -5
  77. package/dist/{server-DtNbD1c-.js.map → server-yb4PkNyo.js.map} +1 -1
  78. package/dist/server.cjs +8 -8
  79. package/dist/server.d.cts +3 -3
  80. package/dist/server.d.ts +3 -3
  81. package/dist/server.js +8 -8
  82. package/dist/{stdio-BLzMxGqU.cjs → stdio-65sYKLOk.cjs} +2 -2
  83. package/dist/{stdio-BLzMxGqU.cjs.map → stdio-65sYKLOk.cjs.map} +1 -1
  84. package/dist/{stdio-D4oW-qT6.js → stdio-DkU2-spy.js} +2 -2
  85. package/dist/{stdio-D4oW-qT6.js.map → stdio-DkU2-spy.js.map} +1 -1
  86. package/dist/test-setup.cjs +1338 -1142
  87. package/dist/test-setup.cjs.map +1 -1
  88. package/dist/test-setup.js +1338 -1141
  89. package/dist/test-setup.js.map +1 -1
  90. package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-B94CNDbt.d.cts} +22 -22
  91. package/dist/toolDefinitions-B94CNDbt.d.cts.map +1 -0
  92. package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-Bb_1ejkl.js} +83 -78
  93. package/dist/toolDefinitions-Bb_1ejkl.js.map +1 -0
  94. package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-DIhvw3vk.cjs} +83 -78
  95. package/dist/toolDefinitions-DIhvw3vk.cjs.map +1 -0
  96. package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-q_1-70fG.d.ts} +22 -22
  97. package/dist/toolDefinitions-q_1-70fG.d.ts.map +1 -0
  98. package/dist/toolDefinitions.cjs +2 -2
  99. package/dist/toolDefinitions.d.cts +1 -1
  100. package/dist/toolDefinitions.d.ts +1 -1
  101. package/dist/toolDefinitions.js +2 -2
  102. package/dist/toolDefinitions.test.cjs +2 -2
  103. package/dist/toolDefinitions.test.js +2 -2
  104. package/dist/{tools-BYt-G6p2.cjs → tools-BdkmyaZo.cjs} +36 -52
  105. package/dist/tools-BdkmyaZo.cjs.map +1 -0
  106. package/dist/{tools-B8ufMRZx.js → tools-CMFpMPpD.js} +36 -52
  107. package/dist/tools-CMFpMPpD.js.map +1 -0
  108. package/dist/tools.cjs +4 -4
  109. package/dist/tools.d.cts +24 -24
  110. package/dist/tools.d.cts.map +1 -1
  111. package/dist/tools.d.ts +24 -24
  112. package/dist/tools.d.ts.map +1 -1
  113. package/dist/tools.js +4 -4
  114. package/dist/tools.test.cjs +111 -34
  115. package/dist/tools.test.cjs.map +1 -1
  116. package/dist/tools.test.js +111 -34
  117. package/dist/tools.test.js.map +1 -1
  118. package/dist/transports/stdio.cjs +9 -9
  119. package/dist/transports/stdio.d.cts +3 -3
  120. package/dist/transports/stdio.d.ts +3 -3
  121. package/dist/transports/stdio.js +9 -9
  122. package/dist/{types-CPuN4Qmi.d.cts → types-B03G337q.d.cts} +2 -2
  123. package/dist/{types-CPuN4Qmi.d.cts.map → types-B03G337q.d.cts.map} +1 -1
  124. package/dist/{types-Ds7qzCBB.d.ts → types-CN4NEway.d.ts} +2 -2
  125. package/dist/{types-Ds7qzCBB.d.ts.map → types-CN4NEway.d.ts.map} +1 -1
  126. package/dist/{types-TaJcaAVg.d.cts → types-OeoNXRm-.d.cts} +3 -3
  127. package/dist/{types-TaJcaAVg.d.cts.map → types-OeoNXRm-.d.cts.map} +1 -1
  128. package/dist/{types-DyM4kaGZ.d.ts → types-jftb-CP9.d.ts} +3 -3
  129. package/dist/{types-DyM4kaGZ.d.ts.map → types-jftb-CP9.d.ts.map} +1 -1
  130. package/dist/types.d.cts +3 -3
  131. package/dist/types.d.ts +3 -3
  132. package/dist/{version-B0O4KvZ9.cjs → version-CDnh7DyW.cjs} +2 -2
  133. package/dist/{version-B0O4KvZ9.cjs.map → version-CDnh7DyW.cjs.map} +1 -1
  134. package/dist/version-TjO7fHpC.js +6 -0
  135. package/dist/{version-dTEKpaGt.js.map → version-TjO7fHpC.js.map} +1 -1
  136. package/dist/version.cjs +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/client-1dRfG57H.d.ts.map +0 -1
  140. package/dist/client-BsYOQsEI.d.cts.map +0 -1
  141. package/dist/client-CTm4cvI7.js.map +0 -1
  142. package/dist/client-DQ837FXP.cjs.map +0 -1
  143. package/dist/formatting-BQRAzO5v.js.map +0 -1
  144. package/dist/formatting-C-0bHtbh.cjs.map +0 -1
  145. package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
  146. package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
  147. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
  148. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
  149. package/dist/schema-BCkBPgjj.cjs +0 -64
  150. package/dist/schema-BCkBPgjj.cjs.map +0 -1
  151. package/dist/schema-CJrk_GUH.js +0 -15
  152. package/dist/schema-CJrk_GUH.js.map +0 -1
  153. package/dist/schema-KEMqYaQn.cjs.map +0 -1
  154. package/dist/schema-nyYqVk4Y.js.map +0 -1
  155. package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
  156. package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
  157. package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
  158. package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
  159. package/dist/tools-B8ufMRZx.js.map +0 -1
  160. package/dist/tools-BYt-G6p2.cjs.map +0 -1
  161. package/dist/version-dTEKpaGt.js +0 -6
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import "./schema-nyYqVk4Y.js";
3
- import "./client-CTm4cvI7.js";
2
+ import "./schema-Dltbjui7.js";
3
+ import "./client-Bz_PNC8o.js";
4
4
  import "./types-H-TSmRpm.js";
5
5
  import "./api-client-9mzrj2HY.js";
6
- import "./formatting-BQRAzO5v.js";
6
+ import "./formatting-ggD6YRYR.js";
7
7
  import "./issue-helpers-CyoHu5j4.js";
8
8
  import "./logging-Cxm8lQvg.js";
9
- import "./tools-B8ufMRZx.js";
10
- import "./schema-CJrk_GUH.js";
11
- import "./toolDefinitions-BF-D81bS.js";
9
+ import "./tools-CMFpMPpD.js";
10
+ import "./schema-BKa41TQ4.js";
11
+ import "./toolDefinitions-Bb_1ejkl.js";
12
12
  import "./resources-OM3EAnnj.js";
13
- import "./promptDefinitions-CPTadtuI.js";
13
+ import "./promptDefinitions-DBNOeSg-.js";
14
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";
15
+ import "./server-yb4PkNyo.js";
16
+ import { startStdio } from "./stdio-DkU2-spy.js";
17
+ import { LIB_VERSION } from "./version-TjO7fHpC.js";
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
19
  import * as Sentry from "@sentry/node";
20
20
 
@@ -54,7 +54,7 @@ Sentry.init({
54
54
  "mcp.transport": "stdio",
55
55
  "sentry.host": host
56
56
  } },
57
- release: "0.9.0",
57
+ release: "0.10.0",
58
58
  integrations: [Sentry.consoleLoggingIntegration(), Sentry.zodErrorsIntegration()],
59
59
  environment: "stdio"
60
60
  });
@@ -1,4 +1,4 @@
1
- const require_formatting = require('../formatting-C-0bHtbh.cjs');
1
+ const require_formatting = require('../formatting-B0SJqiqX.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-CaJV2aIO.cjs";
2
- import { Event, Issue } from "../types-CPuN4Qmi.cjs";
3
- import { SentryApiService } from "../client-BsYOQsEI.cjs";
1
+ import { FrameInterface } from "../schema-PvgLrC1b.cjs";
2
+ import { Event, Issue } from "../types-B03G337q.cjs";
3
+ import { SentryApiService } from "../client-tE6FD__9.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":";;;;;;;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
+ {"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBAWgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgFzB,iBAAA;;;;;;;EAhGA,KAAA,EAuGP,KAvGO;EAAiB,KAAA,EAwGxB,KAxGwB;EAAA,UACT,EAwGV,gBAxGU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
@@ -1,6 +1,6 @@
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";
1
+ import { FrameInterface$1 as FrameInterface } from "../schema-B7A-FyIi.js";
2
+ import { Event, Issue } from "../types-CN4NEway.js";
3
+ import { SentryApiService$1 as SentryApiService } from "../client-J6VSRmQS.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":";;;;;;;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
+ {"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":null,"mappings":";;;;;;;iBAWgB,iBAAA,QACP,CAAA,CAAE,aAAa;iBAeR,iBAAA,QAAyB;iBAgFzB,iBAAA;;;;;;;EAhGA,KAAA,EAuGP,KAvGO;EAAiB,KAAA,EAwGxB,KAxGwB;EAAA,UACT,EAwGV,gBAxGU;CAAc,CAAA,EAAA,MAA3B;;;AAAK"}
@@ -1,3 +1,3 @@
1
- import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-BQRAzO5v.js";
1
+ import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-ggD6YRYR.js";
2
2
 
3
3
  export { formatEventOutput, formatFrameHeader, formatIssueOutput };
@@ -93,9 +93,9 @@ require_dist.describe("parseIssueParams", () => {
93
93
  require_dist.it("should parse from issueId and organizationSlug", () => {
94
94
  require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueParams({
95
95
  issueId: "CLOUDFLARE-MCP-41.!",
96
- organizationSlug: "cloudflare"
96
+ organizationSlug: "sentry-mcp-evals"
97
97
  })).toEqual({
98
- organizationSlug: "cloudflare",
98
+ organizationSlug: "sentry-mcp-evals",
99
99
  issueId: "CLOUDFLARE-MCP-41"
100
100
  });
101
101
  });
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"cloudflare\",\n }),\n ).toEqual({ organizationSlug: \"cloudflare\", issueId: \"CLOUDFLARE-MCP-41\" });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAA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file":"issue-helpers.test.cjs","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;;AAOA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,kDAAkD,MAAM;AACzD,mCACE,qCAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uEAAuE,MAAM;AAC9E,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,yEAAyE,MAAM;AAChF,mCACE,qCAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,2DAA2D,MAAM;AAClE,mCAAO,qCAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,iBAAG,+EAA+E,MAAM;AACtF,mCACE,qCAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,uFAAuF,MAAM;AAC9F,mCACE,qCAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,MAAM,qCAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,iBAAG,2CAA2C,MAAM;AAClD,mCAAO,MACL,qCAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,iBAAG,sDAAsD,MAAM;AAC7D,mCACE,qCAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,iBAAG,oDAAoD,MAAM;AAC3D,mCAAO,MAAM,qCAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,sBAAS,gBAAgB,MAAM;AAC7B,iBAAG,oDAAoD,MAAM;AAC3D;;GAEE,mCAAa,sBAAsB;CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,iBAAG,sCAAsC,MAAM;AAC7C,mCAAO,mCAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,mCAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,sBAAS,oBAAoB,MAAM;AACjC,iBAAG,8BAA8B,MAAM;AACrC,mCACE,uCAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,iBAAG,kDAAkD,MAAM;AACzD,mCACE,uCAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GACR,kBAAkB;GAClB,SAAS;EACV,EAAC;CACH,EAAC;AAEF,iBAAG,4DAA4D,MAAM;AACnE,mCAAO,MACL,uCAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,iBAAG,+DAA+D,MAAM;AACtE,mCAAO,MACL,uCAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,iBAAG,uCAAuC,MAAM;AAC9C,mCAAO,MACL,uCAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -92,9 +92,9 @@ describe("parseIssueParams", () => {
92
92
  it("should parse from issueId and organizationSlug", () => {
93
93
  globalExpect(parseIssueParams({
94
94
  issueId: "CLOUDFLARE-MCP-41.!",
95
- organizationSlug: "cloudflare"
95
+ organizationSlug: "sentry-mcp-evals"
96
96
  })).toEqual({
97
- organizationSlug: "cloudflare",
97
+ organizationSlug: "sentry-mcp-evals",
98
98
  issueId: "CLOUDFLARE-MCP-41"
99
99
  });
100
100
  });
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"cloudflare\",\n }),\n ).toEqual({ organizationSlug: \"cloudflare\", issueId: \"CLOUDFLARE-MCP-41\" });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,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;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
1
+ {"version":3,"file":"issue-helpers.test.js","names":[],"sources":["../../src/internal/issue-helpers.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport {\n extractIssueId,\n parseIssueId,\n parseIssueParams,\n} from \"./issue-helpers\";\n\ndescribe(\"extractIssueId\", () => {\n it(\"should extract issue ID from a full Sentry URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/1234\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"1234\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID from a Sentry URL with organization in path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/sentry/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from URL with organizations path\", () => {\n expect(\n extractIssueId(\"https://sentry.io/organizations/my-org/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-org\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from subdomain URL\", () => {\n expect(extractIssueId(\"https://my-team.sentry.io/issues/123\")).toEqual({\n issueId: \"123\",\n organizationSlug: \"my-team\",\n });\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with subdomain\", () => {\n expect(\n extractIssueId(\"https://sentry.mycompany.com/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should extract issue ID and org slug from self-hosted Sentry with organization path\", () => {\n expect(\n extractIssueId(\"https://mycompany.com/my-team/issues/123\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"123\",\n \"organizationSlug\": \"my-team\",\n }\n `);\n });\n\n it(\"should throw error for empty input\", () => {\n expect(() => extractIssueId(\"\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n\n it(\"should throw error for invalid URL path\", () => {\n expect(() =>\n extractIssueId(\"https://sentry.sentry.io/projects/123\"),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Path must contain '/issues/{issue_id}']`,\n );\n });\n\n it(\"should throw error for non-numeric issue ID in URL\", () => {\n expect(\n extractIssueId(\"https://sentry.sentry.io/issues/abc\"),\n ).toMatchInlineSnapshot(`\n {\n \"issueId\": \"abc\",\n \"organizationSlug\": \"sentry\",\n }\n `);\n });\n\n it(\"should throw error for non-numeric standalone ID\", () => {\n expect(() => extractIssueId(\"abc\")).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n\ndescribe(\"parseIssueId\", () => {\n it(\"should remove trailing punctuation from issue ID\", () => {\n expect(\n // trailing period and exclamation\n parseIssueId(\"CLOUDFLARE-MCP-41.!\"),\n ).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should not modify a clean issue ID\", () => {\n expect(parseIssueId(\"CLOUDFLARE-MCP-41\")).toBe(\"CLOUDFLARE-MCP-41\");\n });\n\n it(\"should remove special characters except dash and underscore\", () => {\n expect(parseIssueId(\"ID_123-456!@#\")).toBe(\"ID_123-456\");\n });\n});\n\ndescribe(\"parseIssueParams\", () => {\n it(\"should parse from issueUrl\", () => {\n expect(\n parseIssueParams({\n issueUrl: \"https://sentry.io/sentry/issues/123\",\n }),\n ).toEqual({ organizationSlug: \"sentry\", issueId: \"123\" });\n });\n\n it(\"should parse from issueId and organizationSlug\", () => {\n expect(\n parseIssueParams({\n issueId: \"CLOUDFLARE-MCP-41.!\",\n organizationSlug: \"sentry-mcp-evals\",\n }),\n ).toEqual({\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n });\n });\n\n it(\"should throw if neither issueId nor issueUrl is provided\", () => {\n expect(() =>\n parseIssueParams({ organizationSlug: \"foo\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Either issueId or issueUrl must be provided]`,\n );\n });\n\n it(\"should throw if organizationSlug is missing and no issueUrl\", () => {\n expect(() =>\n parseIssueParams({ issueId: \"123\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Organization slug is required]`,\n );\n });\n\n it(\"should throw if issueUrl is invalid\", () => {\n expect(() =>\n parseIssueParams({ issueUrl: \"not-a-url\" }),\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: Invalid Sentry issue URL. Must start with http:// or https://]`,\n );\n });\n});\n"],"mappings":";;;;;AAOA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,kDAAkD,MAAM;AACzD,eACE,eAAe,uCAAuC,CACvD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uEAAuE,MAAM;AAC9E,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,yEAAyE,MAAM;AAChF,eACE,eAAe,oDAAoD,CACpE,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,2DAA2D,MAAM;AAClE,eAAO,eAAe,uCAAuC,CAAC,CAAC,QAAQ;GACrE,SAAS;GACT,kBAAkB;EACnB,EAAC;CACH,EAAC;AAEF,IAAG,+EAA+E,MAAM;AACtF,eACE,eAAe,0CAA0C,CAC1D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,uFAAuF,MAAM;AAC9F,eACE,eAAe,2CAA2C,CAC3D,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACx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const PROMPT_DEFINITIONS: ({
15
15
  description: string;
16
16
  paramsSchema: {
17
17
  organizationSlug: z.ZodOptional<z.ZodString>;
18
- issueId: z.ZodOptional<z.ZodString>;
19
- issueUrl: z.ZodOptional<z.ZodString>;
18
+ issueId: z.ZodString;
19
+ issueUrl: z.ZodString;
20
20
  filename?: undefined;
21
21
  };
22
22
  })[]; //#endregion
23
23
 
24
24
  //# sourceMappingURL=promptDefinitions.d.ts.map
25
25
  export { PROMPT_DEFINITIONS };
26
- //# sourceMappingURL=promptDefinitions-Dcz3d9wL.d.cts.map
26
+ //# sourceMappingURL=promptDefinitions-BR7PxWcH.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-BR7PxWcH.d.cts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAOa;;EAAA,WAAA,EAAA,MAAA;EAuBZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -1,4 +1,4 @@
1
- import { ParamOrganizationSlug } from "./schema-CJrk_GUH.js";
1
+ import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug } from "./schema-BKa41TQ4.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/promptDefinitions.ts
@@ -7,18 +7,18 @@ const PROMPT_DEFINITIONS = [{
7
7
  description: ["Use this prompt when you need to find errors in Sentry for a given file."].join("\n"),
8
8
  paramsSchema: {
9
9
  organizationSlug: ParamOrganizationSlug,
10
- filename: z.string()
10
+ filename: z.string().describe("The filename to search for errors in.")
11
11
  }
12
12
  }, {
13
13
  name: "fix_issue_with_seer",
14
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
15
  paramsSchema: {
16
16
  organizationSlug: ParamOrganizationSlug.optional(),
17
- issueId: z.string().optional(),
18
- issueUrl: z.string().optional()
17
+ issueId: ParamIssueShortId,
18
+ issueUrl: ParamIssueUrl
19
19
  }
20
20
  }];
21
21
 
22
22
  //#endregion
23
23
  export { PROMPT_DEFINITIONS };
24
- //# sourceMappingURL=promptDefinitions-CPTadtuI.js.map
24
+ //# sourceMappingURL=promptDefinitions-DBNOeSg-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-DBNOeSg-.js","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n ParamIssueShortId,\n ParamIssueUrl,\n ParamOrganizationSlug,\n} 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().describe(\"The filename to search for errors in.\"),\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: ParamIssueShortId,\n issueUrl: ParamIssueUrl,\n },\n },\n];\n"],"mappings":";;;;AAOA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB;EAClB,UAAU,EAAE,QAAQ,CAAC,SAAS,wCAAwC;CACvE;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,sBAAsB,UAAU;EAClD,SAAS;EACT,UAAU;CACX;AACF,CACF"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-BtT13l48.cjs');
3
- const require_schema = require('./schema-BCkBPgjj.cjs');
3
+ const require_schema = require('./schema-jk88gqOu.cjs');
4
4
  const zod = require_chunk.__toESM(require("zod"));
5
5
 
6
6
  //#region src/promptDefinitions.ts
@@ -9,15 +9,15 @@ const PROMPT_DEFINITIONS = [{
9
9
  description: ["Use this prompt when you need to find errors in Sentry for a given file."].join("\n"),
10
10
  paramsSchema: {
11
11
  organizationSlug: require_schema.ParamOrganizationSlug,
12
- filename: zod.z.string()
12
+ filename: zod.z.string().describe("The filename to search for errors in.")
13
13
  }
14
14
  }, {
15
15
  name: "fix_issue_with_seer",
16
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
17
  paramsSchema: {
18
18
  organizationSlug: require_schema.ParamOrganizationSlug.optional(),
19
- issueId: zod.z.string().optional(),
20
- issueUrl: zod.z.string().optional()
19
+ issueId: require_schema.ParamIssueShortId,
20
+ issueUrl: require_schema.ParamIssueUrl
21
21
  }
22
22
  }];
23
23
 
@@ -28,4 +28,4 @@ Object.defineProperty(exports, 'PROMPT_DEFINITIONS', {
28
28
  return PROMPT_DEFINITIONS;
29
29
  }
30
30
  });
31
- //# sourceMappingURL=promptDefinitions-5jiZMBg5.cjs.map
31
+ //# sourceMappingURL=promptDefinitions-pHRpPOpJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-pHRpPOpJ.cjs","names":["ParamOrganizationSlug","ParamIssueShortId","ParamIssueUrl"],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n ParamIssueShortId,\n ParamIssueUrl,\n ParamOrganizationSlug,\n} 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().describe(\"The filename to search for errors in.\"),\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: ParamIssueShortId,\n issueUrl: ParamIssueUrl,\n },\n },\n];\n"],"mappings":";;;;;;AAOA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkBA;EAClB,UAAU,MAAE,QAAQ,CAAC,SAAS,wCAAwC;CACvE;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,qCAAsB,UAAU;EAClD,SAASC;EACT,UAAUC;CACX;AACF,CACF"}
@@ -15,12 +15,12 @@ declare const PROMPT_DEFINITIONS: ({
15
15
  description: string;
16
16
  paramsSchema: {
17
17
  organizationSlug: z.ZodOptional<z.ZodString>;
18
- issueId: z.ZodOptional<z.ZodString>;
19
- issueUrl: z.ZodOptional<z.ZodString>;
18
+ issueId: z.ZodString;
19
+ issueUrl: z.ZodString;
20
20
  filename?: undefined;
21
21
  };
22
22
  })[]; //#endregion
23
23
 
24
24
  //# sourceMappingURL=promptDefinitions.d.ts.map
25
25
  export { PROMPT_DEFINITIONS as PROMPT_DEFINITIONS$1 };
26
- //# sourceMappingURL=promptDefinitions-DrGK-v8n.d.ts.map
26
+ //# sourceMappingURL=promptDefinitions-tpKruPny.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptDefinitions-tpKruPny.d.ts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":null,"mappings":";;;cAOa;;EAAA,WAAA,EAAA,MAAA;EAuBZ,YAAA,EAAA;IAAA,gBAAA,EAAA,CAAA,CAAA,SAAA"}
@@ -1,4 +1,4 @@
1
- require('./schema-BCkBPgjj.cjs');
2
- const require_promptDefinitions = require('./promptDefinitions-5jiZMBg5.cjs');
1
+ require('./schema-jk88gqOu.cjs');
2
+ const require_promptDefinitions = require('./promptDefinitions-pHRpPOpJ.cjs');
3
3
 
4
4
  exports.PROMPT_DEFINITIONS = require_promptDefinitions.PROMPT_DEFINITIONS
@@ -1,2 +1,2 @@
1
- import { PROMPT_DEFINITIONS } from "./promptDefinitions-Dcz3d9wL.cjs";
1
+ import { PROMPT_DEFINITIONS } from "./promptDefinitions-BR7PxWcH.cjs";
2
2
  export { PROMPT_DEFINITIONS };
@@ -1,2 +1,2 @@
1
- import { PROMPT_DEFINITIONS$1 as PROMPT_DEFINITIONS } from "./promptDefinitions-DrGK-v8n.js";
1
+ import { PROMPT_DEFINITIONS$1 as PROMPT_DEFINITIONS } from "./promptDefinitions-tpKruPny.js";
2
2
  export { PROMPT_DEFINITIONS };
@@ -1,4 +1,4 @@
1
- import "./schema-CJrk_GUH.js";
2
- import { PROMPT_DEFINITIONS } from "./promptDefinitions-CPTadtuI.js";
1
+ import "./schema-BKa41TQ4.js";
2
+ import { PROMPT_DEFINITIONS } from "./promptDefinitions-DBNOeSg-.js";
3
3
 
4
4
  export { PROMPT_DEFINITIONS };
@@ -1,6 +1,6 @@
1
- import "./promptDefinitions-Dcz3d9wL.cjs";
2
- import "./toolDefinitions-K_TVqaLU.cjs";
3
- import { ServerContext } from "./types-TaJcaAVg.cjs";
1
+ import "./promptDefinitions-BR7PxWcH.cjs";
2
+ import "./toolDefinitions-B94CNDbt.cjs";
3
+ import { ServerContext } from "./types-OeoNXRm-.cjs";
4
4
 
5
5
  //#region src/prompts.d.ts
6
6
  declare const PROMPT_HANDLERS: {
@@ -19,8 +19,8 @@ declare const PROMPT_HANDLERS: {
19
19
  issueUrl
20
20
  }: {
21
21
  organizationSlug: string | undefined;
22
- issueId: string | undefined;
23
- issueUrl: string | undefined;
22
+ issueId: string;
23
+ issueUrl: string;
24
24
  filename?: unknown;
25
25
  }) => Promise<string>;
26
26
  };
package/dist/prompts.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import "./promptDefinitions-DrGK-v8n.js";
2
- import "./toolDefinitions-CCscRQoM.js";
3
- import { ServerContext } from "./types-DyM4kaGZ.js";
1
+ import "./promptDefinitions-tpKruPny.js";
2
+ import "./toolDefinitions-q_1-70fG.js";
3
+ import { ServerContext } from "./types-jftb-CP9.js";
4
4
 
5
5
  //#region src/prompts.d.ts
6
6
  declare const PROMPT_HANDLERS: {
@@ -19,8 +19,8 @@ declare const PROMPT_HANDLERS: {
19
19
  issueUrl
20
20
  }: {
21
21
  organizationSlug: string | undefined;
22
- issueId: string | undefined;
23
- issueUrl: string | undefined;
22
+ issueId: string;
23
+ issueUrl: string;
24
24
  filename?: unknown;
25
25
  }) => Promise<string>;
26
26
  };
@@ -140,7 +140,14 @@ const BaseEventSchema = zod.z.object({
140
140
  type: zod.z.string(),
141
141
  data: zod.z.unknown()
142
142
  })
143
- ]))
143
+ ])),
144
+ contexts: zod.z.record(zod.z.string(), zod.z.object({ type: zod.z.union([
145
+ zod.z.literal("default"),
146
+ zod.z.literal("runtime"),
147
+ zod.z.literal("os"),
148
+ zod.z.literal("trace"),
149
+ zod.z.unknown()
150
+ ]) }).passthrough()).optional()
144
151
  });
145
152
  const ErrorEventSchema = BaseEventSchema.omit({ type: true }).extend({
146
153
  type: zod.z.literal("error"),
@@ -457,4 +464,4 @@ Object.defineProperty(exports, 'UnknownEventSchema', {
457
464
  return UnknownEventSchema;
458
465
  }
459
466
  });
460
- //# sourceMappingURL=schema-KEMqYaQn.cjs.map
467
+ //# sourceMappingURL=schema-3VLYcf4D.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-3VLYcf4D.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\nexport const RequestEntrySchema = z.object({\n method: z.string().nullable(),\n url: z.string().url().nullable(),\n // TODO:\n // query: z.array(z.tuple([z.string(), z.string()])).nullable(),\n // data: z.unknown().nullable(),\n // headers: z.array(z.tuple([z.string(), z.string()])).nullable(),\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 contexts: z\n .record(\n z.string(),\n z\n .object({\n type: z.union([\n z.literal(\"default\"),\n z.literal(\"runtime\"),\n z.literal(\"os\"),\n z.literal(\"trace\"),\n z.unknown(),\n ]),\n })\n .passthrough(),\n )\n .optional(),\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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