@sentry/mcp-server 0.17.1 → 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 +28 -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-ByoDTsq-.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-CpwtN4UA.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-DLkUGS7r.d.ts → client-B0wezrpt.d.cts} +97 -13
- 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-DV68BdcS.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-Fe-4NTUo.js → constants-BPM_OWt0.js} +18 -2
- package/dist/constants-BPM_OWt0.js.map +1 -0
- package/dist/{constants-wrEbre3j.cjs → constants-DJrjLmh5.cjs} +29 -1
- package/dist/constants-DJrjLmh5.cjs.map +1 -0
- package/dist/constants.cjs +3 -1
- package/dist/constants.d.cts +8 -1
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +8 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -2
- package/dist/{create-dsn-BT3t-MDA.js → create-dsn-BhshlP7l.js} +5 -4
- package/dist/{create-dsn-BT3t-MDA.js.map → create-dsn-BhshlP7l.js.map} +1 -1
- package/dist/{create-dsn-Bgwi-Ygi.cjs → create-dsn-DaHidLhE.cjs} +7 -6
- package/dist/{create-dsn-Bgwi-Ygi.cjs.map → create-dsn-DaHidLhE.cjs.map} +1 -1
- package/dist/{create-project-Ca1Sy1_F.js → create-project-C3laecaU.js} +6 -5
- package/dist/create-project-C3laecaU.js.map +1 -0
- package/dist/{create-project-4R4aZMoc.cjs → create-project-xszOpGTC.cjs} +8 -7
- package/dist/create-project-xszOpGTC.cjs.map +1 -0
- package/dist/{create-team-D0dUl7Zo.js → create-team-CTN-DxOE.js} +5 -4
- package/dist/create-team-CTN-DxOE.js.map +1 -0
- package/dist/{create-team-CSBXDcoD.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-CkvahHwJ.cjs → find-dsns-D0l3siyF.cjs} +7 -6
- package/dist/find-dsns-D0l3siyF.cjs.map +1 -0
- package/dist/{find-dsns-DrNAfU_Q.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-Dh-1AK-m.cjs → find-projects-CWNLthwg.cjs} +7 -6
- package/dist/find-projects-CWNLthwg.cjs.map +1 -0
- package/dist/{find-projects-CZCMck_0.js → find-projects-Dy1_O9L0.js} +5 -4
- package/dist/find-projects-Dy1_O9L0.js.map +1 -0
- package/dist/{find-releases-BsAkl--F.cjs → find-releases-BtazPcQH.cjs} +7 -6
- package/dist/find-releases-BtazPcQH.cjs.map +1 -0
- package/dist/{find-releases-Do_CywRr.js → find-releases-DN_BfQM2.js} +5 -4
- package/dist/find-releases-DN_BfQM2.js.map +1 -0
- package/dist/{find-teams-BylQQ4FO.js → find-teams-CRVT4KOg.js} +5 -4
- package/dist/find-teams-CRVT4KOg.js.map +1 -0
- package/dist/{find-teams-DXyzyQOy.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-CmBYkI_e.d.cts → formatting-XMmhMjRz.d.cts} +4 -4
- package/dist/formatting-XMmhMjRz.d.cts.map +1 -0
- package/dist/{formatting-C3qu84cm.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-BzhDeM6z.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-CVoMrETq.js → get-event-attachment-pIJmUfFE.js} +5 -4
- package/dist/get-event-attachment-pIJmUfFE.js.map +1 -0
- package/dist/{get-issue-details-_uS_AZ_v.js → get-issue-details-B1PDMmMY.js} +40 -20
- package/dist/get-issue-details-B1PDMmMY.js.map +1 -0
- package/dist/{get-issue-details-C96fhps3.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-B0bLvFFX.js → handler-BbqDy4DA.js} +39 -41
- package/dist/handler-BbqDy4DA.js.map +1 -0
- package/dist/{handler-DEjS3yks.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-DTN2HYXt.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-7T1iMsQU.cjs → handler-cy5oD28N.cjs} +41 -43
- package/dist/handler-cy5oD28N.cjs.map +1 -0
- package/dist/index.cjs +105 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +105 -95
- 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 +134 -44
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +116 -26
- 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-CWV8hsUX.cjs → promptDefinitions-02aQWFKD.cjs} +2 -2
- package/dist/{promptDefinitions-CWV8hsUX.cjs.map → promptDefinitions-02aQWFKD.cjs.map} +1 -1
- package/dist/{promptDefinitions-CVHtYaj8.d.cts → promptDefinitions-ImFNiWkX.d.cts} +3 -3
- package/dist/promptDefinitions-ImFNiWkX.d.cts.map +1 -0
- package/dist/{promptDefinitions-DehpwJfn.d.ts → promptDefinitions-Y-mt2_IM.d.ts} +3 -3
- package/dist/promptDefinitions-Y-mt2_IM.d.ts.map +1 -0
- package/dist/{promptDefinitions-DF8nuJVq.js → promptDefinitions-wR6u6ZJE.js} +2 -2
- package/dist/{promptDefinitions-DF8nuJVq.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-BL3kwfOA.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-xbTf44Hn.d.cts → schema-ChvpDxUk.d.cts} +535 -288
- package/dist/{schema-xbTf44Hn.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-DWmx8lgm.d.ts → schema-DOY22v1Q.d.ts} +509 -262
- package/dist/{schema-DWmx8lgm.d.ts.map → schema-DOY22v1Q.d.ts.map} +1 -1
- package/dist/{schema-DMfkTR1l.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-EbjJuL9Q.cjs → search-docs-CH6-1H9_.cjs} +8 -7
- package/dist/search-docs-CH6-1H9_.cjs.map +1 -0
- package/dist/{search-docs-DIm3ykOg.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-CnJvaT0s.js → server-BjizUxVR.js} +74 -128
- package/dist/server-BjizUxVR.js.map +1 -0
- package/dist/{server-Dv9HxoRk.cjs → server-RKq8MlNM.cjs} +74 -128
- 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-C6MAgHmA.cjs → stdio-CJnMOUAU.cjs} +3 -3
- package/dist/{stdio-C6MAgHmA.cjs.map → stdio-CJnMOUAU.cjs.map} +1 -1
- package/dist/{stdio-DnAY4MSF.js → stdio-DB9muOi8.js} +3 -3
- package/dist/{stdio-DnAY4MSF.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-qfk-QAo0.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-DE-njuHe.d.cts → types-B4nOfch5.d.cts} +7 -3
- package/dist/{types-DE-njuHe.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-DRywojVB.d.ts → types-ryM3umix.d.ts} +7 -3
- package/dist/{types-DRywojVB.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-DqUsAuTd.cjs → update-issue-CD-kp2dt.cjs} +13 -18
- package/dist/update-issue-CD-kp2dt.cjs.map +1 -0
- package/dist/{update-issue-DoQYEQjf.js → update-issue-nq8D_YUe.js} +9 -14
- package/dist/update-issue-nq8D_YUe.js.map +1 -0
- package/dist/{update-project-DQu5PnE3.cjs → update-project-B_OLM4Ky.cjs} +8 -7
- package/dist/{update-project-DQu5PnE3.cjs.map → update-project-B_OLM4Ky.cjs.map} +1 -1
- package/dist/{update-project-C9CLxNfF.js → update-project-DvJfmSmX.js} +6 -5
- package/dist/{update-project-C9CLxNfF.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-Fm-dODdb.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-CzV_Tz2C.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-DvjTvYJs.js.map → version-CaDh5TML.js.map} +1 -1
- package/dist/{version-Bu9nGzm5.cjs → version-DB2IM9qM.cjs} +2 -2
- package/dist/{version-Bu9nGzm5.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-ByoDTsq-.cjs.map +0 -1
- package/dist/analyze-issue-with-seer-CpwtN4UA.js.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-DLkUGS7r.d.ts.map +0 -1
- package/dist/client-DV68BdcS.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-Fe-4NTUo.js.map +0 -1
- package/dist/constants-wrEbre3j.cjs.map +0 -1
- package/dist/create-project-4R4aZMoc.cjs.map +0 -1
- package/dist/create-project-Ca1Sy1_F.js.map +0 -1
- package/dist/create-team-CSBXDcoD.cjs.map +0 -1
- package/dist/create-team-D0dUl7Zo.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-CkvahHwJ.cjs.map +0 -1
- package/dist/find-dsns-DrNAfU_Q.js.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-CZCMck_0.js.map +0 -1
- package/dist/find-projects-Dh-1AK-m.cjs.map +0 -1
- package/dist/find-releases-BsAkl--F.cjs.map +0 -1
- package/dist/find-releases-Do_CywRr.js.map +0 -1
- package/dist/find-teams-BylQQ4FO.js.map +0 -1
- package/dist/find-teams-DXyzyQOy.cjs.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-C180PVwd.cjs.map +0 -1
- package/dist/formatting-C3qu84cm.d.ts.map +0 -1
- package/dist/formatting-CmBYkI_e.d.cts.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-BzhDeM6z.cjs.map +0 -1
- package/dist/get-event-attachment-CVoMrETq.js.map +0 -1
- package/dist/get-issue-details-C96fhps3.cjs.map +0 -1
- package/dist/get-issue-details-_uS_AZ_v.js.map +0 -1
- package/dist/handler-7T1iMsQU.cjs.map +0 -1
- package/dist/handler-B0bLvFFX.js.map +0 -1
- package/dist/handler-BGhr9FJM.d.cts.map +0 -1
- package/dist/handler-BPPTAi7I.d.ts.map +0 -1
- package/dist/handler-BZ3hKPb8.d.cts.map +0 -1
- package/dist/handler-DEjS3yks.cjs.map +0 -1
- package/dist/handler-DTN2HYXt.js.map +0 -1
- package/dist/handler-cUB6XcUV.d.ts.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-Dadvq5Fm.cjs +0 -72
- package/dist/resources-Dadvq5Fm.cjs.map +0 -1
- package/dist/resources-jcFoc4JU.js +0 -60
- package/dist/resources-jcFoc4JU.js.map +0 -1
- package/dist/schema-BL3kwfOA.cjs.map +0 -1
- package/dist/schema-C0LznFvu.cjs.map +0 -1
- package/dist/schema-CcFmBoEf.js.map +0 -1
- package/dist/schema-DMfkTR1l.js.map +0 -1
- package/dist/search-docs-DIm3ykOg.js.map +0 -1
- package/dist/search-docs-EbjJuL9Q.cjs.map +0 -1
- package/dist/seer-utils-C7Kv0gr8.cjs.map +0 -1
- package/dist/seer-utils-NPHv8KYY.js.map +0 -1
- package/dist/server-CnJvaT0s.js.map +0 -1
- package/dist/server-Dv9HxoRk.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-B0wbxDty.js +0 -44
- package/dist/tools-B0wbxDty.js.map +0 -1
- package/dist/tools-qfk-QAo0.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-DoQYEQjf.js.map +0 -1
- package/dist/update-issue-DqUsAuTd.cjs.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-CqbeJfE1.cjs.map +0 -1
- package/dist/utils-CzV_Tz2C.d.ts.map +0 -1
- package/dist/utils-Fm-dODdb.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-DvjTvYJs.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
|
@@ -9,18 +9,19 @@ function isSentryHost(host) {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Generates a Sentry issue URL.
|
|
12
|
-
* @param host The Sentry host
|
|
12
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
13
13
|
* @param organizationSlug Organization identifier
|
|
14
14
|
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
15
15
|
* @returns The complete issue URL
|
|
16
16
|
*/
|
|
17
17
|
function getIssueUrl(host, organizationSlug, issueId) {
|
|
18
18
|
const isSaas = isSentryHost(host);
|
|
19
|
-
|
|
19
|
+
const webHost = isSaas ? "sentry.io" : host;
|
|
20
|
+
return isSaas ? `https://${organizationSlug}.${webHost}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Generates a Sentry issues search URL.
|
|
23
|
-
* @param host The Sentry host
|
|
24
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
24
25
|
* @param organizationSlug Organization identifier
|
|
25
26
|
* @param query Optional search query
|
|
26
27
|
* @param projectSlugOrId Optional project slug or ID
|
|
@@ -28,7 +29,8 @@ function getIssueUrl(host, organizationSlug, issueId) {
|
|
|
28
29
|
*/
|
|
29
30
|
function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
|
|
30
31
|
const isSaas = isSentryHost(host);
|
|
31
|
-
|
|
32
|
+
const webHost = isSaas ? "sentry.io" : host;
|
|
33
|
+
let url = isSaas ? `https://${organizationSlug}.${webHost}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;
|
|
32
34
|
const params = new URLSearchParams();
|
|
33
35
|
if (projectSlugOrId) params.append("project", projectSlugOrId);
|
|
34
36
|
if (query) params.append("query", query);
|
|
@@ -38,18 +40,19 @@ function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
|
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
40
42
|
* Generates a Sentry trace URL for performance investigation.
|
|
41
|
-
* @param host The Sentry host
|
|
43
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
42
44
|
* @param organizationSlug Organization identifier
|
|
43
45
|
* @param traceId Trace identifier
|
|
44
46
|
* @returns The complete trace URL
|
|
45
47
|
*/
|
|
46
48
|
function getTraceUrl(host, organizationSlug, traceId) {
|
|
47
49
|
const isSaas = isSentryHost(host);
|
|
48
|
-
|
|
50
|
+
const webHost = isSaas ? "sentry.io" : host;
|
|
51
|
+
return isSaas ? `https://${organizationSlug}.${webHost}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
|
|
49
52
|
}
|
|
50
53
|
/**
|
|
51
54
|
* Generates a Sentry events explorer URL.
|
|
52
|
-
* @param host The Sentry host
|
|
55
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
53
56
|
* @param organizationSlug Organization identifier
|
|
54
57
|
* @param query Search query
|
|
55
58
|
* @param dataset Dataset type
|
|
@@ -59,7 +62,8 @@ function getTraceUrl(host, organizationSlug, traceId) {
|
|
|
59
62
|
*/
|
|
60
63
|
function getEventsExplorerUrl(host, organizationSlug, query, dataset = "spans", projectSlug, fields) {
|
|
61
64
|
const isSaas = isSentryHost(host);
|
|
62
|
-
|
|
65
|
+
const webHost = isSaas ? "sentry.io" : host;
|
|
66
|
+
let url = isSaas ? `https://${organizationSlug}.${webHost}/explore/` : `https://${host}/organizations/${organizationSlug}/explore/`;
|
|
63
67
|
const params = new URLSearchParams();
|
|
64
68
|
params.append("query", query);
|
|
65
69
|
params.append("dataset", dataset);
|
|
@@ -149,4 +153,4 @@ function validateAndParseSentryUrlThrows(url) {
|
|
|
149
153
|
|
|
150
154
|
//#endregion
|
|
151
155
|
export { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
152
|
-
//# sourceMappingURL=url-utils-
|
|
156
|
+
//# sourceMappingURL=url-utils-DF8NBCyH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils-DF8NBCyH.js","names":["host: string","organizationSlug: string","issueId: string","query?: string | null","projectSlugOrId?: string","traceId: string","query: string","dataset: \"spans\" | \"errors\" | \"logs\"","projectSlug?: string","fields?: string[]","url: string"],"sources":["../src/utils/url-utils.ts"],"sourcesContent":["/**\n * Determines if a Sentry instance is SaaS or self-hosted based on the host.\n * @param host The Sentry host (e.g., \"sentry.io\" or \"sentry.company.com\")\n * @returns true if SaaS instance, false if self-hosted\n */\nexport function isSentryHost(host: string): boolean {\n return host === \"sentry.io\" || host.endsWith(\".sentry.io\");\n}\n\n/**\n * Generates a Sentry issue URL.\n * @param host The Sentry host (may include regional subdomain for API access)\n * @param organizationSlug Organization identifier\n * @param issueId Issue identifier (e.g., \"PROJECT-123\")\n * @returns The complete issue URL\n */\nexport function getIssueUrl(\n host: string,\n organizationSlug: string,\n issueId: string,\n): string {\n const isSaas = isSentryHost(host);\n // For SaaS instances, always use sentry.io for web UI URLs regardless of region\n // Regional subdomains (e.g., us.sentry.io) are only for API endpoints\n const webHost = isSaas ? \"sentry.io\" : host;\n return isSaas\n ? `https://${organizationSlug}.${webHost}/issues/${issueId}`\n : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;\n}\n\n/**\n * Generates a Sentry issues search URL.\n * @param host The Sentry host (may include regional subdomain for API access)\n * @param organizationSlug Organization identifier\n * @param query Optional search query\n * @param projectSlugOrId Optional project slug or ID\n * @returns The complete issues search URL\n */\nexport function getIssuesSearchUrl(\n host: string,\n organizationSlug: string,\n query?: string | null,\n projectSlugOrId?: string,\n): string {\n const isSaas = isSentryHost(host);\n // For SaaS instances, always use sentry.io for web UI URLs regardless of region\n // Regional subdomains (e.g., us.sentry.io) are only for API endpoints\n const webHost = isSaas ? \"sentry.io\" : host;\n let url = isSaas\n ? `https://${organizationSlug}.${webHost}/issues/`\n : `https://${host}/organizations/${organizationSlug}/issues/`;\n\n const params = new URLSearchParams();\n if (projectSlugOrId) {\n params.append(\"project\", projectSlugOrId);\n }\n if (query) {\n params.append(\"query\", query);\n }\n\n const queryString = params.toString();\n if (queryString) {\n url += `?${queryString}`;\n }\n\n return url;\n}\n\n/**\n * Generates a Sentry trace URL for performance investigation.\n * @param host The Sentry host (may include regional subdomain for API access)\n * @param organizationSlug Organization identifier\n * @param traceId Trace identifier\n * @returns The complete trace URL\n */\nexport function getTraceUrl(\n host: string,\n organizationSlug: string,\n traceId: string,\n): string {\n const isSaas = isSentryHost(host);\n // For SaaS instances, always use sentry.io for web UI URLs regardless of region\n // Regional subdomains (e.g., us.sentry.io) are only for API endpoints\n const webHost = isSaas ? \"sentry.io\" : host;\n return isSaas\n ? `https://${organizationSlug}.${webHost}/explore/traces/trace/${traceId}`\n : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n}\n\n/**\n * Generates a Sentry events explorer URL.\n * @param host The Sentry host (may include regional subdomain for API access)\n * @param organizationSlug Organization identifier\n * @param query Search query\n * @param dataset Dataset type\n * @param projectSlug Optional project slug\n * @param fields Optional fields to display\n * @returns The complete events explorer URL\n */\nexport function getEventsExplorerUrl(\n host: string,\n organizationSlug: string,\n query: string,\n dataset: \"spans\" | \"errors\" | \"logs\" = \"spans\",\n projectSlug?: string,\n fields?: string[],\n): string {\n const isSaas = isSentryHost(host);\n // For SaaS instances, always use sentry.io for web UI URLs regardless of region\n // Regional subdomains (e.g., us.sentry.io) are only for API endpoints\n const webHost = isSaas ? \"sentry.io\" : host;\n let url = isSaas\n ? `https://${organizationSlug}.${webHost}/explore/`\n : `https://${host}/organizations/${organizationSlug}/explore/`;\n\n const params = new URLSearchParams();\n params.append(\"query\", query);\n params.append(\"dataset\", dataset);\n params.append(\"layout\", \"table\");\n\n if (projectSlug) {\n params.append(\"project\", projectSlug);\n }\n\n if (fields && fields.length > 0) {\n for (const field of fields) {\n params.append(\"field\", field);\n }\n }\n\n url += `?${params.toString()}`;\n return url;\n}\n\n/**\n * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nfunction _validateSentryHostInternal(host: string): void {\n if (host.startsWith(\"http://\") || host.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\",\n );\n }\n}\n\n/**\n * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nfunction _validateAndParseSentryUrlInternal(url: string): string {\n if (!url.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.host;\n } catch (error) {\n throw new Error(\n \"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param host The hostname to validate\n */\nexport function validateSentryHost(host: string): void {\n try {\n _validateSentryHostInternal(host);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n */\nexport function validateAndParseSentryUrl(url: string): string {\n try {\n return _validateAndParseSentryUrlInternal(url);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error instead of exiting the process (for testing).\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nexport function validateSentryHostThrows(host: string): void {\n _validateSentryHostInternal(host);\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error instead of exiting the process (for testing).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nexport function validateAndParseSentryUrlThrows(url: string): string {\n return _validateAndParseSentryUrlInternal(url);\n}\n"],"mappings":";;;;;;AAKA,SAAgB,aAAaA,MAAuB;AAClD,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;AAC3D;;;;;;;;AASD,SAAgB,YACdA,MACAC,kBACAC,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;CAGjC,MAAM,UAAU,SAAS,cAAc;AACvC,QAAO,UACF,UAAU,iBAAiB,GAAG,QAAQ,UAAU,aAChD,UAAU,KAAK,iBAAiB,iBAAiB,UAAU;AACjE;;;;;;;;;AAUD,SAAgB,mBACdF,MACAC,kBACAE,OACAC,iBACQ;CACR,MAAM,SAAS,aAAa,KAAK;CAGjC,MAAM,UAAU,SAAS,cAAc;CACvC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,QAAQ,aACtC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,KAAI,gBACF,QAAO,OAAO,WAAW,gBAAgB;AAE3C,KAAI,MACF,QAAO,OAAO,SAAS,MAAM;CAG/B,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YACF,SAAQ,GAAG;AAGb,QAAO;AACR;;;;;;;;AASD,SAAgB,YACdJ,MACAC,kBACAI,SACQ;CACR,MAAM,SAAS,aAAa,KAAK;CAGjC,MAAM,UAAU,SAAS,cAAc;AACvC,QAAO,UACF,UAAU,iBAAiB,GAAG,QAAQ,wBAAwB,aAC9D,UAAU,KAAK,iBAAiB,iBAAiB,wBAAwB;AAC/E;;;;;;;;;;;AAYD,SAAgB,qBACdL,MACAC,kBACAK,OACAC,UAAuC,SACvCC,aACAC,QACQ;CACR,MAAM,SAAS,aAAa,KAAK;CAGjC,MAAM,UAAU,SAAS,cAAc;CACvC,IAAI,MAAM,UACL,UAAU,iBAAiB,GAAG,QAAQ,cACtC,UAAU,KAAK,iBAAiB,iBAAiB;CAEtD,MAAM,SAAS,IAAI;AACnB,QAAO,OAAO,SAAS,MAAM;AAC7B,QAAO,OAAO,WAAW,QAAQ;AACjC,QAAO,OAAO,UAAU,QAAQ;AAEhC,KAAI,YACF,QAAO,OAAO,WAAW,YAAY;AAGvC,KAAI,UAAU,OAAO,SAAS,EAC5B,MAAK,MAAM,SAAS,OAClB,QAAO,OAAO,SAAS,MAAM;AAIjC,SAAQ,GAAG,OAAO,UAAU;AAC5B,QAAO;AACR;;;;;;;;AASD,SAAS,4BAA4BT,MAAoB;AACvD,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;AAGL;;;;;;;;;AAUD,SAAS,mCAAmCU,KAAqB;AAC/D,MAAK,IAAI,WAAW,WAAW,CAC7B,OAAM,IAAI,MACR;AAIJ,KAAI;EACF,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,QAAM,IAAI,MACR;CAEH;AACF;;;;;;;AAQD,SAAgB,mBAAmBV,MAAoB;AACrD,KAAI;AACF,8BAA4B,KAAK;CAClC,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,0BAA0BU,KAAqB;AAC7D,KAAI;AACF,SAAO,mCAAmC,IAAI;CAC/C,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,yBAAyBV,MAAoB;AAC3D,6BAA4B,KAAK;AAClC;;;;;;;;;AAUD,SAAgB,gCAAgCU,KAAqB;AACnE,QAAO,mCAAmC,IAAI;AAC/C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/cli/usage.ts
|
|
3
|
+
function buildUsage(packageName, defaults, all) {
|
|
4
|
+
return `Usage: ${packageName} --access-token=<token> [--host=<host>|--url=<url>] [--mcp-url=<url>] [--sentry-dsn=<dsn>] [--scopes=<scope1,scope2>] [--add-scopes=<scope1,scope2>] [--all-scopes]
|
|
5
|
+
|
|
6
|
+
Default scopes (read-only):
|
|
7
|
+
- ${defaults.join(", ")}
|
|
8
|
+
|
|
9
|
+
Scope options:
|
|
10
|
+
--scopes Override default scopes completely
|
|
11
|
+
--add-scopes Add scopes to the default read-only set
|
|
12
|
+
--all-scopes Grant all available scopes (admin-level and implied)
|
|
13
|
+
|
|
14
|
+
Constraints (stdio only):
|
|
15
|
+
--organization-slug <slug> Constrain all tool calls to this org
|
|
16
|
+
--project-slug <slug> Constrain to a project (optional)
|
|
17
|
+
|
|
18
|
+
Available scopes (higher scopes include lower):
|
|
19
|
+
- org:read, org:write, org:admin
|
|
20
|
+
- project:read, project:write, project:admin
|
|
21
|
+
- team:read, team:write, team:admin
|
|
22
|
+
- member:read, member:write, member:admin
|
|
23
|
+
- event:read, event:write, event:admin
|
|
24
|
+
- project:releases
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
# Default read-only access
|
|
28
|
+
${packageName} --access-token=TOKEN
|
|
29
|
+
|
|
30
|
+
# Override with specific scopes only
|
|
31
|
+
${packageName} --access-token=TOKEN --scopes=org:read,event:read
|
|
32
|
+
|
|
33
|
+
# Add write permissions to defaults
|
|
34
|
+
${packageName} --access-token=TOKEN --add-scopes=event:write,project:write`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
Object.defineProperty(exports, 'buildUsage', {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return buildUsage;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=usage-Do2a2NJi.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-Do2a2NJi.cjs","names":["packageName: string","defaults: ReadonlyArray<Scope>","all: ReadonlyArray<Scope>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Scope } from \"../permissions\";\n\nexport function buildUsage(\n packageName: string,\n defaults: ReadonlyArray<Scope>,\n all: ReadonlyArray<Scope>,\n): string {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>|--url=<url>] [--mcp-url=<url>] [--sentry-dsn=<dsn>] [--scopes=<scope1,scope2>] [--add-scopes=<scope1,scope2>] [--all-scopes]\n\nDefault scopes (read-only):\n - ${defaults.join(\", \")}\n\nScope options:\n --scopes Override default scopes completely\n --add-scopes Add scopes to the default read-only set\n --all-scopes Grant all available scopes (admin-level and implied)\n\nConstraints (stdio only):\n --organization-slug <slug> Constrain all tool calls to this org\n --project-slug <slug> Constrain to a project (optional)\n\nAvailable scopes (higher scopes include lower):\n - org:read, org:write, org:admin\n - project:read, project:write, project:admin\n - team:read, team:write, team:admin\n - member:read, member:write, member:admin\n - event:read, event:write, event:admin\n - project:releases\n\nExamples:\n # Default read-only access\n ${packageName} --access-token=TOKEN\n \n # Override with specific scopes only\n ${packageName} --access-token=TOKEN --scopes=org:read,event:read\n \n # Add write permissions to defaults\n ${packageName} --access-token=TOKEN --add-scopes=event:write,project:write`;\n}\n"],"mappings":";;AAEA,SAAgB,WACdA,aACAC,UACAC,KACQ;AACR,SAAQ,SAAS,YAAY;;;MAGzB,SAAS,KAAK,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;IAqBtB,YAAY;;;IAGZ,YAAY;;;IAGZ,YAAY;AACf"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/cli/usage.ts
|
|
2
|
+
function buildUsage(packageName, defaults, all) {
|
|
3
|
+
return `Usage: ${packageName} --access-token=<token> [--host=<host>|--url=<url>] [--mcp-url=<url>] [--sentry-dsn=<dsn>] [--scopes=<scope1,scope2>] [--add-scopes=<scope1,scope2>] [--all-scopes]
|
|
4
|
+
|
|
5
|
+
Default scopes (read-only):
|
|
6
|
+
- ${defaults.join(", ")}
|
|
7
|
+
|
|
8
|
+
Scope options:
|
|
9
|
+
--scopes Override default scopes completely
|
|
10
|
+
--add-scopes Add scopes to the default read-only set
|
|
11
|
+
--all-scopes Grant all available scopes (admin-level and implied)
|
|
12
|
+
|
|
13
|
+
Constraints (stdio only):
|
|
14
|
+
--organization-slug <slug> Constrain all tool calls to this org
|
|
15
|
+
--project-slug <slug> Constrain to a project (optional)
|
|
16
|
+
|
|
17
|
+
Available scopes (higher scopes include lower):
|
|
18
|
+
- org:read, org:write, org:admin
|
|
19
|
+
- project:read, project:write, project:admin
|
|
20
|
+
- team:read, team:write, team:admin
|
|
21
|
+
- member:read, member:write, member:admin
|
|
22
|
+
- event:read, event:write, event:admin
|
|
23
|
+
- project:releases
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
# Default read-only access
|
|
27
|
+
${packageName} --access-token=TOKEN
|
|
28
|
+
|
|
29
|
+
# Override with specific scopes only
|
|
30
|
+
${packageName} --access-token=TOKEN --scopes=org:read,event:read
|
|
31
|
+
|
|
32
|
+
# Add write permissions to defaults
|
|
33
|
+
${packageName} --access-token=TOKEN --add-scopes=event:write,project:write`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { buildUsage };
|
|
38
|
+
//# sourceMappingURL=usage-OGOjVeAz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-OGOjVeAz.js","names":["packageName: string","defaults: ReadonlyArray<Scope>","all: ReadonlyArray<Scope>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Scope } from \"../permissions\";\n\nexport function buildUsage(\n packageName: string,\n defaults: ReadonlyArray<Scope>,\n all: ReadonlyArray<Scope>,\n): string {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>|--url=<url>] [--mcp-url=<url>] [--sentry-dsn=<dsn>] [--scopes=<scope1,scope2>] [--add-scopes=<scope1,scope2>] [--all-scopes]\n\nDefault scopes (read-only):\n - ${defaults.join(\", \")}\n\nScope options:\n --scopes Override default scopes completely\n --add-scopes Add scopes to the default read-only set\n --all-scopes Grant all available scopes (admin-level and implied)\n\nConstraints (stdio only):\n --organization-slug <slug> Constrain all tool calls to this org\n --project-slug <slug> Constrain to a project (optional)\n\nAvailable scopes (higher scopes include lower):\n - org:read, org:write, org:admin\n - project:read, project:write, project:admin\n - team:read, team:write, team:admin\n - member:read, member:write, member:admin\n - event:read, event:write, event:admin\n - project:releases\n\nExamples:\n # Default read-only access\n ${packageName} --access-token=TOKEN\n \n # Override with specific scopes only\n ${packageName} --access-token=TOKEN --scopes=org:read,event:read\n \n # Add write permissions to defaults\n ${packageName} --access-token=TOKEN --add-scopes=event:write,project:write`;\n}\n"],"mappings":";AAEA,SAAgB,WACdA,aACAC,UACAC,KACQ;AACR,SAAQ,SAAS,YAAY;;;MAGzB,SAAS,KAAK,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;IAqBtB,YAAY;;;IAGZ,YAAY;;;IAGZ,YAAY;AACf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const require_slug_validation = require('../slug-validation-DMk8Dyuh.cjs');
|
|
2
|
+
|
|
3
|
+
exports.isNumericId = require_slug_validation.isNumericId;
|
|
4
|
+
exports.validateSlug = require_slug_validation.validateSlug;
|
|
5
|
+
exports.validateSlugOrId = require_slug_validation.validateSlugOrId;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/slug-validation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Helper to check if a string is a numeric ID.
|
|
7
|
+
*/
|
|
8
|
+
declare function isNumericId(value: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Validates a slug to prevent path traversal and injection attacks.
|
|
11
|
+
* Designed to be used with Zod's superRefine() method.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const OrganizationSlug = z.string()
|
|
16
|
+
* .toLowerCase()
|
|
17
|
+
* .trim()
|
|
18
|
+
* .superRefine(validateSlug)
|
|
19
|
+
* .describe("Organization slug");
|
|
20
|
+
*
|
|
21
|
+
* const TeamSlug = z.string()
|
|
22
|
+
* .toLowerCase()
|
|
23
|
+
* .trim()
|
|
24
|
+
* .superRefine(validateSlug)
|
|
25
|
+
* .describe("Team slug");
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function validateSlug(val: string, ctx: z.RefinementCtx): void;
|
|
29
|
+
/**
|
|
30
|
+
* Validates a parameter that can be either a slug or numeric ID.
|
|
31
|
+
* Designed to be used with Zod's superRefine() method.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const ProjectSlugOrId = z.string()
|
|
36
|
+
* .toLowerCase()
|
|
37
|
+
* .trim()
|
|
38
|
+
* .superRefine(validateSlugOrId)
|
|
39
|
+
* .describe("Project slug or numeric ID");
|
|
40
|
+
*
|
|
41
|
+
* const IssueSlugOrId = z.string()
|
|
42
|
+
* .trim()
|
|
43
|
+
* .superRefine(validateSlugOrId)
|
|
44
|
+
* .describe("Issue slug or numeric ID");
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function validateSlugOrId(val: string, ctx: z.RefinementCtx): void;
|
|
48
|
+
//# sourceMappingURL=slug-validation.d.ts.map
|
|
49
|
+
//#endregion
|
|
50
|
+
export { isNumericId, validateSlug, validateSlugOrId };
|
|
51
|
+
//# sourceMappingURL=slug-validation.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug-validation.d.cts","names":[],"sources":["../../src/utils/slug-validation.ts"],"sourcesContent":[],"mappings":";;;;;;;iBAsBgB,WAAA;;;;;;;;;;;;;;;;;;;;iBA6BA,YAAA,mBAA+B,CAAA,CAAE;;;;;;;;;;;;;;;;;;;iBA+CjC,gBAAA,mBAAmC,CAAA,CAAE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/slug-validation.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Helper to check if a string is a numeric ID.
|
|
7
|
+
*/
|
|
8
|
+
declare function isNumericId(value: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Validates a slug to prevent path traversal and injection attacks.
|
|
11
|
+
* Designed to be used with Zod's superRefine() method.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const OrganizationSlug = z.string()
|
|
16
|
+
* .toLowerCase()
|
|
17
|
+
* .trim()
|
|
18
|
+
* .superRefine(validateSlug)
|
|
19
|
+
* .describe("Organization slug");
|
|
20
|
+
*
|
|
21
|
+
* const TeamSlug = z.string()
|
|
22
|
+
* .toLowerCase()
|
|
23
|
+
* .trim()
|
|
24
|
+
* .superRefine(validateSlug)
|
|
25
|
+
* .describe("Team slug");
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function validateSlug(val: string, ctx: z.RefinementCtx): void;
|
|
29
|
+
/**
|
|
30
|
+
* Validates a parameter that can be either a slug or numeric ID.
|
|
31
|
+
* Designed to be used with Zod's superRefine() method.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const ProjectSlugOrId = z.string()
|
|
36
|
+
* .toLowerCase()
|
|
37
|
+
* .trim()
|
|
38
|
+
* .superRefine(validateSlugOrId)
|
|
39
|
+
* .describe("Project slug or numeric ID");
|
|
40
|
+
*
|
|
41
|
+
* const IssueSlugOrId = z.string()
|
|
42
|
+
* .trim()
|
|
43
|
+
* .superRefine(validateSlugOrId)
|
|
44
|
+
* .describe("Issue slug or numeric ID");
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function validateSlugOrId(val: string, ctx: z.RefinementCtx): void;
|
|
48
|
+
//# sourceMappingURL=slug-validation.d.ts.map
|
|
49
|
+
//#endregion
|
|
50
|
+
export { isNumericId, validateSlug, validateSlugOrId };
|
|
51
|
+
//# sourceMappingURL=slug-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug-validation.d.ts","names":[],"sources":["../../src/utils/slug-validation.ts"],"sourcesContent":[],"mappings":";;;;;;;iBAsBgB,WAAA;;;;;;;;;;;;;;;;;;;;iBA6BA,YAAA,mBAA+B,CAAA,CAAE;;;;;;;;;;;;;;;;;;;iBA+CjC,gBAAA,mBAAmC,CAAA,CAAE"}
|
package/dist/utils/url-utils.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
declare function isSentryHost(host: string): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Generates a Sentry issue URL.
|
|
10
|
-
* @param host The Sentry host
|
|
10
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
11
11
|
* @param organizationSlug Organization identifier
|
|
12
12
|
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
13
13
|
* @returns The complete issue URL
|
|
@@ -15,16 +15,16 @@ declare function isSentryHost(host: string): boolean;
|
|
|
15
15
|
declare function getIssueUrl(host: string, organizationSlug: string, issueId: string): string;
|
|
16
16
|
/**
|
|
17
17
|
* Generates a Sentry issues search URL.
|
|
18
|
-
* @param host The Sentry host
|
|
18
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
19
19
|
* @param organizationSlug Organization identifier
|
|
20
20
|
* @param query Optional search query
|
|
21
21
|
* @param projectSlugOrId Optional project slug or ID
|
|
22
22
|
* @returns The complete issues search URL
|
|
23
23
|
*/
|
|
24
|
-
declare function getIssuesSearchUrl(host: string, organizationSlug: string, query?: string, projectSlugOrId?: string): string;
|
|
24
|
+
declare function getIssuesSearchUrl(host: string, organizationSlug: string, query?: string | null, projectSlugOrId?: string): string;
|
|
25
25
|
/**
|
|
26
26
|
* Generates a Sentry trace URL for performance investigation.
|
|
27
|
-
* @param host The Sentry host
|
|
27
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
28
28
|
* @param organizationSlug Organization identifier
|
|
29
29
|
* @param traceId Trace identifier
|
|
30
30
|
* @returns The complete trace URL
|
|
@@ -32,7 +32,7 @@ declare function getIssuesSearchUrl(host: string, organizationSlug: string, quer
|
|
|
32
32
|
declare function getTraceUrl(host: string, organizationSlug: string, traceId: string): string;
|
|
33
33
|
/**
|
|
34
34
|
* Generates a Sentry events explorer URL.
|
|
35
|
-
* @param host The Sentry host
|
|
35
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
36
36
|
* @param organizationSlug Organization identifier
|
|
37
37
|
* @param query Search query
|
|
38
38
|
* @param dataset Dataset type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-utils.d.cts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AAKA;AAWA;
|
|
1
|
+
{"version":3,"file":"url-utils.d.cts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AAKA;AAWA;AAsBA;AAqCA;AAwBgB,iBA9FA,YAAA,CA8FoB,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AAiFpC;AAgBA;AAgBA;AAYA;;;;iBAhNgB,WAAA;;;;;;;;;iBAsBA,kBAAA;;;;;;;;iBAqCA,WAAA;;;;;;;;;;;iBAwBA,oBAAA;;;;;;;iBAiFA,kBAAA;;;;;;;;iBAgBA,yBAAA;;;;;;;;iBAgBA,wBAAA;;;;;;;;;iBAYA,+BAAA"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
declare function isSentryHost(host: string): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* Generates a Sentry issue URL.
|
|
10
|
-
* @param host The Sentry host
|
|
10
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
11
11
|
* @param organizationSlug Organization identifier
|
|
12
12
|
* @param issueId Issue identifier (e.g., "PROJECT-123")
|
|
13
13
|
* @returns The complete issue URL
|
|
@@ -15,16 +15,16 @@ declare function isSentryHost(host: string): boolean;
|
|
|
15
15
|
declare function getIssueUrl(host: string, organizationSlug: string, issueId: string): string;
|
|
16
16
|
/**
|
|
17
17
|
* Generates a Sentry issues search URL.
|
|
18
|
-
* @param host The Sentry host
|
|
18
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
19
19
|
* @param organizationSlug Organization identifier
|
|
20
20
|
* @param query Optional search query
|
|
21
21
|
* @param projectSlugOrId Optional project slug or ID
|
|
22
22
|
* @returns The complete issues search URL
|
|
23
23
|
*/
|
|
24
|
-
declare function getIssuesSearchUrl(host: string, organizationSlug: string, query?: string, projectSlugOrId?: string): string;
|
|
24
|
+
declare function getIssuesSearchUrl(host: string, organizationSlug: string, query?: string | null, projectSlugOrId?: string): string;
|
|
25
25
|
/**
|
|
26
26
|
* Generates a Sentry trace URL for performance investigation.
|
|
27
|
-
* @param host The Sentry host
|
|
27
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
28
28
|
* @param organizationSlug Organization identifier
|
|
29
29
|
* @param traceId Trace identifier
|
|
30
30
|
* @returns The complete trace URL
|
|
@@ -32,7 +32,7 @@ declare function getIssuesSearchUrl(host: string, organizationSlug: string, quer
|
|
|
32
32
|
declare function getTraceUrl(host: string, organizationSlug: string, traceId: string): string;
|
|
33
33
|
/**
|
|
34
34
|
* Generates a Sentry events explorer URL.
|
|
35
|
-
* @param host The Sentry host
|
|
35
|
+
* @param host The Sentry host (may include regional subdomain for API access)
|
|
36
36
|
* @param organizationSlug Organization identifier
|
|
37
37
|
* @param query Search query
|
|
38
38
|
* @param dataset Dataset type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-utils.d.ts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AAKA;AAWA;
|
|
1
|
+
{"version":3,"file":"url-utils.d.ts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AAKA;AAWA;AAsBA;AAqCA;AAwBgB,iBA9FA,YAAA,CA8FoB,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;AAiFpC;AAgBA;AAgBA;AAYA;;;;iBAhNgB,WAAA;;;;;;;;;iBAsBA,kBAAA;;;;;;;;iBAqCA,WAAA;;;;;;;;;;;iBAwBA,oBAAA;;;;;;;iBAiFA,kBAAA;;;;;;;;iBAgBA,yBAAA;;;;;;;;iBAgBA,wBAAA;;;;;;;;;iBAYA,+BAAA"}
|
package/dist/utils/url-utils.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows } from "../url-utils-
|
|
1
|
+
import { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows } from "../url-utils-DF8NBCyH.js";
|
|
2
2
|
|
|
3
3
|
export { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
+
const require_errors = require('./errors-BtJEw2Z-.cjs');
|
|
3
|
+
const require_errors$1 = require('./errors-CNTY5dED.cjs');
|
|
4
|
+
const require_logging = require('./logging-rvUPDKax.cjs');
|
|
5
|
+
const zod = require_chunk.__toESM(require("zod"));
|
|
6
|
+
const ai = require_chunk.__toESM(require("ai"));
|
|
7
|
+
|
|
8
|
+
//#region src/internal/agents/tools/utils.ts
|
|
9
|
+
/**
|
|
10
|
+
* Standard response schema for all embedded agent tools.
|
|
11
|
+
* Tools return either an error message or the result data, never both.
|
|
12
|
+
*/
|
|
13
|
+
const AgentToolResponseSchema = zod.z.object({
|
|
14
|
+
error: zod.z.string().optional().describe("Error message if the operation failed"),
|
|
15
|
+
result: zod.z.unknown().optional().describe("The successful result data")
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* Handles errors from agent tool execution and returns appropriate error messages.
|
|
19
|
+
*
|
|
20
|
+
* SECURITY: Only returns trusted error messages to prevent prompt injection.
|
|
21
|
+
* We trust: Sentry API errors, our own UserInputError messages, and system templates.
|
|
22
|
+
*/
|
|
23
|
+
function handleAgentToolError(error) {
|
|
24
|
+
if (error instanceof require_errors.UserInputError) {
|
|
25
|
+
console.warn(`[agent-tool] ${error.message}`);
|
|
26
|
+
return { error: `Input Error: ${error.message}. You may be able to resolve this by addressing the concern and trying again.` };
|
|
27
|
+
}
|
|
28
|
+
if (error instanceof require_errors$1.ApiClientError) {
|
|
29
|
+
const message = error.toUserMessage();
|
|
30
|
+
console.warn(`[agent-tool] ${message}`);
|
|
31
|
+
return { error: `Input Error: ${message}. You may be able to resolve this by addressing the concern and trying again.` };
|
|
32
|
+
}
|
|
33
|
+
if (error instanceof require_errors$1.ApiServerError) {
|
|
34
|
+
const eventId$1 = require_logging.logError(error);
|
|
35
|
+
const statusText = error.status ? ` (${error.status})` : "";
|
|
36
|
+
return { error: `Server Error${statusText}: ${error.message}. Event ID: ${eventId$1}. This is a system error that cannot be resolved by retrying.` };
|
|
37
|
+
}
|
|
38
|
+
const eventId = require_logging.logError(error);
|
|
39
|
+
return { error: `System Error: An unexpected error occurred. Event ID: ${eventId}. This is a system error that cannot be resolved by retrying.` };
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Creates an embedded agent tool with automatic error handling and schema wrapping.
|
|
43
|
+
*
|
|
44
|
+
* This wrapper:
|
|
45
|
+
* - Maintains the same API as the AI SDK's tool() function
|
|
46
|
+
* - Automatically wraps the result schema with error/result structure
|
|
47
|
+
* - Handles all error types and returns them as structured responses
|
|
48
|
+
* - Preserves type inference from the original tool implementation
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* export function createMyTool(apiService: SentryApiService) {
|
|
53
|
+
* return agentTool({
|
|
54
|
+
* description: "My tool description",
|
|
55
|
+
* parameters: z.object({ param: z.string() }),
|
|
56
|
+
* execute: async (params) => {
|
|
57
|
+
* // Tool implementation that might throw errors
|
|
58
|
+
* const result = await apiService.someMethod(params);
|
|
59
|
+
* return result; // Original return type preserved
|
|
60
|
+
* }
|
|
61
|
+
* });
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
function agentTool(config) {
|
|
66
|
+
return (0, ai.tool)({
|
|
67
|
+
description: config.description,
|
|
68
|
+
parameters: config.parameters,
|
|
69
|
+
execute: async (params) => {
|
|
70
|
+
try {
|
|
71
|
+
const result = await config.execute(params);
|
|
72
|
+
return { result };
|
|
73
|
+
} catch (error) {
|
|
74
|
+
return handleAgentToolError(error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
Object.defineProperty(exports, 'agentTool', {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () {
|
|
84
|
+
return agentTool;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=utils-BOPpU4-H.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-BOPpU4-H.cjs","names":["error: unknown","UserInputError","ApiClientError","ApiServerError","eventId","config: {\n description: string;\n parameters: z.ZodSchema<TParameters>;\n execute: (params: TParameters) => Promise<TResult>;\n}","params: TParameters"],"sources":["../src/internal/agents/tools/utils.ts"],"sourcesContent":["import { tool } from \"ai\";\nimport { z } from \"zod\";\nimport { UserInputError } from \"../../../errors\";\nimport { ApiClientError, ApiServerError } from \"../../../api-client\";\nimport { logError } from \"../../../logging\";\n\n/**\n * Standard response schema for all embedded agent tools.\n * Tools return either an error message or the result data, never both.\n */\nconst AgentToolResponseSchema = z.object({\n error: z\n .string()\n .optional()\n .describe(\"Error message if the operation failed\"),\n result: z.unknown().optional().describe(\"The successful result data\"),\n});\n\nexport type AgentToolResponse<T = unknown> = {\n error?: string;\n result?: T;\n};\n\n/**\n * Handles errors from agent tool execution and returns appropriate error messages.\n *\n * SECURITY: Only returns trusted error messages to prevent prompt injection.\n * We trust: Sentry API errors, our own UserInputError messages, and system templates.\n */\nfunction handleAgentToolError<T>(error: unknown): AgentToolResponse<T> {\n if (error instanceof UserInputError) {\n // Log UserInputError for Sentry logging (as log, not exception)\n console.warn(`[agent-tool] ${error.message}`);\n return {\n error: `Input Error: ${error.message}. You may be able to resolve this by addressing the concern and trying again.`,\n };\n }\n\n if (error instanceof ApiClientError) {\n // Log ApiClientError for Sentry logging (as log, not exception)\n const message = error.toUserMessage();\n console.warn(`[agent-tool] ${message}`);\n return {\n error: `Input Error: ${message}. You may be able to resolve this by addressing the concern and trying again.`,\n };\n }\n\n if (error instanceof ApiServerError) {\n // Log server errors to Sentry and get Event ID\n const eventId = logError(error);\n const statusText = error.status ? ` (${error.status})` : \"\";\n return {\n error: `Server Error${statusText}: ${error.message}. Event ID: ${eventId}. This is a system error that cannot be resolved by retrying.`,\n };\n }\n\n // Log unexpected errors to Sentry and return safe generic message\n // SECURITY: Don't return untrusted error messages that could enable prompt injection\n const eventId = logError(error);\n return {\n error: `System Error: An unexpected error occurred. Event ID: ${eventId}. This is a system error that cannot be resolved by retrying.`,\n };\n}\n\n/**\n * Creates an embedded agent tool with automatic error handling and schema wrapping.\n *\n * This wrapper:\n * - Maintains the same API as the AI SDK's tool() function\n * - Automatically wraps the result schema with error/result structure\n * - Handles all error types and returns them as structured responses\n * - Preserves type inference from the original tool implementation\n *\n * @example\n * ```typescript\n * export function createMyTool(apiService: SentryApiService) {\n * return agentTool({\n * description: \"My tool description\",\n * parameters: z.object({ param: z.string() }),\n * execute: async (params) => {\n * // Tool implementation that might throw errors\n * const result = await apiService.someMethod(params);\n * return result; // Original return type preserved\n * }\n * });\n * }\n * ```\n */\nexport function agentTool<TParameters, TResult>(config: {\n description: string;\n parameters: z.ZodSchema<TParameters>;\n execute: (params: TParameters) => Promise<TResult>;\n}) {\n // Infer the result type from the execute function's return type\n type InferredResult = Awaited<ReturnType<typeof config.execute>>;\n\n return tool({\n description: config.description,\n parameters: config.parameters,\n execute: async (\n params: TParameters,\n ): Promise<AgentToolResponse<InferredResult>> => {\n try {\n const result = await config.execute(params);\n return { result };\n } catch (error) {\n return handleAgentToolError<InferredResult>(error);\n }\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,0BAA0B,MAAE,OAAO;CACvC,OAAO,MACJ,QAAQ,CACR,UAAU,CACV,SAAS,wCAAwC;CACpD,QAAQ,MAAE,SAAS,CAAC,UAAU,CAAC,SAAS,6BAA6B;AACtE,EAAC;;;;;;;AAaF,SAAS,qBAAwBA,OAAsC;AACrE,KAAI,iBAAiBC,+BAAgB;AAEnC,UAAQ,MAAM,eAAe,MAAM,UAAU;AAC7C,SAAO,EACL,QAAQ,eAAe,MAAM,QAAQ,+EACtC;CACF;AAED,KAAI,iBAAiBC,iCAAgB;EAEnC,MAAM,UAAU,MAAM,eAAe;AACrC,UAAQ,MAAM,eAAe,UAAU;AACvC,SAAO,EACL,QAAQ,eAAe,QAAQ,+EAChC;CACF;AAED,KAAI,iBAAiBC,iCAAgB;EAEnC,MAAMC,YAAU,yBAAS,MAAM;EAC/B,MAAM,aAAa,MAAM,UAAU,IAAI,MAAM,OAAO,KAAK;AACzD,SAAO,EACL,QAAQ,cAAc,WAAW,IAAI,MAAM,QAAQ,cAAcA,UAAQ,+DAC1E;CACF;CAID,MAAM,UAAU,yBAAS,MAAM;AAC/B,QAAO,EACL,QAAQ,wDAAwD,QAAQ,+DACzE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;AA0BD,SAAgB,UAAgCC,QAI7C;AAID,QAAO,aAAK;EACV,aAAa,OAAO;EACpB,YAAY,OAAO;EACnB,SAAS,OACPC,WAC+C;AAC/C,OAAI;IACF,MAAM,SAAS,MAAM,OAAO,QAAQ,OAAO;AAC3C,WAAO,EAAE,OAAQ;GAClB,SAAQ,OAAO;AACd,WAAO,qBAAqC,MAAM;GACnD;EACF;CACF,EAAC;AACH"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { agentTool } from "./utils-K1XhlGf4.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/tools/search-events/utils.ts
|
|
5
|
+
function getStringValue(event, key, defaultValue = "") {
|
|
6
|
+
const value = event[key];
|
|
7
|
+
return typeof value === "string" ? value : defaultValue;
|
|
8
|
+
}
|
|
9
|
+
function getNumberValue(event, key) {
|
|
10
|
+
const value = event[key];
|
|
11
|
+
return typeof value === "number" ? value : void 0;
|
|
12
|
+
}
|
|
13
|
+
function isAggregateQuery(fields) {
|
|
14
|
+
return fields.some((field) => field.includes("(") && field.includes(")"));
|
|
15
|
+
}
|
|
16
|
+
async function fetchCustomAttributes(apiService, organizationSlug, dataset, projectId, timeParams) {
|
|
17
|
+
const customAttributes = {};
|
|
18
|
+
const fieldTypes = {};
|
|
19
|
+
if (dataset === "errors") {
|
|
20
|
+
const tagsResponse = await apiService.listTags({
|
|
21
|
+
organizationSlug,
|
|
22
|
+
dataset: "events",
|
|
23
|
+
project: projectId,
|
|
24
|
+
statsPeriod: "14d",
|
|
25
|
+
useCache: true,
|
|
26
|
+
useFlagsBackend: true
|
|
27
|
+
});
|
|
28
|
+
for (const tag of tagsResponse) if (tag.key && !tag.key.startsWith("sentry:")) customAttributes[tag.key] = tag.name || tag.key;
|
|
29
|
+
} else {
|
|
30
|
+
const itemType = dataset === "logs" ? "logs" : "spans";
|
|
31
|
+
const attributesResponse = await apiService.listTraceItemAttributes({
|
|
32
|
+
organizationSlug,
|
|
33
|
+
itemType,
|
|
34
|
+
project: projectId,
|
|
35
|
+
statsPeriod: "14d"
|
|
36
|
+
});
|
|
37
|
+
for (const attr of attributesResponse) if (attr.key && !attr.key.startsWith("sentry:")) {
|
|
38
|
+
customAttributes[attr.key] = attr.name || attr.key;
|
|
39
|
+
if (attr.type && (attr.type === "string" || attr.type === "number")) fieldTypes[attr.key] = attr.type;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
attributes: customAttributes,
|
|
44
|
+
fieldTypes
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a tool for the agent to query available attributes by dataset
|
|
49
|
+
* The tool is pre-bound with the API service and organization configured for the appropriate region
|
|
50
|
+
*/
|
|
51
|
+
function createDatasetAttributesTool(options) {
|
|
52
|
+
const { apiService, organizationSlug, projectId } = options;
|
|
53
|
+
return agentTool({
|
|
54
|
+
description: "Query available attributes and fields for a specific Sentry dataset to understand what data is available",
|
|
55
|
+
parameters: z.object({ dataset: z.enum([
|
|
56
|
+
"spans",
|
|
57
|
+
"errors",
|
|
58
|
+
"logs"
|
|
59
|
+
]).describe("The dataset to query attributes for") }),
|
|
60
|
+
execute: async ({ dataset }) => {
|
|
61
|
+
const { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS, NUMERIC_FIELDS } = await import("./tools/search-events/config.js");
|
|
62
|
+
const { attributes: customAttributes, fieldTypes } = await fetchCustomAttributes(apiService, organizationSlug, dataset, projectId);
|
|
63
|
+
const allFields = {
|
|
64
|
+
...BASE_COMMON_FIELDS,
|
|
65
|
+
...DATASET_FIELDS[dataset],
|
|
66
|
+
...customAttributes
|
|
67
|
+
};
|
|
68
|
+
const recommendedFields = RECOMMENDED_FIELDS[dataset];
|
|
69
|
+
const allFieldTypes = { ...fieldTypes };
|
|
70
|
+
const staticNumericFields = NUMERIC_FIELDS[dataset] || /* @__PURE__ */ new Set();
|
|
71
|
+
for (const field of staticNumericFields) allFieldTypes[field] = "number";
|
|
72
|
+
return `Dataset: ${dataset}
|
|
73
|
+
|
|
74
|
+
Available Fields (${Object.keys(allFields).length} total):
|
|
75
|
+
${Object.entries(allFields).slice(0, 50).map(([key, desc]) => `- ${key}: ${desc}`).join("\n")}
|
|
76
|
+
${Object.keys(allFields).length > 50 ? `\n... and ${Object.keys(allFields).length - 50} more fields` : ""}
|
|
77
|
+
|
|
78
|
+
Recommended Fields for ${dataset}:
|
|
79
|
+
${recommendedFields.basic.map((f) => `- ${f}`).join("\n")}
|
|
80
|
+
|
|
81
|
+
Field Types (CRITICAL for aggregate functions):
|
|
82
|
+
${Object.entries(allFieldTypes).slice(0, 30).map(([key, type]) => `- ${key}: ${type}`).join("\n")}
|
|
83
|
+
${Object.keys(allFieldTypes).length > 30 ? `\n... and ${Object.keys(allFieldTypes).length - 30} more fields` : ""}
|
|
84
|
+
|
|
85
|
+
IMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.
|
|
86
|
+
|
|
87
|
+
Use this information to construct appropriate queries for the ${dataset} dataset.`;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { createDatasetAttributesTool, fetchCustomAttributes, getNumberValue, getStringValue, isAggregateQuery };
|
|
94
|
+
//# sourceMappingURL=utils-CP4vAzfv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-CP4vAzfv.js","names":["event: FlexibleEventData","key: string","fields: string[]","apiService: SentryApiService","organizationSlug: string","dataset: \"errors\" | \"logs\" | \"spans\"","projectId?: string","timeParams?: { statsPeriod?: string; start?: string; end?: string }","customAttributes: Record<string, string>","fieldTypes: Record<string, \"string\" | \"number\">","options: {\n apiService: SentryApiService;\n organizationSlug: string;\n projectId?: string;\n}"],"sources":["../src/tools/search-events/utils.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { SentryApiService } from \"../../api-client\";\nimport { agentTool } from \"../../internal/agents/tools/utils\";\n\n// Type for flexible event data that can contain any fields\nexport type FlexibleEventData = Record<string, unknown>;\n\n// Helper to safely get a string value from event data\nexport function getStringValue(\n event: FlexibleEventData,\n key: string,\n defaultValue = \"\",\n): string {\n const value = event[key];\n return typeof value === \"string\" ? value : defaultValue;\n}\n\n// Helper to safely get a number value from event data\nexport function getNumberValue(\n event: FlexibleEventData,\n key: string,\n): number | undefined {\n const value = event[key];\n return typeof value === \"number\" ? value : undefined;\n}\n\n// Helper to check if fields contain aggregate functions\nexport function isAggregateQuery(fields: string[]): boolean {\n return fields.some((field) => field.includes(\"(\") && field.includes(\")\"));\n}\n\n// Helper function to fetch custom attributes for a dataset\nexport async function fetchCustomAttributes(\n apiService: SentryApiService,\n organizationSlug: string,\n dataset: \"errors\" | \"logs\" | \"spans\",\n projectId?: string,\n timeParams?: { statsPeriod?: string; start?: string; end?: string },\n): Promise<{\n attributes: Record<string, string>;\n fieldTypes: Record<string, \"string\" | \"number\">;\n}> {\n const customAttributes: Record<string, string> = {};\n const fieldTypes: Record<string, \"string\" | \"number\"> = {};\n\n if (dataset === \"errors\") {\n // TODO: For errors dataset, we currently need to use the old listTags API\n // This will be updated in the future to use the new trace-items attributes API\n const tagsResponse = await apiService.listTags({\n organizationSlug,\n dataset: \"events\",\n project: projectId,\n statsPeriod: \"14d\",\n useCache: true,\n useFlagsBackend: true,\n });\n\n for (const tag of tagsResponse) {\n if (tag.key && !tag.key.startsWith(\"sentry:\")) {\n customAttributes[tag.key] = tag.name || tag.key;\n }\n }\n } else {\n // For logs and spans datasets, use the trace-items attributes endpoint\n const itemType = dataset === \"logs\" ? \"logs\" : \"spans\";\n const attributesResponse = await apiService.listTraceItemAttributes({\n organizationSlug,\n itemType,\n project: projectId,\n statsPeriod: \"14d\",\n });\n\n for (const attr of attributesResponse) {\n if (attr.key && !attr.key.startsWith(\"sentry:\")) {\n customAttributes[attr.key] = attr.name || attr.key;\n // Track field type from the attribute response with validation\n if (attr.type && (attr.type === \"string\" || attr.type === \"number\")) {\n fieldTypes[attr.key] = attr.type;\n }\n }\n }\n }\n\n return { attributes: customAttributes, fieldTypes };\n}\n\n/**\n * Create a tool for the agent to query available attributes by dataset\n * The tool is pre-bound with the API service and organization configured for the appropriate region\n */\nexport function createDatasetAttributesTool(options: {\n apiService: SentryApiService;\n organizationSlug: string;\n projectId?: string;\n}) {\n const { apiService, organizationSlug, projectId } = options;\n return agentTool({\n description:\n \"Query available attributes and fields for a specific Sentry dataset to understand what data is available\",\n parameters: z.object({\n dataset: z\n .enum([\"spans\", \"errors\", \"logs\"])\n .describe(\"The dataset to query attributes for\"),\n }),\n execute: async ({ dataset }) => {\n const {\n BASE_COMMON_FIELDS,\n DATASET_FIELDS,\n RECOMMENDED_FIELDS,\n NUMERIC_FIELDS,\n } = await import(\"./config\");\n\n // Get custom attributes for this dataset\n // IMPORTANT: Let ALL errors bubble up to wrapAgentToolExecute\n // UserInputError will be converted to error string for the AI agent\n // Other errors will bubble up to be captured by Sentry\n const { attributes: customAttributes, fieldTypes } =\n await fetchCustomAttributes(\n apiService,\n organizationSlug,\n dataset,\n projectId,\n );\n\n // Combine all available fields\n const allFields = {\n ...BASE_COMMON_FIELDS,\n ...DATASET_FIELDS[dataset],\n ...customAttributes,\n };\n\n const recommendedFields = RECOMMENDED_FIELDS[dataset];\n\n // Combine field types from both static config and dynamic API\n const allFieldTypes = { ...fieldTypes };\n const staticNumericFields = NUMERIC_FIELDS[dataset] || new Set();\n for (const field of staticNumericFields) {\n allFieldTypes[field] = \"number\";\n }\n\n return `Dataset: ${dataset}\n\nAvailable Fields (${Object.keys(allFields).length} total):\n${Object.entries(allFields)\n .slice(0, 50) // Limit to first 50 to avoid overwhelming the agent\n .map(([key, desc]) => `- ${key}: ${desc}`)\n .join(\"\\n\")}\n${Object.keys(allFields).length > 50 ? `\\n... and ${Object.keys(allFields).length - 50} more fields` : \"\"}\n\nRecommended Fields for ${dataset}:\n${recommendedFields.basic.map((f) => `- ${f}`).join(\"\\n\")}\n\nField Types (CRITICAL for aggregate functions):\n${Object.entries(allFieldTypes)\n .slice(0, 30) // Show more field types since this is critical for validation\n .map(([key, type]) => `- ${key}: ${type}`)\n .join(\"\\n\")}\n${Object.keys(allFieldTypes).length > 30 ? `\\n... and ${Object.keys(allFieldTypes).length - 30} more fields` : \"\"}\n\nIMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.\n\nUse this information to construct appropriate queries for the ${dataset} dataset.`;\n },\n });\n}\n"],"mappings":";;;;AAQA,SAAgB,eACdA,OACAC,KACA,eAAe,IACP;CACR,MAAM,QAAQ,MAAM;AACpB,eAAc,UAAU,WAAW,QAAQ;AAC5C;AAGD,SAAgB,eACdD,OACAC,KACoB;CACpB,MAAM,QAAQ,MAAM;AACpB,eAAc,UAAU,WAAW;AACpC;AAGD,SAAgB,iBAAiBC,QAA2B;AAC1D,QAAO,OAAO,KAAK,CAAC,UAAU,MAAM,SAAS,IAAI,IAAI,MAAM,SAAS,IAAI,CAAC;AAC1E;AAGD,eAAsB,sBACpBC,YACAC,kBACAC,SACAC,WACAC,YAIC;CACD,MAAMC,mBAA2C,CAAE;CACnD,MAAMC,aAAkD,CAAE;AAE1D,KAAI,YAAY,UAAU;EAGxB,MAAM,eAAe,MAAM,WAAW,SAAS;GAC7C;GACA,SAAS;GACT,SAAS;GACT,aAAa;GACb,UAAU;GACV,iBAAiB;EAClB,EAAC;AAEF,OAAK,MAAM,OAAO,aAChB,KAAI,IAAI,QAAQ,IAAI,IAAI,WAAW,UAAU,CAC3C,kBAAiB,IAAI,OAAO,IAAI,QAAQ,IAAI;CAGjD,OAAM;EAEL,MAAM,WAAW,YAAY,SAAS,SAAS;EAC/C,MAAM,qBAAqB,MAAM,WAAW,wBAAwB;GAClE;GACA;GACA,SAAS;GACT,aAAa;EACd,EAAC;AAEF,OAAK,MAAM,QAAQ,mBACjB,KAAI,KAAK,QAAQ,KAAK,IAAI,WAAW,UAAU,EAAE;AAC/C,oBAAiB,KAAK,OAAO,KAAK,QAAQ,KAAK;AAE/C,OAAI,KAAK,SAAS,KAAK,SAAS,YAAY,KAAK,SAAS,UACxD,YAAW,KAAK,OAAO,KAAK;EAE/B;CAEJ;AAED,QAAO;EAAE,YAAY;EAAkB;CAAY;AACpD;;;;;AAMD,SAAgB,4BAA4BC,SAIzC;CACD,MAAM,EAAE,YAAY,kBAAkB,WAAW,GAAG;AACpD,QAAO,UAAU;EACf,aACE;EACF,YAAY,EAAE,OAAO,EACnB,SAAS,EACN,KAAK;GAAC;GAAS;GAAU;EAAO,EAAC,CACjC,SAAS,sCAAsC,CACnD,EAAC;EACF,SAAS,OAAO,EAAE,SAAS,KAAK;GAC9B,MAAM,EACJ,oBACA,gBACA,oBACA,gBACD,GAAG,MAAM,OAAO;GAMjB,MAAM,EAAE,YAAY,kBAAkB,YAAY,GAChD,MAAM,sBACJ,YACA,kBACA,SACA,UACD;GAGH,MAAM,YAAY;IAChB,GAAG;IACH,GAAG,eAAe;IAClB,GAAG;GACJ;GAED,MAAM,oBAAoB,mBAAmB;GAG7C,MAAM,gBAAgB,EAAE,GAAG,WAAY;GACvC,MAAM,sBAAsB,eAAe,4BAAY,IAAI;AAC3D,QAAK,MAAM,SAAS,oBAClB,eAAc,SAAS;AAGzB,WAAQ,WAAW,QAAQ;;oBAEb,OAAO,KAAK,UAAU,CAAC,OAAO;EAChD,OAAO,QAAQ,UAAU,CACxB,MAAM,GAAG,GAAG,CACZ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,IAAI,IAAI,IAAI,OAAO,CACzC,KAAK,KAAK,CAAC;EACZ,OAAO,KAAK,UAAU,CAAC,SAAS,MAAM,YAAY,OAAO,KAAK,UAAU,CAAC,SAAS,GAAG,gBAAgB,GAAG;;yBAEjF,QAAQ;EAC/B,kBAAkB,MAAM,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;;;EAGxD,OAAO,QAAQ,cAAc,CAC5B,MAAM,GAAG,GAAG,CACZ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,IAAI,IAAI,IAAI,OAAO,CACzC,KAAK,KAAK,CAAC;EACZ,OAAO,KAAK,cAAc,CAAC,SAAS,MAAM,YAAY,OAAO,KAAK,cAAc,CAAC,SAAS,GAAG,gBAAgB,GAAG;;;;gEAIlD,QAAQ;EACnE;CACF,EAAC;AACH"}
|