@sentry/mcp-server 0.4.0 → 0.6.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/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 +6 -3
  8. package/dist/api-client/index.d.cts +4 -4
  9. package/dist/api-client/index.d.ts +4 -4
  10. package/dist/api-client/index.js +3 -3
  11. package/dist/api-client/schema.cjs +5 -2
  12. package/dist/api-client/schema.d.cts +2 -2
  13. package/dist/api-client/schema.d.ts +2 -2
  14. package/dist/api-client/schema.js +2 -2
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/{client-C_XfRSu3.cjs → client-DQF6UreY.cjs} +41 -38
  18. package/dist/client-DQF6UreY.cjs.map +1 -0
  19. package/dist/{client-BKLE5Lkt.js → client-vqrS5E_N.js} +41 -38
  20. package/dist/client-vqrS5E_N.js.map +1 -0
  21. package/dist/{client.d-BizHDVuq.d.cts → client.d-JulFjrUM.d.cts} +25 -23
  22. package/dist/client.d-JulFjrUM.d.cts.map +1 -0
  23. package/dist/{client.d-CrWOcVIU.d.ts → client.d-eUhyVsN_.d.ts} +27 -25
  24. package/dist/client.d-eUhyVsN_.d.ts.map +1 -0
  25. package/dist/index.cjs +13 -13
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +13 -13
  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 +4 -2
  32. package/dist/internal/issue-helpers.d.cts +30 -1
  33. package/dist/internal/issue-helpers.d.cts.map +1 -1
  34. package/dist/internal/issue-helpers.d.ts +30 -1
  35. package/dist/internal/issue-helpers.d.ts.map +1 -1
  36. package/dist/internal/issue-helpers.js +2 -2
  37. package/dist/internal/issue-helpers.test.cjs +41 -1
  38. package/dist/internal/issue-helpers.test.cjs.map +1 -1
  39. package/dist/internal/issue-helpers.test.js +41 -1
  40. package/dist/internal/issue-helpers.test.js.map +1 -1
  41. package/dist/issue-helpers-CdWMhVWJ.cjs +87 -0
  42. package/dist/issue-helpers-CdWMhVWJ.cjs.map +1 -0
  43. package/dist/{issue-helpers-C0kEdXOE.cjs → issue-helpers-Cx6bFCUv.js} +38 -9
  44. package/dist/issue-helpers-Cx6bFCUv.js.map +1 -0
  45. package/dist/{promptDefinitions-CaRMCDPI.js → promptDefinitions-C9aGYWZ6.js} +2 -2
  46. package/dist/{promptDefinitions-CaRMCDPI.js.map → promptDefinitions-C9aGYWZ6.js.map} +1 -1
  47. package/dist/{promptDefinitions-CVB4IyVf.cjs → promptDefinitions-OnJHLqrZ.cjs} +2 -2
  48. package/dist/{promptDefinitions-CVB4IyVf.cjs.map → promptDefinitions-OnJHLqrZ.cjs.map} +1 -1
  49. package/dist/promptDefinitions.cjs +2 -2
  50. package/dist/promptDefinitions.js +2 -2
  51. package/dist/{schema-Bc6_gUDA.cjs → schema-BnXdl41H.cjs} +71 -13
  52. package/dist/schema-BnXdl41H.cjs.map +1 -0
  53. package/dist/{schema-D1B8p0Ib.js → schema-BzPfPMq7.js} +54 -14
  54. package/dist/schema-BzPfPMq7.js.map +1 -0
  55. package/dist/{schema-BvloqMHW.cjs → schema-_xqdSRLo.cjs} +8 -1
  56. package/dist/{schema-BvloqMHW.cjs.map → schema-_xqdSRLo.cjs.map} +1 -1
  57. package/dist/{schema-k04PdSCK.js → schema-pZrPEvtp.js} +3 -2
  58. package/dist/{schema-k04PdSCK.js.map → schema-pZrPEvtp.js.map} +1 -1
  59. package/dist/schema.cjs +2 -1
  60. package/dist/{schema.d-DQ5YUr0Y.d.ts → schema.d-DwpHAZsi.d.ts} +2950 -184
  61. package/dist/schema.d-DwpHAZsi.d.ts.map +1 -0
  62. package/dist/{schema.d-cvHc3M20.d.cts → schema.d-vgLUM73w.d.cts} +3025 -259
  63. package/dist/schema.d-vgLUM73w.d.cts.map +1 -0
  64. package/dist/schema.d.cts +2 -1
  65. package/dist/schema.d.cts.map +1 -1
  66. package/dist/schema.d.ts +2 -1
  67. package/dist/schema.d.ts.map +1 -1
  68. package/dist/schema.js +2 -2
  69. package/dist/{server-DHbbEoa2.js → server-BLE3CwEp.js} +8 -9
  70. package/dist/server-BLE3CwEp.js.map +1 -0
  71. package/dist/{server-DQ_dBWQy.cjs → server-CqLaJq7P.cjs} +8 -9
  72. package/dist/server-CqLaJq7P.cjs.map +1 -0
  73. package/dist/server.cjs +8 -8
  74. package/dist/server.d.cts +2 -2
  75. package/dist/server.d.cts.map +1 -1
  76. package/dist/server.d.ts +2 -2
  77. package/dist/server.d.ts.map +1 -1
  78. package/dist/server.js +8 -8
  79. package/dist/{stdio-BHg5CaoN.js → stdio-BLheCcU0.js} +2 -2
  80. package/dist/{stdio-BHg5CaoN.js.map → stdio-BLheCcU0.js.map} +1 -1
  81. package/dist/{stdio-CRqulLZQ.cjs → stdio-DKNKrvTY.cjs} +2 -2
  82. package/dist/{stdio-CRqulLZQ.cjs.map → stdio-DKNKrvTY.cjs.map} +1 -1
  83. package/dist/test-setup.cjs +42 -42
  84. package/dist/test-setup.cjs.map +1 -1
  85. package/dist/test-setup.js +42 -42
  86. package/dist/test-setup.js.map +1 -1
  87. package/dist/{toolDefinitions-BJ0cyDce.cjs → toolDefinitions-C0t6Y5Su.cjs} +26 -5
  88. package/dist/toolDefinitions-C0t6Y5Su.cjs.map +1 -0
  89. package/dist/{toolDefinitions-L20Lv3AW.js → toolDefinitions-DB4pPvgy.js} +26 -5
  90. package/dist/toolDefinitions-DB4pPvgy.js.map +1 -0
  91. package/dist/toolDefinitions.cjs +2 -2
  92. package/dist/{toolDefinitions.d-C0zMvL9m.d.ts → toolDefinitions.d-C5JUBInb.d.ts} +16 -1
  93. package/dist/toolDefinitions.d-C5JUBInb.d.ts.map +1 -0
  94. package/dist/{toolDefinitions.d-Dx4q--0l.d.cts → toolDefinitions.d-CsT15_MF.d.cts} +16 -1
  95. package/dist/toolDefinitions.d-CsT15_MF.d.cts.map +1 -0
  96. package/dist/toolDefinitions.d.cts +1 -1
  97. package/dist/toolDefinitions.d.ts +1 -1
  98. package/dist/toolDefinitions.js +2 -2
  99. package/dist/toolDefinitions.test.cjs +2 -2
  100. package/dist/toolDefinitions.test.js +2 -2
  101. package/dist/{tools-B22b8Jjm.cjs → tools-BdAFXSMG.cjs} +118 -101
  102. package/dist/tools-BdAFXSMG.cjs.map +1 -0
  103. package/dist/{tools-CXgh-6Vh.js → tools-DZzt3LcX.js} +118 -101
  104. package/dist/tools-DZzt3LcX.js.map +1 -0
  105. package/dist/tools.cjs +4 -4
  106. package/dist/tools.d.cts +32 -75
  107. package/dist/tools.d.cts.map +1 -1
  108. package/dist/tools.d.ts +35 -78
  109. package/dist/tools.d.ts.map +1 -1
  110. package/dist/tools.js +4 -4
  111. package/dist/tools.test.cjs +94 -25
  112. package/dist/tools.test.cjs.map +1 -1
  113. package/dist/tools.test.js +94 -25
  114. package/dist/tools.test.js.map +1 -1
  115. package/dist/transports/stdio.cjs +9 -9
  116. package/dist/transports/stdio.d.cts +2 -2
  117. package/dist/transports/stdio.d.ts +2 -2
  118. package/dist/transports/stdio.js +9 -9
  119. package/dist/{types.d-DsrCjT7G.d.ts → types.d-B-acZthg.d.ts} +2 -2
  120. package/dist/{types.d-DsrCjT7G.d.ts.map → types.d-B-acZthg.d.ts.map} +1 -1
  121. package/dist/{types.d-DHI7S0mb.d.ts → types.d-BeKsSRmy.d.ts} +2 -2
  122. package/dist/{types.d-DHI7S0mb.d.ts.map → types.d-BeKsSRmy.d.ts.map} +1 -1
  123. package/dist/{types.d-DQGXrBBW.d.cts → types.d-BfhMPrt_.d.cts} +2 -2
  124. package/dist/{types.d-DQGXrBBW.d.cts.map → types.d-BfhMPrt_.d.cts.map} +1 -1
  125. package/dist/{types.d-r20cCyVI.d.cts → types.d-Bq-AxlK6.d.cts} +2 -2
  126. package/dist/{types.d-r20cCyVI.d.cts.map → types.d-Bq-AxlK6.d.cts.map} +1 -1
  127. package/dist/types.d.cts +2 -2
  128. package/dist/types.d.ts +2 -2
  129. package/dist/{version-D93Bj2gg.cjs → version-DkTBZdhM.cjs} +2 -2
  130. package/dist/version-DkTBZdhM.cjs.map +1 -0
  131. package/dist/version-S8A9iKsF.js +6 -0
  132. package/dist/version-S8A9iKsF.js.map +1 -0
  133. package/dist/version.cjs +1 -1
  134. package/dist/version.d.cts +1 -1
  135. package/dist/version.d.cts.map +1 -1
  136. package/dist/version.d.ts +1 -1
  137. package/dist/version.d.ts.map +1 -1
  138. package/dist/version.js +1 -1
  139. package/package.json +5 -6
  140. package/dist/client-BKLE5Lkt.js.map +0 -1
  141. package/dist/client-C_XfRSu3.cjs.map +0 -1
  142. package/dist/client.d-BizHDVuq.d.cts.map +0 -1
  143. package/dist/client.d-CrWOcVIU.d.ts.map +0 -1
  144. package/dist/issue-helpers-C0kEdXOE.cjs.map +0 -1
  145. package/dist/issue-helpers-DFde36Zu.js +0 -32
  146. package/dist/issue-helpers-DFde36Zu.js.map +0 -1
  147. package/dist/schema-Bc6_gUDA.cjs.map +0 -1
  148. package/dist/schema-D1B8p0Ib.js.map +0 -1
  149. package/dist/schema.d-DQ5YUr0Y.d.ts.map +0 -1
  150. package/dist/schema.d-cvHc3M20.d.cts.map +0 -1
  151. package/dist/server-DHbbEoa2.js.map +0 -1
  152. package/dist/server-DQ_dBWQy.cjs.map +0 -1
  153. package/dist/toolDefinitions-BJ0cyDce.cjs.map +0 -1
  154. package/dist/toolDefinitions-L20Lv3AW.js.map +0 -1
  155. package/dist/toolDefinitions.d-C0zMvL9m.d.ts.map +0 -1
  156. package/dist/toolDefinitions.d-Dx4q--0l.d.cts.map +0 -1
  157. package/dist/tools-B22b8Jjm.cjs.map +0 -1
  158. package/dist/tools-CXgh-6Vh.js.map +0 -1
  159. package/dist/version-D93Bj2gg.cjs.map +0 -1
  160. package/dist/version-DkmlRpxa.js +0 -6
  161. package/dist/version-DkmlRpxa.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAGC,4BAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,2CAAwB,OAAO;AAE1D,MAAM,iBAAiB;AAIvB,yBAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,eAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,cAAO,MAAM,eAAe"}
1
+ {"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n initialScope: {\n tags: {\n mcp_server_version: LIB_VERSION,\n },\n },\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAGC,4BAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,cAAc,EACZ,MAAM,EACJ,oBAAoBA,4BACrB,EACF;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,cAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,yBAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,eAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,cAAO,MAAM,eAAe"}
package/dist/index.js CHANGED
@@ -1,28 +1,27 @@
1
1
  #!/usr/bin/env node
2
- import "./schema-D1B8p0Ib.js";
3
- import "./client-BKLE5Lkt.js";
2
+ import "./schema-BzPfPMq7.js";
3
+ import "./client-vqrS5E_N.js";
4
4
  import "./types-H-TSmRpm.js";
5
5
  import "./api-client-9mzrj2HY.js";
6
6
  import "./formatting-Bacfde0I.js";
7
- import "./issue-helpers-DFde36Zu.js";
7
+ import "./issue-helpers-Cx6bFCUv.js";
8
8
  import "./logging-Cxm8lQvg.js";
9
- import "./tools-CXgh-6Vh.js";
10
- import "./schema-k04PdSCK.js";
11
- import "./toolDefinitions-L20Lv3AW.js";
9
+ import "./tools-DZzt3LcX.js";
10
+ import "./schema-pZrPEvtp.js";
11
+ import "./toolDefinitions-DB4pPvgy.js";
12
12
  import "./resources-OM3EAnnj.js";
13
- import "./promptDefinitions-CaRMCDPI.js";
13
+ import "./promptDefinitions-C9aGYWZ6.js";
14
14
  import "./prompts-Tz-qECa0.js";
15
- import "./server-DHbbEoa2.js";
16
- import { startStdio } from "./stdio-BHg5CaoN.js";
17
- import { LIB_VERSION } from "./version-DkmlRpxa.js";
15
+ import "./server-BLE3CwEp.js";
16
+ import { startStdio } from "./stdio-BLheCcU0.js";
17
+ import { LIB_VERSION } from "./version-S8A9iKsF.js";
18
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
19
- import { wrapMcpServerWithSentry } from "@sentry/core";
20
19
  import * as Sentry from "@sentry/node";
21
20
 
22
21
  //#region src/index.ts
23
22
  let accessToken = process.env.SENTRY_AUTH_TOKEN;
24
23
  let host = process.env.SENTRY_HOST;
25
- let sentryDsn = process.env.SENTRY_DSN || "https://7f7bbaad9504b727cdf8edc378c6d1de@o1.ingest.us.sentry.io/4509062593708032";
24
+ let sentryDsn = process.env.SENTRY_DSN || "https://d0805acebb937435abcb5958da99cdab@o1.ingest.us.sentry.io/4509062593708032";
26
25
  const packageName = "@sentry/mcp-server";
27
26
  function getUsage() {
28
27
  return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;
@@ -49,13 +48,14 @@ if (!accessToken) {
49
48
  Sentry.init({
50
49
  dsn: sentryDsn,
51
50
  sendDefaultPii: true,
51
+ initialScope: { tags: { mcp_server_version: LIB_VERSION } },
52
52
  environment: "stdio"
53
53
  });
54
54
  const server = new McpServer({
55
55
  name: "Sentry MCP",
56
56
  version: LIB_VERSION
57
57
  });
58
- const instrumentedServer = wrapMcpServerWithSentry(server);
58
+ const instrumentedServer = Sentry.wrapMcpServerWithSentry(server);
59
59
  const SENTRY_TIMEOUT = 5e3;
60
60
  startStdio(instrumentedServer, {
61
61
  accessToken,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,wBAAwB,OAAO;AAE1D,MAAM,iBAAiB;AAIvB,WAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
1
+ {"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n initialScope: {\n tags: {\n mcp_server_version: LIB_VERSION,\n },\n },\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = Sentry.wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,cAAc,EACZ,MAAM,EACJ,oBAAoB,YACrB,EACF;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,OAAO,wBAAwB,OAAO;AAEjE,MAAM,iBAAiB;AAIvB,WAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
@@ -1,6 +1,6 @@
1
- import { FrameInterface } from "../schema.d-cvHc3M20.cjs";
2
- import { Event } from "../types.d-r20cCyVI.cjs";
3
- import "../client.d-BizHDVuq.cjs";
1
+ import { FrameInterface } from "../schema.d-vgLUM73w.cjs";
2
+ import { Event } from "../types.d-Bq-AxlK6.cjs";
3
+ import "../client.d-JulFjrUM.cjs";
4
4
  import "../index.d-Cb-lHGvn.cjs";
5
5
  import { z } from "zod";
6
6
 
@@ -1,6 +1,6 @@
1
- import { FrameInterface$1 as FrameInterface } from "../schema.d-DQ5YUr0Y.js";
2
- import { Event } from "../types.d-DsrCjT7G.js";
3
- import "../client.d-CrWOcVIU.js";
1
+ import { FrameInterface$1 as FrameInterface } from "../schema.d-DwpHAZsi.js";
2
+ import { Event } from "../types.d-B-acZthg.js";
3
+ import "../client.d-eUhyVsN_.js";
4
4
  import "../index.d-kYckfDWv.js";
5
5
  import { z } from "zod";
6
6
 
@@ -1,3 +1,5 @@
1
- const require_issue_helpers = require('../issue-helpers-C0kEdXOE.cjs');
1
+ const require_issue_helpers = require('../issue-helpers-CdWMhVWJ.cjs');
2
2
 
3
- exports.extractIssueId = require_issue_helpers.extractIssueId
3
+ exports.extractIssueId = require_issue_helpers.extractIssueId
4
+ exports.parseIssueId = require_issue_helpers.parseIssueId
5
+ exports.parseIssueParams = require_issue_helpers.parseIssueParams
@@ -9,7 +9,36 @@
9
9
  declare function extractIssueId(url: string): {
10
10
  issueId: string;
11
11
  organizationSlug: string;
12
+ };
13
+ /**
14
+ * Sometimes the LLM will pass in a funky issue shortId. For example it might pass
15
+ * in "CLOUDFLARE-MCP-41." instead of "CLOUDFLARE-MCP-41". This function attempts to
16
+ * fix common issues.
17
+ *
18
+ * @param issueId - The issue ID to parse
19
+ * @returns The parsed issue ID
20
+ */
21
+ declare function parseIssueId(issueId: string): string;
22
+ /**
23
+ * Parses issue parameters from a variety of formats.
24
+ *
25
+ * @param params - Object containing issue URL, issue ID, and organization slug
26
+ * @returns Object containing the parsed organization slug and issue ID
27
+ * @throws Error if the input is invalid
28
+ */
29
+ declare function parseIssueParams({
30
+ issueUrl,
31
+ issueId,
32
+ organizationSlug
33
+ }: {
34
+ issueUrl?: string | null;
35
+ issueId?: string | null;
36
+ organizationSlug?: string | null;
37
+ }): {
38
+ organizationSlug: string;
39
+ issueId: string;
12
40
  }; //#endregion
41
+
13
42
  //# sourceMappingURL=issue-helpers.d.ts.map
14
- export { extractIssueId };
43
+ export { extractIssueId, parseIssueId, parseIssueParams };
15
44
  //# sourceMappingURL=issue-helpers.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA"}
1
+ {"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":null,"mappings":";;;;;;;;iBAOgB,cAAA;EAAA,OAAA,EAAA,MAAA;;;;;;;;;AAwDhB;;iBAAgB,YAAA;;;;;;AAehB;;AACE,iBADc,gBAAA,CACd;EAAA,QAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EAAQ,QACR,CAAA,EAAA,MAAA,GAAA,IAAA;EAAO,OACP,CAAA,EAAA,MAAA,GAAA,IAAA;EAAgB,gBAAA,CAAA,EAAA,MAAA,GAAA,IAAA"}
@@ -9,7 +9,36 @@
9
9
  declare function extractIssueId(url: string): {
10
10
  issueId: string;
11
11
  organizationSlug: string;
12
+ };
13
+ /**
14
+ * Sometimes the LLM will pass in a funky issue shortId. For example it might pass
15
+ * in "CLOUDFLARE-MCP-41." instead of "CLOUDFLARE-MCP-41". This function attempts to
16
+ * fix common issues.
17
+ *
18
+ * @param issueId - The issue ID to parse
19
+ * @returns The parsed issue ID
20
+ */
21
+ declare function parseIssueId(issueId: string): string;
22
+ /**
23
+ * Parses issue parameters from a variety of formats.
24
+ *
25
+ * @param params - Object containing issue URL, issue ID, and organization slug
26
+ * @returns Object containing the parsed organization slug and issue ID
27
+ * @throws Error if the input is invalid
28
+ */
29
+ declare function parseIssueParams({
30
+ issueUrl,
31
+ issueId,
32
+ organizationSlug
33
+ }: {
34
+ issueUrl?: string | null;
35
+ issueId?: string | null;
36
+ organizationSlug?: string | null;
37
+ }): {
38
+ organizationSlug: string;
39
+ issueId: string;
12
40
  }; //#endregion
41
+
13
42
  //# sourceMappingURL=issue-helpers.d.ts.map
14
- export { extractIssueId };
43
+ export { extractIssueId, parseIssueId, parseIssueParams };
15
44
  //# sourceMappingURL=issue-helpers.d.ts.map
@@ -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"}
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,3 +1,3 @@
1
- import { extractIssueId } from "../issue-helpers-DFde36Zu.js";
1
+ import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-Cx6bFCUv.js";
2
2
 
3
- export { extractIssueId };
3
+ export { extractIssueId, parseIssueId, parseIssueParams };
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const require_issue_helpers = require('../issue-helpers-C0kEdXOE.cjs');
2
+ const require_issue_helpers = require('../issue-helpers-CdWMhVWJ.cjs');
3
3
  const require_dist = require('../dist-3oa5SxPp.cjs');
4
4
  const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bn6W0wTE.cjs');
5
5
 
@@ -69,6 +69,46 @@ require_dist.describe("extractIssueId", () => {
69
69
  require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
70
70
  });
71
71
  });
72
+ require_dist.describe("parseIssueId", () => {
73
+ require_dist.it("should remove trailing punctuation from issue ID", () => {
74
+ require_vi_ClIskdbk.globalExpect(
75
+ // trailing period and exclamation
76
+ require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41.!")
77
+ ).toBe("CLOUDFLARE-MCP-41");
78
+ });
79
+ require_dist.it("should not modify a clean issue ID", () => {
80
+ require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
81
+ });
82
+ require_dist.it("should remove special characters except dash and underscore", () => {
83
+ require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
84
+ });
85
+ });
86
+ require_dist.describe("parseIssueParams", () => {
87
+ require_dist.it("should parse from issueUrl", () => {
88
+ require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
89
+ organizationSlug: "sentry",
90
+ issueId: "123"
91
+ });
92
+ });
93
+ require_dist.it("should parse from issueId and organizationSlug", () => {
94
+ require_vi_ClIskdbk.globalExpect(require_issue_helpers.parseIssueParams({
95
+ issueId: "CLOUDFLARE-MCP-41.!",
96
+ organizationSlug: "cloudflare"
97
+ })).toEqual({
98
+ organizationSlug: "cloudflare",
99
+ issueId: "CLOUDFLARE-MCP-41"
100
+ });
101
+ });
102
+ require_dist.it("should throw if neither issueId nor issueUrl is provided", () => {
103
+ require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
104
+ });
105
+ require_dist.it("should throw if organizationSlug is missing and no issueUrl", () => {
106
+ require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
107
+ });
108
+ require_dist.it("should throw if issueUrl is invalid", () => {
109
+ require_vi_ClIskdbk.globalExpect(() => require_issue_helpers.parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
110
+ });
111
+ });
72
112
 
73
113
  //#endregion
74
114
  //# sourceMappingURL=issue-helpers.test.cjs.map
@@ -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 { extractIssueId } 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"],"mappings":";;;;;;AAGA,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"}
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,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;GAAE,kBAAkB;GAAc,SAAS;EAAqB,EAAC;CAC5E,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"}
@@ -1,4 +1,4 @@
1
- import { extractIssueId } from "../issue-helpers-DFde36Zu.js";
1
+ import { extractIssueId, parseIssueId, parseIssueParams } from "../issue-helpers-Cx6bFCUv.js";
2
2
  import { describe, it } from "../dist-Bewd5-7a.js";
3
3
  import { globalExpect } from "../vi.ClIskdbk-Dd6dTM3O.js";
4
4
 
@@ -68,6 +68,46 @@ describe("extractIssueId", () => {
68
68
  globalExpect(() => extractIssueId("abc")).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
69
69
  });
70
70
  });
71
+ describe("parseIssueId", () => {
72
+ it("should remove trailing punctuation from issue ID", () => {
73
+ globalExpect(
74
+ // trailing period and exclamation
75
+ parseIssueId("CLOUDFLARE-MCP-41.!")
76
+ ).toBe("CLOUDFLARE-MCP-41");
77
+ });
78
+ it("should not modify a clean issue ID", () => {
79
+ globalExpect(parseIssueId("CLOUDFLARE-MCP-41")).toBe("CLOUDFLARE-MCP-41");
80
+ });
81
+ it("should remove special characters except dash and underscore", () => {
82
+ globalExpect(parseIssueId("ID_123-456!@#")).toBe("ID_123-456");
83
+ });
84
+ });
85
+ describe("parseIssueParams", () => {
86
+ it("should parse from issueUrl", () => {
87
+ globalExpect(parseIssueParams({ issueUrl: "https://sentry.io/sentry/issues/123" })).toEqual({
88
+ organizationSlug: "sentry",
89
+ issueId: "123"
90
+ });
91
+ });
92
+ it("should parse from issueId and organizationSlug", () => {
93
+ globalExpect(parseIssueParams({
94
+ issueId: "CLOUDFLARE-MCP-41.!",
95
+ organizationSlug: "cloudflare"
96
+ })).toEqual({
97
+ organizationSlug: "cloudflare",
98
+ issueId: "CLOUDFLARE-MCP-41"
99
+ });
100
+ });
101
+ it("should throw if neither issueId nor issueUrl is provided", () => {
102
+ globalExpect(() => parseIssueParams({ organizationSlug: "foo" })).toThrowErrorMatchingInlineSnapshot(`[Error: Either issueId or issueUrl must be provided]`);
103
+ });
104
+ it("should throw if organizationSlug is missing and no issueUrl", () => {
105
+ globalExpect(() => parseIssueParams({ issueId: "123" })).toThrowErrorMatchingInlineSnapshot(`[Error: Organization slug is required]`);
106
+ });
107
+ it("should throw if issueUrl is invalid", () => {
108
+ globalExpect(() => parseIssueParams({ issueUrl: "not-a-url" })).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid Sentry issue URL. Must start with http:// or https://]`);
109
+ });
110
+ });
71
111
 
72
112
  //#endregion
73
113
  //# sourceMappingURL=issue-helpers.test.js.map
@@ -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 { extractIssueId } 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"],"mappings":";;;;;AAGA,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,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,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: \"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,MAAM,eAAe,GAAG,CAAC,CAAC,oCAC9B,wEACF;CACF,EAAC;AAEF,IAAG,2CAA2C,MAAM;AAClD,eAAO,MACL,eAAe,wCAAwC,CACxD,CAAC,oCACC,2EACF;CACF,EAAC;AAEF,IAAG,sDAAsD,MAAM;AAC7D,eACE,eAAe,sCAAsC,CACtD,CAAC,uBAAuB;;;;;MAKvB;CACH,EAAC;AAEF,IAAG,oDAAoD,MAAM;AAC3D,eAAO,MAAM,eAAe,MAAM,CAAC,CAAC,oCACjC,wEACF;CACF,EAAC;AACH,EAAC;AAEF,SAAS,gBAAgB,MAAM;AAC7B,IAAG,oDAAoD,MAAM;AAC3D;;GAEE,aAAa,sBAAsB;CACpC,CAAC,KAAK,oBAAoB;CAC5B,EAAC;AAEF,IAAG,sCAAsC,MAAM;AAC7C,eAAO,aAAa,oBAAoB,CAAC,CAAC,KAAK,oBAAoB;CACpE,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,aAAa,gBAAgB,CAAC,CAAC,KAAK,aAAa;CACzD,EAAC;AACH,EAAC;AAEF,SAAS,oBAAoB,MAAM;AACjC,IAAG,8BAA8B,MAAM;AACrC,eACE,iBAAiB,EACf,UAAU,sCACX,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAU,SAAS;EAAO,EAAC;CAC1D,EAAC;AAEF,IAAG,kDAAkD,MAAM;AACzD,eACE,iBAAiB;GACf,SAAS;GACT,kBAAkB;EACnB,EAAC,CACH,CAAC,QAAQ;GAAE,kBAAkB;GAAc,SAAS;EAAqB,EAAC;CAC5E,EAAC;AAEF,IAAG,4DAA4D,MAAM;AACnE,eAAO,MACL,iBAAiB,EAAE,kBAAkB,MAAO,EAAC,CAC9C,CAAC,oCACC,sDACF;CACF,EAAC;AAEF,IAAG,+DAA+D,MAAM;AACtE,eAAO,MACL,iBAAiB,EAAE,SAAS,MAAO,EAAC,CACrC,CAAC,oCACC,wCACF;CACF,EAAC;AAEF,IAAG,uCAAuC,MAAM;AAC9C,eAAO,MACL,iBAAiB,EAAE,UAAU,YAAa,EAAC,CAC5C,CAAC,oCACC,wEACF;CACF,EAAC;AACH,EAAC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ //#region src/internal/issue-helpers.ts
4
+ /**
5
+ * Extracts the Sentry issue ID and organization slug from a full URL
6
+ *
7
+ * @param url - A full Sentry issue URL
8
+ * @returns Object containing the numeric issue ID and organization slug (if found)
9
+ * @throws Error if the input is invalid
10
+ */
11
+ function extractIssueId(url) {
12
+ if (!url.startsWith("http://") && !url.startsWith("https://")) throw new Error("Invalid Sentry issue URL. Must start with http:// or https://");
13
+ const parsedUrl = new URL(url);
14
+ const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
15
+ if (pathParts.length < 2 || !pathParts.includes("issues")) throw new Error("Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'");
16
+ const issueId = pathParts[pathParts.indexOf("issues") + 1];
17
+ if (!issueId) throw new Error("Unable to determine issue ID from URL.");
18
+ let organizationSlug;
19
+ if (pathParts.includes("organizations")) organizationSlug = pathParts[pathParts.indexOf("organizations") + 1];
20
+ else if (pathParts.length > 1 && pathParts[0] !== "issues") organizationSlug = pathParts[0];
21
+ else {
22
+ const hostParts = parsedUrl.hostname.split(".");
23
+ if (hostParts.length > 2 && hostParts[0] !== "www") organizationSlug = hostParts[0];
24
+ }
25
+ if (!organizationSlug) throw new Error("Invalid Sentry issue URL. Could not determine organization.");
26
+ return {
27
+ issueId,
28
+ organizationSlug
29
+ };
30
+ }
31
+ /**
32
+ * Sometimes the LLM will pass in a funky issue shortId. For example it might pass
33
+ * in "CLOUDFLARE-MCP-41." instead of "CLOUDFLARE-MCP-41". This function attempts to
34
+ * fix common issues.
35
+ *
36
+ * @param issueId - The issue ID to parse
37
+ * @returns The parsed issue ID
38
+ */
39
+ function parseIssueId(issueId) {
40
+ let finalIssueId = issueId;
41
+ finalIssueId = finalIssueId.replace(/[^\w-]/g, "");
42
+ return finalIssueId;
43
+ }
44
+ /**
45
+ * Parses issue parameters from a variety of formats.
46
+ *
47
+ * @param params - Object containing issue URL, issue ID, and organization slug
48
+ * @returns Object containing the parsed organization slug and issue ID
49
+ * @throws Error if the input is invalid
50
+ */
51
+ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
52
+ if (issueUrl) {
53
+ const resolved = extractIssueId(issueUrl);
54
+ if (!resolved) throw new Error("Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'");
55
+ return {
56
+ ...resolved,
57
+ issueId: parseIssueId(resolved.issueId)
58
+ };
59
+ }
60
+ if (!organizationSlug) throw new Error("Organization slug is required");
61
+ if (issueId) return {
62
+ organizationSlug,
63
+ issueId: parseIssueId(issueId)
64
+ };
65
+ throw new Error("Either issueId or issueUrl must be provided");
66
+ }
67
+
68
+ //#endregion
69
+ Object.defineProperty(exports, 'extractIssueId', {
70
+ enumerable: true,
71
+ get: function () {
72
+ return extractIssueId;
73
+ }
74
+ });
75
+ Object.defineProperty(exports, 'parseIssueId', {
76
+ enumerable: true,
77
+ get: function () {
78
+ return parseIssueId;
79
+ }
80
+ });
81
+ Object.defineProperty(exports, 'parseIssueParams', {
82
+ enumerable: true,
83
+ get: function () {
84
+ return parseIssueParams;
85
+ }
86
+ });
87
+ //# sourceMappingURL=issue-helpers-CdWMhVWJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-CdWMhVWJ.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 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;AAElD,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  //#region src/internal/issue-helpers.ts
4
2
  /**
5
3
  * Extracts the Sentry issue ID and organization slug from a full URL
@@ -28,12 +26,43 @@ function extractIssueId(url) {
28
26
  organizationSlug
29
27
  };
30
28
  }
29
+ /**
30
+ * Sometimes the LLM will pass in a funky issue shortId. For example it might pass
31
+ * in "CLOUDFLARE-MCP-41." instead of "CLOUDFLARE-MCP-41". This function attempts to
32
+ * fix common issues.
33
+ *
34
+ * @param issueId - The issue ID to parse
35
+ * @returns The parsed issue ID
36
+ */
37
+ function parseIssueId(issueId) {
38
+ let finalIssueId = issueId;
39
+ finalIssueId = finalIssueId.replace(/[^\w-]/g, "");
40
+ return finalIssueId;
41
+ }
42
+ /**
43
+ * Parses issue parameters from a variety of formats.
44
+ *
45
+ * @param params - Object containing issue URL, issue ID, and organization slug
46
+ * @returns Object containing the parsed organization slug and issue ID
47
+ * @throws Error if the input is invalid
48
+ */
49
+ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
50
+ if (issueUrl) {
51
+ const resolved = extractIssueId(issueUrl);
52
+ if (!resolved) throw new Error("Invalid Sentry issue URL. Path should contain '/issues/{issue_id}'");
53
+ return {
54
+ ...resolved,
55
+ issueId: parseIssueId(resolved.issueId)
56
+ };
57
+ }
58
+ if (!organizationSlug) throw new Error("Organization slug is required");
59
+ if (issueId) return {
60
+ organizationSlug,
61
+ issueId: parseIssueId(issueId)
62
+ };
63
+ throw new Error("Either issueId or issueUrl must be provided");
64
+ }
31
65
 
32
66
  //#endregion
33
- Object.defineProperty(exports, 'extractIssueId', {
34
- enumerable: true,
35
- get: function () {
36
- return extractIssueId;
37
- }
38
- });
39
- //# sourceMappingURL=issue-helpers-C0kEdXOE.cjs.map
67
+ export { extractIssueId, parseIssueId, parseIssueParams };
68
+ //# sourceMappingURL=issue-helpers-Cx6bFCUv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-helpers-Cx6bFCUv.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 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;AAElD,QAAO;AACR;;;;;;;;AASD,SAAgB,iBAAiB,EAC/B,UACA,SACA,kBAKD,EAGC;AACA,KAAI,UAAU;EACZ,MAAM,WAAW,eAAe,SAAS;AACzC,OAAK,SACH,OAAM,IAAI,MACR;AAGJ,SAAO;GACL,GAAG;GACH,SAAS,aAAa,SAAS,QAAQ;EACxC;CACF;AAED,MAAK,iBACH,OAAM,IAAI,MAAM;AAGlB,KAAI,QACF,QAAO;EACL;EACA,SAAS,aAAa,QAAQ;CAC/B;AAGH,OAAM,IAAI,MAAM;AACjB"}
@@ -1,4 +1,4 @@
1
- import { ParamOrganizationSlug } from "./schema-k04PdSCK.js";
1
+ import { ParamOrganizationSlug } from "./schema-pZrPEvtp.js";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/promptDefinitions.ts
@@ -13,4 +13,4 @@ const PROMPT_DEFINITIONS = [{
13
13
 
14
14
  //#endregion
15
15
  export { PROMPT_DEFINITIONS };
16
- //# sourceMappingURL=promptDefinitions-CaRMCDPI.js.map
16
+ //# sourceMappingURL=promptDefinitions-C9aGYWZ6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"promptDefinitions-CaRMCDPI.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"],"mappings":";;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB;EAClB,UAAU,EAAE,QAAQ;CACrB;AACF,CACF"}
1
+ {"version":3,"file":"promptDefinitions-C9aGYWZ6.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"],"mappings":";;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB;EAClB,UAAU,EAAE,QAAQ;CACrB;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-BvloqMHW.cjs');
3
+ const require_schema = require('./schema-_xqdSRLo.cjs');
4
4
  const zod = require_chunk.__toESM(require("zod"));
5
5
 
6
6
  //#region src/promptDefinitions.ts
@@ -20,4 +20,4 @@ Object.defineProperty(exports, 'PROMPT_DEFINITIONS', {
20
20
  return PROMPT_DEFINITIONS;
21
21
  }
22
22
  });
23
- //# sourceMappingURL=promptDefinitions-CVB4IyVf.cjs.map
23
+ //# sourceMappingURL=promptDefinitions-OnJHLqrZ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"promptDefinitions-CVB4IyVf.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"],"mappings":";;;;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkBA;EAClB,UAAU,MAAE,QAAQ;CACrB;AACF,CACF"}
1
+ {"version":3,"file":"promptDefinitions-OnJHLqrZ.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"],"mappings":";;;;;;AAGA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkBA;EAClB,UAAU,MAAE,QAAQ;CACrB;AACF,CACF"}
@@ -1,4 +1,4 @@
1
- require('./schema-BvloqMHW.cjs');
2
- const require_promptDefinitions = require('./promptDefinitions-CVB4IyVf.cjs');
1
+ require('./schema-_xqdSRLo.cjs');
2
+ const require_promptDefinitions = require('./promptDefinitions-OnJHLqrZ.cjs');
3
3
 
4
4
  exports.PROMPT_DEFINITIONS = require_promptDefinitions.PROMPT_DEFINITIONS
@@ -1,4 +1,4 @@
1
- import "./schema-k04PdSCK.js";
2
- import { PROMPT_DEFINITIONS } from "./promptDefinitions-CaRMCDPI.js";
1
+ import "./schema-pZrPEvtp.js";
2
+ import { PROMPT_DEFINITIONS } from "./promptDefinitions-C9aGYWZ6.js";
3
3
 
4
4
  export { PROMPT_DEFINITIONS };