@sentry/mcp-server 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/api-client/client.cjs +2 -2
  2. package/dist/api-client/client.d.cts +3 -3
  3. package/dist/api-client/client.d.ts +3 -3
  4. package/dist/api-client/client.js +2 -2
  5. package/dist/api-client/client.test.cjs +2 -2
  6. package/dist/api-client/client.test.js +2 -2
  7. package/dist/api-client/index.cjs +2 -2
  8. package/dist/api-client/index.d.cts +3 -3
  9. package/dist/api-client/index.d.ts +3 -3
  10. package/dist/api-client/index.js +2 -2
  11. package/dist/api-client/schema.cjs +1 -1
  12. package/dist/api-client/schema.d.cts +1 -1
  13. package/dist/api-client/schema.d.ts +1 -1
  14. package/dist/api-client/schema.js +1 -1
  15. package/dist/api-client/types.d.cts +2 -2
  16. package/dist/api-client/types.d.ts +2 -2
  17. package/dist/{client-7aaWrjcF.d.ts → client-CRlGzHly.d.ts} +7 -7
  18. package/dist/{client-7aaWrjcF.d.ts.map → client-CRlGzHly.d.ts.map} +1 -1
  19. package/dist/{client-D9mOWh6s.js → client-CXUzhM1I.js} +2 -3
  20. package/dist/client-CXUzhM1I.js.map +1 -0
  21. package/dist/{client-CLuQEpjg.cjs → client-Cp-Y1PHr.cjs} +2 -3
  22. package/dist/client-Cp-Y1PHr.cjs.map +1 -0
  23. package/dist/{client-D1qv6QT3.d.cts → client-TjRMJC41.d.cts} +3 -3
  24. package/dist/{client-D1qv6QT3.d.cts.map → client-TjRMJC41.d.cts.map} +1 -1
  25. package/dist/index.cjs +12 -11
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +12 -11
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal/formatting.d.cts +3 -3
  30. package/dist/internal/formatting.d.ts +3 -3
  31. package/dist/internal/issue-helpers.cjs +1 -1
  32. package/dist/internal/issue-helpers.d.cts.map +1 -1
  33. package/dist/internal/issue-helpers.d.ts.map +1 -1
  34. package/dist/internal/issue-helpers.js +1 -1
  35. package/dist/internal/issue-helpers.test.cjs +1 -1
  36. package/dist/internal/issue-helpers.test.js +1 -1
  37. package/dist/{issue-helpers-Cx6bFCUv.js → issue-helpers-CyoHu5j4.js} +3 -1
  38. package/dist/issue-helpers-CyoHu5j4.js.map +1 -0
  39. package/dist/{issue-helpers-CdWMhVWJ.cjs → issue-helpers-DbsECZFq.cjs} +3 -1
  40. package/dist/issue-helpers-DbsECZFq.cjs.map +1 -0
  41. package/dist/{promptDefinitions-OnJHLqrZ.cjs → promptDefinitions-5jiZMBg5.cjs} +10 -2
  42. package/dist/promptDefinitions-5jiZMBg5.cjs.map +1 -0
  43. package/dist/promptDefinitions-CPTadtuI.js +24 -0
  44. package/dist/promptDefinitions-CPTadtuI.js.map +1 -0
  45. package/dist/promptDefinitions-Dcz3d9wL.d.cts +26 -0
  46. package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +1 -0
  47. package/dist/promptDefinitions-DrGK-v8n.d.ts +26 -0
  48. package/dist/promptDefinitions-DrGK-v8n.d.ts.map +1 -0
  49. package/dist/promptDefinitions.cjs +2 -2
  50. package/dist/promptDefinitions.d.cts +1 -1
  51. package/dist/promptDefinitions.d.ts +1 -1
  52. package/dist/promptDefinitions.js +2 -2
  53. package/dist/prompts-DgWOD2rU.js +32 -0
  54. package/dist/prompts-DgWOD2rU.js.map +1 -0
  55. package/dist/prompts-nfFU-zY-.cjs +39 -0
  56. package/dist/prompts-nfFU-zY-.cjs.map +1 -0
  57. package/dist/prompts.cjs +1 -1
  58. package/dist/prompts.d.cts +21 -11
  59. package/dist/prompts.d.cts.map +1 -1
  60. package/dist/prompts.d.ts +21 -11
  61. package/dist/prompts.d.ts.map +1 -1
  62. package/dist/prompts.js +1 -1
  63. package/dist/{schema-_xqdSRLo.cjs → schema-BCkBPgjj.cjs} +6 -6
  64. package/dist/schema-BCkBPgjj.cjs.map +1 -0
  65. package/dist/{schema-BnXdl41H.cjs → schema-BuByiEkr.cjs} +5 -2
  66. package/dist/schema-BuByiEkr.cjs.map +1 -0
  67. package/dist/{schema-BnIwkBRb.d.ts → schema-BzLH7LPa.d.ts} +335 -335
  68. package/dist/schema-BzLH7LPa.d.ts.map +1 -0
  69. package/dist/schema-CJrk_GUH.js +15 -0
  70. package/dist/schema-CJrk_GUH.js.map +1 -0
  71. package/dist/{schema-aits0AJg.d.cts → schema-DpID9ztC.d.cts} +351 -351
  72. package/dist/schema-DpID9ztC.d.cts.map +1 -0
  73. package/dist/{schema-BzPfPMq7.js → schema-Drnljuwf.js} +5 -2
  74. package/dist/schema-Drnljuwf.js.map +1 -0
  75. package/dist/schema.cjs +1 -1
  76. package/dist/schema.d.cts.map +1 -1
  77. package/dist/schema.d.ts.map +1 -1
  78. package/dist/schema.js +1 -1
  79. package/dist/{server-0pTMWBNO.js → server-BCmPE_Kt.js} +40 -10
  80. package/dist/server-BCmPE_Kt.js.map +1 -0
  81. package/dist/{server-C9hKLN_c.cjs → server-fYrkDOmy.cjs} +40 -10
  82. package/dist/server-fYrkDOmy.cjs.map +1 -0
  83. package/dist/server.cjs +9 -9
  84. package/dist/server.d.cts +3 -3
  85. package/dist/server.d.cts.map +1 -1
  86. package/dist/server.d.ts +3 -3
  87. package/dist/server.d.ts.map +1 -1
  88. package/dist/server.js +9 -9
  89. package/dist/{stdio-BsM7bvfc.cjs → stdio-BxJq3OU7.cjs} +2 -2
  90. package/dist/{stdio-BsM7bvfc.cjs.map → stdio-BxJq3OU7.cjs.map} +1 -1
  91. package/dist/{stdio-8gK912aj.js → stdio-QBN7-Am6.js} +2 -2
  92. package/dist/{stdio-8gK912aj.js.map → stdio-QBN7-Am6.js.map} +1 -1
  93. package/dist/test-setup.cjs +2 -2
  94. package/dist/test-setup.cjs.map +1 -1
  95. package/dist/test-setup.js +2 -2
  96. package/dist/test-setup.js.map +1 -1
  97. package/dist/{toolDefinitions-CRtHauHJ.cjs → toolDefinitions-1SnflztE.cjs} +12 -12
  98. package/dist/toolDefinitions-1SnflztE.cjs.map +1 -0
  99. package/dist/{toolDefinitions-CfNXEIaX.js → toolDefinitions-D13S3vQE.js} +12 -12
  100. package/dist/toolDefinitions-D13S3vQE.js.map +1 -0
  101. package/dist/{toolDefinitions-abNbVXb5.d.ts → toolDefinitions-DkO9-iEg.d.ts} +3 -3
  102. package/dist/toolDefinitions-DkO9-iEg.d.ts.map +1 -0
  103. package/dist/{toolDefinitions-DPePAe0y.d.cts → toolDefinitions-Z-JGBEIN.d.cts} +3 -3
  104. package/dist/toolDefinitions-Z-JGBEIN.d.cts.map +1 -0
  105. package/dist/toolDefinitions.cjs +2 -2
  106. package/dist/toolDefinitions.d.cts +1 -1
  107. package/dist/toolDefinitions.d.ts +1 -1
  108. package/dist/toolDefinitions.js +2 -2
  109. package/dist/toolDefinitions.test.cjs +2 -2
  110. package/dist/toolDefinitions.test.js +2 -2
  111. package/dist/{tools-2PgtFQ7q.cjs → tools-BgrGdS8I.cjs} +11 -11
  112. package/dist/tools-BgrGdS8I.cjs.map +1 -0
  113. package/dist/{tools-D5yXarBR.js → tools-CnVttgaS.js} +11 -11
  114. package/dist/tools-CnVttgaS.js.map +1 -0
  115. package/dist/tools.cjs +4 -4
  116. package/dist/tools.d.cts +5 -5
  117. package/dist/tools.d.cts.map +1 -1
  118. package/dist/tools.d.ts +8 -8
  119. package/dist/tools.d.ts.map +1 -1
  120. package/dist/tools.js +4 -4
  121. package/dist/tools.test.cjs +12 -12
  122. package/dist/tools.test.cjs.map +1 -1
  123. package/dist/tools.test.js +12 -12
  124. package/dist/tools.test.js.map +1 -1
  125. package/dist/transports/stdio.cjs +10 -10
  126. package/dist/transports/stdio.d.cts +3 -3
  127. package/dist/transports/stdio.d.ts +3 -3
  128. package/dist/transports/stdio.js +10 -10
  129. package/dist/{types-DFKY4nvR.d.cts → types-BO0mZ8vj.d.cts} +7 -6
  130. package/dist/types-BO0mZ8vj.d.cts.map +1 -0
  131. package/dist/{types-Dg6ARePW.d.cts → types-CczA6AH1.d.cts} +2 -2
  132. package/dist/{types-Dg6ARePW.d.cts.map → types-CczA6AH1.d.cts.map} +1 -1
  133. package/dist/{types-X3ot7x0d.d.ts → types-Cis1PiVW.d.ts} +7 -6
  134. package/dist/types-Cis1PiVW.d.ts.map +1 -0
  135. package/dist/{types-RxedZjnY.d.ts → types-X5Epdrlo.d.ts} +2 -2
  136. package/dist/{types-RxedZjnY.d.ts.map → types-X5Epdrlo.d.ts.map} +1 -1
  137. package/dist/types.d.cts +4 -4
  138. package/dist/types.d.ts +4 -4
  139. package/dist/version-DtWIv-x9.js +6 -0
  140. package/dist/{version-psBzsZ8-.js.map → version-DtWIv-x9.js.map} +1 -1
  141. package/dist/{version-B3dZ0aPQ.cjs → version-sY-gY_s6.cjs} +2 -2
  142. package/dist/{version-B3dZ0aPQ.cjs.map → version-sY-gY_s6.cjs.map} +1 -1
  143. package/dist/version.cjs +1 -1
  144. package/dist/version.js +1 -1
  145. package/package.json +5 -5
  146. package/dist/client-CLuQEpjg.cjs.map +0 -1
  147. package/dist/client-D9mOWh6s.js.map +0 -1
  148. package/dist/issue-helpers-CdWMhVWJ.cjs.map +0 -1
  149. package/dist/issue-helpers-Cx6bFCUv.js.map +0 -1
  150. package/dist/promptDefinitions-C85r2wAk.d.ts +0 -15
  151. package/dist/promptDefinitions-C85r2wAk.d.ts.map +0 -1
  152. package/dist/promptDefinitions-C9aGYWZ6.js +0 -16
  153. package/dist/promptDefinitions-C9aGYWZ6.js.map +0 -1
  154. package/dist/promptDefinitions-CkGJr3c4.d.cts +0 -15
  155. package/dist/promptDefinitions-CkGJr3c4.d.cts.map +0 -1
  156. package/dist/promptDefinitions-OnJHLqrZ.cjs.map +0 -1
  157. package/dist/prompts--QCiXmR2.cjs +0 -26
  158. package/dist/prompts--QCiXmR2.cjs.map +0 -1
  159. package/dist/prompts-Tz-qECa0.js +0 -19
  160. package/dist/prompts-Tz-qECa0.js.map +0 -1
  161. package/dist/schema-BnIwkBRb.d.ts.map +0 -1
  162. package/dist/schema-BnXdl41H.cjs.map +0 -1
  163. package/dist/schema-BzPfPMq7.js.map +0 -1
  164. package/dist/schema-_xqdSRLo.cjs.map +0 -1
  165. package/dist/schema-aits0AJg.d.cts.map +0 -1
  166. package/dist/schema-pZrPEvtp.js +0 -15
  167. package/dist/schema-pZrPEvtp.js.map +0 -1
  168. package/dist/server-0pTMWBNO.js.map +0 -1
  169. package/dist/server-C9hKLN_c.cjs.map +0 -1
  170. package/dist/toolDefinitions-CRtHauHJ.cjs.map +0 -1
  171. package/dist/toolDefinitions-CfNXEIaX.js.map +0 -1
  172. package/dist/toolDefinitions-DPePAe0y.d.cts.map +0 -1
  173. package/dist/toolDefinitions-abNbVXb5.d.ts.map +0 -1
  174. package/dist/tools-2PgtFQ7q.cjs.map +0 -1
  175. package/dist/tools-D5yXarBR.js.map +0 -1
  176. package/dist/types-DFKY4nvR.d.cts.map +0 -1
  177. package/dist/types-X3ot7x0d.d.ts.map +0 -1
  178. package/dist/version-psBzsZ8-.js +0 -6
@@ -1,13 +1,13 @@
1
- import { SentryApiService } from "./client-D9mOWh6s.js";
1
+ import { SentryApiService } from "./client-CXUzhM1I.js";
2
2
  import { formatIssueOutput } from "./formatting-C6Py2iOz.js";
3
- import { parseIssueParams } from "./issue-helpers-Cx6bFCUv.js";
3
+ import { parseIssueParams } from "./issue-helpers-CyoHu5j4.js";
4
4
  import { logError } from "./logging-Cxm8lQvg.js";
5
5
  import { setTag } from "@sentry/core";
6
6
 
7
7
  //#region src/tools.ts
8
8
  function apiServiceFromContext(context, opts = {}) {
9
9
  return new SentryApiService({
10
- host: opts.regionUrl || context.host,
10
+ host: opts.regionUrl ? new URL(opts.regionUrl).host : context.host,
11
11
  accessToken: context.accessToken
12
12
  });
13
13
  }
@@ -398,7 +398,7 @@ const TOOL_HANDLERS = {
398
398
  output += "- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\n";
399
399
  return output;
400
400
  },
401
- begin_autofix: async (context, params) => {
401
+ begin_seer_issue_fix: async (context, params) => {
402
402
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
403
403
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
404
404
  organizationSlug: params.organizationSlug ?? context.organizationSlug,
@@ -411,20 +411,20 @@ const TOOL_HANDLERS = {
411
411
  issueId: parsedIssueId
412
412
  });
413
413
  return [
414
- `# Autofix Started for Issue ${parsedIssueId}`,
414
+ `# Issue Fix Started for Issue ${parsedIssueId}`,
415
415
  "",
416
416
  `**Run ID:**: ${data.run_id}`,
417
417
  "",
418
- "This operation may take some time, so you should call `get_autofix_status()` to check the status of the analysis, and repeat the process until its finished.",
418
+ "This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis, and repeat the process until its finished.",
419
419
  "",
420
420
  "You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..",
421
421
  "",
422
422
  "```",
423
- params.issueUrl ? `get_autofix_status(issueUrl="${params.issueUrl}")` : `get_autofix_status(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`,
423
+ params.issueUrl ? `get_seer_issue_fix_status(issueUrl="${params.issueUrl}")` : `get_seer_issue_fix_status(organizationSlug="${orgSlug}", issueId="${parsedIssueId}")`,
424
424
  "```"
425
425
  ].join("\n");
426
426
  },
427
- get_autofix_status: async (context, params) => {
427
+ get_seer_issue_fix_status: async (context, params) => {
428
428
  const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
429
429
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
430
430
  organizationSlug: params.organizationSlug ?? context.organizationSlug,
@@ -436,9 +436,9 @@ const TOOL_HANDLERS = {
436
436
  organizationSlug: orgSlug,
437
437
  issueId: parsedIssueId
438
438
  });
439
- let output = `# Autofix Status for Issue ${parsedIssueId}\n\n`;
439
+ let output = `# Issue Fix Status for Issue ${parsedIssueId}\n\n`;
440
440
  if (!autofix) {
441
- output += `No autofix run found for ${parsedIssueId}.\n\nYou can initiate a new autofix run using the \`begin_autofix\` tool.`;
441
+ output += `No issue fix process found for ${parsedIssueId}.\n\nYou can initiate a new issue fix execution using the \`begin_seer_issue_fix\` tool.`;
442
442
  return output;
443
443
  }
444
444
  for (const step of autofix.steps) {
@@ -491,4 +491,4 @@ function getOutputForAutofixStep(step) {
491
491
 
492
492
  //#endregion
493
493
  export { TOOL_HANDLERS };
494
- //# sourceMappingURL=tools-D5yXarBR.js.map
494
+ //# sourceMappingURL=tools-CnVttgaS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-CnVttgaS.js","names":["context: ServerContext","opts: { regionUrl?: string }","orgSlug","issue","event","clientKey: ClientKey | null","step: z.infer<typeof AutofixRunStepSchema>","typedStep"],"sources":["../src/tools.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport {\n type AutofixRunStepDefaultSchema,\n type AutofixRunStepRootCauseAnalysisSchema,\n type AutofixRunStepSchema,\n type AutofixRunStepSolutionSchema,\n type ClientKey,\n SentryApiService,\n} from \"./api-client/index\";\nimport { formatIssueOutput } from \"./internal/formatting\";\nimport { parseIssueParams } from \"./internal/issue-helpers\";\nimport { logError } from \"./logging\";\nimport type { ServerContext, ToolHandlers } from \"./types\";\nimport { setTag } from \"@sentry/core\";\n\nfunction apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n return new SentryApiService({\n host: opts.regionUrl ? new URL(opts.regionUrl).host : context.host,\n accessToken: context.accessToken,\n });\n}\n\nexport const TOOL_HANDLERS = {\n list_organizations: async (context) => {\n const apiService = apiServiceFromContext(context);\n const organizations = await apiService.listOrganizations();\n\n let output = \"# Organizations\\n\\n\";\n\n if (organizations.length === 0) {\n output += \"You don't appear to be a member of any organizations.\\n\";\n return output;\n }\n\n output += organizations\n .map((org) =>\n [\n `## **${org.slug}**`,\n \"\",\n `**Web URL:** ${org.links.organizationUrl}`,\n `**Region URL:** ${org.links.regionUrl}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n\n output += \"\\n\\n# Using this information\\n\\n\";\n output += `- The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\\n`;\n output += `- If a tool supports passing in the \\`regionUrl\\`, you should also pass in the correct value there.\\n`;\n\n return output;\n },\n list_teams: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n list_projects: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const projects = await apiService.listProjects(organizationSlug);\n let output = `# Projects in **${organizationSlug}**\\n\\n`;\n if (projects.length === 0) {\n output += \"No projects found.\\n\";\n return output;\n }\n output += projects.map((project) => `- **${project.slug}**\\n`).join(\"\");\n return output;\n },\n list_issues: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const sortByMap = {\n last_seen: \"date\" as const,\n first_seen: \"new\" as const,\n count: \"freq\" as const,\n userCount: \"user\" as const,\n };\n const issues = await apiService.listIssues({\n organizationSlug,\n projectSlug: params.projectSlug,\n query: params.query,\n sortBy: params.sortBy\n ? sortByMap[params.sortBy as keyof typeof sortByMap]\n : undefined,\n });\n let output = `# Issues in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (issues.length === 0) {\n output += \"No issues found.\\n\";\n return output;\n }\n output += issues\n .map((issue) =>\n [\n `## ${issue.shortId}`,\n \"\",\n `**Description**: ${issue.title}`,\n `**Culprit**: ${issue.culprit}`,\n `**First Seen**: ${new Date(issue.firstSeen).toISOString()}`,\n `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}`,\n `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}`,\n ].join(\"\\n\"),\n )\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n list_releases: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const releases = await apiService.listReleases({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (releases.length === 0) {\n output += \"No releases found.\\n\";\n return output;\n }\n output += releases\n .map((release) => {\n const releaseInfo = [\n `## ${release.shortVersion}`,\n \"\",\n `**Created**: ${new Date(release.dateCreated).toISOString()}`,\n ];\n if (release.dateReleased) {\n releaseInfo.push(\n `**Released**: ${new Date(release.dateReleased).toISOString()}`,\n );\n }\n if (release.firstEvent) {\n releaseInfo.push(\n `**First Event**: ${new Date(release.firstEvent).toISOString()}`,\n );\n }\n if (release.lastEvent) {\n releaseInfo.push(\n `**Last Event**: ${new Date(release.lastEvent).toISOString()}`,\n );\n }\n if (release.newGroups !== undefined) {\n releaseInfo.push(`**New Issues**: ${release.newGroups}`);\n }\n if (release.projects && release.projects.length > 0) {\n releaseInfo.push(\n `**Projects**: ${release.projects.map((p) => p.name).join(\", \")}`,\n );\n }\n if (release.lastCommit) {\n releaseInfo.push(\"\", `### Last Commit`, \"\");\n releaseInfo.push(`**Commit ID**: ${release.lastCommit.id}`);\n releaseInfo.push(`**Commit Message**: ${release.lastCommit.message}`);\n releaseInfo.push(\n `**Commit Author**: ${release.lastCommit.author.name}`,\n );\n releaseInfo.push(\n `**Commit Date**: ${new Date(release.lastCommit.dateCreated).toISOString()}`,\n );\n }\n if (release.lastDeploy) {\n releaseInfo.push(\"\", `### Last Deploy`, \"\");\n releaseInfo.push(`**Deploy ID**: ${release.lastDeploy.id}`);\n releaseInfo.push(\n `**Environment**: ${release.lastDeploy.environment}`,\n );\n if (release.lastDeploy.dateStarted) {\n releaseInfo.push(\n `**Deploy Started**: ${new Date(release.lastDeploy.dateStarted).toISOString()}`,\n );\n }\n if (release.lastDeploy.dateFinished) {\n releaseInfo.push(\n `**Deploy Finished**: ${new Date(release.lastDeploy.dateFinished).toISOString()}`,\n );\n }\n }\n return releaseInfo.join(\"\\n\");\n })\n .join(\"\\n\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Release version in commit messages or documentation.\\n`;\n output += `- You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:${releases.length ? releases[0]!.version : \"VERSION\"}\\`.\\n`;\n return output;\n },\n list_tags: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const tagList = await apiService.listTags({ organizationSlug }, {});\n let output = `# Tags in **${organizationSlug}**\\n\\n`;\n if (tagList.length === 0) {\n output += \"No tags found.\\n\";\n return output;\n }\n output += tagList.map((tag) => [`- ${tag.key}`].join(\"\\n\")).join(\"\\n\");\n output += \"\\n\\n\";\n output += \"# Using this information\\n\\n\";\n output += `- You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\\n`;\n return output;\n },\n get_issue_summary: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n\n const issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n let output = `# Issue ${issue.shortId} in **${orgSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, issue.shortId)}\\n`;\n return output;\n },\n get_issue_details: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug ?? context.organizationSlug;\n if (!orgSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", orgSlug);\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: params.eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${params.eventId}`;\n }\n const event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId: params.eventId,\n });\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n\n const [issue, event] = await Promise.all([\n apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n ]);\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n });\n },\n search_errors: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const eventList = await apiService.searchErrors({\n organizationSlug,\n projectSlug: params.projectSlug,\n filename: params.filename,\n query: params.query,\n transaction: params.transaction,\n sortBy: params.sortBy as \"last_seen\" | \"count\" | undefined,\n });\n let output = `# Errors in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These errors match the query \\`${params.query}\\`\\n`;\n if (params.filename)\n output += `These errors are limited to the file suffix \\`${params.filename}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.issue}\\n\\n`;\n output += `**Description**: ${eventSummary.title}\\n`;\n output += `**Issue ID**: ${eventSummary.issue}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, eventSummary.issue)}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**Last Seen**: ${eventSummary[\"last_seen()\"]}\\n`;\n output += `**Occurrences**: ${eventSummary[\"count()\"]}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\\n`;\n output += `- You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"${organizationSlug}\", issueId=<issueID>)\\`\\n`;\n return output;\n },\n search_transactions: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const eventList = await apiService.searchSpans({\n organizationSlug,\n projectSlug: params.projectSlug,\n transaction: params.transaction,\n query: params.query,\n sortBy: params.sortBy as \"timestamp\" | \"duration\" | undefined,\n });\n let output = `# Transactions in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : \"\"}**\\n\\n`;\n if (params.query)\n output += `These spans match the query \\`${params.query}\\`\\n`;\n if (params.transaction)\n output += `These spans are limited to the transaction \\`${params.transaction}\\`\\n`;\n output += \"\\n\";\n if (eventList.length === 0) {\n output += `No results found\\n\\n`;\n output += `We searched within the ${organizationSlug} organization.\\n\\n`;\n return output;\n }\n for (const eventSummary of eventList) {\n output += `## ${eventSummary.transaction}\\n\\n`;\n output += `**Span ID**: ${eventSummary.id}\\n`;\n output += `**Trace ID**: ${eventSummary.trace}\\n`;\n output += `**Span Operation**: ${eventSummary[\"span.op\"]}\\n`;\n output += `**Span Description**: ${eventSummary[\"span.description\"]}\\n`;\n output += `**Duration**: ${eventSummary[\"span.duration\"]}\\n`;\n output += `**Timestamp**: ${eventSummary.timestamp}\\n`;\n output += `**Project**: ${eventSummary.project}\\n`;\n output += `**URL**: ${apiService.getTraceUrl(organizationSlug, eventSummary.trace)}\\n\\n`;\n }\n return output;\n },\n create_team: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const team = await apiService.createTeam({\n organizationSlug,\n name: params.name,\n });\n let output = `# New Team in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${team.id}\\n`;\n output += `**Slug**: ${team.slug}\\n`;\n output += `**Name**: ${team.name}\\n`;\n output += \"# Using this information\\n\\n\";\n output += `- You should always inform the user of the Team Slug value.\\n`;\n return output;\n },\n create_project: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const project = await apiService.createProject({\n organizationSlug,\n teamSlug: params.teamSlug,\n name: params.name,\n platform: params.platform,\n });\n let clientKey: ClientKey | null = null;\n try {\n clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: project.slug,\n name: \"Default\",\n });\n } catch (err) {\n logError(err);\n }\n let output = `# New Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (clientKey) {\n output += `**SENTRY_DSN**: ${clientKey?.dsn.public}\\n\\n`;\n } else {\n output += \"**SENTRY_DSN**: There was an error fetching this value.\\n\\n\";\n }\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\\n`;\n output += `- You should always inform the user of the **SENTRY_DSN** and Project Slug values.\\n`;\n return output;\n },\n create_dsn: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const clientKey = await apiService.createClientKey({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n });\n let output = `# New DSN in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n`;\n output += `**Name**: ${clientKey.name}\\n\\n`;\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n list_dsns: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n let organizationSlug = params.organizationSlug;\n if (!organizationSlug && context.organizationSlug) {\n organizationSlug = context.organizationSlug;\n }\n if (!organizationSlug) {\n throw new Error(\"Organization slug is required\");\n }\n setTag(\"organization.slug\", organizationSlug);\n\n const clientKeys = await apiService.listClientKeys({\n organizationSlug,\n projectSlug: params.projectSlug,\n });\n let output = `# DSNs in **${organizationSlug}/${params.projectSlug}**\\n\\n`;\n if (clientKeys.length === 0) {\n output +=\n \"No DSNs were found.\\n\\nYou can create new one using the `create_dsn` tool.\";\n return output;\n }\n for (const clientKey of clientKeys) {\n output += `## ${clientKey.name}\\n`;\n output += `**ID**: ${clientKey.id}\\n`;\n output += `**DSN**: ${clientKey.dsn.public}\\n\\n`;\n }\n output += \"# Using this information\\n\\n\";\n output +=\n \"- The `SENTRY_DSN` value is a URL that you can use to initialize Sentry's SDKs.\\n\";\n return output;\n },\n begin_seer_issue_fix: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n\n const data = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n return [\n `# Issue Fix Started for Issue ${parsedIssueId}`,\n \"\",\n `**Run ID:**: ${data.run_id}`,\n \"\",\n \"This operation may take some time, so you should call `get_seer_issue_fix_status()` to check the status of the analysis, and repeat the process until its finished.\",\n \"\",\n \"You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\",\n \"\",\n \"```\",\n params.issueUrl\n ? `get_seer_issue_fix_status(issueUrl=\"${params.issueUrl}\")`\n : `get_seer_issue_fix_status(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`,\n \"```\",\n ].join(\"\\n\");\n },\n get_seer_issue_fix_status: async (context, params) => {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug ?? context.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n setTag(\"organization.slug\", orgSlug);\n const { autofix } = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n let output = `# Issue Fix Status for Issue ${parsedIssueId}\\n\\n`;\n if (!autofix) {\n output += `No issue fix process found for ${parsedIssueId}.\\n\\nYou can initiate a new issue fix execution using the \\`begin_seer_issue_fix\\` tool.`;\n return output;\n }\n for (const step of autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n return output;\n },\n} satisfies ToolHandlers;\n\nfunction getOutputForAutofixStep(step: z.infer<typeof AutofixRunStepSchema>) {\n let output = `## ${step.title}\\n\\n`;\n\n if (step.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n return output;\n }\n\n if (step.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step. Please check back in a minute.**\\n\\n`;\n return output;\n }\n\n if (step.type === \"root_cause_analysis\") {\n const typedStep = step as z.infer<\n typeof AutofixRunStepRootCauseAnalysisSchema\n >;\n\n for (const cause of typedStep.causes) {\n if (typedStep.description) {\n output += `${typedStep.description}\\n\\n`;\n }\n for (const entry of cause.root_cause_reproduction) {\n output += `**${entry.title}**\\n\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n }\n return output;\n }\n\n if (step.type === \"solution\") {\n const typedStep = step as z.infer<typeof AutofixRunStepSolutionSchema>;\n output += `${typedStep.description}\\n\\n`;\n for (const entry of typedStep.solution) {\n output += `**${entry.title}**\\n`;\n output += `${entry.code_snippet_and_analysis}\\n\\n`;\n }\n\n if (typedStep.status === \"FAILED\") {\n output += `**Sentry hit an error completing this step.\\n\\n`;\n } else if (typedStep.status !== \"COMPLETED\") {\n output += `**Sentry is still working on this step.**\\n\\n`;\n }\n\n return output;\n }\n\n const typedStep = step as z.infer<typeof AutofixRunStepDefaultSchema>;\n if (typedStep.insights && typedStep.insights.length > 0) {\n for (const entry of typedStep.insights) {\n output += `**${entry.insight}**\\n`;\n output += `${entry.justification}\\n\\n`;\n }\n } else if (step.output_stream) {\n output += `${step.output_stream}\\n`;\n }\n\n return output;\n}\n"],"mappings":";;;;;;;AAeA,SAAS,sBACPA,SACAC,OAA+B,CAAE,GACjC;AACA,QAAO,IAAI,iBAAiB;EAC1B,MAAM,KAAK,YAAY,IAAI,IAAI,KAAK,WAAW,OAAO,QAAQ;EAC9D,aAAa,QAAQ;CACtB;AACF;AAED,MAAa,gBAAgB;CAC3B,oBAAoB,OAAO,YAAY;EACrC,MAAM,aAAa,sBAAsB,QAAQ;EACjD,MAAM,gBAAgB,MAAM,WAAW,mBAAmB;EAE1D,IAAI,SAAS;AAEb,MAAI,cAAc,WAAW,GAAG;AAC9B,aAAU;AACV,UAAO;EACR;AAED,Y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,cAAW,IAAI,MAAM,MAAM;AAC3B,cAAW,EAAE,MAAM,0BAA0B;EAC9C;AAED,MAAIA,YAAU,WAAW,SACvB,YAAW;WACFA,YAAU,WAAW,YAC9B,YAAW;AAGb,SAAO;CACR;CAED,MAAM,YAAY;AAClB,KAAI,UAAU,YAAY,UAAU,SAAS,SAAS,EACpD,MAAK,MAAM,SAAS,UAAU,UAAU;AACtC,aAAW,IAAI,MAAM,QAAQ;AAC7B,aAAW,EAAE,MAAM,cAAc;CAClC;UACQ,KAAK,cACd,YAAW,EAAE,KAAK,cAAc;AAGlC,QAAO;AACR"}
package/dist/tools.cjs CHANGED
@@ -1,10 +1,10 @@
1
- require('./schema-BnXdl41H.cjs');
2
- require('./client-CLuQEpjg.cjs');
1
+ require('./schema-BuByiEkr.cjs');
2
+ require('./client-Cp-Y1PHr.cjs');
3
3
  require('./types-o3zWarRp.cjs');
4
4
  require('./api-client-CEBuz3Zu.cjs');
5
5
  require('./formatting-BmbJ5-Uh.cjs');
6
- require('./issue-helpers-CdWMhVWJ.cjs');
6
+ require('./issue-helpers-DbsECZFq.cjs');
7
7
  require('./logging-BEMgC5SA.cjs');
8
- const require_tools = require('./tools-2PgtFQ7q.cjs');
8
+ const require_tools = require('./tools-BgrGdS8I.cjs');
9
9
 
10
10
  exports.TOOL_HANDLERS = require_tools.TOOL_HANDLERS
package/dist/tools.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import "./promptDefinitions-CkGJr3c4.cjs";
2
- import "./toolDefinitions-DPePAe0y.cjs";
3
- import { ServerContext } from "./types-DFKY4nvR.cjs";
1
+ import "./promptDefinitions-Dcz3d9wL.cjs";
2
+ import "./toolDefinitions-Z-JGBEIN.cjs";
3
+ import { ServerContext } from "./types-BO0mZ8vj.cjs";
4
4
 
5
5
  //#region src/tools.d.ts
6
6
  declare const TOOL_HANDLERS: {
@@ -200,7 +200,7 @@ declare const TOOL_HANDLERS: {
200
200
  teamSlug?: unknown;
201
201
  platform?: unknown;
202
202
  }) => Promise<string>;
203
- begin_autofix: (context: ServerContext, params: {
203
+ begin_seer_issue_fix: (context: ServerContext, params: {
204
204
  organizationSlug: string | undefined;
205
205
  regionUrl: string | undefined;
206
206
  issueId: string | undefined;
@@ -215,7 +215,7 @@ declare const TOOL_HANDLERS: {
215
215
  teamSlug?: unknown;
216
216
  platform?: unknown;
217
217
  }) => Promise<string>;
218
- get_autofix_status: (context: ServerContext, params: {
218
+ get_seer_issue_fix_status: (context: ServerContext, params: {
219
219
  organizationSlug: string | undefined;
220
220
  regionUrl: string | undefined;
221
221
  issueId: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.cts","names":[],"sources":["../src/tools.ts"],"sourcesContent":null,"mappings":";;;;;cA0Ba;gCAulBW;;;IAvlBX,SAAA,EAAA,MAulBW,GAAA,SAAA;IAAA,WAAA,CAAA,EAAA,OAAA;IAAA,KAAA,CAAA,EAAA,OAAA"}
1
+ {"version":3,"file":"tools.d.cts","names":[],"sources":["../src/tools.ts"],"sourcesContent":null,"mappings":";;;;;cAyBa;gCAulBW;;;IAvlBX,SAAA,EAAA,MAulBW,GAAA,SAAA;IAAA,WAAA,CAAA,EAAA,OAAA;IAAA,KAAA,CAAA,EAAA,OAAA"}
package/dist/tools.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import "./promptDefinitions-C85r2wAk.js";
2
- import "./toolDefinitions-abNbVXb5.js";
3
- import { ServerContext } from "./types-X3ot7x0d.js";
1
+ import "./promptDefinitions-DrGK-v8n.js";
2
+ import "./toolDefinitions-DkO9-iEg.js";
3
+ import { ServerContext } from "./types-Cis1PiVW.js";
4
4
 
5
5
  //#region src/tools.d.ts
6
6
  declare const TOOL_HANDLERS: {
@@ -40,7 +40,7 @@ declare const TOOL_HANDLERS: {
40
40
  regionUrl: string | undefined;
41
41
  projectSlug: string | undefined;
42
42
  query: string | undefined;
43
- sortBy: "last_seen" | "first_seen" | "count" | "userCount" | undefined;
43
+ sortBy: "count" | "userCount" | "last_seen" | "first_seen" | undefined;
44
44
  issueId?: unknown;
45
45
  issueUrl?: unknown;
46
46
  eventId?: unknown;
@@ -117,7 +117,7 @@ declare const TOOL_HANDLERS: {
117
117
  filename: string | undefined;
118
118
  transaction: string | undefined;
119
119
  query: string | undefined;
120
- sortBy: "last_seen" | "count";
120
+ sortBy: "count" | "last_seen";
121
121
  issueId?: unknown;
122
122
  issueUrl?: unknown;
123
123
  eventId?: unknown;
@@ -131,7 +131,7 @@ declare const TOOL_HANDLERS: {
131
131
  projectSlug: string | undefined;
132
132
  transaction: string | undefined;
133
133
  query: string | undefined;
134
- sortBy: "timestamp" | "duration";
134
+ sortBy: "duration" | "timestamp";
135
135
  issueId?: unknown;
136
136
  issueUrl?: unknown;
137
137
  eventId?: unknown;
@@ -200,7 +200,7 @@ declare const TOOL_HANDLERS: {
200
200
  teamSlug?: unknown;
201
201
  platform?: unknown;
202
202
  }) => Promise<string>;
203
- begin_autofix: (context: ServerContext, params: {
203
+ begin_seer_issue_fix: (context: ServerContext, params: {
204
204
  organizationSlug: string | undefined;
205
205
  regionUrl: string | undefined;
206
206
  issueId: string | undefined;
@@ -215,7 +215,7 @@ declare const TOOL_HANDLERS: {
215
215
  teamSlug?: unknown;
216
216
  platform?: unknown;
217
217
  }) => Promise<string>;
218
- get_autofix_status: (context: ServerContext, params: {
218
+ get_seer_issue_fix_status: (context: ServerContext, params: {
219
219
  organizationSlug: string | undefined;
220
220
  regionUrl: string | undefined;
221
221
  issueId: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","names":[],"sources":["../src/tools.ts"],"sourcesContent":null,"mappings":";;;;;cA0Ba;gCAulBW;;;IAvlBX,SAAA,EAAA,MAulBW,GAAA,SAAA;IAAA,WAAA,CAAA,EAAA,OAAA;IAAA,KAAA,CAAA,EAAA,OAAA"}
1
+ {"version":3,"file":"tools.d.ts","names":[],"sources":["../src/tools.ts"],"sourcesContent":null,"mappings":";;;;;cAyBa;gCAulBW;;;IAvlBX,SAAA,EAAA,MAulBW,GAAA,SAAA;IAAA,WAAA,CAAA,EAAA,OAAA;IAAA,KAAA,CAAA,EAAA,OAAA"}
package/dist/tools.js CHANGED
@@ -1,10 +1,10 @@
1
- import "./schema-BzPfPMq7.js";
2
- import "./client-D9mOWh6s.js";
1
+ import "./schema-Drnljuwf.js";
2
+ import "./client-CXUzhM1I.js";
3
3
  import "./types-H-TSmRpm.js";
4
4
  import "./api-client-9mzrj2HY.js";
5
5
  import "./formatting-C6Py2iOz.js";
6
- import "./issue-helpers-Cx6bFCUv.js";
6
+ import "./issue-helpers-CyoHu5j4.js";
7
7
  import "./logging-Cxm8lQvg.js";
8
- import { TOOL_HANDLERS } from "./tools-D5yXarBR.js";
8
+ import { TOOL_HANDLERS } from "./tools-CnVttgaS.js";
9
9
 
10
10
  export { TOOL_HANDLERS };
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- require('./schema-BnXdl41H.cjs');
3
- require('./client-CLuQEpjg.cjs');
2
+ require('./schema-BuByiEkr.cjs');
3
+ require('./client-Cp-Y1PHr.cjs');
4
4
  require('./types-o3zWarRp.cjs');
5
5
  require('./api-client-CEBuz3Zu.cjs');
6
6
  require('./formatting-BmbJ5-Uh.cjs');
7
- require('./issue-helpers-CdWMhVWJ.cjs');
7
+ require('./issue-helpers-DbsECZFq.cjs');
8
8
  require('./logging-BEMgC5SA.cjs');
9
- const require_tools = require('./tools-2PgtFQ7q.cjs');
9
+ const require_tools = require('./tools-BgrGdS8I.cjs');
10
10
  const require_dist = require('./dist-wiyJYfAH.cjs');
11
11
  const require_vi_ClIskdbk = require('./vi.ClIskdbk-TqmAThAO.cjs');
12
12
 
@@ -639,9 +639,9 @@ require_dist.describe("list_dsn", () => {
639
639
  `);
640
640
  });
641
641
  });
642
- require_dist.describe("begin_autofix", () => {
642
+ require_dist.describe("begin_seer_issue_fix", () => {
643
643
  require_dist.it("serializes", async () => {
644
- const tool = require_tools.TOOL_HANDLERS.begin_autofix;
644
+ const tool = require_tools.TOOL_HANDLERS.begin_seer_issue_fix;
645
645
  const result = await tool({
646
646
  accessToken: "access-token",
647
647
  userId: "1",
@@ -653,23 +653,23 @@ require_dist.describe("begin_autofix", () => {
653
653
  regionUrl: void 0
654
654
  });
655
655
  require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
656
- "# Autofix Started for Issue PEATED-A8
656
+ "# Issue Fix Started for Issue PEATED-A8
657
657
 
658
658
  **Run ID:**: 123
659
659
 
660
- This operation may take some time, so you should call \`get_autofix_status()\` to check the status of the analysis, and repeat the process until its finished.
660
+ This operation may take some time, so you should call \`get_seer_issue_fix_status()\` to check the status of the analysis, and repeat the process until its finished.
661
661
 
662
662
  You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..
663
663
 
664
664
  \`\`\`
665
- get_autofix_status(organizationSlug="sentry-mcp-evals", issueId="PEATED-A8")
665
+ get_seer_issue_fix_status(organizationSlug="sentry-mcp-evals", issueId="PEATED-A8")
666
666
  \`\`\`"
667
667
  `);
668
668
  });
669
669
  });
670
- require_dist.describe("get_autofix_status", () => {
670
+ require_dist.describe("get_seer_issue_fix_status", () => {
671
671
  require_dist.it("serializes", async () => {
672
- const tool = require_tools.TOOL_HANDLERS.get_autofix_status;
672
+ const tool = require_tools.TOOL_HANDLERS.get_seer_issue_fix_status;
673
673
  const result = await tool({
674
674
  accessToken: "access-token",
675
675
  userId: "1",
@@ -681,7 +681,7 @@ require_dist.describe("get_autofix_status", () => {
681
681
  regionUrl: void 0
682
682
  });
683
683
  require_vi_ClIskdbk.globalExpect(result).toMatchInlineSnapshot(`
684
- "# Autofix Status for Issue PEATED-A8
684
+ "# Issue Fix Status for Issue PEATED-A8
685
685
 
686
686
  ## Analyzing the Issue
687
687
 
@@ -1 +1 @@
1
- {"version":3,"file":"tools.test.cjs","names":["TOOL_HANDLERS"],"sources":["../src/tools.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { TOOL_HANDLERS } from \"./tools\";\n\ndescribe(\"list_organizations\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_organizations;\n const result = await tool({\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n });\n expect(result).toMatchInlineSnapshot(`\n \"# Organizations\n\n ## **sentry-mcp-evals**\n\n **Web URL:** https://sentry.io/sentry-mcp-evals\n **Region URL:** https://us.sentry.io\n\n # Using this information\n\n - The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\n - If a tool supports passing in the \\`regionUrl\\`, you should also pass in the correct value there.\n \"\n `);\n });\n});\n\ndescribe(\"list_teams\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_teams;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Teams in **sentry-mcp-evals**\n\n - the-goats\n \"\n `);\n });\n});\n\ndescribe(\"list_projects\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_projects;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Projects in **sentry-mcp-evals**\n\n - **cloudflare-mcp**\n \"\n `);\n });\n});\n\ndescribe(\"list_issues\", () => {\n it(\"serializes with project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals/cloudflare-mcp**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n\n it(\"serializes without project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"list_releases\", () => {\n it(\"works without project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n it(\"works with project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals/cloudflare-mcp**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n});\n\ndescribe(\"list_tags\", () => {\n it(\"works\", async () => {\n const tool = TOOL_HANDLERS.list_tags;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Tags in **sentry-mcp-evals**\n\n - transaction\n - runtime.name\n - level\n - device\n - os\n - user\n - runtime\n - release\n - url\n - uptime_rule\n - server_name\n - browser\n - os.name\n - device.family\n - replayId\n - client_os.name\n - environment\n - service\n - browser.name\n\n # Using this information\n\n - You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\n \"\n `);\n });\n});\n\ndescribe(\"search_errors\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_errors;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n filename: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"count\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Errors in **sentry-mcp-evals**\n\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Issue ID**: CLOUDFLARE-MCP-41\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n **Project**: test-suite\n **Last Seen**: 2025-04-07T12:23:39+00:00\n **Occurrences**: 2\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"search_transactions\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_transactions;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"duration\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Transactions in **sentry-mcp-evals**\n\n\n ## GET /trpc/bottleList\n\n **Span ID**: 07752c6aeb027c8f\n **Trace ID**: 6a477f5b0f31ef7b6b9b5e1dea66c91d\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 12\n **Timestamp**: 2025-04-13T14:19:18+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\n ## GET /trpc/bottleList\n\n **Span ID**: 7ab5edf5b3ba42c9\n **Trace ID**: 54177131c7b192a446124daba3136045\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 18\n **Timestamp**: 2025-04-13T14:19:17+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/54177131c7b192a446124daba3136045\n\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_summary\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_summary;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_summary;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_details\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n eventId: undefined,\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n eventId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n it(\"serializes with eventId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: undefined,\n issueUrl: undefined,\n eventId: \"7ca573c0f4814912aaa9bdc77d1a7d51\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n});\n\ndescribe(\"create_team\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_team;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n name: \"the-goats\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Team in **sentry-mcp-evals**\n\n **ID**: 4509109078196224\n **Slug**: the-goats\n **Name**: the-goats\n # Using this information\n\n - You should always inform the user of the Team Slug value.\n \"\n `);\n });\n});\n\ndescribe(\"create_project\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_project;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n teamSlug: \"the-goats\",\n name: \"cloudflare-mcp\",\n platform: \"javascript\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Project in **sentry-mcp-evals**\n\n **ID**: 4509109104082945\n **Slug**: cloudflare-mcp\n **Name**: cloudflare-mcp\n **SENTRY_DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\n - You should always inform the user of the **SENTRY_DSN** and Project Slug values.\n \"\n `);\n });\n});\n\ndescribe(\"create_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_dsn;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n name: \"Default\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New DSN in **sentry-mcp-evals/cloudflare-mcp**\n\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n **Name**: Default\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"list_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_dsns;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# DSNs in **sentry-mcp-evals/cloudflare-mcp**\n\n ## Default\n **ID**: d20df0a1ab5031c7f3c7edca9c02814d\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"begin_autofix\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.begin_autofix;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Autofix Started for Issue PEATED-A8\n\n **Run ID:**: 123\n\n This operation may take some time, so you should call \\`get_autofix_status()\\` to check the status of the analysis, and repeat the process until its finished.\n\n You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\n\n \\`\\`\\`\n get_autofix_status(organizationSlug=\"sentry-mcp-evals\", issueId=\"PEATED-A8\")\n \\`\\`\\`\"\n `);\n });\n});\n\ndescribe(\"get_autofix_status\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.get_autofix_status;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Autofix Status for Issue PEATED-A8\n\n ## Analyzing the Issue\n\n **The \\`bottleById\\` query fails because the input ID (3216) doesn't exist in the database.\n **\n The exception details show that the \\`input\\` value at the time of the \\`TRPCError\\` in \\`bottleById.ts\\` was 3216, and the query likely failed because a bottle with ID 3216 was not found in the database.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n **However, the request also includes a different ID (16720) for \\`bottlePriceList\\`.\n **\n The root cause is likely a mismatch of input IDs within the batched TRPC request, where \\`bottlePriceList\\` expects bottle ID 16720, but \\`bottleById\\` receives a different ID (3216) leading to the \"Bottle not found\" error.\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n \\`\\`\\`json\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n TRPCError: Bottle not found. (occurred in: GET /trpc/bottlePriceList,bottleById)\n \\`\\`\\`\n\n\n **This suggests a data consistency issue or incorrect client-side request.\n **\n The \\`TRPCError\\` originates from \\`bottleById.ts\\` with the input value being \\`3216\\`, indicating the procedure failed to find a bottle with that specific ID in the database.\n\n \\`\\`\\`\n <anonymous> in file /app/apps/server/src/trpc/routes/bottleById.ts [Line 33, column 13] (In app)\n .select({\n ...getTableColumns(bottles),\n })\n .from(bottleTombstones)\n .innerJoin(bottles, eq(bottleTombstones.newBottleId, bottles.id))\n .where(eq(bottleTombstones.bottleId, input));\n if (!bottle) {\n throw new TRPCError({ <-- SUSPECT LINE\n message: \"Bottle not found.\",\n code: \"NOT_FOUND\",\n });\n }\n }\n\n const createdBy = await db.query.users.findFirst({\n ---\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n\n ## Root Cause Analysis\n\n **The client initiates a batched TRPC request to the \\`/trpc/bottlePriceList,bottleById\\` endpoint, intending to fetch both the price list and details for a specific bottle.**\n\n This is the entry point where the client requests data from two different procedures in a single HTTP request. The server needs to correctly route and process the parameters for each procedure.\n\n **The TRPC server receives the batched request and begins processing the \\`bottlePriceList\\` procedure, intending to fetch the price list for bottle ID 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n .input(z.object({ bottle: z.number(), onlyValid: z.boolean().optional() }))\n .query(async function ({ input, ctx }) {\n const [bottle] = await db.select().from(bottles).where(eq(bottles.id, input.bottle));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a 'bottle' parameter in the input, which is used to query the database.\n\n **The TRPC server also processes the \\`bottleById\\` procedure, but due to a parameter mapping issue or client-side error, it receives bottle ID 3216 as input instead of 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({ input, ctx }) {\n let [bottle] = await db.select().from(bottles).where(eq(bottles.id, input));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a numerical ID as input to find the bottle.\n\n **The \\`bottleById\\` procedure queries the \\`bottles\\` table for a bottle with ID 3216, but no such bottle exists.**\n\n The database query returns no results because bottle ID 3216 is not present in the \\`bottles\\` table.\n\n **The \\`bottleById\\` procedure then checks the \\`bottleTombstones\\` table to see if bottle ID 3216 has been tombstoned (redirected to a new ID), but no such tombstone exists.**\n\n The query to \\`bottleTombstones\\` also returns no results, indicating that bottle ID 3216 has not been redirected.\n\n **Since the \\`bottleById\\` procedure cannot find a bottle with ID 3216 in either the \\`bottles\\` or \\`bottleTombstones\\` tables, it throws a \\`TRPCError\\` with the message \"Bottle not found.\"**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n if (!bottle) {\n throw new TRPCError({ message: \"Bottle not found.\", code: \"NOT_FOUND\" });\n }\n \\`\\`\\`\n This is where the error is thrown, indicating that the bottle could not be found.\n\n\n ## Planning Solution\n\n **The discrepancy between inputs suggests a potential issue with batch request handling.\n **\n The \\`TRPCError\\` occurred in \\`bottleById.ts\\` with an input of \\`3216\\`, while the request was initiated with a bottle ID of \\`16720\\`, indicating a mismatch in the bottle ID being processed.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n\n **The client-side batch request construction is the most likely source of error.\n **\n The discrepancy between the bottle ID in the error message (16720) and the ID being processed (3216) strongly suggests a client-side parameter mapping issue in the batched TRPC request.\n\n To fix this, I propose the following steps:\n\n 1. **Inspect the Client-Side Code:** Identify the code responsible for constructing the TRPC batch request to \\`/trpc/bottlePriceList,bottleById\\`.\n\n 2. **Verify Parameter Mapping:** Ensure that both \\`bottlePriceList\\` and \\`bottleById\\` are receiving the correct bottle ID (which should be 16720 in this case).\n\n 3. **Correct Parameter Assignment:** If the parameters are being incorrectly assigned, modify the client-side code to ensure that both procedures receive the same, correct bottle ID.\n\n 4. **Add Logging (Client-Side):** Add temporary logging to the client-side code to confirm the parameters being sent to each procedure in the batch request. This will help verify the fix.\n\n \\`\\`\\`typescript\n // Example logging (add to the client-side code where the batch request is created)\n console.log(\"bottlePriceList input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n console.log(\"bottleById input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n \\`\\`\\`\n\n 5. **Test the Fix:** After applying the fix, test the affected functionality to ensure that the \"Bottle not found\" error is resolved and that both procedures are working correctly.\n\n 6. **Remove Logging:** Once the fix is verified, remove the temporary logging.\n\n This approach directly addresses the most likely cause of the issue and provides a clear path to resolution.\n\n\n **Ensuring consistent bottle IDs will likely resolve this inconsistency.\n **\n The error message references bottle ID 16720, but the exception details show the procedure was actually processing ID 3216, indicating a parameter mismatch in the batch request.\n\n To fix this, I recommend the following steps:\n\n 1. **Client-Side Investigation**:\n\n * Examine the client-side code where the TRPC batch request is constructed.\n * Verify that the same \\`bottleId\\` parameter is being passed to both \\`bottlePriceList\\` and \\`bottleById\\` procedures.\n * If the IDs are being passed correctly, inspect the network request payload to confirm the correct structure of the batched request.\n\n \\`\\`\\`typescript\n // Example (Hypothetical) Client-Side Code\n const bottleId = 16720; // Example bottle ID\n\n // Ensure both procedures receive the same bottleId\n const [priceList, bottleDetails] = await trpc.batch(() => [\n trpc.bottlePriceList.fetch({ bottle: bottleId }),\n trpc.bottleById.fetch(bottleId),\n ]);\n \\`\\`\\`\n\n 2. **Server-Side Logging (Temporary)**:\n\n * Add temporary logging to both \\`bottlePriceList\\` and \\`bottleById\\` procedures to log the received \\`input\\` value.\n * This will help confirm whether the server is receiving the correct IDs from the client.\n * **Important**: Remove these logs after debugging to avoid unnecessary overhead.\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n export default publicProcedure\n .input(\n z.object({\n bottle: z.number(),\n onlyValid: z.boolean().optional(),\n }),\n )\n .query(async function ({ input, ctx }) {\n console.log(\"bottlePriceList input:\", input); // Add this line\n // ... rest of the code\n });\n\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({\n input,\n ctx,\n }) {\n console.log(\"bottleById input:\", input); // Add this line\n // ... rest of the code\n });\n \\`\\`\\`\n\n 3. **TRPC Batch Request Configuration**:\n\n * Review the TRPC batch link configuration on the client-side.\n * Ensure that the batching logic is correctly mapping parameters to the corresponding procedures.\n * If using a custom batching implementation, verify its correctness.\n\n 4. **Data Integrity Check**:\n\n * If the client-side code appears correct, investigate whether bottle ID 3216 should exist in the database.\n * Check the \\`bottles\\` table and \\`bottleTombstones\\` table for any entries related to bottle ID 3216.\n * If the bottle should exist but is missing, investigate potential data deletion or migration issues.\n\n 5. **Tombstone Logic**:\n\n * Double-check the logic for creating and using tombstones.\n * Ensure that when a bottle is deleted, a tombstone entry is created correctly, pointing to the new bottle (if any).\n\n 6. **Error Handling**:\n\n * While this isn't the primary fix, consider improving the error message in \\`bottleById.ts\\` to include more context.\n * Include the original requested bottle ID (if available) in the error message to aid debugging.\n\n 7. **Client-Side Retries**:\n\n * Implement a retry mechanism on the client-side for TRPC requests.\n * If a \"Bottle not found\" error occurs, retry the request a few times before giving up. This can help mitigate transient issues.\n\n By following these steps, you should be able to identify the root cause of the parameter mismatch and implement a fix that ensures consistent bottle IDs are passed to both TRPC procedures in the batch request.\n\n\n\n ## Solution\n\n Consolidate bottle and price data fetching into a single batched TRPC request using \\`Promise.all\\` to ensure ID consistency.\n\n **Create a shared utility function to fetch bottle details and price data together.**\n \\`\\`\\`typescript\n // In a shared utility function or component\n export async function getBottleWithPrices(bottleId: number) {\n const trpcClient = await getTrpcClient();\n \n // Use Promise.all to ensure both requests are part of the same batch\n // and receive the same parameters\n const [bottle, priceList] = await Promise.all([\n trpcClient.bottleById.fetch(bottleId),\n trpcClient.bottlePriceList.fetch({ bottle: bottleId }),\n ]);\n \n return { bottle, priceList };\n }\n \\`\\`\\`\n This code creates a function that uses \\`Promise.all\\` to fetch both bottle details and price data concurrently. This ensures that both TRPC procedures are part of the same batch and receive the same \\`bottleId\\`.\n\n **Modify the page components to use the shared utility function.**\n \\`\\`\\`typescript\n // Then in the page components:\n const { bottle, priceList } = await getBottleWithPrices(Number(bottleId));\n \\`\\`\\`\n This code replaces the separate calls to \\`bottleById\\` and \\`bottlePriceList\\` with a single call to the \\`getBottleWithPrices\\` function, ensuring that both components receive data for the same bottle.\n\n **Add a unit test that reproduces the issue.**\n null\n\n\n \"\n `);\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAGA,sBAAS,sBAAsB,MAAM;AACnC,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KAAK;GACxB,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,EAAC;AACF,mCAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;;MAapC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,cAAc,MAAM;AAC3B,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;MAKpC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,iBAAiB,MAAM;AAC9B,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KACnB;GACE,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,GACD;GACE,kBAAkB;GAClB;EACD,EACF;AACD,mCAAO,OAAO,CAAC,uBAAuB;;;;;MAKpC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,eAAe,MAAM;AAC5B,iBAAG,2BAA2B,YAAY;EACxC,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmRpC;CACH,EAAC;AACH,EAAC"}
1
+ {"version":3,"file":"tools.test.cjs","names":["TOOL_HANDLERS"],"sources":["../src/tools.test.ts"],"sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { TOOL_HANDLERS } from \"./tools\";\n\ndescribe(\"list_organizations\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_organizations;\n const result = await tool({\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n });\n expect(result).toMatchInlineSnapshot(`\n \"# Organizations\n\n ## **sentry-mcp-evals**\n\n **Web URL:** https://sentry.io/sentry-mcp-evals\n **Region URL:** https://us.sentry.io\n\n # Using this information\n\n - The organization's name is the identifier for the organization, and is used in many tools for \\`organizationSlug\\`.\n - If a tool supports passing in the \\`regionUrl\\`, you should also pass in the correct value there.\n \"\n `);\n });\n});\n\ndescribe(\"list_teams\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_teams;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Teams in **sentry-mcp-evals**\n\n - the-goats\n \"\n `);\n });\n});\n\ndescribe(\"list_projects\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_projects;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Projects in **sentry-mcp-evals**\n\n - **cloudflare-mcp**\n \"\n `);\n });\n});\n\ndescribe(\"list_issues\", () => {\n it(\"serializes with project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals/cloudflare-mcp**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n\n it(\"serializes without project\", async () => {\n const tool = TOOL_HANDLERS.list_issues;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n query: undefined,\n sortBy: \"last_seen\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issues in **sentry-mcp-evals**\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## CLOUDFLARE-MCP-42\n\n **Description**: Error: Tool list_issues is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-11T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-42\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about a specific issue by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"list_releases\", () => {\n it(\"works without project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n it(\"works with project\", async () => {\n const tool = TOOL_HANDLERS.list_releases;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Releases in **sentry-mcp-evals/cloudflare-mcp**\n\n ## 8ce89484-0fec-4913-a2cd-e8e2d41dee36\n\n **Created**: 2025-04-13T19:54:21.764Z\n **First Event**: 2025-04-13T19:54:21.000Z\n **Last Event**: 2025-04-13T20:28:23.000Z\n **New Issues**: 0\n **Projects**: cloudflare-mcp\n\n # Using this information\n\n - You can reference the Release version in commit messages or documentation.\n - You can search for issues in a specific release using the \\`search_errors()\\` tool with the query \\`release:8ce89484-0fec-4913-a2cd-e8e2d41dee36\\`.\n \"\n `);\n });\n});\n\ndescribe(\"list_tags\", () => {\n it(\"works\", async () => {\n const tool = TOOL_HANDLERS.list_tags;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Tags in **sentry-mcp-evals**\n\n - transaction\n - runtime.name\n - level\n - device\n - os\n - user\n - runtime\n - release\n - url\n - uptime_rule\n - server_name\n - browser\n - os.name\n - device.family\n - replayId\n - client_os.name\n - environment\n - service\n - browser.name\n\n # Using this information\n\n - You can reference tags in the \\`query\\` parameter of various tools: \\`tagName:tagValue\\`.\n \"\n `);\n });\n});\n\ndescribe(\"search_errors\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_errors;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n filename: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"count\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Errors in **sentry-mcp-evals**\n\n\n ## CLOUDFLARE-MCP-41\n\n **Description**: Error: Tool list_organizations is already registered\n **Issue ID**: CLOUDFLARE-MCP-41\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n **Project**: test-suite\n **Last Seen**: 2025-04-07T12:23:39+00:00\n **Occurrences**: 2\n\n # Using this information\n\n - You can reference the Issue ID in commit messages (e.g. \\`Fixes <issueID>\\`) to automatically close the issue when the commit is merged.\n - You can get more details about an error by using the tool: \\`get_issue_details(organizationSlug=\"sentry-mcp-evals\", issueId=<issueID>)\\`\n \"\n `);\n });\n});\n\ndescribe(\"search_transactions\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.search_transactions;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: undefined,\n transaction: undefined,\n query: undefined,\n sortBy: \"duration\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Transactions in **sentry-mcp-evals**\n\n\n ## GET /trpc/bottleList\n\n **Span ID**: 07752c6aeb027c8f\n **Trace ID**: 6a477f5b0f31ef7b6b9b5e1dea66c91d\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 12\n **Timestamp**: 2025-04-13T14:19:18+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/6a477f5b0f31ef7b6b9b5e1dea66c91d\n\n ## GET /trpc/bottleList\n\n **Span ID**: 7ab5edf5b3ba42c9\n **Trace ID**: 54177131c7b192a446124daba3136045\n **Span Operation**: http.server\n **Span Description**: GET /trpc/bottleList\n **Duration**: 18\n **Timestamp**: 2025-04-13T14:19:17+00:00\n **Project**: peated\n **URL**: https://sentry-mcp-evals.sentry.io/explore/traces/trace/54177131c7b192a446124daba3136045\n\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_summary\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_summary;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_summary;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **Occurrences**: 25\n **Users Impacted**: 1\n **Status**: unresolved\n **Platform**: javascript\n **Project**: CLOUDFLARE-MCP\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n \"\n `);\n });\n});\n\ndescribe(\"get_issue_details\", () => {\n it(\"serializes with issueId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"CLOUDFLARE-MCP-41\",\n eventId: undefined,\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n\n it(\"serializes with issueUrl\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: undefined,\n issueId: undefined,\n eventId: undefined,\n issueUrl: \"https://sentry-mcp-evals.sentry.io/issues/6507376925\",\n regionUrl: undefined,\n },\n );\n\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n it(\"serializes with eventId\", async () => {\n const tool = TOOL_HANDLERS.get_issue_details;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: undefined,\n issueUrl: undefined,\n eventId: \"7ca573c0f4814912aaa9bdc77d1a7d51\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue CLOUDFLARE-MCP-41 in **sentry-mcp-evals**\n\n **Description**: Error: Tool list_organizations is already registered\n **Culprit**: Object.fetch(index)\n **First Seen**: 2025-04-03T22:51:19.403Z\n **Last Seen**: 2025-04-12T11:34:11.000Z\n **URL**: https://sentry-mcp-evals.sentry.io/issues/CLOUDFLARE-MCP-41\n\n ## Event Details\n\n **Event ID**: 7ca573c0f4814912aaa9bdc77d1a7d51\n **Occurred At**: 2025-04-08T21:15:04.000Z\n **Error:**\n \\`\\`\\`\n Error: Tool list_organizations is already registered\n \\`\\`\\`\n\n **Stacktrace:**\n \\`\\`\\`\n index.js:7809:27\n index.js:8029:24 (OAuthProviderImpl.fetch)\n index.js:19631:28 (Object.fetch)\n \\`\\`\\`\n\n # Using this information\n\n - You can reference the IssueID in commit messages (e.g. \\`Fixes CLOUDFLARE-MCP-41\\`) to automatically close the issue when the commit is merged.\n - The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n \"\n `);\n });\n});\n\ndescribe(\"create_team\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_team;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n name: \"the-goats\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Team in **sentry-mcp-evals**\n\n **ID**: 4509109078196224\n **Slug**: the-goats\n **Name**: the-goats\n # Using this information\n\n - You should always inform the user of the Team Slug value.\n \"\n `);\n });\n});\n\ndescribe(\"create_project\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_project;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n teamSlug: \"the-goats\",\n name: \"cloudflare-mcp\",\n platform: \"javascript\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New Project in **sentry-mcp-evals**\n\n **ID**: 4509109104082945\n **Slug**: cloudflare-mcp\n **Name**: cloudflare-mcp\n **SENTRY_DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - You can reference the **SENTRY_DSN** value to initialize Sentry's SDKs.\n - You should always inform the user of the **SENTRY_DSN** and Project Slug values.\n \"\n `);\n });\n});\n\ndescribe(\"create_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.create_dsn;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n name: \"Default\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# New DSN in **sentry-mcp-evals/cloudflare-mcp**\n\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n **Name**: Default\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"list_dsn\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.list_dsns;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n projectSlug: \"cloudflare-mcp\",\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# DSNs in **sentry-mcp-evals/cloudflare-mcp**\n\n ## Default\n **ID**: d20df0a1ab5031c7f3c7edca9c02814d\n **DSN**: https://d20df0a1ab5031c7f3c7edca9c02814d@o4509106732793856.ingest.us.sentry.io/4509109104082945\n\n # Using this information\n\n - The \\`SENTRY_DSN\\` value is a URL that you can use to initialize Sentry's SDKs.\n \"\n `);\n });\n});\n\ndescribe(\"begin_seer_issue_fix\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.begin_seer_issue_fix;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Started for Issue PEATED-A8\n\n **Run ID:**: 123\n\n This operation may take some time, so you should call \\`get_seer_issue_fix_status()\\` to check the status of the analysis, and repeat the process until its finished.\n\n You should also inform the user that the operation may take some time, and give them updates whenever you check the status of the operation..\n\n \\`\\`\\`\n get_seer_issue_fix_status(organizationSlug=\"sentry-mcp-evals\", issueId=\"PEATED-A8\")\n \\`\\`\\`\"\n `);\n });\n});\n\ndescribe(\"get_seer_issue_fix_status\", () => {\n it(\"serializes\", async () => {\n const tool = TOOL_HANDLERS.get_seer_issue_fix_status;\n const result = await tool(\n {\n accessToken: \"access-token\",\n userId: \"1\",\n organizationSlug: null,\n },\n {\n organizationSlug: \"sentry-mcp-evals\",\n issueId: \"PEATED-A8\",\n issueUrl: undefined,\n regionUrl: undefined,\n },\n );\n expect(result).toMatchInlineSnapshot(`\n \"# Issue Fix Status for Issue PEATED-A8\n\n ## Analyzing the Issue\n\n **The \\`bottleById\\` query fails because the input ID (3216) doesn't exist in the database.\n **\n The exception details show that the \\`input\\` value at the time of the \\`TRPCError\\` in \\`bottleById.ts\\` was 3216, and the query likely failed because a bottle with ID 3216 was not found in the database.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n **However, the request also includes a different ID (16720) for \\`bottlePriceList\\`.\n **\n The root cause is likely a mismatch of input IDs within the batched TRPC request, where \\`bottlePriceList\\` expects bottle ID 16720, but \\`bottleById\\` receives a different ID (3216) leading to the \"Bottle not found\" error.\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n \\`\\`\\`json\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n TRPCError: Bottle not found. (occurred in: GET /trpc/bottlePriceList,bottleById)\n \\`\\`\\`\n\n\n **This suggests a data consistency issue or incorrect client-side request.\n **\n The \\`TRPCError\\` originates from \\`bottleById.ts\\` with the input value being \\`3216\\`, indicating the procedure failed to find a bottle with that specific ID in the database.\n\n \\`\\`\\`\n <anonymous> in file /app/apps/server/src/trpc/routes/bottleById.ts [Line 33, column 13] (In app)\n .select({\n ...getTableColumns(bottles),\n })\n .from(bottleTombstones)\n .innerJoin(bottles, eq(bottleTombstones.newBottleId, bottles.id))\n .where(eq(bottleTombstones.bottleId, input));\n if (!bottle) {\n throw new TRPCError({ <-- SUSPECT LINE\n message: \"Bottle not found.\",\n code: \"NOT_FOUND\",\n });\n }\n }\n\n const createdBy = await db.query.users.findFirst({\n ---\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n\n\n ## Root Cause Analysis\n\n **The client initiates a batched TRPC request to the \\`/trpc/bottlePriceList,bottleById\\` endpoint, intending to fetch both the price list and details for a specific bottle.**\n\n This is the entry point where the client requests data from two different procedures in a single HTTP request. The server needs to correctly route and process the parameters for each procedure.\n\n **The TRPC server receives the batched request and begins processing the \\`bottlePriceList\\` procedure, intending to fetch the price list for bottle ID 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n .input(z.object({ bottle: z.number(), onlyValid: z.boolean().optional() }))\n .query(async function ({ input, ctx }) {\n const [bottle] = await db.select().from(bottles).where(eq(bottles.id, input.bottle));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a 'bottle' parameter in the input, which is used to query the database.\n\n **The TRPC server also processes the \\`bottleById\\` procedure, but due to a parameter mapping issue or client-side error, it receives bottle ID 3216 as input instead of 16720.**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({ input, ctx }) {\n let [bottle] = await db.select().from(bottles).where(eq(bottles.id, input));\n if (!bottle) { ... }\n \\`\\`\\`\n This procedure expects a numerical ID as input to find the bottle.\n\n **The \\`bottleById\\` procedure queries the \\`bottles\\` table for a bottle with ID 3216, but no such bottle exists.**\n\n The database query returns no results because bottle ID 3216 is not present in the \\`bottles\\` table.\n\n **The \\`bottleById\\` procedure then checks the \\`bottleTombstones\\` table to see if bottle ID 3216 has been tombstoned (redirected to a new ID), but no such tombstone exists.**\n\n The query to \\`bottleTombstones\\` also returns no results, indicating that bottle ID 3216 has not been redirected.\n\n **Since the \\`bottleById\\` procedure cannot find a bottle with ID 3216 in either the \\`bottles\\` or \\`bottleTombstones\\` tables, it throws a \\`TRPCError\\` with the message \"Bottle not found.\"**\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottleById.ts\n if (!bottle) {\n throw new TRPCError({ message: \"Bottle not found.\", code: \"NOT_FOUND\" });\n }\n \\`\\`\\`\n This is where the error is thrown, indicating that the bottle could not be found.\n\n\n ## Planning Solution\n\n **The discrepancy between inputs suggests a potential issue with batch request handling.\n **\n The \\`TRPCError\\` occurred in \\`bottleById.ts\\` with an input of \\`3216\\`, while the request was initiated with a bottle ID of \\`16720\\`, indicating a mismatch in the bottle ID being processed.\n\n \\`\\`\\`\n Variable values at the time of the exception::\n {\n \"input\": 3216\n }\n \\`\\`\\`\n\n \\`\\`\\`\n GET http://api.peated.com/trpc/bottlePriceList,bottleById\n \\`\\`\\`\n\n\n **The client-side batch request construction is the most likely source of error.\n **\n The discrepancy between the bottle ID in the error message (16720) and the ID being processed (3216) strongly suggests a client-side parameter mapping issue in the batched TRPC request.\n\n To fix this, I propose the following steps:\n\n 1. **Inspect the Client-Side Code:** Identify the code responsible for constructing the TRPC batch request to \\`/trpc/bottlePriceList,bottleById\\`.\n\n 2. **Verify Parameter Mapping:** Ensure that both \\`bottlePriceList\\` and \\`bottleById\\` are receiving the correct bottle ID (which should be 16720 in this case).\n\n 3. **Correct Parameter Assignment:** If the parameters are being incorrectly assigned, modify the client-side code to ensure that both procedures receive the same, correct bottle ID.\n\n 4. **Add Logging (Client-Side):** Add temporary logging to the client-side code to confirm the parameters being sent to each procedure in the batch request. This will help verify the fix.\n\n \\`\\`\\`typescript\n // Example logging (add to the client-side code where the batch request is created)\n console.log(\"bottlePriceList input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n console.log(\"bottleById input:\", { bottle: 16720 }); // Replace 16720 with the actual ID\n \\`\\`\\`\n\n 5. **Test the Fix:** After applying the fix, test the affected functionality to ensure that the \"Bottle not found\" error is resolved and that both procedures are working correctly.\n\n 6. **Remove Logging:** Once the fix is verified, remove the temporary logging.\n\n This approach directly addresses the most likely cause of the issue and provides a clear path to resolution.\n\n\n **Ensuring consistent bottle IDs will likely resolve this inconsistency.\n **\n The error message references bottle ID 16720, but the exception details show the procedure was actually processing ID 3216, indicating a parameter mismatch in the batch request.\n\n To fix this, I recommend the following steps:\n\n 1. **Client-Side Investigation**:\n\n * Examine the client-side code where the TRPC batch request is constructed.\n * Verify that the same \\`bottleId\\` parameter is being passed to both \\`bottlePriceList\\` and \\`bottleById\\` procedures.\n * If the IDs are being passed correctly, inspect the network request payload to confirm the correct structure of the batched request.\n\n \\`\\`\\`typescript\n // Example (Hypothetical) Client-Side Code\n const bottleId = 16720; // Example bottle ID\n\n // Ensure both procedures receive the same bottleId\n const [priceList, bottleDetails] = await trpc.batch(() => [\n trpc.bottlePriceList.fetch({ bottle: bottleId }),\n trpc.bottleById.fetch(bottleId),\n ]);\n \\`\\`\\`\n\n 2. **Server-Side Logging (Temporary)**:\n\n * Add temporary logging to both \\`bottlePriceList\\` and \\`bottleById\\` procedures to log the received \\`input\\` value.\n * This will help confirm whether the server is receiving the correct IDs from the client.\n * **Important**: Remove these logs after debugging to avoid unnecessary overhead.\n\n \\`\\`\\`typescript\n // apps/server/src/trpc/routes/bottlePriceList.ts\n export default publicProcedure\n .input(\n z.object({\n bottle: z.number(),\n onlyValid: z.boolean().optional(),\n }),\n )\n .query(async function ({ input, ctx }) {\n console.log(\"bottlePriceList input:\", input); // Add this line\n // ... rest of the code\n });\n\n // apps/server/src/trpc/routes/bottleById.ts\n export default publicProcedure.input(z.number()).query(async function ({\n input,\n ctx,\n }) {\n console.log(\"bottleById input:\", input); // Add this line\n // ... rest of the code\n });\n \\`\\`\\`\n\n 3. **TRPC Batch Request Configuration**:\n\n * Review the TRPC batch link configuration on the client-side.\n * Ensure that the batching logic is correctly mapping parameters to the corresponding procedures.\n * If using a custom batching implementation, verify its correctness.\n\n 4. **Data Integrity Check**:\n\n * If the client-side code appears correct, investigate whether bottle ID 3216 should exist in the database.\n * Check the \\`bottles\\` table and \\`bottleTombstones\\` table for any entries related to bottle ID 3216.\n * If the bottle should exist but is missing, investigate potential data deletion or migration issues.\n\n 5. **Tombstone Logic**:\n\n * Double-check the logic for creating and using tombstones.\n * Ensure that when a bottle is deleted, a tombstone entry is created correctly, pointing to the new bottle (if any).\n\n 6. **Error Handling**:\n\n * While this isn't the primary fix, consider improving the error message in \\`bottleById.ts\\` to include more context.\n * Include the original requested bottle ID (if available) in the error message to aid debugging.\n\n 7. **Client-Side Retries**:\n\n * Implement a retry mechanism on the client-side for TRPC requests.\n * If a \"Bottle not found\" error occurs, retry the request a few times before giving up. This can help mitigate transient issues.\n\n By following these steps, you should be able to identify the root cause of the parameter mismatch and implement a fix that ensures consistent bottle IDs are passed to both TRPC procedures in the batch request.\n\n\n\n ## Solution\n\n Consolidate bottle and price data fetching into a single batched TRPC request using \\`Promise.all\\` to ensure ID consistency.\n\n **Create a shared utility function to fetch bottle details and price data together.**\n \\`\\`\\`typescript\n // In a shared utility function or component\n export async function getBottleWithPrices(bottleId: number) {\n const trpcClient = await getTrpcClient();\n \n // Use Promise.all to ensure both requests are part of the same batch\n // and receive the same parameters\n const [bottle, priceList] = await Promise.all([\n trpcClient.bottleById.fetch(bottleId),\n trpcClient.bottlePriceList.fetch({ bottle: bottleId }),\n ]);\n \n return { bottle, priceList };\n }\n \\`\\`\\`\n This code creates a function that uses \\`Promise.all\\` to fetch both bottle details and price data concurrently. This ensures that both TRPC procedures are part of the same batch and receive the same \\`bottleId\\`.\n\n **Modify the page components to use the shared utility function.**\n \\`\\`\\`typescript\n // Then in the page components:\n const { bottle, priceList } = await getBottleWithPrices(Number(bottleId));\n \\`\\`\\`\n This code replaces the separate calls to \\`bottleById\\` and \\`bottlePriceList\\` with a single call to the \\`getBottleWithPrices\\` function, ensuring that both components receive data for the same bottle.\n\n **Add a unit test that reproduces the issue.**\n null\n\n\n \"\n `);\n });\n});\n"],"mappings":";;;;;;;;;;;;;AAGA,sBAAS,sBAAsB,MAAM;AACnC,iBAAG,cAAc,YAAY;EAC3B,MAAM,OAAOA,4BAAc;EAC3B,MAAM,SAAS,MAAM,KAAK;GACxB,aAAa;GACb,QAAQ;GACR,kBAAkB;EACnB,EAAC;AACF,mCAAO,OAAO,CAAC,uBAAuB;;;;;;;;;;;;;MAapC;CACH,EAAC;AACH,EAAC;AAEF,sBAAS,cAAc,MAAM;AAC3B,iBAAG,cAAc,YAAY;EAC3B,M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