@sentry/mcp-server 0.17.0 → 0.18.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.
- package/README.md +32 -11
- package/dist/about-CDAN_HuU.js +136 -0
- package/dist/about-CDAN_HuU.js.map +1 -0
- package/dist/about-CteXVo1Q.d.ts +10 -0
- package/dist/about-CteXVo1Q.d.ts.map +1 -0
- package/dist/about-CwQvsGSc.d.cts +10 -0
- package/dist/about-CwQvsGSc.d.cts.map +1 -0
- package/dist/about-aDGhlM6f.cjs +142 -0
- package/dist/about-aDGhlM6f.cjs.map +1 -0
- package/dist/agent-BF4d0oSb.cjs +66 -0
- package/dist/agent-BF4d0oSb.cjs.map +1 -0
- package/dist/agent-CP5e4nTv.js +60 -0
- package/dist/agent-CP5e4nTv.js.map +1 -0
- package/dist/agent-D9xBrLvD.cjs +49 -0
- package/dist/agent-D9xBrLvD.cjs.map +1 -0
- package/dist/agent-DAlB2lDx.d.cts +34 -0
- package/dist/agent-DAlB2lDx.d.cts.map +1 -0
- package/dist/agent-DD6nYWBQ.d.cts +92 -0
- package/dist/agent-DD6nYWBQ.d.cts.map +1 -0
- package/dist/agent-DzpIyyqs.js +43 -0
- package/dist/agent-DzpIyyqs.js.map +1 -0
- package/dist/agent-UxF0J0wb.d.ts +92 -0
- package/dist/agent-UxF0J0wb.d.ts.map +1 -0
- package/dist/agent-xEtb_OFK.d.ts +34 -0
- package/dist/agent-xEtb_OFK.d.ts.map +1 -0
- package/dist/{analyze-issue-with-seer-Dw9iqvSk.cjs → analyze-issue-with-seer-Cf0jCiKP.cjs} +33 -35
- package/dist/analyze-issue-with-seer-Cf0jCiKP.cjs.map +1 -0
- package/dist/{analyze-issue-with-seer-DcSwrWrs.js → analyze-issue-with-seer-DqwczSTV.js} +12 -14
- package/dist/analyze-issue-with-seer-DqwczSTV.js.map +1 -0
- package/dist/{api-utils-DFWUfQ83.cjs → api-D9yO5I-i.cjs} +15 -20
- package/dist/api-D9yO5I-i.cjs.map +1 -0
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +4 -4
- package/dist/api-client/client.d.ts +4 -4
- package/dist/api-client/client.js +5 -4
- package/dist/api-client/errors.cjs +11 -0
- package/dist/api-client/errors.d.cts +2 -0
- package/dist/api-client/errors.d.ts +2 -0
- package/dist/api-client/errors.js +3 -0
- package/dist/api-client/index.cjs +20 -7
- package/dist/api-client/index.d.cts +6 -5
- package/dist/api-client/index.d.ts +6 -5
- package/dist/api-client/index.js +7 -6
- package/dist/api-client/schema.cjs +5 -1
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{api-utils-BlUSO8xh.js → api-mjnGhOW2.js} +15 -20
- package/dist/api-mjnGhOW2.js.map +1 -0
- package/dist/callEmbeddedAgent-BRz60bxa.cjs +44 -0
- package/dist/callEmbeddedAgent-BRz60bxa.cjs.map +1 -0
- package/dist/callEmbeddedAgent-C0pC9du1.js +38 -0
- package/dist/callEmbeddedAgent-C0pC9du1.js.map +1 -0
- package/dist/cli/parse.cjs +5 -0
- package/dist/cli/parse.d.cts +12 -0
- package/dist/cli/parse.d.cts.map +1 -0
- package/dist/cli/parse.d.ts +12 -0
- package/dist/cli/parse.d.ts.map +1 -0
- package/dist/cli/parse.js +3 -0
- package/dist/cli/resolve.cjs +7 -0
- package/dist/cli/resolve.d.cts +11 -0
- package/dist/cli/resolve.d.cts.map +1 -0
- package/dist/cli/resolve.d.ts +11 -0
- package/dist/cli/resolve.d.ts.map +1 -0
- package/dist/cli/resolve.js +6 -0
- package/dist/cli/types.d.cts +3 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/cli/usage.cjs +3 -0
- package/dist/cli/usage.d.cts +9 -0
- package/dist/cli/usage.d.cts.map +1 -0
- package/dist/cli/usage.d.ts +9 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +3 -0
- package/dist/{client-CPrEfAwa.cjs → client-AVVG7J24.cjs} +126 -71
- package/dist/client-AVVG7J24.cjs.map +1 -0
- package/dist/{client-C_dDreKj.d.ts → client-B0wezrpt.d.cts} +99 -15
- package/dist/client-B0wezrpt.d.cts.map +1 -0
- package/dist/{client-MaVV1gVC.js → client-BqrNpqZW.js} +127 -66
- package/dist/client-BqrNpqZW.js.map +1 -0
- package/dist/{client-CgS3tjJG.d.cts → client-D-KqRd94.d.ts} +101 -17
- package/dist/client-D-KqRd94.d.ts.map +1 -0
- package/dist/config-CqdBCqLx.js +74 -0
- package/dist/config-CqdBCqLx.js.map +1 -0
- package/dist/{config-BvtWiL3I.js → config-DDf8XyZs.js} +173 -2
- package/dist/config-DDf8XyZs.js.map +1 -0
- package/dist/config-DFt-16ni.cjs +80 -0
- package/dist/config-DFt-16ni.cjs.map +1 -0
- package/dist/{config-CD-5FpOO.cjs → config-DsvSjPCG.cjs} +178 -1
- package/dist/config-DsvSjPCG.cjs.map +1 -0
- package/dist/{constants-S7AU45oQ.js → constants-BPM_OWt0.js} +22 -2
- package/dist/constants-BPM_OWt0.js.map +1 -0
- package/dist/{constants-ClkMK29-.cjs → constants-DJrjLmh5.cjs} +39 -1
- package/dist/constants-DJrjLmh5.cjs.map +1 -0
- package/dist/constants.cjs +4 -1
- package/dist/constants.d.cts +12 -1
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +12 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -2
- package/dist/{create-dsn-QDLdwhDO.js → create-dsn-BhshlP7l.js} +5 -4
- package/dist/{create-dsn-QDLdwhDO.js.map → create-dsn-BhshlP7l.js.map} +1 -1
- package/dist/{create-dsn-C6IPwoVO.cjs → create-dsn-DaHidLhE.cjs} +7 -6
- package/dist/{create-dsn-C6IPwoVO.cjs.map → create-dsn-DaHidLhE.cjs.map} +1 -1
- package/dist/{create-project-Cax3fWey.js → create-project-C3laecaU.js} +6 -5
- package/dist/create-project-C3laecaU.js.map +1 -0
- package/dist/{create-project-DdSF58TR.cjs → create-project-xszOpGTC.cjs} +8 -7
- package/dist/create-project-xszOpGTC.cjs.map +1 -0
- package/dist/{create-team-nm06goO5.js → create-team-CTN-DxOE.js} +5 -4
- package/dist/create-team-CTN-DxOE.js.map +1 -0
- package/dist/{create-team-CXaLcylp.cjs → create-team-DmnJHSIx.cjs} +7 -6
- package/dist/create-team-DmnJHSIx.cjs.map +1 -0
- package/dist/{discover-dataset-fields-BEnyqPSq.js → dataset-fields-By43SxJp.js} +13 -14
- package/dist/dataset-fields-By43SxJp.js.map +1 -0
- package/dist/{discover-dataset-fields-Cl7HpVkm.cjs → dataset-fields-DacS0qF0.cjs} +13 -14
- package/dist/dataset-fields-DacS0qF0.cjs.map +1 -0
- package/dist/define-2Lj8Lm1t.js +8 -0
- package/dist/define-2Lj8Lm1t.js.map +1 -0
- package/dist/{defineTool-lWNTzWl_.cjs → define-BfP4rFlE.cjs} +2 -2
- package/dist/define-BfP4rFlE.cjs.map +1 -0
- package/dist/enhance-error-C7AVt85N.js +32 -0
- package/dist/enhance-error-C7AVt85N.js.map +1 -0
- package/dist/enhance-error-CAREhbDf.cjs +37 -0
- package/dist/enhance-error-CAREhbDf.cjs.map +1 -0
- package/dist/error-handling-efwohgKv.js +97 -0
- package/dist/error-handling-efwohgKv.js.map +1 -0
- package/dist/error-handling-qfa1BeDb.cjs +132 -0
- package/dist/error-handling-qfa1BeDb.cjs.map +1 -0
- package/dist/errors-00Iz6Wmy.d.cts +20 -0
- package/dist/errors-00Iz6Wmy.d.cts.map +1 -0
- package/dist/errors-CNTY5dED.cjs +271 -0
- package/dist/errors-CNTY5dED.cjs.map +1 -0
- package/dist/errors-Cn4l-BlC.d.ts +20 -0
- package/dist/errors-Cn4l-BlC.d.ts.map +1 -0
- package/dist/errors-DMiENfq7.d.cts +126 -0
- package/dist/errors-DMiENfq7.d.cts.map +1 -0
- package/dist/errors-Dr7Q6mD5.js +217 -0
- package/dist/errors-Dr7Q6mD5.js.map +1 -0
- package/dist/errors-bxPCd8AO.d.ts +126 -0
- package/dist/errors-bxPCd8AO.d.ts.map +1 -0
- package/dist/errors.d.cts +2 -20
- package/dist/errors.d.ts +2 -20
- package/dist/{fetch-utils-C_Xj921x.js → fetch-utils-DRWItYjp.js} +1 -1
- package/dist/{fetch-utils-C_Xj921x.js.map → fetch-utils-DRWItYjp.js.map} +1 -1
- package/dist/{fetch-utils-DkcYwqBo.cjs → fetch-utils-bHWZV7j9.cjs} +1 -1
- package/dist/{fetch-utils-DkcYwqBo.cjs.map → fetch-utils-bHWZV7j9.cjs.map} +1 -1
- package/dist/{find-dsns-vQolGM7e.cjs → find-dsns-D0l3siyF.cjs} +7 -6
- package/dist/find-dsns-D0l3siyF.cjs.map +1 -0
- package/dist/{find-dsns-C3G5aBm1.js → find-dsns-U4CCcoTv.js} +5 -4
- package/dist/find-dsns-U4CCcoTv.js.map +1 -0
- package/dist/{find-organizations-BDtHkcFV.cjs → find-organizations-Ca-zpAlI.cjs} +7 -6
- package/dist/find-organizations-Ca-zpAlI.cjs.map +1 -0
- package/dist/{find-organizations-Cs1GvZtJ.js → find-organizations-HUZFa8ZA.js} +5 -4
- package/dist/find-organizations-HUZFa8ZA.js.map +1 -0
- package/dist/{find-projects-xM2L0U1W.cjs → find-projects-CWNLthwg.cjs} +7 -6
- package/dist/find-projects-CWNLthwg.cjs.map +1 -0
- package/dist/{find-projects-B0NdOjBO.js → find-projects-Dy1_O9L0.js} +5 -4
- package/dist/find-projects-Dy1_O9L0.js.map +1 -0
- package/dist/{find-releases-BBTYr5Bx.cjs → find-releases-BtazPcQH.cjs} +7 -6
- package/dist/find-releases-BtazPcQH.cjs.map +1 -0
- package/dist/{find-releases-BO2OF_uR.js → find-releases-DN_BfQM2.js} +5 -4
- package/dist/find-releases-DN_BfQM2.js.map +1 -0
- package/dist/{find-teams-CqUwp0EI.js → find-teams-CRVT4KOg.js} +5 -4
- package/dist/find-teams-CRVT4KOg.js.map +1 -0
- package/dist/{find-teams-B237Aq8U.cjs → find-teams-_zAHPVGx.cjs} +7 -6
- package/dist/find-teams-_zAHPVGx.cjs.map +1 -0
- package/dist/{formatters-DbqofIoy.cjs → formatters-Bzx0sr5R.cjs} +17 -4
- package/dist/formatters-Bzx0sr5R.cjs.map +1 -0
- package/dist/{formatters-CfeBjhXZ.cjs → formatters-CCZdBmLd.cjs} +38 -26
- package/dist/formatters-CCZdBmLd.cjs.map +1 -0
- package/dist/{formatters-B3ONbRhI.js → formatters-DJM9_F3A.js} +12 -5
- package/dist/formatters-DJM9_F3A.js.map +1 -0
- package/dist/{formatters-DSYXBiQx.js → formatters-DJSiRyVi.js} +33 -27
- package/dist/formatters-DJSiRyVi.js.map +1 -0
- package/dist/{formatting-DIvCVunN.js → formatting-BjCK9XwW.js} +56 -12
- package/dist/formatting-BjCK9XwW.js.map +1 -0
- package/dist/{formatting-utils-DDz14xeB.cjs → formatting-CJKoPqjy.cjs} +2 -2
- package/dist/formatting-CJKoPqjy.cjs.map +1 -0
- package/dist/{formatting-utils-C3sej5ER.js → formatting-CfpTtZLo.js} +2 -2
- package/dist/formatting-CfpTtZLo.js.map +1 -0
- package/dist/{formatting-C180PVwd.cjs → formatting-CqmsvuAY.cjs} +57 -13
- package/dist/formatting-CqmsvuAY.cjs.map +1 -0
- package/dist/{formatting-BxyhA4G3.d.cts → formatting-XMmhMjRz.d.cts} +4 -4
- package/dist/formatting-XMmhMjRz.d.cts.map +1 -0
- package/dist/{formatting-C80LN9iK.d.ts → formatting-l3qx5d7L.d.ts} +4 -4
- package/dist/formatting-l3qx5d7L.d.ts.map +1 -0
- package/dist/{get-doc-BfMg0GIa.cjs → get-doc-Euz6NiM3.cjs} +7 -6
- package/dist/get-doc-Euz6NiM3.cjs.map +1 -0
- package/dist/{get-doc-DyqJe6TP.js → get-doc-JDwOkY2j.js} +5 -4
- package/dist/get-doc-JDwOkY2j.js.map +1 -0
- package/dist/{get-event-attachment-o0oH43Tv.cjs → get-event-attachment-DvpQ-dEP.cjs} +7 -6
- package/dist/get-event-attachment-DvpQ-dEP.cjs.map +1 -0
- package/dist/{get-event-attachment-B-ElqztF.js → get-event-attachment-pIJmUfFE.js} +5 -4
- package/dist/get-event-attachment-pIJmUfFE.js.map +1 -0
- package/dist/{get-issue-details-CzroF7HR.js → get-issue-details-B1PDMmMY.js} +40 -20
- package/dist/get-issue-details-B1PDMmMY.js.map +1 -0
- package/dist/{get-issue-details-CP_RyCpt.cjs → get-issue-details-BH75EnNk.cjs} +42 -22
- package/dist/get-issue-details-BH75EnNk.cjs.map +1 -0
- package/dist/get-trace-details-Bksygq21.cjs +308 -0
- package/dist/get-trace-details-Bksygq21.cjs.map +1 -0
- package/dist/get-trace-details-CaK0JMf4.js +302 -0
- package/dist/get-trace-details-CaK0JMf4.js.map +1 -0
- package/dist/{handler-aE_8mEm7.js → handler-BbqDy4DA.js} +39 -41
- package/dist/handler-BbqDy4DA.js.map +1 -0
- package/dist/{handler-O9fYgC9a.cjs → handler-C0zOOLbO.cjs} +42 -27
- package/dist/handler-C0zOOLbO.cjs.map +1 -0
- package/dist/{handler-BPPTAi7I.d.ts → handler-CcbbXK_f.d.ts} +4 -4
- package/dist/handler-CcbbXK_f.d.ts.map +1 -0
- package/dist/{handler-cUB6XcUV.d.ts → handler-Ct9Z_sTZ.d.ts} +4 -4
- package/dist/handler-Ct9Z_sTZ.d.ts.map +1 -0
- package/dist/{handler-BGhr9FJM.d.cts → handler-DSYbwPgv.d.cts} +4 -4
- package/dist/handler-DSYbwPgv.d.cts.map +1 -0
- package/dist/{handler-ykkULTZ-.js → handler-DyBdUYam.js} +40 -25
- package/dist/handler-DyBdUYam.js.map +1 -0
- package/dist/{handler-BZ3hKPb8.d.cts → handler-RV4XhU8F.d.cts} +4 -4
- package/dist/handler-RV4XhU8F.d.cts.map +1 -0
- package/dist/{handler-BH_OLIbD.cjs → handler-cy5oD28N.cjs} +41 -43
- package/dist/handler-cy5oD28N.cjs.map +1 -0
- package/dist/index.cjs +113 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +113 -96
- package/dist/index.js.map +1 -1
- package/dist/internal/agents/callEmbeddedAgent.cjs +3 -0
- package/dist/internal/agents/callEmbeddedAgent.d.cts +33 -0
- package/dist/internal/agents/callEmbeddedAgent.d.cts.map +1 -0
- package/dist/internal/agents/callEmbeddedAgent.d.ts +33 -0
- package/dist/internal/agents/callEmbeddedAgent.d.ts.map +1 -0
- package/dist/internal/agents/callEmbeddedAgent.js +3 -0
- package/dist/internal/agents/tools/dataset-fields.cjs +15 -0
- package/dist/{agent-tools/discover-dataset-fields.d.ts → internal/agents/tools/dataset-fields.d.cts} +18 -19
- package/dist/internal/agents/tools/dataset-fields.d.cts.map +1 -0
- package/dist/{agent-tools/discover-dataset-fields.d.cts → internal/agents/tools/dataset-fields.d.ts} +18 -19
- package/dist/internal/agents/tools/dataset-fields.d.ts.map +1 -0
- package/dist/internal/agents/tools/dataset-fields.js +12 -0
- package/dist/internal/agents/tools/otel-semantics.cjs +13 -0
- package/dist/internal/agents/tools/otel-semantics.d.cts +41 -0
- package/dist/internal/agents/tools/otel-semantics.d.cts.map +1 -0
- package/dist/internal/agents/tools/otel-semantics.d.ts +41 -0
- package/dist/internal/agents/tools/otel-semantics.d.ts.map +1 -0
- package/dist/internal/agents/tools/otel-semantics.js +12 -0
- package/dist/internal/agents/tools/utils.cjs +11 -0
- package/dist/internal/agents/tools/utils.d.cts +2 -0
- package/dist/internal/agents/tools/utils.d.ts +2 -0
- package/dist/internal/agents/tools/utils.js +11 -0
- package/dist/internal/agents/tools/whoami.cjs +13 -0
- package/dist/internal/agents/tools/whoami.d.cts +33 -0
- package/dist/internal/agents/tools/whoami.d.cts.map +1 -0
- package/dist/internal/agents/tools/whoami.d.ts +33 -0
- package/dist/internal/agents/tools/whoami.d.ts.map +1 -0
- package/dist/internal/agents/tools/whoami.js +12 -0
- package/dist/internal/error-handling.cjs +16 -0
- package/dist/internal/error-handling.d.cts +40 -0
- package/dist/internal/error-handling.d.cts.map +1 -0
- package/dist/internal/error-handling.d.ts +40 -0
- package/dist/internal/error-handling.d.ts.map +1 -0
- package/dist/internal/error-handling.js +11 -0
- package/dist/internal/fetch-utils.cjs +1 -1
- package/dist/internal/fetch-utils.d.cts +33 -2
- package/dist/internal/fetch-utils.d.cts.map +1 -0
- package/dist/internal/fetch-utils.d.ts +33 -2
- package/dist/internal/fetch-utils.d.ts.map +1 -0
- package/dist/internal/fetch-utils.js +1 -1
- package/dist/internal/formatting.cjs +2 -2
- package/dist/internal/formatting.d.cts +6 -5
- package/dist/internal/formatting.d.ts +6 -5
- package/dist/internal/formatting.js +2 -2
- package/dist/internal/issue-helpers.cjs +1 -1
- package/dist/internal/issue-helpers.d.cts +1 -1
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/sentry-scrubbing.cjs +6 -0
- package/dist/internal/sentry-scrubbing.d.cts +28 -0
- package/dist/internal/sentry-scrubbing.d.cts.map +1 -0
- package/dist/internal/sentry-scrubbing.d.ts +28 -0
- package/dist/internal/sentry-scrubbing.d.ts.map +1 -0
- package/dist/internal/sentry-scrubbing.js +3 -0
- package/dist/internal/test-fixtures.d.cts +242 -152
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +104 -14
- package/dist/internal/test-fixtures.d.ts.map +1 -1
- package/dist/internal/tool-helpers/api.cjs +14 -0
- package/dist/{tools/utils/api-utils.d.cts → internal/tool-helpers/api.d.cts} +11 -10
- package/dist/internal/tool-helpers/api.d.cts.map +1 -0
- package/dist/{tools/utils/api-utils.d.ts → internal/tool-helpers/api.d.ts} +11 -10
- package/dist/internal/tool-helpers/api.d.ts.map +1 -0
- package/dist/internal/tool-helpers/api.js +12 -0
- package/dist/internal/tool-helpers/define.cjs +3 -0
- package/dist/internal/tool-helpers/define.d.cts +13 -0
- package/dist/internal/tool-helpers/define.d.cts.map +1 -0
- package/dist/internal/tool-helpers/define.d.ts +13 -0
- package/dist/internal/tool-helpers/define.d.ts.map +1 -0
- package/dist/internal/tool-helpers/define.js +3 -0
- package/dist/internal/tool-helpers/enhance-error.cjs +10 -0
- package/dist/internal/tool-helpers/enhance-error.d.cts +29 -0
- package/dist/internal/tool-helpers/enhance-error.d.cts.map +1 -0
- package/dist/internal/tool-helpers/enhance-error.d.ts +29 -0
- package/dist/internal/tool-helpers/enhance-error.d.ts.map +1 -0
- package/dist/internal/tool-helpers/enhance-error.js +10 -0
- package/dist/internal/tool-helpers/formatting.cjs +3 -0
- package/dist/internal/tool-helpers/formatting.d.cts +16 -0
- package/dist/internal/tool-helpers/formatting.d.cts.map +1 -0
- package/dist/internal/tool-helpers/formatting.d.ts +16 -0
- package/dist/internal/tool-helpers/formatting.d.ts.map +1 -0
- package/dist/internal/tool-helpers/formatting.js +3 -0
- package/dist/internal/tool-helpers/issue.cjs +8 -0
- package/dist/internal/tool-helpers/issue.d.cts +8 -0
- package/dist/internal/tool-helpers/issue.d.ts +8 -0
- package/dist/internal/tool-helpers/issue.js +7 -0
- package/dist/internal/tool-helpers/seer.cjs +11 -0
- package/dist/{tools/utils/seer-utils.d.cts → internal/tool-helpers/seer.d.cts} +8 -7
- package/dist/internal/tool-helpers/seer.d.cts.map +1 -0
- package/dist/{tools/utils/seer-utils.d.ts → internal/tool-helpers/seer.d.ts} +8 -7
- package/dist/internal/tool-helpers/seer.d.ts.map +1 -0
- package/dist/{tools/utils/seer-utils.js → internal/tool-helpers/seer.js} +1 -1
- package/dist/internal/tool-helpers/validate-region-url.cjs +5 -0
- package/dist/internal/tool-helpers/validate-region-url.d.cts +20 -0
- package/dist/internal/tool-helpers/validate-region-url.d.cts.map +1 -0
- package/dist/internal/tool-helpers/validate-region-url.d.ts +20 -0
- package/dist/internal/tool-helpers/validate-region-url.d.ts.map +1 -0
- package/dist/internal/tool-helpers/validate-region-url.js +5 -0
- package/dist/{issue-helpers-s5fKLwJZ.cjs → issue-helpers-1qxzc7ww.cjs} +1 -1
- package/dist/{issue-helpers-s5fKLwJZ.cjs.map → issue-helpers-1qxzc7ww.cjs.map} +1 -1
- package/dist/{issue-helpers-CRx45FYG.js → issue-helpers-Bjp6xu5H.js} +1 -1
- package/dist/{issue-helpers-CRx45FYG.js.map → issue-helpers-Bjp6xu5H.js.map} +1 -1
- package/dist/{issue-helpers-Cz01Ipvl.d.cts → issue-helpers-Cf6mvHG1.d.cts} +1 -1
- package/dist/{issue-helpers-Cz01Ipvl.d.cts.map → issue-helpers-Cf6mvHG1.d.cts.map} +1 -1
- package/dist/{issue-helpers-D1_Uqr-F.d.ts → issue-helpers-kwhe1ipy.d.ts} +1 -1
- package/dist/{issue-helpers-D1_Uqr-F.d.ts.map → issue-helpers-kwhe1ipy.d.ts.map} +1 -1
- package/dist/{logging-tGU_SYcA.js → logging-CBMxr4i2.js} +1 -1
- package/dist/{logging-tGU_SYcA.js.map → logging-CBMxr4i2.js.map} +1 -1
- package/dist/{logging-BpL53bY6.cjs → logging-rvUPDKax.cjs} +1 -1
- package/dist/{logging-BpL53bY6.cjs.map → logging-rvUPDKax.cjs.map} +1 -1
- package/dist/logging.cjs +1 -1
- package/dist/logging.js +1 -1
- package/dist/{lookup-otel-semantics-Dt667kdR.js → otel-semantics-BFRGhf6y.js} +88 -94
- package/dist/otel-semantics-BFRGhf6y.js.map +1 -0
- package/dist/{lookup-otel-semantics-BbriXZAx.cjs → otel-semantics-CkUpXWEJ.cjs} +88 -94
- package/dist/otel-semantics-CkUpXWEJ.cjs.map +1 -0
- package/dist/parse-C3tRlsy-.js +89 -0
- package/dist/parse-C3tRlsy-.js.map +1 -0
- package/dist/parse-CeFc4xnt.cjs +107 -0
- package/dist/parse-CeFc4xnt.cjs.map +1 -0
- package/dist/permissions-C-q0Y5bL.d.ts +79 -0
- package/dist/permissions-C-q0Y5bL.d.ts.map +1 -0
- package/dist/permissions-Cm5e34n2.d.cts +79 -0
- package/dist/permissions-Cm5e34n2.d.cts.map +1 -0
- package/dist/permissions-DRdH39Fe.js +155 -0
- package/dist/permissions-DRdH39Fe.js.map +1 -0
- package/dist/permissions-DuDYuCjy.cjs +209 -0
- package/dist/permissions-DuDYuCjy.cjs.map +1 -0
- package/dist/permissions.cjs +11 -0
- package/dist/permissions.d.cts +2 -0
- package/dist/permissions.d.ts +2 -0
- package/dist/permissions.js +3 -0
- package/dist/{promptDefinitions-5V4-M69A.cjs → promptDefinitions-02aQWFKD.cjs} +2 -2
- package/dist/{promptDefinitions-5V4-M69A.cjs.map → promptDefinitions-02aQWFKD.cjs.map} +1 -1
- package/dist/{promptDefinitions-DehpwJfn.d.ts → promptDefinitions-ImFNiWkX.d.cts} +3 -3
- package/dist/promptDefinitions-ImFNiWkX.d.cts.map +1 -0
- package/dist/{promptDefinitions-CVHtYaj8.d.cts → promptDefinitions-Y-mt2_IM.d.ts} +3 -3
- package/dist/promptDefinitions-Y-mt2_IM.d.ts.map +1 -0
- package/dist/{promptDefinitions-DyshsF51.js → promptDefinitions-wR6u6ZJE.js} +2 -2
- package/dist/{promptDefinitions-DyshsF51.js.map → promptDefinitions-wR6u6ZJE.js.map} +1 -1
- package/dist/promptDefinitions.cjs +4 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +4 -3
- package/dist/{prompts-BTtNbKQR.cjs → prompts-BwZJaywH.cjs} +1 -1
- package/dist/{prompts-BTtNbKQR.cjs.map → prompts-BwZJaywH.cjs.map} +1 -1
- package/dist/{prompts-CYcvIxWR.js → prompts-DCJ0XraB.js} +1 -1
- package/dist/{prompts-CYcvIxWR.js.map → prompts-DCJ0XraB.js.map} +1 -1
- package/dist/prompts.cjs +1 -1
- package/dist/prompts.d.cts +3 -2
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +3 -2
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/resolve-B_Fq13Dk.js +52 -0
- package/dist/resolve-B_Fq13Dk.js.map +1 -0
- package/dist/resolve-CAtC1wN-.cjs +63 -0
- package/dist/resolve-CAtC1wN-.cjs.map +1 -0
- package/dist/resources/about.cjs +3 -0
- package/dist/resources/about.d.cts +2 -0
- package/dist/resources/about.d.ts +2 -0
- package/dist/resources/about.js +3 -0
- package/dist/resources/index.cjs +4 -0
- package/dist/resources/index.d.cts +2 -0
- package/dist/resources/index.d.ts +2 -0
- package/dist/resources/index.js +4 -0
- package/dist/resources-B4ropjfD.cjs +94 -0
- package/dist/resources-B4ropjfD.cjs.map +1 -0
- package/dist/resources-DaEUMw3Y.js +82 -0
- package/dist/resources-DaEUMw3Y.js.map +1 -0
- package/dist/resources.cjs +6 -4
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +4 -2
- package/dist/{schema-DPL_hZXP.cjs → schema-BUBkkdUa.cjs} +14 -6
- package/dist/schema-BUBkkdUa.cjs.map +1 -0
- package/dist/{schema-C0LznFvu.cjs → schema-CbXlt1rW.cjs} +105 -3
- package/dist/schema-CbXlt1rW.cjs.map +1 -0
- package/dist/{schema-CdDcpvrp.d.cts → schema-ChvpDxUk.d.cts} +733 -486
- package/dist/{schema-CdDcpvrp.d.cts.map → schema-ChvpDxUk.d.cts.map} +1 -1
- package/dist/{schema-CcFmBoEf.js → schema-D1CzTJXB.js} +82 -4
- package/dist/schema-D1CzTJXB.js.map +1 -0
- package/dist/{schema-BlkWypl3.d.ts → schema-DOY22v1Q.d.ts} +509 -262
- package/dist/{schema-BlkWypl3.d.ts.map → schema-DOY22v1Q.d.ts.map} +1 -1
- package/dist/{schema-Bv2fvxgy.js → schema-DPJO5nkQ.js} +9 -7
- package/dist/schema-DPJO5nkQ.js.map +1 -0
- package/dist/schema.cjs +4 -2
- package/dist/schema.d.cts +7 -5
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +7 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +4 -3
- package/dist/{search-docs-CjIZDaD1.cjs → search-docs-CH6-1H9_.cjs} +8 -7
- package/dist/search-docs-CH6-1H9_.cjs.map +1 -0
- package/dist/{search-docs-ss09Dt0F.js → search-docs-CpAlMLs8.js} +6 -5
- package/dist/search-docs-CpAlMLs8.js.map +1 -0
- package/dist/{seer-utils-NPHv8KYY.js → seer-DLvrFQPo.js} +2 -2
- package/dist/seer-DLvrFQPo.js.map +1 -0
- package/dist/{seer-utils-C7Kv0gr8.cjs → seer-retC9dFI.cjs} +2 -2
- package/dist/seer-retC9dFI.cjs.map +1 -0
- package/dist/sentry-scrubbing-BrjExjlM.js +94 -0
- package/dist/sentry-scrubbing-BrjExjlM.js.map +1 -0
- package/dist/sentry-scrubbing-CDcE4n-D.cjs +118 -0
- package/dist/sentry-scrubbing-CDcE4n-D.cjs.map +1 -0
- package/dist/{server-D78x_7Vz.js → server-BjizUxVR.js} +76 -129
- package/dist/server-BjizUxVR.js.map +1 -0
- package/dist/{server-DYFiTMLB.cjs → server-RKq8MlNM.cjs} +76 -129
- package/dist/server-RKq8MlNM.cjs.map +1 -0
- package/dist/server.cjs +63 -53
- package/dist/server.d.cts +3 -2
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +3 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +63 -53
- package/dist/slug-validation-58wajHeL.js +93 -0
- package/dist/slug-validation-58wajHeL.js.map +1 -0
- package/dist/slug-validation-DMk8Dyuh.cjs +111 -0
- package/dist/slug-validation-DMk8Dyuh.cjs.map +1 -0
- package/dist/{stdio-Be01KQkA.cjs → stdio-CJnMOUAU.cjs} +3 -3
- package/dist/{stdio-Be01KQkA.cjs.map → stdio-CJnMOUAU.cjs.map} +1 -1
- package/dist/{stdio-CDb2NHHD.js → stdio-DB9muOi8.js} +3 -3
- package/dist/{stdio-CDb2NHHD.js.map → stdio-DB9muOi8.js.map} +1 -1
- package/dist/test-setup.cjs +33622 -1524
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.d.cts +33 -1
- package/dist/test-setup.d.cts.map +1 -0
- package/dist/test-setup.d.ts +33 -1
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +33632 -1534
- package/dist/test-setup.js.map +1 -1
- package/dist/test-utils/context.cjs +32 -0
- package/dist/test-utils/context.cjs.map +1 -0
- package/dist/test-utils/context.d.cts +18 -0
- package/dist/test-utils/context.d.cts.map +1 -0
- package/dist/test-utils/context.d.ts +18 -0
- package/dist/test-utils/context.d.ts.map +1 -0
- package/dist/test-utils/context.js +30 -0
- package/dist/test-utils/context.js.map +1 -0
- package/dist/toolDefinitions.cjs +9 -0
- package/dist/toolDefinitions.cjs.map +1 -1
- package/dist/toolDefinitions.js +9 -0
- package/dist/toolDefinitions.js.map +1 -1
- package/dist/tools/analyze-issue-with-seer.cjs +18 -15
- package/dist/tools/analyze-issue-with-seer.d.cts +5 -4
- package/dist/tools/analyze-issue-with-seer.d.cts.map +1 -1
- package/dist/tools/analyze-issue-with-seer.d.ts +5 -4
- package/dist/tools/analyze-issue-with-seer.d.ts.map +1 -1
- package/dist/tools/analyze-issue-with-seer.js +18 -15
- package/dist/tools/create-dsn.cjs +13 -10
- package/dist/tools/create-dsn.d.cts +6 -5
- package/dist/tools/create-dsn.d.cts.map +1 -1
- package/dist/tools/create-dsn.d.ts +6 -5
- package/dist/tools/create-dsn.d.ts.map +1 -1
- package/dist/tools/create-dsn.js +13 -10
- package/dist/tools/create-project.cjs +14 -11
- package/dist/tools/create-project.d.cts +6 -5
- package/dist/tools/create-project.d.cts.map +1 -1
- package/dist/tools/create-project.d.ts +6 -5
- package/dist/tools/create-project.d.ts.map +1 -1
- package/dist/tools/create-project.js +14 -11
- package/dist/tools/create-team.cjs +13 -10
- package/dist/tools/create-team.d.cts +5 -4
- package/dist/tools/create-team.d.cts.map +1 -1
- package/dist/tools/create-team.d.ts +5 -4
- package/dist/tools/create-team.d.ts.map +1 -1
- package/dist/tools/create-team.js +13 -10
- package/dist/tools/find-dsns.cjs +13 -10
- package/dist/tools/find-dsns.d.cts +8 -7
- package/dist/tools/find-dsns.d.cts.map +1 -1
- package/dist/tools/find-dsns.d.ts +8 -7
- package/dist/tools/find-dsns.d.ts.map +1 -1
- package/dist/tools/find-dsns.js +13 -10
- package/dist/tools/find-organizations.cjs +11 -8
- package/dist/tools/find-organizations.d.cts +4 -3
- package/dist/tools/find-organizations.d.ts +4 -3
- package/dist/tools/find-organizations.js +11 -8
- package/dist/tools/find-projects.cjs +13 -10
- package/dist/tools/find-projects.d.cts +7 -6
- package/dist/tools/find-projects.d.cts.map +1 -1
- package/dist/tools/find-projects.d.ts +7 -6
- package/dist/tools/find-projects.d.ts.map +1 -1
- package/dist/tools/find-projects.js +13 -10
- package/dist/tools/find-releases.cjs +13 -10
- package/dist/tools/find-releases.d.cts +6 -5
- package/dist/tools/find-releases.d.cts.map +1 -1
- package/dist/tools/find-releases.d.ts +6 -5
- package/dist/tools/find-releases.d.ts.map +1 -1
- package/dist/tools/find-releases.js +13 -10
- package/dist/tools/find-teams.cjs +13 -10
- package/dist/tools/find-teams.d.cts +7 -6
- package/dist/tools/find-teams.d.cts.map +1 -1
- package/dist/tools/find-teams.d.ts +7 -6
- package/dist/tools/find-teams.d.ts.map +1 -1
- package/dist/tools/find-teams.js +13 -10
- package/dist/tools/get-doc.cjs +9 -9
- package/dist/tools/get-doc.d.cts +4 -3
- package/dist/tools/get-doc.d.cts.map +1 -1
- package/dist/tools/get-doc.d.ts +4 -3
- package/dist/tools/get-doc.d.ts.map +1 -1
- package/dist/tools/get-doc.js +9 -9
- package/dist/tools/get-event-attachment.cjs +13 -10
- package/dist/tools/get-event-attachment.d.cts +10 -9
- package/dist/tools/get-event-attachment.d.cts.map +1 -1
- package/dist/tools/get-event-attachment.d.ts +10 -9
- package/dist/tools/get-event-attachment.d.ts.map +1 -1
- package/dist/tools/get-event-attachment.js +13 -10
- package/dist/tools/get-issue-details.cjs +18 -14
- package/dist/tools/get-issue-details.d.cts +5 -4
- package/dist/tools/get-issue-details.d.cts.map +1 -1
- package/dist/tools/get-issue-details.d.ts +5 -4
- package/dist/tools/get-issue-details.d.ts.map +1 -1
- package/dist/tools/get-issue-details.js +18 -14
- package/dist/tools/get-trace-details.cjs +16 -0
- package/dist/tools/get-trace-details.d.cts +15 -0
- package/dist/tools/get-trace-details.d.cts.map +1 -0
- package/dist/tools/get-trace-details.d.ts +15 -0
- package/dist/tools/get-trace-details.d.ts.map +1 -0
- package/dist/tools/get-trace-details.js +16 -0
- package/dist/tools/index.cjs +54 -48
- package/dist/tools/index.d.cts +77 -71
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +77 -71
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +54 -48
- package/dist/tools/search-docs.cjs +12 -11
- package/dist/tools/search-docs.d.cts +4 -3
- package/dist/tools/search-docs.d.cts.map +1 -1
- package/dist/tools/search-docs.d.ts +4 -3
- package/dist/tools/search-docs.d.ts.map +1 -1
- package/dist/tools/search-docs.js +12 -11
- package/dist/tools/search-events/agent.cjs +15 -6
- package/dist/tools/search-events/agent.d.cts +7 -43
- package/dist/tools/search-events/agent.d.ts +7 -43
- package/dist/tools/search-events/agent.js +15 -6
- package/dist/tools/search-events/config.cjs +3 -2
- package/dist/tools/search-events/config.d.cts +2 -1
- package/dist/tools/search-events/config.d.cts.map +1 -1
- package/dist/tools/search-events/config.d.ts +2 -1
- package/dist/tools/search-events/config.d.ts.map +1 -1
- package/dist/tools/search-events/config.js +2 -2
- package/dist/tools/search-events/formatters.cjs +11 -3
- package/dist/tools/search-events/formatters.d.cts +28 -17
- package/dist/tools/search-events/formatters.d.cts.map +1 -1
- package/dist/tools/search-events/formatters.d.ts +28 -17
- package/dist/tools/search-events/formatters.d.ts.map +1 -1
- package/dist/tools/search-events/formatters.js +11 -4
- package/dist/tools/search-events/handler.cjs +22 -17
- package/dist/tools/search-events/handler.d.cts +5 -4
- package/dist/tools/search-events/handler.d.ts +5 -4
- package/dist/tools/search-events/handler.js +22 -17
- package/dist/tools/search-events/index.cjs +26 -19
- package/dist/tools/search-events/index.d.cts +12 -5
- package/dist/tools/search-events/index.d.ts +12 -5
- package/dist/tools/search-events/index.js +24 -19
- package/dist/tools/search-events/utils.cjs +14 -7
- package/dist/tools/search-events/utils.d.cts +7 -5
- package/dist/tools/search-events/utils.d.ts +7 -5
- package/dist/tools/search-events/utils.js +9 -2
- package/dist/tools/search-issues/agent.cjs +14 -5
- package/dist/tools/search-issues/agent.d.cts +7 -33
- package/dist/tools/search-issues/agent.d.ts +7 -33
- package/dist/tools/search-issues/agent.js +14 -5
- package/dist/tools/search-issues/config.cjs +1 -1
- package/dist/tools/search-issues/config.d.cts +1 -1
- package/dist/tools/search-issues/config.d.ts +1 -1
- package/dist/tools/search-issues/config.js +1 -1
- package/dist/tools/search-issues/formatters.cjs +3 -2
- package/dist/tools/search-issues/formatters.d.cts +20 -7
- package/dist/tools/search-issues/formatters.d.cts.map +1 -1
- package/dist/tools/search-issues/formatters.d.ts +20 -7
- package/dist/tools/search-issues/formatters.d.ts.map +1 -1
- package/dist/tools/search-issues/formatters.js +3 -3
- package/dist/tools/search-issues/handler.cjs +21 -15
- package/dist/tools/search-issues/handler.d.cts +5 -4
- package/dist/tools/search-issues/handler.d.ts +5 -4
- package/dist/tools/search-issues/handler.js +21 -15
- package/dist/tools/search-issues/index.cjs +25 -17
- package/dist/tools/search-issues/index.d.cts +12 -5
- package/dist/tools/search-issues/index.d.ts +12 -5
- package/dist/tools/search-issues/index.js +23 -17
- package/dist/tools/types.d.cts +4 -3
- package/dist/tools/types.d.ts +4 -3
- package/dist/tools/update-issue.cjs +18 -15
- package/dist/tools/update-issue.d.cts +11 -10
- package/dist/tools/update-issue.d.cts.map +1 -1
- package/dist/tools/update-issue.d.ts +11 -10
- package/dist/tools/update-issue.d.ts.map +1 -1
- package/dist/tools/update-issue.js +18 -15
- package/dist/tools/update-project.cjs +14 -11
- package/dist/tools/update-project.d.cts +7 -6
- package/dist/tools/update-project.d.cts.map +1 -1
- package/dist/tools/update-project.d.ts +7 -6
- package/dist/tools/update-project.d.ts.map +1 -1
- package/dist/tools/update-project.js +14 -11
- package/dist/tools/whoami.cjs +11 -8
- package/dist/tools/whoami.d.cts +4 -3
- package/dist/tools/whoami.d.ts +4 -3
- package/dist/tools/whoami.js +11 -8
- package/dist/tools-BiCRxQiY.js +46 -0
- package/dist/tools-BiCRxQiY.js.map +1 -0
- package/dist/{tools-sQ2wM3Pi.cjs → tools-UZ_biJKC.cjs} +21 -19
- package/dist/tools-UZ_biJKC.cjs.map +1 -0
- package/dist/transports/stdio.cjs +64 -54
- package/dist/transports/stdio.d.cts +3 -2
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +3 -2
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +64 -54
- package/dist/{types-B-8S69No.d.ts → types-B4nOfch5.d.cts} +7 -3
- package/dist/{types-BYtO24VE.d.cts.map → types-B4nOfch5.d.cts.map} +1 -1
- package/dist/types-CKPddlfS.cjs +0 -0
- package/dist/types-Cy4S5lN-.js +0 -0
- package/dist/types-DLRWzl3K.d.cts +55 -0
- package/dist/types-DLRWzl3K.d.cts.map +1 -0
- package/dist/types-DTp1ajTT.d.ts +55 -0
- package/dist/types-DTp1ajTT.d.ts.map +1 -0
- package/dist/{types-BV-G5sBp.d.cts → types-Dj36Sq2V.d.cts} +14 -4
- package/dist/types-Dj36Sq2V.d.cts.map +1 -0
- package/dist/{types-C1Fih0eQ.d.ts → types-m-t7jx2f.d.ts} +14 -4
- package/dist/{types-BV-G5sBp.d.cts.map → types-m-t7jx2f.d.ts.map} +1 -1
- package/dist/{types-aOEJ0KgQ.d.cts → types-o23QqDgk.d.cts} +4 -2
- package/dist/types-o23QqDgk.d.cts.map +1 -0
- package/dist/{types-BYtO24VE.d.cts → types-ryM3umix.d.ts} +7 -3
- package/dist/{types-B-8S69No.d.ts.map → types-ryM3umix.d.ts.map} +1 -1
- package/dist/{types-BOcoP3Na.d.ts → types-s3ChfOM9.d.ts} +4 -2
- package/dist/types-s3ChfOM9.d.ts.map +1 -0
- package/dist/types.d.cts +4 -3
- package/dist/types.d.ts +4 -3
- package/dist/{update-issue-D77PudUi.cjs → update-issue-CD-kp2dt.cjs} +13 -18
- package/dist/update-issue-CD-kp2dt.cjs.map +1 -0
- package/dist/{update-issue-ndy2PF5G.js → update-issue-nq8D_YUe.js} +9 -14
- package/dist/update-issue-nq8D_YUe.js.map +1 -0
- package/dist/{update-project-DqECtbDA.cjs → update-project-B_OLM4Ky.cjs} +8 -7
- package/dist/{update-project-DqECtbDA.cjs.map → update-project-B_OLM4Ky.cjs.map} +1 -1
- package/dist/{update-project-Bxsi-BG_.js → update-project-DvJfmSmX.js} +6 -5
- package/dist/{update-project-Bxsi-BG_.js.map → update-project-DvJfmSmX.js.map} +1 -1
- package/dist/{url-utils-vJo2ER5v.cjs → url-utils-0OheI87i.cjs} +13 -9
- package/dist/url-utils-0OheI87i.cjs.map +1 -0
- package/dist/{url-utils-IqgSmI-B.js → url-utils-DF8NBCyH.js} +13 -9
- package/dist/url-utils-DF8NBCyH.js.map +1 -0
- package/dist/usage-Do2a2NJi.cjs +44 -0
- package/dist/usage-Do2a2NJi.cjs.map +1 -0
- package/dist/usage-OGOjVeAz.js +38 -0
- package/dist/usage-OGOjVeAz.js.map +1 -0
- package/dist/utils/slug-validation.cjs +5 -0
- package/dist/utils/slug-validation.d.cts +51 -0
- package/dist/utils/slug-validation.d.cts.map +1 -0
- package/dist/utils/slug-validation.d.ts +51 -0
- package/dist/utils/slug-validation.d.ts.map +1 -0
- package/dist/utils/slug-validation.js +3 -0
- package/dist/utils/url-utils.cjs +1 -1
- package/dist/utils/url-utils.d.cts +5 -5
- package/dist/utils/url-utils.d.cts.map +1 -1
- package/dist/utils/url-utils.d.ts +5 -5
- package/dist/utils/url-utils.d.ts.map +1 -1
- package/dist/utils/url-utils.js +1 -1
- package/dist/utils-BOPpU4-H.cjs +87 -0
- package/dist/utils-BOPpU4-H.cjs.map +1 -0
- package/dist/utils-CP4vAzfv.js +94 -0
- package/dist/utils-CP4vAzfv.js.map +1 -0
- package/dist/utils-Cw6O1ztc.d.ts +43 -0
- package/dist/utils-Cw6O1ztc.d.ts.map +1 -0
- package/dist/{utils-CtBGHj_N.d.cts → utils-DA-V9B-n.d.ts} +16 -12
- package/dist/utils-DA-V9B-n.d.ts.map +1 -0
- package/dist/{utils-CqbeJfE1.cjs → utils-DQ69VZrK.cjs} +39 -53
- package/dist/utils-DQ69VZrK.cjs.map +1 -0
- package/dist/{utils-BwXbSgEI.d.ts → utils-Ddvt3CBZ.d.cts} +16 -12
- package/dist/utils-Ddvt3CBZ.d.cts.map +1 -0
- package/dist/utils-K1XhlGf4.js +81 -0
- package/dist/utils-K1XhlGf4.js.map +1 -0
- package/dist/utils-OyJ8CB2S.d.cts +43 -0
- package/dist/utils-OyJ8CB2S.d.cts.map +1 -0
- package/dist/validate-region-url-BhxxcBgE.cjs +42 -0
- package/dist/validate-region-url-BhxxcBgE.cjs.map +1 -0
- package/dist/validate-region-url-DTUtqFky.js +37 -0
- package/dist/validate-region-url-DTUtqFky.js.map +1 -0
- package/dist/version-CaDh5TML.js +6 -0
- package/dist/{version-Bj68uyCt.js.map → version-CaDh5TML.js.map} +1 -1
- package/dist/{version-CMS1IOUV.cjs → version-DB2IM9qM.cjs} +2 -2
- package/dist/{version-CMS1IOUV.cjs.map → version-DB2IM9qM.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/whoami-BdiVu0Wr.cjs +38 -0
- package/dist/whoami-BdiVu0Wr.cjs.map +1 -0
- package/dist/{whoami-CoZJKpys.cjs → whoami-DCgOyVnW.cjs} +7 -5
- package/dist/whoami-DCgOyVnW.cjs.map +1 -0
- package/dist/{whoami-xBAWvzG4.js → whoami-bRIfclYF.js} +7 -5
- package/dist/whoami-bRIfclYF.js.map +1 -0
- package/dist/whoami-qCGsRPRm.js +33 -0
- package/dist/whoami-qCGsRPRm.js.map +1 -0
- package/package.json +34 -9
- package/dist/agent-COgY789I.js +0 -225
- package/dist/agent-COgY789I.js.map +0 -1
- package/dist/agent-Cody_f0d.cjs +0 -59
- package/dist/agent-Cody_f0d.cjs.map +0 -1
- package/dist/agent-DZRRChrO.js +0 -53
- package/dist/agent-DZRRChrO.js.map +0 -1
- package/dist/agent-DpCCnhh5.cjs +0 -231
- package/dist/agent-DpCCnhh5.cjs.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.cjs +0 -6
- package/dist/agent-tools/discover-dataset-fields.d.cts.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.d.ts.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.js +0 -3
- package/dist/agent-tools/lookup-otel-semantics.cjs +0 -5
- package/dist/agent-tools/lookup-otel-semantics.d.cts +0 -38
- package/dist/agent-tools/lookup-otel-semantics.d.cts.map +0 -1
- package/dist/agent-tools/lookup-otel-semantics.d.ts +0 -38
- package/dist/agent-tools/lookup-otel-semantics.d.ts.map +0 -1
- package/dist/agent-tools/lookup-otel-semantics.js +0 -4
- package/dist/agent-tools/whoami.cjs +0 -4
- package/dist/agent-tools/whoami.d.cts +0 -28
- package/dist/agent-tools/whoami.d.cts.map +0 -1
- package/dist/agent-tools/whoami.d.ts +0 -28
- package/dist/agent-tools/whoami.d.ts.map +0 -1
- package/dist/agent-tools/whoami.js +0 -3
- package/dist/analyze-issue-with-seer-DcSwrWrs.js.map +0 -1
- package/dist/analyze-issue-with-seer-Dw9iqvSk.cjs.map +0 -1
- package/dist/api-utils-BlUSO8xh.js.map +0 -1
- package/dist/api-utils-DFWUfQ83.cjs.map +0 -1
- package/dist/client-CPrEfAwa.cjs.map +0 -1
- package/dist/client-C_dDreKj.d.ts.map +0 -1
- package/dist/client-CgS3tjJG.d.cts.map +0 -1
- package/dist/client-MaVV1gVC.js.map +0 -1
- package/dist/config-BUmDxVLS.js +0 -52
- package/dist/config-BUmDxVLS.js.map +0 -1
- package/dist/config-BvtWiL3I.js.map +0 -1
- package/dist/config-CD-5FpOO.cjs.map +0 -1
- package/dist/config-FWsgDbm7.cjs +0 -58
- package/dist/config-FWsgDbm7.cjs.map +0 -1
- package/dist/constants-ClkMK29-.cjs.map +0 -1
- package/dist/constants-S7AU45oQ.js.map +0 -1
- package/dist/create-project-Cax3fWey.js.map +0 -1
- package/dist/create-project-DdSF58TR.cjs.map +0 -1
- package/dist/create-team-CXaLcylp.cjs.map +0 -1
- package/dist/create-team-nm06goO5.js.map +0 -1
- package/dist/defineTool-77H4nSna.js +0 -8
- package/dist/defineTool-77H4nSna.js.map +0 -1
- package/dist/defineTool-lWNTzWl_.cjs.map +0 -1
- package/dist/discover-dataset-fields-BEnyqPSq.js.map +0 -1
- package/dist/discover-dataset-fields-Cl7HpVkm.cjs.map +0 -1
- package/dist/errors.d.cts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/fetch-utils-CTLoW1R8.d.cts +0 -33
- package/dist/fetch-utils-CTLoW1R8.d.cts.map +0 -1
- package/dist/fetch-utils-JDZw4XaU.d.ts +0 -33
- package/dist/fetch-utils-JDZw4XaU.d.ts.map +0 -1
- package/dist/find-dsns-C3G5aBm1.js.map +0 -1
- package/dist/find-dsns-vQolGM7e.cjs.map +0 -1
- package/dist/find-organizations-BDtHkcFV.cjs.map +0 -1
- package/dist/find-organizations-Cs1GvZtJ.js.map +0 -1
- package/dist/find-projects-B0NdOjBO.js.map +0 -1
- package/dist/find-projects-xM2L0U1W.cjs.map +0 -1
- package/dist/find-releases-BBTYr5Bx.cjs.map +0 -1
- package/dist/find-releases-BO2OF_uR.js.map +0 -1
- package/dist/find-teams-B237Aq8U.cjs.map +0 -1
- package/dist/find-teams-CqUwp0EI.js.map +0 -1
- package/dist/formatters-B3ONbRhI.js.map +0 -1
- package/dist/formatters-CfeBjhXZ.cjs.map +0 -1
- package/dist/formatters-DSYXBiQx.js.map +0 -1
- package/dist/formatters-DbqofIoy.cjs.map +0 -1
- package/dist/formatting-BxyhA4G3.d.cts.map +0 -1
- package/dist/formatting-C180PVwd.cjs.map +0 -1
- package/dist/formatting-C80LN9iK.d.ts.map +0 -1
- package/dist/formatting-DIvCVunN.js.map +0 -1
- package/dist/formatting-utils-C3sej5ER.js.map +0 -1
- package/dist/formatting-utils-DDz14xeB.cjs.map +0 -1
- package/dist/get-doc-BfMg0GIa.cjs.map +0 -1
- package/dist/get-doc-DyqJe6TP.js.map +0 -1
- package/dist/get-event-attachment-B-ElqztF.js.map +0 -1
- package/dist/get-event-attachment-o0oH43Tv.cjs.map +0 -1
- package/dist/get-issue-details-CP_RyCpt.cjs.map +0 -1
- package/dist/get-issue-details-CzroF7HR.js.map +0 -1
- package/dist/handler-BGhr9FJM.d.cts.map +0 -1
- package/dist/handler-BH_OLIbD.cjs.map +0 -1
- package/dist/handler-BPPTAi7I.d.ts.map +0 -1
- package/dist/handler-BZ3hKPb8.d.cts.map +0 -1
- package/dist/handler-O9fYgC9a.cjs.map +0 -1
- package/dist/handler-aE_8mEm7.js.map +0 -1
- package/dist/handler-cUB6XcUV.d.ts.map +0 -1
- package/dist/handler-ykkULTZ-.js.map +0 -1
- package/dist/lookup-otel-semantics-BbriXZAx.cjs.map +0 -1
- package/dist/lookup-otel-semantics-Dt667kdR.js.map +0 -1
- package/dist/promptDefinitions-CVHtYaj8.d.cts.map +0 -1
- package/dist/promptDefinitions-DehpwJfn.d.ts.map +0 -1
- package/dist/resources-CSxBC9gs.js +0 -60
- package/dist/resources-CSxBC9gs.js.map +0 -1
- package/dist/resources-TCvijqOA.cjs +0 -72
- package/dist/resources-TCvijqOA.cjs.map +0 -1
- package/dist/schema-Bv2fvxgy.js.map +0 -1
- package/dist/schema-C0LznFvu.cjs.map +0 -1
- package/dist/schema-CcFmBoEf.js.map +0 -1
- package/dist/schema-DPL_hZXP.cjs.map +0 -1
- package/dist/search-docs-CjIZDaD1.cjs.map +0 -1
- package/dist/search-docs-ss09Dt0F.js.map +0 -1
- package/dist/seer-utils-C7Kv0gr8.cjs.map +0 -1
- package/dist/seer-utils-NPHv8KYY.js.map +0 -1
- package/dist/server-D78x_7Vz.js.map +0 -1
- package/dist/server-DYFiTMLB.cjs.map +0 -1
- package/dist/tools/search-events/agent.d.cts.map +0 -1
- package/dist/tools/search-events/agent.d.ts.map +0 -1
- package/dist/tools/search-issues/agent.d.cts.map +0 -1
- package/dist/tools/search-issues/agent.d.ts.map +0 -1
- package/dist/tools/utils/api-utils.cjs +0 -11
- package/dist/tools/utils/api-utils.d.cts.map +0 -1
- package/dist/tools/utils/api-utils.d.ts.map +0 -1
- package/dist/tools/utils/api-utils.js +0 -9
- package/dist/tools/utils/defineTool.cjs +0 -3
- package/dist/tools/utils/defineTool.d.cts +0 -12
- package/dist/tools/utils/defineTool.d.cts.map +0 -1
- package/dist/tools/utils/defineTool.d.ts +0 -12
- package/dist/tools/utils/defineTool.d.ts.map +0 -1
- package/dist/tools/utils/defineTool.js +0 -3
- package/dist/tools/utils/fetch-utils.cjs +0 -5
- package/dist/tools/utils/fetch-utils.d.cts +0 -2
- package/dist/tools/utils/fetch-utils.d.ts +0 -2
- package/dist/tools/utils/fetch-utils.js +0 -4
- package/dist/tools/utils/formatting-utils.cjs +0 -3
- package/dist/tools/utils/formatting-utils.d.cts +0 -15
- package/dist/tools/utils/formatting-utils.d.cts.map +0 -1
- package/dist/tools/utils/formatting-utils.d.ts +0 -15
- package/dist/tools/utils/formatting-utils.d.ts.map +0 -1
- package/dist/tools/utils/formatting-utils.js +0 -3
- package/dist/tools/utils/issue-utils.cjs +0 -8
- package/dist/tools/utils/issue-utils.d.cts +0 -7
- package/dist/tools/utils/issue-utils.d.ts +0 -7
- package/dist/tools/utils/issue-utils.js +0 -7
- package/dist/tools/utils/seer-utils.cjs +0 -11
- package/dist/tools/utils/seer-utils.d.cts.map +0 -1
- package/dist/tools/utils/seer-utils.d.ts.map +0 -1
- package/dist/tools-DvKm5uMs.js +0 -44
- package/dist/tools-DvKm5uMs.js.map +0 -1
- package/dist/tools-sQ2wM3Pi.cjs.map +0 -1
- package/dist/types-BOcoP3Na.d.ts.map +0 -1
- package/dist/types-C1Fih0eQ.d.ts.map +0 -1
- package/dist/types-aOEJ0KgQ.d.cts.map +0 -1
- package/dist/update-issue-D77PudUi.cjs.map +0 -1
- package/dist/update-issue-ndy2PF5G.js.map +0 -1
- package/dist/url-utils-IqgSmI-B.js.map +0 -1
- package/dist/url-utils-vJo2ER5v.cjs.map +0 -1
- package/dist/utils-BwXbSgEI.d.ts.map +0 -1
- package/dist/utils-CqbeJfE1.cjs.map +0 -1
- package/dist/utils-CtBGHj_N.d.cts.map +0 -1
- package/dist/utils-OgYE-imr.js +0 -108
- package/dist/utils-OgYE-imr.js.map +0 -1
- package/dist/version-Bj68uyCt.js +0 -6
- package/dist/whoami-BOJHfdih.cjs +0 -28
- package/dist/whoami-BOJHfdih.cjs.map +0 -1
- package/dist/whoami-Bswhb72a.js +0 -23
- package/dist/whoami-Bswhb72a.js.map +0 -1
- package/dist/whoami-CoZJKpys.cjs.map +0 -1
- package/dist/whoami-xBAWvzG4.js.map +0 -1
- /package/dist/{api-client-BWt6M7ij.cjs → api-client-T99a5Vta.js} +0 -0
- /package/dist/{api-client-CNv_hbPO.js → api-client-_2QFWf0d.cjs} +0 -0
- /package/dist/{fetch-utils-BqMx2KQr.js → cli/types.cjs} +0 -0
- /package/dist/{fetch-utils-DeZcERfe.cjs → cli/types.js} +0 -0
- /package/dist/{index-BPSCxsMC.d.cts → index-CmCelmEL.d.cts} +0 -0
- /package/dist/{index-DE1muTvw.d.ts → index-DCwqskfg.d.ts} +0 -0
- /package/dist/{issue-utils-BVAB6I-Z.js → issue-DKr8zNay.js} +0 -0
- /package/dist/{issue-utils-pdbo-5LW.cjs → issue-DrgpqPbF.cjs} +0 -0
- /package/dist/{search-events-BBFPuvRq.cjs → resources-BlsH_EDg.cjs} +0 -0
- /package/dist/{search-events-bV3-kK78.js → resources-U-u5ze91.js} +0 -0
- /package/dist/{search-issues-BFgCvRYe.js → search-events-CUvQ_Jch.js} +0 -0
- /package/dist/{search-issues-Biu64RkQ.cjs → search-events-DSY2Z_Eh.cjs} +0 -0
- /package/dist/{types-6zHoEWAx.js → search-issues-BOmdyuUf.js} +0 -0
- /package/dist/{types-DdloOYgD.cjs → search-issues-BxO2JE3D.cjs} +0 -0
package/dist/agent-DpCCnhh5.cjs
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_errors = require('./errors-BtJEw2Z-.cjs');
|
|
3
|
-
const require_lookup_otel_semantics = require('./lookup-otel-semantics-BbriXZAx.cjs');
|
|
4
|
-
const require_whoami = require('./whoami-CoZJKpys.cjs');
|
|
5
|
-
const require_utils = require('./utils-CqbeJfE1.cjs');
|
|
6
|
-
const zod = require_chunk.__toESM(require("zod"));
|
|
7
|
-
const ai = require_chunk.__toESM(require("ai"));
|
|
8
|
-
const __ai_sdk_openai = require_chunk.__toESM(require("@ai-sdk/openai"));
|
|
9
|
-
|
|
10
|
-
//#region src/tools/search-events/agent.ts
|
|
11
|
-
/**
|
|
12
|
-
* Translate natural language query to Sentry search syntax using AI
|
|
13
|
-
*/
|
|
14
|
-
async function translateQuery(params, apiService, organizationSlug, projectId) {
|
|
15
|
-
if (!process.env.OPENAI_API_KEY) throw new require_errors.ConfigurationError("OPENAI_API_KEY environment variable is required for semantic search");
|
|
16
|
-
const systemPrompt = `You are a Sentry query translator. You need to:
|
|
17
|
-
1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query
|
|
18
|
-
2. Query the available attributes for that dataset using the datasetAttributes tool
|
|
19
|
-
3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions
|
|
20
|
-
4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)
|
|
21
|
-
5. Decide which fields to return in the results
|
|
22
|
-
|
|
23
|
-
CRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.
|
|
24
|
-
|
|
25
|
-
DATASET SELECTION GUIDELINES:
|
|
26
|
-
- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, "XYZ calls", ambiguous operations (richest attribute set)
|
|
27
|
-
- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors
|
|
28
|
-
- logs: Log entries, log messages, severity levels, debugging information
|
|
29
|
-
|
|
30
|
-
For ambiguous queries like "calls using XYZ", prefer spans dataset first as it contains the most comprehensive telemetry data.
|
|
31
|
-
|
|
32
|
-
CRITICAL TOOL USAGE:
|
|
33
|
-
1. Use datasetAttributes tool to discover what fields are available for your chosen dataset
|
|
34
|
-
2. Use otelSemantics tool when you need specific OpenTelemetry attributes (gen_ai.*, db.*, http.*, etc.)
|
|
35
|
-
3. Use whoami tool when queries contain "me" references for user.id or user.email fields
|
|
36
|
-
4. IMPORTANT: For ambiguous terms like "user agents", "browser", "client" - ALWAYS use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id
|
|
37
|
-
|
|
38
|
-
CRITICAL - HANDLING "DISTINCT" OR "UNIQUE VALUES" QUERIES:
|
|
39
|
-
When user asks for "distinct", "unique", "all values of", or "what are the X" queries:
|
|
40
|
-
1. This ALWAYS requires an AGGREGATE query with count() function
|
|
41
|
-
2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts
|
|
42
|
-
3. Sort by "-count()" to show most common values first
|
|
43
|
-
4. Use datasetAttributes tool to verify the field exists before constructing query
|
|
44
|
-
5. Examples:
|
|
45
|
-
- "distinct tool names" → fields=['mcp.tool.name', 'count()'], sort='-count()'
|
|
46
|
-
- "unique models" → fields=['gen_ai.request.model', 'count()'], sort='-count()'
|
|
47
|
-
|
|
48
|
-
CRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:
|
|
49
|
-
When user asks about "traffic", "volume", "how much", "how many" (without specific metrics):
|
|
50
|
-
1. This ALWAYS requires an AGGREGATE query with count() function
|
|
51
|
-
2. For total counts: fields=['count()']
|
|
52
|
-
3. For grouped counts: fields=['grouping_field', 'count()']
|
|
53
|
-
4. Always include timeRange for period-specific queries
|
|
54
|
-
5. Examples:
|
|
55
|
-
- "how much traffic in last 30 days" → fields=['count()'], timeRange: {"statsPeriod": "30d"}
|
|
56
|
-
- "traffic on mcp-server" → query: "project:mcp-server", fields=['count()']
|
|
57
|
-
|
|
58
|
-
CRITICAL - HANDLING "ME" REFERENCES:
|
|
59
|
-
- If the query contains "me", "my", "myself", or "affecting me" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email
|
|
60
|
-
- For assignedTo fields, you can use "me" directly without translation (e.g., assignedTo:me works as-is)
|
|
61
|
-
- After calling whoami, replace "me" references with the actual user.id or user.email values
|
|
62
|
-
- If whoami fails, return an error explaining the issue
|
|
63
|
-
|
|
64
|
-
QUERY MODES:
|
|
65
|
-
1. INDIVIDUAL EVENTS (default): Returns raw event data
|
|
66
|
-
- Used when fields contain no function() calls
|
|
67
|
-
- Include recommended fields plus any user-requested fields
|
|
68
|
-
|
|
69
|
-
2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)
|
|
70
|
-
- Activated when ANY field contains a function() call
|
|
71
|
-
- Fields should ONLY include: aggregate functions + groupBy fields
|
|
72
|
-
- Automatically groups by ALL non-function fields
|
|
73
|
-
- For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.
|
|
74
|
-
|
|
75
|
-
CRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:
|
|
76
|
-
- Queries asking for data "over time", "by hour", "by day", "time series", or similar temporal groupings are NOT currently supported
|
|
77
|
-
- If user asks for "X over time", return an error explaining: "Time series aggregations are not currently supported."
|
|
78
|
-
|
|
79
|
-
CRITICAL - DO NOT USE SQL SYNTAX:
|
|
80
|
-
- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL
|
|
81
|
-
- NEVER use SQL date functions - use timeRange parameter instead
|
|
82
|
-
- For "yesterday": Use timeRange: {"statsPeriod": "24h"}, NOT timestamp >= yesterday()
|
|
83
|
-
- For field existence: Use has:field_name, NOT field_name IS NOT NULL
|
|
84
|
-
- For field absence: Use !has:field_name, NOT field_name IS NULL
|
|
85
|
-
|
|
86
|
-
MATHEMATICAL QUERY PATTERNS:
|
|
87
|
-
When user asks mathematical questions like "how many tokens", "total tokens used", "token usage today":
|
|
88
|
-
- Use spans dataset (where OpenTelemetry data lives)
|
|
89
|
-
- Use datasetAttributes tool to find available token fields
|
|
90
|
-
- Use sum() function for total counts: sum(gen_ai.usage.input_tokens), sum(gen_ai.usage.output_tokens)
|
|
91
|
-
- For time-based queries ("today", "this week"), use timeRange parameter
|
|
92
|
-
|
|
93
|
-
DERIVED METRICS AND CALCULATIONS (SPANS ONLY):
|
|
94
|
-
When user asks for calculated metrics, ratios, or conversions:
|
|
95
|
-
- Use equation fields with "equation|" prefix
|
|
96
|
-
- Examples:
|
|
97
|
-
- "duration in milliseconds" → fields: ["equation|avg(span.duration) * 1000"]
|
|
98
|
-
- "total tokens" → fields: ["equation|sum(gen_ai.usage.input_tokens) + sum(gen_ai.usage.output_tokens)"]
|
|
99
|
-
- "error rate percentage" → fields: ["equation|failure_rate() * 100"]
|
|
100
|
-
- "requests per second" → fields: ["equation|count() / 3600"] (for hourly data)
|
|
101
|
-
- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs
|
|
102
|
-
|
|
103
|
-
SORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):
|
|
104
|
-
1. CRITICAL: Sort MUST go in the separate "sort" field, NEVER in the "query" field
|
|
105
|
-
- WRONG: query: "level:error sort:-timestamp" ← Sort syntax in query field is FORBIDDEN
|
|
106
|
-
- CORRECT: query: "level:error", sort: "-timestamp" ← Sort in separate field
|
|
107
|
-
|
|
108
|
-
2. DEFAULT SORTING:
|
|
109
|
-
- errors dataset: Use "-timestamp" (newest first)
|
|
110
|
-
- spans dataset: Use "-span.duration" (slowest first)
|
|
111
|
-
- logs dataset: Use "-timestamp" (newest first)
|
|
112
|
-
|
|
113
|
-
3. SORTING SYNTAX:
|
|
114
|
-
- Use "-" prefix for descending order (e.g., "-timestamp" for newest first)
|
|
115
|
-
- Use field name without prefix for ascending order
|
|
116
|
-
- For aggregate queries: sort by aggregate function results (e.g., "-count()" for highest count first)
|
|
117
|
-
|
|
118
|
-
4. IMPORTANT SORTING REQUIREMENTS:
|
|
119
|
-
- YOU MUST ALWAYS INCLUDE A SORT PARAMETER
|
|
120
|
-
- CRITICAL: The field you sort by MUST be included in your fields array
|
|
121
|
-
- If sorting by "-timestamp", include "timestamp" in fields
|
|
122
|
-
- If sorting by "-count()", include "count()" in fields
|
|
123
|
-
- This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields
|
|
124
|
-
|
|
125
|
-
YOUR RESPONSE FORMAT:
|
|
126
|
-
Return a JSON object with these fields:
|
|
127
|
-
- "dataset": Which dataset you determined to use ("spans", "errors", or "logs")
|
|
128
|
-
- "query": The Sentry query string for filtering results (use empty string "" for no filters)
|
|
129
|
-
- "fields": Array of field names to return in results
|
|
130
|
-
- For individual event queries: OPTIONAL (will use recommended fields if not provided)
|
|
131
|
-
- For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)
|
|
132
|
-
- "sort": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)
|
|
133
|
-
- "timeRange": Time range parameters (optional)
|
|
134
|
-
- Relative: {"statsPeriod": "24h"} for last 24 hours, "7d" for last 7 days, etc.
|
|
135
|
-
- Absolute: {"start": "2025-06-19T07:00:00", "end": "2025-06-20T06:59:59"} for specific date ranges
|
|
136
|
-
- "error": Error message if you cannot translate the query (optional)
|
|
137
|
-
|
|
138
|
-
CORRECT QUERY PATTERNS (FOLLOW THESE):
|
|
139
|
-
- For field existence: Use has:field_name (NOT field_name IS NOT NULL)
|
|
140
|
-
- For field absence: Use !has:field_name (NOT field_name IS NULL)
|
|
141
|
-
- For time periods: Use timeRange parameter (NOT SQL date functions)
|
|
142
|
-
- Example: "models used yesterday" → query: "has:gen_ai.usage.input_tokens", timeRange: {"statsPeriod": "24h"}
|
|
143
|
-
|
|
144
|
-
PROCESS:
|
|
145
|
-
1. Analyze the user's query
|
|
146
|
-
2. Determine appropriate dataset
|
|
147
|
-
3. Use datasetAttributes tool to discover available fields
|
|
148
|
-
4. Use otelSemantics tool if needed for OpenTelemetry attributes
|
|
149
|
-
5. Construct the final query with proper fields and sort parameters
|
|
150
|
-
|
|
151
|
-
COMMON ERRORS TO AVOID:
|
|
152
|
-
- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead
|
|
153
|
-
- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields
|
|
154
|
-
- Using incorrect field names (use the otelSemantics tool to look up correct names)
|
|
155
|
-
- Missing required fields in the fields array for aggregate queries
|
|
156
|
-
- Invalid sort parameter not included in fields array
|
|
157
|
-
- For field existence: Use has:field_name (NOT field_name IS NOT NULL)
|
|
158
|
-
- For field absence: Use !has:field_name (NOT field_name IS NULL)
|
|
159
|
-
- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;
|
|
160
|
-
const datasetAttributesTool = require_utils.createDatasetAttributesTool(apiService, organizationSlug, projectId);
|
|
161
|
-
const otelLookupTool = require_lookup_otel_semantics.createOtelLookupTool(apiService, organizationSlug, projectId);
|
|
162
|
-
const whoamiTool = require_whoami.createWhoamiTool(apiService);
|
|
163
|
-
const result = await (0, ai.generateText)({
|
|
164
|
-
model: (0, __ai_sdk_openai.openai)("gpt-4o"),
|
|
165
|
-
system: systemPrompt,
|
|
166
|
-
prompt: params.naturalLanguageQuery,
|
|
167
|
-
tools: {
|
|
168
|
-
datasetAttributes: datasetAttributesTool,
|
|
169
|
-
otelSemantics: otelLookupTool,
|
|
170
|
-
whoami: whoamiTool
|
|
171
|
-
},
|
|
172
|
-
maxSteps: 5,
|
|
173
|
-
temperature: .1,
|
|
174
|
-
experimental_output: ai.Output.object({ schema: zod.z.object({
|
|
175
|
-
dataset: zod.z.enum([
|
|
176
|
-
"spans",
|
|
177
|
-
"errors",
|
|
178
|
-
"logs"
|
|
179
|
-
]).optional().describe("Which dataset to use for the query"),
|
|
180
|
-
query: zod.z.string().optional().describe("The Sentry query string for filtering results (empty string returns all recent events)"),
|
|
181
|
-
fields: zod.z.array(zod.z.string()).optional().describe("Array of field names to return in results. REQUIRED for aggregate queries (include only aggregate functions and groupBy fields). Optional for individual event queries (will use recommended fields if not provided)."),
|
|
182
|
-
sort: zod.z.string().optional().describe("REQUIRED: Sort parameter for results (e.g., '-timestamp' for newest first, '-count()' for highest count first)"),
|
|
183
|
-
timeRange: zod.z.union([zod.z.object({ statsPeriod: zod.z.string().describe("Relative time period like '1h', '24h', '7d'") }), zod.z.object({
|
|
184
|
-
start: zod.z.string().describe("ISO 8601 start time"),
|
|
185
|
-
end: zod.z.string().describe("ISO 8601 end time")
|
|
186
|
-
})]).optional().describe("Time range for filtering events. Use either statsPeriod for relative time or start/end for absolute time."),
|
|
187
|
-
error: zod.z.string().optional().describe("Error message if the query cannot be translated")
|
|
188
|
-
}).superRefine((data, ctx) => {
|
|
189
|
-
if (!data.error) {
|
|
190
|
-
if (data.dataset === void 0) ctx.addIssue({
|
|
191
|
-
code: zod.z.ZodIssueCode.custom,
|
|
192
|
-
message: "Dataset is required when no error is returned.",
|
|
193
|
-
path: ["dataset"]
|
|
194
|
-
});
|
|
195
|
-
if (data.sort === void 0) ctx.addIssue({
|
|
196
|
-
code: zod.z.ZodIssueCode.custom,
|
|
197
|
-
message: "Sort is required when no error is returned.",
|
|
198
|
-
path: ["sort"]
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}) }),
|
|
202
|
-
experimental_telemetry: {
|
|
203
|
-
isEnabled: true,
|
|
204
|
-
functionId: "search_events_agent"
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
let parsed;
|
|
208
|
-
try {
|
|
209
|
-
parsed = result.experimental_output;
|
|
210
|
-
} catch (error) {
|
|
211
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
212
|
-
return { error: `AI failed to generate a valid query translation. This may happen when the query is too complex or ambiguous. Please try rephrasing your query. Details: ${errorMessage}` };
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
dataset: parsed.dataset,
|
|
216
|
-
query: parsed.query,
|
|
217
|
-
fields: parsed.fields,
|
|
218
|
-
sort: parsed.sort,
|
|
219
|
-
timeRange: parsed.timeRange,
|
|
220
|
-
error: parsed.error
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
//#endregion
|
|
225
|
-
Object.defineProperty(exports, 'translateQuery', {
|
|
226
|
-
enumerable: true,
|
|
227
|
-
get: function () {
|
|
228
|
-
return translateQuery;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
//# sourceMappingURL=agent-DpCCnhh5.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-DpCCnhh5.cjs","names":["params: Omit<\n QueryTranslationParams,\n \"dataset\" | \"allFields\" | \"datasetConfig\" | \"recommendedFields\"\n >","apiService: SentryApiService","organizationSlug: string","projectId?: string","ConfigurationError","z","parsed: any"],"sources":["../src/tools/search-events/agent.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { generateText, tool, Output } from \"ai\";\nimport { openai } from \"@ai-sdk/openai\";\nimport { ConfigurationError, UserInputError } from \"../../errors\";\nimport type { SentryApiService } from \"../../api-client\";\nimport { createOtelLookupTool } from \"../../agent-tools/lookup-otel-semantics\";\nimport { createWhoamiTool } from \"../../agent-tools/whoami\";\nimport { createDatasetAttributesTool } from \"./utils\";\n\n// Type definitions\nexport interface QueryTranslationResult {\n query?: string;\n fields?: string[];\n sort?: string;\n timeRange?:\n | {\n statsPeriod: string;\n }\n | {\n start: string;\n end: string;\n };\n error?: string;\n}\n\nexport interface QueryTranslationParams {\n naturalLanguageQuery: string;\n dataset: \"spans\" | \"errors\" | \"logs\";\n organizationSlug: string;\n projectId?: string;\n allFields: Record<string, string>;\n datasetConfig: {\n rules: string;\n examples: string;\n };\n recommendedFields: {\n basic: string[];\n description: string;\n };\n}\n\n/**\n * Translate natural language query to Sentry search syntax using AI\n */\nexport async function translateQuery(\n params: Omit<\n QueryTranslationParams,\n \"dataset\" | \"allFields\" | \"datasetConfig\" | \"recommendedFields\"\n >,\n apiService: SentryApiService,\n organizationSlug: string,\n projectId?: string,\n): Promise<QueryTranslationResult & { dataset?: \"spans\" | \"errors\" | \"logs\" }> {\n // Check if OpenAI API key is available\n if (!process.env.OPENAI_API_KEY) {\n throw new ConfigurationError(\n \"OPENAI_API_KEY environment variable is required for semantic search\",\n );\n }\n\n // Build a dataset-agnostic system prompt\n const systemPrompt = `You are a Sentry query translator. You need to:\n1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query\n2. Query the available attributes for that dataset using the datasetAttributes tool\n3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions\n4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)\n5. Decide which fields to return in the results\n\nCRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.\n\nDATASET SELECTION GUIDELINES:\n- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, \"XYZ calls\", ambiguous operations (richest attribute set)\n- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors\n- logs: Log entries, log messages, severity levels, debugging information\n\nFor ambiguous queries like \"calls using XYZ\", prefer spans dataset first as it contains the most comprehensive telemetry data.\n\nCRITICAL TOOL USAGE:\n1. Use datasetAttributes tool to discover what fields are available for your chosen dataset\n2. Use otelSemantics tool when you need specific OpenTelemetry attributes (gen_ai.*, db.*, http.*, etc.)\n3. Use whoami tool when queries contain \"me\" references for user.id or user.email fields\n4. IMPORTANT: For ambiguous terms like \"user agents\", \"browser\", \"client\" - ALWAYS use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id\n\nCRITICAL - HANDLING \"DISTINCT\" OR \"UNIQUE VALUES\" QUERIES:\nWhen user asks for \"distinct\", \"unique\", \"all values of\", or \"what are the X\" queries:\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts\n3. Sort by \"-count()\" to show most common values first\n4. Use datasetAttributes tool to verify the field exists before constructing query\n5. Examples:\n - \"distinct tool names\" → fields=['mcp.tool.name', 'count()'], sort='-count()'\n - \"unique models\" → fields=['gen_ai.request.model', 'count()'], sort='-count()'\n\nCRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:\nWhen user asks about \"traffic\", \"volume\", \"how much\", \"how many\" (without specific metrics):\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. For total counts: fields=['count()']\n3. For grouped counts: fields=['grouping_field', 'count()']\n4. Always include timeRange for period-specific queries\n5. Examples:\n - \"how much traffic in last 30 days\" → fields=['count()'], timeRange: {\"statsPeriod\": \"30d\"}\n - \"traffic on mcp-server\" → query: \"project:mcp-server\", fields=['count()']\n\nCRITICAL - HANDLING \"ME\" REFERENCES:\n- If the query contains \"me\", \"my\", \"myself\", or \"affecting me\" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email\n- For assignedTo fields, you can use \"me\" directly without translation (e.g., assignedTo:me works as-is)\n- After calling whoami, replace \"me\" references with the actual user.id or user.email values\n- If whoami fails, return an error explaining the issue\n\nQUERY MODES:\n1. INDIVIDUAL EVENTS (default): Returns raw event data\n - Used when fields contain no function() calls\n - Include recommended fields plus any user-requested fields\n\n2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)\n - Activated when ANY field contains a function() call\n - Fields should ONLY include: aggregate functions + groupBy fields\n - Automatically groups by ALL non-function fields\n - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.\n\nCRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:\n- Queries asking for data \"over time\", \"by hour\", \"by day\", \"time series\", or similar temporal groupings are NOT currently supported\n- If user asks for \"X over time\", return an error explaining: \"Time series aggregations are not currently supported.\"\n\nCRITICAL - DO NOT USE SQL SYNTAX:\n- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL\n- NEVER use SQL date functions - use timeRange parameter instead\n- For \"yesterday\": Use timeRange: {\"statsPeriod\": \"24h\"}, NOT timestamp >= yesterday()\n- For field existence: Use has:field_name, NOT field_name IS NOT NULL\n- For field absence: Use !has:field_name, NOT field_name IS NULL\n\nMATHEMATICAL QUERY PATTERNS:\nWhen user asks mathematical questions like \"how many tokens\", \"total tokens used\", \"token usage today\":\n- Use spans dataset (where OpenTelemetry data lives)\n- Use datasetAttributes tool to find available token fields\n- Use sum() function for total counts: sum(gen_ai.usage.input_tokens), sum(gen_ai.usage.output_tokens)\n- For time-based queries (\"today\", \"this week\"), use timeRange parameter\n\nDERIVED METRICS AND CALCULATIONS (SPANS ONLY):\nWhen user asks for calculated metrics, ratios, or conversions:\n- Use equation fields with \"equation|\" prefix\n- Examples:\n - \"duration in milliseconds\" → fields: [\"equation|avg(span.duration) * 1000\"]\n - \"total tokens\" → fields: [\"equation|sum(gen_ai.usage.input_tokens) + sum(gen_ai.usage.output_tokens)\"]\n - \"error rate percentage\" → fields: [\"equation|failure_rate() * 100\"]\n - \"requests per second\" → fields: [\"equation|count() / 3600\"] (for hourly data)\n- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs\n\nSORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"level:error sort:-timestamp\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"level:error\", sort: \"-timestamp\" ← Sort in separate field\n\n2. DEFAULT SORTING:\n - errors dataset: Use \"-timestamp\" (newest first)\n - spans dataset: Use \"-span.duration\" (slowest first) \n - logs dataset: Use \"-timestamp\" (newest first)\n\n3. SORTING SYNTAX:\n - Use \"-\" prefix for descending order (e.g., \"-timestamp\" for newest first)\n - Use field name without prefix for ascending order\n - For aggregate queries: sort by aggregate function results (e.g., \"-count()\" for highest count first)\n\n4. IMPORTANT SORTING REQUIREMENTS:\n - YOU MUST ALWAYS INCLUDE A SORT PARAMETER\n - CRITICAL: The field you sort by MUST be included in your fields array\n - If sorting by \"-timestamp\", include \"timestamp\" in fields\n - If sorting by \"-count()\", include \"count()\" in fields\n - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with these fields:\n- \"dataset\": Which dataset you determined to use (\"spans\", \"errors\", or \"logs\")\n- \"query\": The Sentry query string for filtering results (use empty string \"\" for no filters)\n- \"fields\": Array of field names to return in results\n - For individual event queries: OPTIONAL (will use recommended fields if not provided)\n - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)\n- \"sort\": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)\n- \"timeRange\": Time range parameters (optional)\n - Relative: {\"statsPeriod\": \"24h\"} for last 24 hours, \"7d\" for last 7 days, etc.\n - Absolute: {\"start\": \"2025-06-19T07:00:00\", \"end\": \"2025-06-20T06:59:59\"} for specific date ranges\n- \"error\": Error message if you cannot translate the query (optional)\n\nCORRECT QUERY PATTERNS (FOLLOW THESE):\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions)\n- Example: \"models used yesterday\" → query: \"has:gen_ai.usage.input_tokens\", timeRange: {\"statsPeriod\": \"24h\"}\n\nPROCESS:\n1. Analyze the user's query\n2. Determine appropriate dataset\n3. Use datasetAttributes tool to discover available fields\n4. Use otelSemantics tool if needed for OpenTelemetry attributes\n5. Construct the final query with proper fields and sort parameters\n\nCOMMON ERRORS TO AVOID:\n- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead\n- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields\n- Using incorrect field names (use the otelSemantics tool to look up correct names)\n- Missing required fields in the fields array for aggregate queries\n- Invalid sort parameter not included in fields array\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;\n\n // Create tools for the agent\n const datasetAttributesTool = createDatasetAttributesTool(\n apiService,\n organizationSlug,\n projectId,\n );\n const otelLookupTool = createOtelLookupTool(\n apiService,\n organizationSlug,\n projectId,\n );\n const whoamiTool = createWhoamiTool(apiService);\n\n // Use the AI SDK to translate the query with tools and structured output\n const result = await generateText({\n model: openai(\"gpt-4o\"),\n system: systemPrompt,\n prompt: params.naturalLanguageQuery,\n tools: {\n datasetAttributes: datasetAttributesTool,\n otelSemantics: otelLookupTool,\n whoami: whoamiTool,\n },\n maxSteps: 5, // Allow up to 5 sequential tool calls for complex queries requiring multiple lookups\n temperature: 0.1, // Low temperature for more consistent translations\n experimental_output: Output.object({\n schema: z\n .object({\n dataset: z\n .enum([\"spans\", \"errors\", \"logs\"])\n .optional()\n .describe(\"Which dataset to use for the query\"),\n query: z\n .string()\n .optional()\n .describe(\n \"The Sentry query string for filtering results (empty string returns all recent events)\",\n ),\n fields: z\n .array(z.string())\n .optional()\n .describe(\n \"Array of field names to return in results. REQUIRED for aggregate queries (include only aggregate functions and groupBy fields). Optional for individual event queries (will use recommended fields if not provided).\",\n ),\n sort: z\n .string()\n .optional()\n .describe(\n \"REQUIRED: Sort parameter for results (e.g., '-timestamp' for newest first, '-count()' for highest count first)\",\n ),\n timeRange: z\n .union([\n z.object({\n statsPeriod: z\n .string()\n .describe(\"Relative time period like '1h', '24h', '7d'\"),\n }),\n z.object({\n start: z.string().describe(\"ISO 8601 start time\"),\n end: z.string().describe(\"ISO 8601 end time\"),\n }),\n ])\n .optional()\n .describe(\n \"Time range for filtering events. Use either statsPeriod for relative time or start/end for absolute time.\",\n ),\n error: z\n .string()\n .optional()\n .describe(\"Error message if the query cannot be translated\"),\n })\n .superRefine((data, ctx) => {\n if (!data.error) {\n // If no error is present, dataset and sort must be defined\n if (data.dataset === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Dataset is required when no error is returned.\",\n path: [\"dataset\"],\n });\n }\n if (data.sort === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: \"Sort is required when no error is returned.\",\n path: [\"sort\"],\n });\n }\n }\n }),\n }),\n experimental_telemetry: {\n isEnabled: true,\n functionId: \"search_events_agent\",\n },\n });\n\n let parsed: any;\n try {\n parsed = result.experimental_output;\n } catch (error) {\n // If the AI SDK failed to parse the output, return a safe error object\n const errorMessage = error instanceof Error ? error.message : String(error);\n\n // Return a safe error response that matches our schema\n return {\n error: `AI failed to generate a valid query translation. This may happen when the query is too complex or ambiguous. Please try rephrasing your query. Details: ${errorMessage}`,\n };\n }\n\n return {\n dataset: parsed.dataset,\n query: parsed.query,\n fields: parsed.fields,\n sort: parsed.sort,\n timeRange: parsed.timeRange,\n error: parsed.error,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AA4CA,eAAsB,eACpBA,QAIAC,YACAC,kBACAC,WAC6E;AAE7E,MAAK,QAAQ,IAAI,eACf,OAAM,IAAIC,kCACR;CAKJ,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJtB,MAAM,wBAAwB,0CAC5B,YACA,kBACA,UACD;CACD,MAAM,iBAAiB,mDACrB,YACA,kBACA,UACD;CACD,MAAM,aAAa,gCAAiB,WAAW;CAG/C,MAAM,SAAS,MAAM,qBAAa;EAChC,OAAO,4BAAO,SAAS;EACvB,QAAQ;EACR,QAAQ,OAAO;EACf,OAAO;GACL,mBAAmB;GACnB,eAAe;GACf,QAAQ;EACT;EACD,UAAU;EACV,aAAa;EACb,qBAAqB,UAAO,OAAO,EACjC,QAAQ,MACL,OAAO;GACN,SAAS,MACN,KAAK;IAAC;IAAS;IAAU;GAAO,EAAC,CACjC,UAAU,CACV,SAAS,qCAAqC;GACjD,OAAO,MACJ,QAAQ,CACR,UAAU,CACV,SACC,yFACD;GACH,QAAQ,MACL,MAAM,MAAE,QAAQ,CAAC,CACjB,UAAU,CACV,SACC,wNACD;GACH,MAAM,MACH,QAAQ,CACR,UAAU,CACV,SACC,iHACD;GACH,WAAW,MACR,MAAM,CACL,MAAE,OAAO,EACP,aAAa,MACV,QAAQ,CACR,SAAS,8CAA8C,CAC3D,EAAC,EACF,MAAE,OAAO;IACP,OAAO,MAAE,QAAQ,CAAC,SAAS,sBAAsB;IACjD,KAAK,MAAE,QAAQ,CAAC,SAAS,oBAAoB;GAC9C,EAAC,AACH,EAAC,CACD,UAAU,CACV,SACC,4GACD;GACH,OAAO,MACJ,QAAQ,CACR,UAAU,CACV,SAAS,kDAAkD;EAC/D,EAAC,CACD,YAAY,CAAC,MAAM,QAAQ;AAC1B,QAAK,KAAK,OAAO;AAEf,QAAI,KAAK,mBACP,KAAI,SAAS;KACX,MAAMC,MAAE,aAAa;KACrB,SAAS;KACT,MAAM,CAAC,SAAU;IAClB,EAAC;AAEJ,QAAI,KAAK,gBACP,KAAI,SAAS;KACX,MAAMA,MAAE,aAAa;KACrB,SAAS;KACT,MAAM,CAAC,MAAO;IACf,EAAC;GAEL;EACF,EAAC,CACL,EAAC;EACF,wBAAwB;GACtB,WAAW;GACX,YAAY;EACb;CACF,EAAC;CAEF,IAAIC;AACJ,KAAI;AACF,WAAS,OAAO;CACjB,SAAQ,OAAO;EAEd,MAAM,eAAe,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM;AAG3E,SAAO,EACL,QAAQ,0JAA0J,eACnK;CACF;AAED,QAAO;EACL,SAAS,OAAO;EAChB,OAAO,OAAO;EACd,QAAQ,OAAO;EACf,MAAM,OAAO;EACb,WAAW,OAAO;EAClB,OAAO,OAAO;CACf;AACF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const require_discover_dataset_fields = require('../discover-dataset-fields-Cl7HpVkm.cjs');
|
|
2
|
-
|
|
3
|
-
exports.createDatasetFieldsTool = require_discover_dataset_fields.createDatasetFieldsTool;
|
|
4
|
-
exports.discoverDatasetFields = require_discover_dataset_fields.discoverDatasetFields;
|
|
5
|
-
exports.getCommonPatterns = require_discover_dataset_fields.getCommonPatterns;
|
|
6
|
-
exports.getFieldExamples = require_discover_dataset_fields.getFieldExamples;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discover-dataset-fields.d.cts","names":[],"sources":["../../src/agent-tools/discover-dataset-fields.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAIY,WAAA;UAEK,YAAA;;;;;AAFjB;AAEiB,UAOA,mBAAA,CAPY;EAOZ,OAAA,EAAA,MAAA;EAAmB,MAAA,EAE1B,YAF0B,EAAA;EAAA,cAE1B,EACQ,KADR,CAAA;IACQ,OAAA,EAAA,MAAA;IAAK,WAAA,EAAA,MAAA;EAMD,CAAA,CAAA;;;;;AAQnB,iBARmB,qBAAA,CAQnB,UAAA,EAPW,gBAOX,EAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EALQ,WAKR,EAAA,OAiCoC,CAjCpC,EAAA;EAAO,SAAA,CAAA,EAAA,MAAA;EAiCM,eAAA,CAAA,EAAA,OAAA;CAAuB,CAAA,EAjCpC,OAiCoC,CAjC5B,mBAiC4B,CAAA;;;;iBAAvB,uBAAA,aACF,qDAEH,sCACS,KAAA,CAAA,CAAA;iBAAA,EADE,CAAA,CAAA,UACF;CAAA,EAAA,OAAA,cAAA,EAAA;iBAAA,EAAA,OAAA;CAAA,EAAA;;IAAA;;IAuBJ,eAAgB,EAAA,OAAA;EAqChB,CAAA,EAAA,OAAA,EA5DI,GAAA,CAAA,oBA4Da,EAAA,cAAA,oBAAA,CAAA;;;;;iBArCjB,gBAAA;;;;iBAqCA,iBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discover-dataset-fields.d.ts","names":[],"sources":["../../src/agent-tools/discover-dataset-fields.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAIY,WAAA;UAEK,YAAA;;;;;AAFjB;AAEiB,UAOA,mBAAA,CAPY;EAOZ,OAAA,EAAA,MAAA;EAAmB,MAAA,EAE1B,YAF0B,EAAA;EAAA,cAE1B,EACQ,KADR,CAAA;IACQ,OAAA,EAAA,MAAA;IAAK,WAAA,EAAA,MAAA;EAMD,CAAA,CAAA;;;;;AAQnB,iBARmB,qBAAA,CAQnB,UAAA,EAPW,gBAOX,EAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EALQ,WAKR,EAAA,OAiCoC,CAjCpC,EAAA;EAAO,SAAA,CAAA,EAAA,MAAA;EAiCM,eAAA,CAAA,EAAA,OAAA;CAAuB,CAAA,EAjCpC,OAiCoC,CAjC5B,mBAiC4B,CAAA;;;;iBAAvB,uBAAA,aACF,qDAEH,wCACS,KAAA,CAAA,CAAA;iBAAA,EADE,CAAA,CAAA,UACF;CAAA,EAAA,OAAA,cAAA,EAAA;iBAAA,EAAA,OAAA;CAAA,EAAA;;IAAA;;IAuBJ,eAAgB,EAAA,OAAA;EAqChB,CAAA,EAAA,OAAA,EA5DI,KAAA,CAAA,oBA4Da,EAAA,cAAA,oBAAA,CAAA;;;;;iBArCjB,gBAAA;;;;iBAqCA,iBAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
require('../errors-BtJEw2Z-.cjs');
|
|
2
|
-
const require_lookup_otel_semantics = require('../lookup-otel-semantics-BbriXZAx.cjs');
|
|
3
|
-
|
|
4
|
-
exports.createOtelLookupTool = require_lookup_otel_semantics.createOtelLookupTool;
|
|
5
|
-
exports.lookupOtelSemantics = require_lookup_otel_semantics.lookupOtelSemantics;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import "../schema-CdDcpvrp.cjs";
|
|
2
|
-
import "../types-BYtO24VE.cjs";
|
|
3
|
-
import { SentryApiService } from "../client-CgS3tjJG.cjs";
|
|
4
|
-
import "../index-BPSCxsMC.cjs";
|
|
5
|
-
import * as ai4 from "ai";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
|
|
8
|
-
//#region src/agent-tools/lookup-otel-semantics.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* Lookup OpenTelemetry semantic convention attributes for a given namespace
|
|
11
|
-
*/
|
|
12
|
-
declare function lookupOtelSemantics(namespace: string, searchTerm: string | undefined, dataset: "errors" | "logs" | "spans", apiService: SentryApiService, organizationSlug: string, projectId?: string): Promise<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Create the otel-semantics-lookup tool for AI agents
|
|
15
|
-
*/
|
|
16
|
-
declare function createOtelLookupTool(apiService: SentryApiService, organizationSlug: string, projectId?: string): ai4.Tool<z.ZodObject<{
|
|
17
|
-
namespace: z.ZodString;
|
|
18
|
-
searchTerm: z.ZodOptional<z.ZodString>;
|
|
19
|
-
dataset: z.ZodEnum<["spans", "errors", "logs"]>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
namespace: string;
|
|
22
|
-
dataset: "errors" | "spans" | "logs";
|
|
23
|
-
searchTerm?: string | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
namespace: string;
|
|
26
|
-
dataset: "errors" | "spans" | "logs";
|
|
27
|
-
searchTerm?: string | undefined;
|
|
28
|
-
}>, string> & {
|
|
29
|
-
execute: (args: {
|
|
30
|
-
namespace: string;
|
|
31
|
-
dataset: "errors" | "spans" | "logs";
|
|
32
|
-
searchTerm?: string | undefined;
|
|
33
|
-
}, options: ai4.ToolExecutionOptions) => PromiseLike<string>;
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=lookup-otel-semantics.d.ts.map
|
|
36
|
-
//#endregion
|
|
37
|
-
export { createOtelLookupTool, lookupOtelSemantics };
|
|
38
|
-
//# sourceMappingURL=lookup-otel-semantics.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup-otel-semantics.d.cts","names":[],"sources":["../../src/agent-tools/lookup-otel-semantics.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;iBAiLsB,mBAAA,sGAIR,iEAGX;;;AAPH;AAAyC,iBAiFzB,oBAAA,CAjFyB,UAAA,EAkF3B,gBAlF2B,EAAA,gBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,MAAA,CAAA,EAoFrB,GAAA,CAAA,IApFqB,CAoFrB,CAAA,CAAA,SApFqB,CAAA;EAAA,SAI3B,EA8EgB,CAAA,CAAA,SA9EhB;EAAgB,UAG3B,eAAA,YAAA,CAAA;EAAO,OAAA,WAAA,CAAA,CAAA,OAAA,EAAA,QAAA,EAAA,MAAA,CAAA,CAAA;AA0EV,CAAA,EAAA,OAAgB,cAAA,EAAA;EAAoB,SAAA,EAAA,MAAA;EAAA,OACtB,EAAA,QAAA,GAAA,OAAA,GAAA,MAAA;EAAgB,UAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;UAEV,CAAA,GAAA;EAAA,OAAA,EAAA,CAAA,IAAA,EAAA;IAAA,SAAA,EAAA,MAAA;;;cAAA,GAAA,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import "../schema-BlkWypl3.js";
|
|
2
|
-
import "../types-B-8S69No.js";
|
|
3
|
-
import { SentryApiService } from "../client-C_dDreKj.js";
|
|
4
|
-
import "../index-DE1muTvw.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
import * as ai165 from "ai";
|
|
7
|
-
|
|
8
|
-
//#region src/agent-tools/lookup-otel-semantics.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* Lookup OpenTelemetry semantic convention attributes for a given namespace
|
|
11
|
-
*/
|
|
12
|
-
declare function lookupOtelSemantics(namespace: string, searchTerm: string | undefined, dataset: "errors" | "logs" | "spans", apiService: SentryApiService, organizationSlug: string, projectId?: string): Promise<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Create the otel-semantics-lookup tool for AI agents
|
|
15
|
-
*/
|
|
16
|
-
declare function createOtelLookupTool(apiService: SentryApiService, organizationSlug: string, projectId?: string): ai165.Tool<z.ZodObject<{
|
|
17
|
-
namespace: z.ZodString;
|
|
18
|
-
searchTerm: z.ZodOptional<z.ZodString>;
|
|
19
|
-
dataset: z.ZodEnum<["spans", "errors", "logs"]>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
namespace: string;
|
|
22
|
-
dataset: "spans" | "errors" | "logs";
|
|
23
|
-
searchTerm?: string | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
namespace: string;
|
|
26
|
-
dataset: "spans" | "errors" | "logs";
|
|
27
|
-
searchTerm?: string | undefined;
|
|
28
|
-
}>, string> & {
|
|
29
|
-
execute: (args: {
|
|
30
|
-
namespace: string;
|
|
31
|
-
dataset: "spans" | "errors" | "logs";
|
|
32
|
-
searchTerm?: string | undefined;
|
|
33
|
-
}, options: ai165.ToolExecutionOptions) => PromiseLike<string>;
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=lookup-otel-semantics.d.ts.map
|
|
36
|
-
//#endregion
|
|
37
|
-
export { createOtelLookupTool, lookupOtelSemantics };
|
|
38
|
-
//# sourceMappingURL=lookup-otel-semantics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lookup-otel-semantics.d.ts","names":[],"sources":["../../src/agent-tools/lookup-otel-semantics.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;iBAiLsB,mBAAA,sGAIR,iEAGX;;;AAPH;AAAyC,iBAiFzB,oBAAA,CAjFyB,UAAA,EAkF3B,gBAlF2B,EAAA,gBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,MAAA,CAAA,EAoFrB,KAAA,CAAA,IApFqB,CAoFrB,CAAA,CAAA,SApFqB,CAAA;EAAA,SAI3B,EA8EgB,CAAA,CAAA,SA9EhB;EAAgB,UAG3B,eAAA,YAAA,CAAA;EAAO,OAAA,WAAA,CAAA,CAAA,OAAA,EAAA,QAAA,EAAA,MAAA,CAAA,CAAA;AA0EV,CAAA,EAAA,OAAgB,cAAA,EAAA;EAAoB,SAAA,EAAA,MAAA;EAAA,OACtB,EAAA,OAAA,GAAA,QAAA,GAAA,MAAA;EAAgB,UAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;;UAEV,CAAA,GAAA;EAAA,OAAA,EAAA,CAAA,IAAA,EAAA;IAAA,SAAA,EAAA,MAAA;;;cAAA,KAAA,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "../schema-CdDcpvrp.cjs";
|
|
2
|
-
import "../types-BYtO24VE.cjs";
|
|
3
|
-
import { SentryApiService } from "../client-CgS3tjJG.cjs";
|
|
4
|
-
import "../index-BPSCxsMC.cjs";
|
|
5
|
-
import * as ai6 from "ai";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
|
|
8
|
-
//#region src/agent-tools/whoami.d.ts
|
|
9
|
-
interface WhoamiResult {
|
|
10
|
-
id: string | number;
|
|
11
|
-
name: string | null;
|
|
12
|
-
email: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get the current authenticated user's information from Sentry API
|
|
16
|
-
*/
|
|
17
|
-
declare function getCurrentUser(apiService: SentryApiService): Promise<WhoamiResult>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a tool for getting current user information
|
|
20
|
-
*/
|
|
21
|
-
declare function createWhoamiTool(apiService: SentryApiService): ai6.Tool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, string> & {
|
|
22
|
-
execute: (args: {}, options: ai6.ToolExecutionOptions) => PromiseLike<string>;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=whoami.d.ts.map
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { WhoamiResult, createWhoamiTool, getCurrentUser };
|
|
28
|
-
//# sourceMappingURL=whoami.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.d.cts","names":[],"sources":["../../src/agent-tools/whoami.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAIiB,YAAA;;;;;;AAAjB;AASA;AAAoC,iBAAd,cAAA,CAAc,UAAA,EACtB,gBADsB,CAAA,EAEjC,OAFiC,CAEzB,YAFyB,CAAA;;;;AAE1B,iBAYM,gBAAA,CAZN,UAAA,EAYmC,gBAZnC,CAAA,EAYmD,GAAA,CAAA,IAZnD,CAYmD,CAAA,CAAA,SAZnD,CAAA,CAAA,CAAA,EAAA,OAAA,EAYmD,CAAA,CAAA,UAZnD,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,GAAA;EAYM,OAAA,EAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAgB,OAAA,EAA6B,GAAA,CAAA,oBAA7B,EAAA,cAAA,CAAA,MAAA,CAAA;CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "../schema-BlkWypl3.js";
|
|
2
|
-
import "../types-B-8S69No.js";
|
|
3
|
-
import { SentryApiService } from "../client-C_dDreKj.js";
|
|
4
|
-
import "../index-DE1muTvw.js";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
import * as ai168 from "ai";
|
|
7
|
-
|
|
8
|
-
//#region src/agent-tools/whoami.d.ts
|
|
9
|
-
interface WhoamiResult {
|
|
10
|
-
id: string | number;
|
|
11
|
-
name: string | null;
|
|
12
|
-
email: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Get the current authenticated user's information from Sentry API
|
|
16
|
-
*/
|
|
17
|
-
declare function getCurrentUser(apiService: SentryApiService): Promise<WhoamiResult>;
|
|
18
|
-
/**
|
|
19
|
-
* Create a tool for getting current user information
|
|
20
|
-
*/
|
|
21
|
-
declare function createWhoamiTool(apiService: SentryApiService): ai168.Tool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, string> & {
|
|
22
|
-
execute: (args: {}, options: ai168.ToolExecutionOptions) => PromiseLike<string>;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=whoami.d.ts.map
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { WhoamiResult, createWhoamiTool, getCurrentUser };
|
|
28
|
-
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.d.ts","names":[],"sources":["../../src/agent-tools/whoami.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAIiB,YAAA;;;;;;AAAjB;AASA;AAAoC,iBAAd,cAAA,CAAc,UAAA,EACtB,gBADsB,CAAA,EAEjC,OAFiC,CAEzB,YAFyB,CAAA;;;;AAE1B,iBAYM,gBAAA,CAZN,UAAA,EAYmC,gBAZnC,CAAA,EAYmD,KAAA,CAAA,IAZnD,CAYmD,CAAA,CAAA,SAZnD,CAAA,CAAA,CAAA,EAAA,OAAA,EAYmD,CAAA,CAAA,UAZnD,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,GAAA;EAYM,OAAA,EAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAgB,OAAA,EAA6B,KAAA,CAAA,oBAA7B,EAAA,cAAA,CAAA,MAAA,CAAA;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-DcSwrWrs.js","names":["context: ServerContext"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n isHumanInterventionStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"./utils/seer-utils\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n description: [\n \"Use Seer AI to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n let output = `# Seer AI Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on network errors or 5xx errors\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n // Retry on network/connection errors\n return true;\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n return true;\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n return true;\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-Dw9iqvSk.cjs","names":["context: ServerContext","SEER_MAX_RETRIES","SEER_INITIAL_RETRY_DELAY","ApiError","SEER_TIMEOUT","SEER_POLLING_INTERVAL"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n isHumanInterventionStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"./utils/seer-utils\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n description: [\n \"Use Seer AI to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n let output = `# Seer AI Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on network errors or 5xx errors\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n // Retry on network/connection errors\n return true;\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n return true;\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n if (error instanceof ApiError) {\n return error.status >= 500;\n }\n return true;\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-utils-BlUSO8xh.js","names":["context: ServerContext","opts: { regionUrl?: string }","error: unknown","params?: Record<string, unknown>","paramsList: string[]","fn: () => Promise<T>"],"sources":["../src/tools/utils/api-utils.ts"],"sourcesContent":["import { SentryApiService, ApiError } from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\n\n/**\n * Create a Sentry API service from server context with optional region override\n * @param context - Server context containing host and access token\n * @param opts - Options object containing optional regionUrl override\n * @returns Configured SentryApiService instance (always uses HTTPS)\n * @throws {UserInputError} When regionUrl is provided but invalid\n */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n try {\n const parsedUrl = new URL(opts.regionUrl);\n\n // Validate that the URL has a proper protocol\n if (![\"http:\", \"https:\"].includes(parsedUrl.protocol)) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`,\n );\n }\n\n // Validate that the host is not just the protocol name\n if (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`,\n );\n }\n\n host = parsedUrl.host;\n } catch (error) {\n if (error instanceof UserInputError) {\n throw error;\n }\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\n/**\n * Maps API errors to user-friendly errors based on context\n * @param error - The error to handle\n * @param params - The parameters that were used in the API call\n * @returns Never - always throws an error\n * @throws {UserInputError} For 4xx errors that are likely user input issues\n * @throws {Error} For other errors\n */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n if (error instanceof ApiError) {\n // For 4xx errors, convert to UserInputError with status code in message\n // This provides agents with the specific error type while using the appropriate error class\n if (error.status >= 400 && error.status < 500) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // For 404s, add helpful context about parameters if available\n if (error.status === 404 && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n }\n\n // Re-throw any other errors as-is (including 5xx server errors)\n throw error;\n}\n\n/**\n * Wraps an async API call with automatic error handling\n * @param fn - The async function to execute\n * @param params - The parameters that were used in the API call\n * @returns The result of the function\n * @throws {UserInputError} For user input errors\n * @throws {Error} For other errors\n */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,CACxB,KAAI;EACF,MAAM,YAAY,IAAI,IAAI,KAAK;AAG/B,OAAK,CAAC,SAAS,QAAS,EAAC,SAAS,UAAU,SAAS,CACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAKlD,MAAI,UAAU,SAAS,WAAW,UAAU,SAAS,OACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAIlD,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,MAAI,iBAAiB,eACnB,OAAM;AAER,QAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AACP,KAAI,iBAAiB,UAGnB;MAAI,MAAM,UAAU,OAAO,MAAM,SAAS,KAAK;GAC7C,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,OAAI,MAAM,WAAW,OAAO,QAAQ;IAClC,MAAMC,aAAuB,CAAE;AAC/B,SAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,QAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;GAErJ;AAED,SAAM,IAAI,eAAe,SAAS,EAAE,OAAO,MAAO;EACnD;;AAIH,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAF,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-utils-DFWUfQ83.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","UserInputError","SentryApiService","error: unknown","params?: Record<string, unknown>","ApiError","paramsList: string[]","fn: () => Promise<T>"],"sources":["../src/tools/utils/api-utils.ts"],"sourcesContent":["import { SentryApiService, ApiError } from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\n\n/**\n * Create a Sentry API service from server context with optional region override\n * @param context - Server context containing host and access token\n * @param opts - Options object containing optional regionUrl override\n * @returns Configured SentryApiService instance (always uses HTTPS)\n * @throws {UserInputError} When regionUrl is provided but invalid\n */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n try {\n const parsedUrl = new URL(opts.regionUrl);\n\n // Validate that the URL has a proper protocol\n if (![\"http:\", \"https:\"].includes(parsedUrl.protocol)) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`,\n );\n }\n\n // Validate that the host is not just the protocol name\n if (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`,\n );\n }\n\n host = parsedUrl.host;\n } catch (error) {\n if (error instanceof UserInputError) {\n throw error;\n }\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\n/**\n * Maps API errors to user-friendly errors based on context\n * @param error - The error to handle\n * @param params - The parameters that were used in the API call\n * @returns Never - always throws an error\n * @throws {UserInputError} For 4xx errors that are likely user input issues\n * @throws {Error} For other errors\n */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n if (error instanceof ApiError) {\n // For 4xx errors, convert to UserInputError with status code in message\n // This provides agents with the specific error type while using the appropriate error class\n if (error.status >= 400 && error.status < 500) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // For 404s, add helpful context about parameters if available\n if (error.status === 404 && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n }\n\n // Re-throw any other errors as-is (including 5xx server errors)\n throw error;\n}\n\n/**\n * Wraps an async API call with automatic error handling\n * @param fn - The async function to execute\n * @param params - The parameters that were used in the API call\n * @returns The result of the function\n * @throws {UserInputError} For user input errors\n * @throws {Error} For other errors\n */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,CACxB,KAAI;EACF,MAAM,YAAY,IAAI,IAAI,KAAK;AAG/B,OAAK,CAAC,SAAS,QAAS,EAAC,SAAS,UAAU,SAAS,CACnD,OAAM,IAAIC,+BACP,8BAA8B,KAAK,UAAU;AAKlD,MAAI,UAAU,SAAS,WAAW,UAAU,SAAS,OACnD,OAAM,IAAIA,+BACP,8BAA8B,KAAK,UAAU;AAIlD,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,MAAI,iBAAiBA,8BACnB,OAAM;AAER,QAAM,IAAIA,+BACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAIC,gCAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AACP,KAAI,iBAAiBC,yBAGnB;MAAI,MAAM,UAAU,OAAO,MAAM,SAAS,KAAK;GAC7C,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,OAAI,MAAM,WAAW,OAAO,QAAQ;IAClC,MAAMC,aAAuB,CAAE;AAC/B,SAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,QAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;GAErJ;AAED,SAAM,IAAIL,8BAAe,SAAS,EAAE,OAAO,MAAO;EACnD;;AAIH,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBM,IACAH,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
|