@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
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/permissions.ts
|
|
3
|
+
/**
|
|
4
|
+
* Scope hierarchy - higher scopes include lower ones
|
|
5
|
+
*/
|
|
6
|
+
const SCOPE_HIERARCHY = {
|
|
7
|
+
"org:read": new Set(["org:read"]),
|
|
8
|
+
"org:write": new Set(["org:read", "org:write"]),
|
|
9
|
+
"org:admin": new Set([
|
|
10
|
+
"org:read",
|
|
11
|
+
"org:write",
|
|
12
|
+
"org:admin"
|
|
13
|
+
]),
|
|
14
|
+
"project:read": new Set(["project:read"]),
|
|
15
|
+
"project:write": new Set(["project:read", "project:write"]),
|
|
16
|
+
"project:admin": new Set([
|
|
17
|
+
"project:read",
|
|
18
|
+
"project:write",
|
|
19
|
+
"project:admin"
|
|
20
|
+
]),
|
|
21
|
+
"team:read": new Set(["team:read"]),
|
|
22
|
+
"team:write": new Set(["team:read", "team:write"]),
|
|
23
|
+
"team:admin": new Set([
|
|
24
|
+
"team:read",
|
|
25
|
+
"team:write",
|
|
26
|
+
"team:admin"
|
|
27
|
+
]),
|
|
28
|
+
"member:read": new Set(["member:read"]),
|
|
29
|
+
"member:write": new Set(["member:read", "member:write"]),
|
|
30
|
+
"member:admin": new Set([
|
|
31
|
+
"member:read",
|
|
32
|
+
"member:write",
|
|
33
|
+
"member:admin"
|
|
34
|
+
]),
|
|
35
|
+
"event:read": new Set(["event:read"]),
|
|
36
|
+
"event:write": new Set(["event:read", "event:write"]),
|
|
37
|
+
"event:admin": new Set([
|
|
38
|
+
"event:read",
|
|
39
|
+
"event:write",
|
|
40
|
+
"event:admin"
|
|
41
|
+
]),
|
|
42
|
+
"project:releases": new Set(["project:releases"])
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* All available scopes as a readonly list
|
|
46
|
+
*/
|
|
47
|
+
function getAvailableScopes() {
|
|
48
|
+
return Object.keys(SCOPE_HIERARCHY);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* All scopes available in the server, generated from the permission hierarchy.
|
|
52
|
+
* Exported here to keep scope consumers lightweight and avoid importing other
|
|
53
|
+
* unrelated constants.
|
|
54
|
+
*/
|
|
55
|
+
const ALL_SCOPES = getAvailableScopes();
|
|
56
|
+
const ALL_SCOPES_SET = new Set(ALL_SCOPES);
|
|
57
|
+
/**
|
|
58
|
+
* Expand a set of granted scopes to include all implied scopes
|
|
59
|
+
*/
|
|
60
|
+
function expandScopes(grantedScopes) {
|
|
61
|
+
const expandedScopes = /* @__PURE__ */ new Set();
|
|
62
|
+
for (const scope of grantedScopes) {
|
|
63
|
+
const implied = SCOPE_HIERARCHY[scope];
|
|
64
|
+
for (const s of implied) expandedScopes.add(s);
|
|
65
|
+
}
|
|
66
|
+
return expandedScopes;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Human-readable descriptions of scopes
|
|
70
|
+
*/
|
|
71
|
+
const SCOPE_DESCRIPTIONS = {
|
|
72
|
+
"org:read": "View organization details",
|
|
73
|
+
"org:write": "Modify organization details",
|
|
74
|
+
"org:admin": "Delete organizations",
|
|
75
|
+
"project:read": "View project information",
|
|
76
|
+
"project:write": "Create and modify projects",
|
|
77
|
+
"project:admin": "Delete projects",
|
|
78
|
+
"team:read": "View team information",
|
|
79
|
+
"team:write": "Create and modify teams",
|
|
80
|
+
"team:admin": "Delete teams",
|
|
81
|
+
"member:read": "View member information",
|
|
82
|
+
"member:write": "Create and modify members",
|
|
83
|
+
"member:admin": "Delete members",
|
|
84
|
+
"event:read": "View events and issues",
|
|
85
|
+
"event:write": "Update and manage issues",
|
|
86
|
+
"event:admin": "Delete issues",
|
|
87
|
+
"project:releases": "Access release information"
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Check if a set of scopes satisfies the required scopes
|
|
91
|
+
*/
|
|
92
|
+
function hasRequiredScopes(grantedScopes, requiredScopes) {
|
|
93
|
+
const expandedScopes = expandScopes(grantedScopes);
|
|
94
|
+
return requiredScopes.every((scope) => expandedScopes.has(scope));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check if a tool is allowed based on granted scopes
|
|
98
|
+
*/
|
|
99
|
+
function isToolAllowed(requiredScopes, grantedScopes) {
|
|
100
|
+
if (!requiredScopes || requiredScopes.length === 0) return true;
|
|
101
|
+
return hasRequiredScopes(grantedScopes, requiredScopes);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Parse scopes from a comma-separated string
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* Parse scopes from a comma-separated string.
|
|
108
|
+
* - Filters out invalid entries
|
|
109
|
+
* - Logs a console.warn listing any invalid values
|
|
110
|
+
*/
|
|
111
|
+
/**
|
|
112
|
+
* Parse scopes from an array of strings.
|
|
113
|
+
* - Filters out invalid entries
|
|
114
|
+
* - Logs a console.warn listing any invalid values
|
|
115
|
+
*/
|
|
116
|
+
/**
|
|
117
|
+
* Generic scope parser: accepts a comma-separated string or an array.
|
|
118
|
+
* Returns both valid and invalid tokens. No logging.
|
|
119
|
+
*/
|
|
120
|
+
function parseScopes(input) {
|
|
121
|
+
let tokens = [];
|
|
122
|
+
if (typeof input === "string") tokens = input.split(",");
|
|
123
|
+
else if (Array.isArray(input)) tokens = input.map((v) => typeof v === "string" ? v : "");
|
|
124
|
+
const valid = /* @__PURE__ */ new Set();
|
|
125
|
+
const invalid = [];
|
|
126
|
+
for (const raw of tokens.map((s) => s.trim()).filter(Boolean)) if (ALL_SCOPES_SET.has(raw)) valid.add(raw);
|
|
127
|
+
else invalid.push(raw);
|
|
128
|
+
return {
|
|
129
|
+
valid,
|
|
130
|
+
invalid
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Strict validation helper for scope strings supplied via flags/env.
|
|
135
|
+
* Returns both valid and invalid entries without side effects.
|
|
136
|
+
*/
|
|
137
|
+
/**
|
|
138
|
+
* Resolve final scopes from optional override/additive sets and provided defaults.
|
|
139
|
+
* - If override is provided, it replaces defaults and is expanded
|
|
140
|
+
* - Else if add is provided, it unions with defaults and is expanded
|
|
141
|
+
* - Else returns undefined to indicate default handling upstream
|
|
142
|
+
*/
|
|
143
|
+
function resolveScopes(options) {
|
|
144
|
+
const { override, add, defaults } = options;
|
|
145
|
+
if (override) return expandScopes(override);
|
|
146
|
+
if (add) {
|
|
147
|
+
const base = new Set(defaults);
|
|
148
|
+
for (const s of add) base.add(s);
|
|
149
|
+
return expandScopes(base);
|
|
150
|
+
}
|
|
151
|
+
return void 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
155
|
+
Object.defineProperty(exports, 'ALL_SCOPES', {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () {
|
|
158
|
+
return ALL_SCOPES;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, 'ALL_SCOPES_SET', {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () {
|
|
164
|
+
return ALL_SCOPES_SET;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, 'SCOPE_DESCRIPTIONS', {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () {
|
|
170
|
+
return SCOPE_DESCRIPTIONS;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, 'expandScopes', {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function () {
|
|
176
|
+
return expandScopes;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(exports, 'getAvailableScopes', {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: function () {
|
|
182
|
+
return getAvailableScopes;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, 'hasRequiredScopes', {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function () {
|
|
188
|
+
return hasRequiredScopes;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(exports, 'isToolAllowed', {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: function () {
|
|
194
|
+
return isToolAllowed;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
Object.defineProperty(exports, 'parseScopes', {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function () {
|
|
200
|
+
return parseScopes;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
Object.defineProperty(exports, 'resolveScopes', {
|
|
204
|
+
enumerable: true,
|
|
205
|
+
get: function () {
|
|
206
|
+
return resolveScopes;
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
//# sourceMappingURL=permissions-DuDYuCjy.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions-DuDYuCjy.cjs","names":["SCOPE_HIERARCHY: Record<Scope, Set<Scope>>","ALL_SCOPES: ReadonlyArray<Scope>","grantedScopes: Set<Scope>","SCOPE_DESCRIPTIONS: Record<Scope, string>","requiredScopes: Scope[]","requiredScopes: Scope[] | undefined","input: unknown","tokens: string[]","invalid: string[]","options: {\n override?: Set<Scope>;\n add?: Set<Scope>;\n defaults: ReadonlyArray<Scope>;\n}"],"sources":["../src/permissions.ts"],"sourcesContent":["/**\n * OAuth-style scope system for Sentry MCP Server\n *\n * Defines scopes for access control with hierarchical permissions.\n * Higher scopes include lower ones (e.g., write includes read).\n */\n\n/**\n * Available scopes in the MCP server\n * These align with Sentry's API scopes where possible\n */\nexport type Scope =\n | \"org:read\" // Read organization information\n | \"org:write\" // Write organization information (includes read)\n | \"org:admin\" // Admin organization (includes write and read)\n | \"project:read\" // Read project information\n | \"project:write\" // Create/update projects (includes read)\n | \"project:admin\" // Delete projects (includes write and read)\n | \"team:read\" // Read team information\n | \"team:write\" // Create/update teams (includes read)\n | \"team:admin\" // Delete teams (includes write and read)\n | \"member:read\" // Read member information\n | \"member:write\" // Create/update members (includes read)\n | \"member:admin\" // Delete members (includes write and read)\n | \"event:read\" // Read events and issues\n | \"event:write\" // Update issues (includes read)\n | \"event:admin\" // Delete issues (includes write and read)\n | \"project:releases\"; // Access release endpoints\n\n/**\n * Scope hierarchy - higher scopes include lower ones\n */\nconst SCOPE_HIERARCHY: Record<Scope, Set<Scope>> = {\n // Organization scopes\n \"org:read\": new Set([\"org:read\"]),\n \"org:write\": new Set([\"org:read\", \"org:write\"]),\n \"org:admin\": new Set([\"org:read\", \"org:write\", \"org:admin\"]),\n\n // Project scopes\n \"project:read\": new Set([\"project:read\"]),\n \"project:write\": new Set([\"project:read\", \"project:write\"]),\n \"project:admin\": new Set([\"project:read\", \"project:write\", \"project:admin\"]),\n\n // Team scopes\n \"team:read\": new Set([\"team:read\"]),\n \"team:write\": new Set([\"team:read\", \"team:write\"]),\n \"team:admin\": new Set([\"team:read\", \"team:write\", \"team:admin\"]),\n\n // Member scopes\n \"member:read\": new Set([\"member:read\"]),\n \"member:write\": new Set([\"member:read\", \"member:write\"]),\n \"member:admin\": new Set([\"member:read\", \"member:write\", \"member:admin\"]),\n\n // Event scopes\n \"event:read\": new Set([\"event:read\"]),\n \"event:write\": new Set([\"event:read\", \"event:write\"]),\n \"event:admin\": new Set([\"event:read\", \"event:write\", \"event:admin\"]),\n\n // Special scopes\n \"project:releases\": new Set([\"project:releases\"]),\n};\n\n/**\n * All available scopes as a readonly list\n */\nexport function getAvailableScopes(): ReadonlyArray<Scope> {\n return Object.keys(SCOPE_HIERARCHY) as ReadonlyArray<Scope>;\n}\n\n/**\n * All scopes available in the server, generated from the permission hierarchy.\n * Exported here to keep scope consumers lightweight and avoid importing other\n * unrelated constants.\n */\nexport const ALL_SCOPES: ReadonlyArray<Scope> = getAvailableScopes();\n\n// Fast lookup set for validations\nexport const ALL_SCOPES_SET = new Set<Scope>(ALL_SCOPES);\n\n/**\n * Expand a set of granted scopes to include all implied scopes\n */\nexport function expandScopes(grantedScopes: Set<Scope>): Set<Scope> {\n const expandedScopes = new Set<Scope>();\n\n for (const scope of grantedScopes) {\n const implied = SCOPE_HIERARCHY[scope];\n for (const s of implied) {\n expandedScopes.add(s);\n }\n }\n\n return expandedScopes;\n}\n\n/**\n * Human-readable descriptions of scopes\n */\nexport const SCOPE_DESCRIPTIONS: Record<Scope, string> = {\n \"org:read\": \"View organization details\",\n \"org:write\": \"Modify organization details\",\n \"org:admin\": \"Delete organizations\",\n \"project:read\": \"View project information\",\n \"project:write\": \"Create and modify projects\",\n \"project:admin\": \"Delete projects\",\n \"team:read\": \"View team information\",\n \"team:write\": \"Create and modify teams\",\n \"team:admin\": \"Delete teams\",\n \"member:read\": \"View member information\",\n \"member:write\": \"Create and modify members\",\n \"member:admin\": \"Delete members\",\n \"event:read\": \"View events and issues\",\n \"event:write\": \"Update and manage issues\",\n \"event:admin\": \"Delete issues\",\n \"project:releases\": \"Access release information\",\n};\n\n/**\n * Check if a set of scopes satisfies the required scopes\n */\nexport function hasRequiredScopes(\n grantedScopes: Set<Scope>,\n requiredScopes: Scope[],\n): boolean {\n // Expand granted scopes to include implied scopes\n const expandedScopes = expandScopes(grantedScopes);\n return requiredScopes.every((scope) => expandedScopes.has(scope));\n}\n\n/**\n * Check if a tool is allowed based on granted scopes\n */\nexport function isToolAllowed(\n requiredScopes: Scope[] | undefined,\n grantedScopes: Set<Scope>,\n): boolean {\n // If no scopes are required, tool is always allowed\n if (!requiredScopes || requiredScopes.length === 0) {\n return true;\n }\n\n return hasRequiredScopes(grantedScopes, requiredScopes);\n}\n\n/**\n * Parse scopes from a comma-separated string\n */\n/**\n * Parse scopes from a comma-separated string.\n * - Filters out invalid entries\n * - Logs a console.warn listing any invalid values\n */\n\n/**\n * Parse scopes from an array of strings.\n * - Filters out invalid entries\n * - Logs a console.warn listing any invalid values\n */\n\n/**\n * Generic scope parser: accepts a comma-separated string or an array.\n * Returns both valid and invalid tokens. No logging.\n */\nexport function parseScopes(input: unknown): {\n valid: Set<Scope>;\n invalid: string[];\n} {\n let tokens: string[] = [];\n if (typeof input === \"string\") {\n tokens = input.split(\",\");\n } else if (Array.isArray(input)) {\n tokens = input.map((v) => (typeof v === \"string\" ? v : \"\"));\n }\n\n const valid = new Set<Scope>();\n const invalid: string[] = [];\n for (const raw of tokens.map((s) => s.trim()).filter(Boolean)) {\n if (ALL_SCOPES_SET.has(raw as Scope)) {\n valid.add(raw as Scope);\n } else {\n invalid.push(raw);\n }\n }\n return { valid, invalid };\n}\n\n/**\n * Strict validation helper for scope strings supplied via flags/env.\n * Returns both valid and invalid entries without side effects.\n */\n// Deprecated: use parseScopes(scopesString)\n// export function validateScopes(scopesString: string): { valid: Set<Scope>; invalid: string[] } { ... }\n\n/**\n * Resolve final scopes from optional override/additive sets and provided defaults.\n * - If override is provided, it replaces defaults and is expanded\n * - Else if add is provided, it unions with defaults and is expanded\n * - Else returns undefined to indicate default handling upstream\n */\nexport function resolveScopes(options: {\n override?: Set<Scope>;\n add?: Set<Scope>;\n defaults: ReadonlyArray<Scope>;\n}): Set<Scope> | undefined {\n const { override, add, defaults } = options;\n if (override) {\n return expandScopes(override);\n }\n if (add) {\n const base = new Set<Scope>(defaults as ReadonlyArray<Scope>);\n for (const s of add) base.add(s);\n return expandScopes(base);\n }\n return undefined;\n}\n"],"mappings":";;;;;AAgCA,MAAMA,kBAA6C;CAEjD,YAAY,IAAI,IAAI,CAAC,UAAW;CAChC,aAAa,IAAI,IAAI,CAAC,YAAY,WAAY;CAC9C,aAAa,IAAI,IAAI;EAAC;EAAY;EAAa;CAAY;CAG3D,gBAAgB,IAAI,IAAI,CAAC,cAAe;CACxC,iBAAiB,IAAI,IAAI,CAAC,gBAAgB,eAAgB;CAC1D,iBAAiB,IAAI,IAAI;EAAC;EAAgB;EAAiB;CAAgB;CAG3E,aAAa,IAAI,IAAI,CAAC,WAAY;CAClC,cAAc,IAAI,IAAI,CAAC,aAAa,YAAa;CACjD,cAAc,IAAI,IAAI;EAAC;EAAa;EAAc;CAAa;CAG/D,eAAe,IAAI,IAAI,CAAC,aAAc;CACtC,gBAAgB,IAAI,IAAI,CAAC,eAAe,cAAe;CACvD,gBAAgB,IAAI,IAAI;EAAC;EAAe;EAAgB;CAAe;CAGvE,cAAc,IAAI,IAAI,CAAC,YAAa;CACpC,eAAe,IAAI,IAAI,CAAC,cAAc,aAAc;CACpD,eAAe,IAAI,IAAI;EAAC;EAAc;EAAe;CAAc;CAGnE,oBAAoB,IAAI,IAAI,CAAC,kBAAmB;AACjD;;;;AAKD,SAAgB,qBAA2C;AACzD,QAAO,OAAO,KAAK,gBAAgB;AACpC;;;;;;AAOD,MAAaC,aAAmC,oBAAoB;AAGpE,MAAa,iBAAiB,IAAI,IAAW;;;;AAK7C,SAAgB,aAAaC,eAAuC;CAClE,MAAM,iCAAiB,IAAI;AAE3B,MAAK,MAAM,SAAS,eAAe;EACjC,MAAM,UAAU,gBAAgB;AAChC,OAAK,MAAM,KAAK,QACd,gBAAe,IAAI,EAAE;CAExB;AAED,QAAO;AACR;;;;AAKD,MAAaC,qBAA4C;CACvD,YAAY;CACZ,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,iBAAiB;CACjB,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,gBAAgB;CAChB,cAAc;CACd,eAAe;CACf,eAAe;CACf,oBAAoB;AACrB;;;;AAKD,SAAgB,kBACdD,eACAE,gBACS;CAET,MAAM,iBAAiB,aAAa,cAAc;AAClD,QAAO,eAAe,MAAM,CAAC,UAAU,eAAe,IAAI,MAAM,CAAC;AAClE;;;;AAKD,SAAgB,cACdC,gBACAH,eACS;AAET,MAAK,kBAAkB,eAAe,WAAW,EAC/C,QAAO;AAGT,QAAO,kBAAkB,eAAe,eAAe;AACxD;;;;;;;;;;;;;;;;;;AAqBD,SAAgB,YAAYI,OAG1B;CACA,IAAIC,SAAmB,CAAE;AACzB,YAAW,UAAU,SACnB,UAAS,MAAM,MAAM,IAAI;UAChB,MAAM,QAAQ,MAAM,CAC7B,UAAS,MAAM,IAAI,CAAC,aAAc,MAAM,WAAW,IAAI,GAAI;CAG7D,MAAM,wBAAQ,IAAI;CAClB,MAAMC,UAAoB,CAAE;AAC5B,MAAK,MAAM,OAAO,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,OAAO,QAAQ,CAC3D,KAAI,eAAe,IAAI,IAAa,CAClC,OAAM,IAAI,IAAa;KAEvB,SAAQ,KAAK,IAAI;AAGrB,QAAO;EAAE;EAAO;CAAS;AAC1B;;;;;;;;;;;AAeD,SAAgB,cAAcC,SAIH;CACzB,MAAM,EAAE,UAAU,KAAK,UAAU,GAAG;AACpC,KAAI,SACF,QAAO,aAAa,SAAS;AAE/B,KAAI,KAAK;EACP,MAAM,OAAO,IAAI,IAAW;AAC5B,OAAK,MAAM,KAAK,IAAK,MAAK,IAAI,EAAE;AAChC,SAAO,aAAa,KAAK;CAC1B;AACD;AACD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const require_permissions = require('./permissions-DuDYuCjy.cjs');
|
|
2
|
+
|
|
3
|
+
exports.ALL_SCOPES = require_permissions.ALL_SCOPES;
|
|
4
|
+
exports.ALL_SCOPES_SET = require_permissions.ALL_SCOPES_SET;
|
|
5
|
+
exports.SCOPE_DESCRIPTIONS = require_permissions.SCOPE_DESCRIPTIONS;
|
|
6
|
+
exports.expandScopes = require_permissions.expandScopes;
|
|
7
|
+
exports.getAvailableScopes = require_permissions.getAvailableScopes;
|
|
8
|
+
exports.hasRequiredScopes = require_permissions.hasRequiredScopes;
|
|
9
|
+
exports.isToolAllowed = require_permissions.isToolAllowed;
|
|
10
|
+
exports.parseScopes = require_permissions.parseScopes;
|
|
11
|
+
exports.resolveScopes = require_permissions.resolveScopes;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, Scope, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes } from "./permissions-Cm5e34n2.cjs";
|
|
2
|
+
export { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, Scope, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, Scope, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes } from "./permissions-C-q0Y5bL.js";
|
|
2
|
+
export { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, Scope, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes } from "./permissions-DRdH39Fe.js";
|
|
2
|
+
|
|
3
|
+
export { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_schema = require('./schema-
|
|
2
|
+
const require_schema = require('./schema-BUBkkdUa.cjs');
|
|
3
3
|
const zod = require_chunk.__toESM(require("zod"));
|
|
4
4
|
|
|
5
5
|
//#region src/promptDefinitions.ts
|
|
@@ -34,4 +34,4 @@ Object.defineProperty(exports, 'PROMPT_DEFINITIONS', {
|
|
|
34
34
|
return PROMPT_DEFINITIONS;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
//# sourceMappingURL=promptDefinitions-
|
|
37
|
+
//# sourceMappingURL=promptDefinitions-02aQWFKD.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptDefinitions-
|
|
1
|
+
{"version":3,"file":"promptDefinitions-02aQWFKD.cjs","names":["ParamOrganizationSlug"],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["/**\n * Prompt definitions for the Sentry MCP server.\n *\n * Declarative definitions for all MCP prompts that provide multi-step workflows\n * and guided interactions with Sentry. Prompts orchestrate sequences of tool calls\n * with structured guidance for complex tasks.\n *\n * @example Prompt Definition Structure\n * ```typescript\n * {\n * name: \"prompt_name\" as const,\n * description: [\n * \"Brief prompt description and purpose.\",\n * \"Additional context about when to use this prompt.\",\n * ].join(\"\\n\"),\n * paramsSchema: {\n * organizationSlug: ParamOrganizationSlug,\n * optionalParam: ParamSchema.optional(),\n * },\n * }\n * ```\n */\nimport { z } from \"zod\";\nimport {\n ParamIssueShortId,\n ParamIssueUrl,\n ParamOrganizationSlug,\n} from \"./schema\";\n\n/**\n * All MCP prompt definitions for the Sentry server.\n *\n * Used by server.ts to register prompts with the MCP server and by prompts.ts\n * for implementation handlers. Each definition includes name, description, and\n * Zod parameter schema for multi-step workflows.\n */\nexport const PROMPT_DEFINITIONS = [\n {\n name: \"find_errors_in_file\" as const,\n description: [\n \"Use this prompt when you need to find errors in Sentry for a given file.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n filename: z.string().describe(\"The filename to search for errors in.\"),\n },\n },\n {\n name: \"fix_issue_with_seer\" as const,\n description: [\n \"Use this prompt when you need to fix an issue with Seer.\",\n \"You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n];\n"],"mappings":";;;;;;;;;;;;AAoCA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkBA;EAClB,UAAU,MAAE,QAAQ,CAAC,SAAS,wCAAwC;CACvE;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,qCAAsB,UAAU;EAClD,SAAS,iCAAkB,UAAU;EACrC,UAAU,6BAAc,UAAU;CACnC;AACF,CACF"}
|
|
@@ -13,7 +13,7 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
13
13
|
name: "find_errors_in_file";
|
|
14
14
|
description: string;
|
|
15
15
|
paramsSchema: {
|
|
16
|
-
organizationSlug: z.ZodString
|
|
16
|
+
organizationSlug: z.ZodEffects<z.ZodString, string, string>;
|
|
17
17
|
filename: z.ZodString;
|
|
18
18
|
issueId?: undefined;
|
|
19
19
|
issueUrl?: undefined;
|
|
@@ -22,7 +22,7 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
22
22
|
name: "fix_issue_with_seer";
|
|
23
23
|
description: string;
|
|
24
24
|
paramsSchema: {
|
|
25
|
-
organizationSlug: z.ZodOptional<z.ZodString
|
|
25
|
+
organizationSlug: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
26
26
|
issueId: z.ZodOptional<z.ZodString>;
|
|
27
27
|
issueUrl: z.ZodOptional<z.ZodString>;
|
|
28
28
|
filename?: undefined;
|
|
@@ -31,4 +31,4 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
31
31
|
//# sourceMappingURL=promptDefinitions.d.ts.map
|
|
32
32
|
//#endregion
|
|
33
33
|
export { PROMPT_DEFINITIONS };
|
|
34
|
-
//# sourceMappingURL=promptDefinitions-
|
|
34
|
+
//# sourceMappingURL=promptDefinitions-ImFNiWkX.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptDefinitions-ImFNiWkX.d.cts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAoCa;;;;mCAuBZ,CAAA,CAAA"}
|
|
@@ -13,7 +13,7 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
13
13
|
name: "find_errors_in_file";
|
|
14
14
|
description: string;
|
|
15
15
|
paramsSchema: {
|
|
16
|
-
organizationSlug: z.ZodString
|
|
16
|
+
organizationSlug: z.ZodEffects<z.ZodString, string, string>;
|
|
17
17
|
filename: z.ZodString;
|
|
18
18
|
issueId?: undefined;
|
|
19
19
|
issueUrl?: undefined;
|
|
@@ -22,7 +22,7 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
22
22
|
name: "fix_issue_with_seer";
|
|
23
23
|
description: string;
|
|
24
24
|
paramsSchema: {
|
|
25
|
-
organizationSlug: z.ZodOptional<z.ZodString
|
|
25
|
+
organizationSlug: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
26
26
|
issueId: z.ZodOptional<z.ZodString>;
|
|
27
27
|
issueUrl: z.ZodOptional<z.ZodString>;
|
|
28
28
|
filename?: undefined;
|
|
@@ -31,4 +31,4 @@ declare const PROMPT_DEFINITIONS: ({
|
|
|
31
31
|
//# sourceMappingURL=promptDefinitions.d.ts.map
|
|
32
32
|
//#endregion
|
|
33
33
|
export { PROMPT_DEFINITIONS };
|
|
34
|
-
//# sourceMappingURL=promptDefinitions-
|
|
34
|
+
//# sourceMappingURL=promptDefinitions-Y-mt2_IM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptDefinitions-Y-mt2_IM.d.ts","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAoCa;;;;mCAuBZ,CAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug } from "./schema-
|
|
1
|
+
import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug } from "./schema-DPJO5nkQ.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/promptDefinitions.ts
|
|
@@ -28,4 +28,4 @@ const PROMPT_DEFINITIONS = [{
|
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { PROMPT_DEFINITIONS };
|
|
31
|
-
//# sourceMappingURL=promptDefinitions-
|
|
31
|
+
//# sourceMappingURL=promptDefinitions-wR6u6ZJE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptDefinitions-
|
|
1
|
+
{"version":3,"file":"promptDefinitions-wR6u6ZJE.js","names":[],"sources":["../src/promptDefinitions.ts"],"sourcesContent":["/**\n * Prompt definitions for the Sentry MCP server.\n *\n * Declarative definitions for all MCP prompts that provide multi-step workflows\n * and guided interactions with Sentry. Prompts orchestrate sequences of tool calls\n * with structured guidance for complex tasks.\n *\n * @example Prompt Definition Structure\n * ```typescript\n * {\n * name: \"prompt_name\" as const,\n * description: [\n * \"Brief prompt description and purpose.\",\n * \"Additional context about when to use this prompt.\",\n * ].join(\"\\n\"),\n * paramsSchema: {\n * organizationSlug: ParamOrganizationSlug,\n * optionalParam: ParamSchema.optional(),\n * },\n * }\n * ```\n */\nimport { z } from \"zod\";\nimport {\n ParamIssueShortId,\n ParamIssueUrl,\n ParamOrganizationSlug,\n} from \"./schema\";\n\n/**\n * All MCP prompt definitions for the Sentry server.\n *\n * Used by server.ts to register prompts with the MCP server and by prompts.ts\n * for implementation handlers. Each definition includes name, description, and\n * Zod parameter schema for multi-step workflows.\n */\nexport const PROMPT_DEFINITIONS = [\n {\n name: \"find_errors_in_file\" as const,\n description: [\n \"Use this prompt when you need to find errors in Sentry for a given file.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug,\n filename: z.string().describe(\"The filename to search for errors in.\"),\n },\n },\n {\n name: \"fix_issue_with_seer\" as const,\n description: [\n \"Use this prompt when you need to fix an issue with Seer.\",\n \"You can pass in either an `issueId` and `organizationSlug`, or an `issueUrl`.\",\n ].join(\"\\n\"),\n paramsSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n },\n];\n"],"mappings":";;;;;;;;;;;AAoCA,MAAa,qBAAqB,CAChC;CACE,MAAM;CACN,aAAa,CACX,0EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB;EAClB,UAAU,EAAE,QAAQ,CAAC,SAAS,wCAAwC;CACvE;AACF,GACD;CACE,MAAM;CACN,aAAa,CACX,4DACA,+EACD,EAAC,KAAK,KAAK;CACZ,cAAc;EACZ,kBAAkB,sBAAsB,UAAU;EAClD,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;CACnC;AACF,CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
require('./constants-
|
|
2
|
-
require('./
|
|
3
|
-
|
|
1
|
+
require('./constants-DJrjLmh5.cjs');
|
|
2
|
+
require('./slug-validation-DMk8Dyuh.cjs');
|
|
3
|
+
require('./schema-BUBkkdUa.cjs');
|
|
4
|
+
const require_promptDefinitions = require('./promptDefinitions-02aQWFKD.cjs');
|
|
4
5
|
|
|
5
6
|
exports.PROMPT_DEFINITIONS = require_promptDefinitions.PROMPT_DEFINITIONS;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PROMPT_DEFINITIONS } from "./promptDefinitions-
|
|
1
|
+
import { PROMPT_DEFINITIONS } from "./promptDefinitions-ImFNiWkX.cjs";
|
|
2
2
|
export { PROMPT_DEFINITIONS };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PROMPT_DEFINITIONS } from "./promptDefinitions-
|
|
1
|
+
import { PROMPT_DEFINITIONS } from "./promptDefinitions-Y-mt2_IM.js";
|
|
2
2
|
export { PROMPT_DEFINITIONS };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./constants-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import "./constants-BPM_OWt0.js";
|
|
2
|
+
import "./slug-validation-58wajHeL.js";
|
|
3
|
+
import "./schema-DPJO5nkQ.js";
|
|
4
|
+
import { PROMPT_DEFINITIONS } from "./promptDefinitions-wR6u6ZJE.js";
|
|
4
5
|
|
|
5
6
|
export { PROMPT_DEFINITIONS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts-
|
|
1
|
+
{"version":3,"file":"prompts-BwZJaywH.cjs","names":["issueMessage: string","UserInputError"],"sources":["../src/prompts.ts"],"sourcesContent":["/**\n * Prompt implementation handlers for the Sentry MCP server.\n *\n * Contains runtime implementations for all MCP prompts defined in `promptDefinitions.ts`.\n * Each handler generates context-aware instructions that guide LLMs through\n * complex multi-step workflows involving Sentry operations.\n *\n * @example Basic Handler Pattern\n * ```typescript\n * prompt_name: async (context, params) => {\n * const instructions = [\n * \"Primary objective and context\",\n * \"\",\n * \"1. First step with specific tool call\",\n * \"2. Second step with conditional logic\",\n * \"3. Final step with recommendations\",\n * ];\n * return instructions.join(\"\\n\");\n * },\n * ```\n */\nimport { UserInputError } from \"./errors\";\nimport type { PromptHandlers } from \"./types\";\n\nexport const PROMPT_HANDLERS = {\n find_errors_in_file: async (context, { organizationSlug, filename }) =>\n [\n `I want to find errors in Sentry, within the organization ${organizationSlug}, for the file ${filename}`,\n \"\",\n \"You should use the tool `search_events` with a natural language query to find errors in Sentry.\",\n \"\",\n `For example: \\`search_events(organizationSlug='${organizationSlug}', naturalLanguageQuery='errors in file ${filename}')\\``,\n \"\",\n \"If the filename is ambiguous, such as something like `index.ts`, and in most cases, you should include its direct parent.\",\n \"For example: if the file is `app/utils/index.ts`, you should search for `errors in file utils/index.ts` or `errors in file app/utils/index.ts` depending on if the file is actually part of the applications source path.\",\n ].join(\"\\n\"),\n fix_issue_with_seer: async (\n context,\n { organizationSlug, issueId, issueUrl },\n ) => {\n let issueMessage: string;\n if (issueUrl) {\n issueMessage = `The Sentry issue is ${issueUrl}`;\n } else if (organizationSlug && issueId) {\n issueMessage = `The Sentry issue is ${issueId} in the organization ${organizationSlug}`;\n } else {\n throw new UserInputError(\n \"Either issueUrl or organizationSlug and issueId must be provided\",\n );\n }\n return [\n `I want to use Seer to fix an issue in Sentry.`,\n \"\",\n issueMessage,\n \"\",\n \"1. Call the tool `analyze_issue_with_seer` to analyze the issue and get fix recommendations.\",\n \"2. The tool will automatically check for existing analysis or start a new one if needed.\",\n \"3. Wait for the analysis to complete (typically 30-60 seconds).\",\n \"4. Review the root cause analysis and suggested fixes.\",\n \"5. Help me apply the fix to my application, if you are able to. Think carefully when doing this.\",\n ].join(\"\\n\");\n },\n} satisfies PromptHandlers;\n"],"mappings":";;;AAwBA,MAAa,kBAAkB;CAC7B,qBAAqB,OAAO,SAAS,EAAE,kBAAkB,UAAU,KACjE;GACG,2DAA2D,iBAAiB,iBAAiB;EAC9F;EACA;EACA;GACC,iDAAiD,iBAAiB,0CAA0C,SAAS;EACtH;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACd,qBAAqB,OACnB,SACA,EAAE,kBAAkB,SAAS,UAAU,KACpC;EACH,IAAIA;AACJ,MAAI,SACF,iBAAgB,sBAAsB;WAC7B,oBAAoB,QAC7B,iBAAgB,sBAAsB,QAAQ,uBAAuB;MAErE,OAAM,IAAIC,8BACR;AAGJ,SAAO;IACJ;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;CACb;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts-
|
|
1
|
+
{"version":3,"file":"prompts-DCJ0XraB.js","names":["issueMessage: string"],"sources":["../src/prompts.ts"],"sourcesContent":["/**\n * Prompt implementation handlers for the Sentry MCP server.\n *\n * Contains runtime implementations for all MCP prompts defined in `promptDefinitions.ts`.\n * Each handler generates context-aware instructions that guide LLMs through\n * complex multi-step workflows involving Sentry operations.\n *\n * @example Basic Handler Pattern\n * ```typescript\n * prompt_name: async (context, params) => {\n * const instructions = [\n * \"Primary objective and context\",\n * \"\",\n * \"1. First step with specific tool call\",\n * \"2. Second step with conditional logic\",\n * \"3. Final step with recommendations\",\n * ];\n * return instructions.join(\"\\n\");\n * },\n * ```\n */\nimport { UserInputError } from \"./errors\";\nimport type { PromptHandlers } from \"./types\";\n\nexport const PROMPT_HANDLERS = {\n find_errors_in_file: async (context, { organizationSlug, filename }) =>\n [\n `I want to find errors in Sentry, within the organization ${organizationSlug}, for the file ${filename}`,\n \"\",\n \"You should use the tool `search_events` with a natural language query to find errors in Sentry.\",\n \"\",\n `For example: \\`search_events(organizationSlug='${organizationSlug}', naturalLanguageQuery='errors in file ${filename}')\\``,\n \"\",\n \"If the filename is ambiguous, such as something like `index.ts`, and in most cases, you should include its direct parent.\",\n \"For example: if the file is `app/utils/index.ts`, you should search for `errors in file utils/index.ts` or `errors in file app/utils/index.ts` depending on if the file is actually part of the applications source path.\",\n ].join(\"\\n\"),\n fix_issue_with_seer: async (\n context,\n { organizationSlug, issueId, issueUrl },\n ) => {\n let issueMessage: string;\n if (issueUrl) {\n issueMessage = `The Sentry issue is ${issueUrl}`;\n } else if (organizationSlug && issueId) {\n issueMessage = `The Sentry issue is ${issueId} in the organization ${organizationSlug}`;\n } else {\n throw new UserInputError(\n \"Either issueUrl or organizationSlug and issueId must be provided\",\n );\n }\n return [\n `I want to use Seer to fix an issue in Sentry.`,\n \"\",\n issueMessage,\n \"\",\n \"1. Call the tool `analyze_issue_with_seer` to analyze the issue and get fix recommendations.\",\n \"2. The tool will automatically check for existing analysis or start a new one if needed.\",\n \"3. Wait for the analysis to complete (typically 30-60 seconds).\",\n \"4. Review the root cause analysis and suggested fixes.\",\n \"5. Help me apply the fix to my application, if you are able to. Think carefully when doing this.\",\n ].join(\"\\n\");\n },\n} satisfies PromptHandlers;\n"],"mappings":";;;AAwBA,MAAa,kBAAkB;CAC7B,qBAAqB,OAAO,SAAS,EAAE,kBAAkB,UAAU,KACjE;GACG,2DAA2D,iBAAiB,iBAAiB;EAC9F;EACA;EACA;GACC,iDAAiD,iBAAiB,0CAA0C,SAAS;EACtH;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACd,qBAAqB,OACnB,SACA,EAAE,kBAAkB,SAAS,UAAU,KACpC;EACH,IAAIA;AACJ,MAAI,SACF,iBAAgB,sBAAsB;WAC7B,oBAAoB,QAC7B,iBAAgB,sBAAsB,QAAQ,uBAAuB;MAErE,OAAM,IAAI,eACR;AAGJ,SAAO;IACJ;GACD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,EAAC,KAAK,KAAK;CACb;AACF"}
|
package/dist/prompts.cjs
CHANGED
package/dist/prompts.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
1
|
+
import "./permissions-Cm5e34n2.cjs";
|
|
2
|
+
import "./promptDefinitions-ImFNiWkX.cjs";
|
|
3
|
+
import { ServerContext } from "./types-Dj36Sq2V.cjs";
|
|
3
4
|
|
|
4
5
|
//#region src/prompts.d.ts
|
|
5
6
|
declare const PROMPT_HANDLERS: {
|
package/dist/prompts.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.cts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.cts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa;iCAsCa;;;EAAA;;;;IAtCb,QAAA,CAAA,EAAA,OAsCa;EAAA,CAAA,EAAA,UAAA,CAAA,MAAA,CAAA;EAAA,mBAAA,EAAA,CAAA,OAAA,eAAA,EAAA;IAAA,gBAAA;IAAA,OAAA;IAAA;GAAA,EAAA"}
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
1
|
+
import "./permissions-C-q0Y5bL.js";
|
|
2
|
+
import "./promptDefinitions-Y-mt2_IM.js";
|
|
3
|
+
import { ServerContext } from "./types-m-t7jx2f.js";
|
|
3
4
|
|
|
4
5
|
//#region src/prompts.d.ts
|
|
5
6
|
declare const PROMPT_HANDLERS: {
|
package/dist/prompts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","names":[],"sources":["../src/prompts.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa;iCAsCa;;;EAAA;;;;IAtCb,QAAA,CAAA,EAAA,OAsCa;EAAA,CAAA,EAAA,UAAA,CAAA,MAAA,CAAA;EAAA,mBAAA,EAAA,CAAA,OAAA,eAAA,EAAA;IAAA,gBAAA;IAAA,OAAA;IAAA;GAAA,EAAA"}
|
package/dist/prompts.js
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DEFAULT_SCOPES } from "./constants-BPM_OWt0.js";
|
|
2
|
+
import { validateAndParseSentryUrlThrows, validateSentryHostThrows } from "./url-utils-DF8NBCyH.js";
|
|
3
|
+
import { ALL_SCOPES, parseScopes, resolveScopes } from "./permissions-DRdH39Fe.js";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/resolve.ts
|
|
6
|
+
function formatInvalid(invalid, envName) {
|
|
7
|
+
const where = envName ? `${envName} provided` : "Invalid scopes provided";
|
|
8
|
+
return `Error: ${where}: ${invalid.join(", ")}\nAvailable scopes: ${ALL_SCOPES.join(", ")}`;
|
|
9
|
+
}
|
|
10
|
+
function finalize(input) {
|
|
11
|
+
if (!input.accessToken) throw new Error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.");
|
|
12
|
+
let sentryHost = "sentry.io";
|
|
13
|
+
if (input.url) sentryHost = validateAndParseSentryUrlThrows(input.url);
|
|
14
|
+
else if (input.host) {
|
|
15
|
+
validateSentryHostThrows(input.host);
|
|
16
|
+
sentryHost = input.host;
|
|
17
|
+
}
|
|
18
|
+
let finalScopes = void 0;
|
|
19
|
+
if (input.allScopes) finalScopes = new Set(ALL_SCOPES);
|
|
20
|
+
else if (input.scopes || input.addScopes) {
|
|
21
|
+
if (input.scopes) {
|
|
22
|
+
const { valid, invalid } = parseScopes(input.scopes);
|
|
23
|
+
if (invalid.length > 0) throw new Error(formatInvalid(invalid));
|
|
24
|
+
if (valid.size === 0) throw new Error("Error: Invalid scopes provided. No valid scopes found.");
|
|
25
|
+
finalScopes = resolveScopes({
|
|
26
|
+
override: valid,
|
|
27
|
+
defaults: DEFAULT_SCOPES
|
|
28
|
+
});
|
|
29
|
+
} else if (input.addScopes) {
|
|
30
|
+
const { valid, invalid } = parseScopes(input.addScopes);
|
|
31
|
+
if (invalid.length > 0) throw new Error(formatInvalid(invalid));
|
|
32
|
+
if (valid.size === 0) throw new Error("Error: Invalid additional scopes provided. No valid scopes found.");
|
|
33
|
+
finalScopes = resolveScopes({
|
|
34
|
+
add: valid,
|
|
35
|
+
defaults: DEFAULT_SCOPES
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
accessToken: input.accessToken,
|
|
41
|
+
sentryHost,
|
|
42
|
+
mcpUrl: input.mcpUrl,
|
|
43
|
+
sentryDsn: input.sentryDsn,
|
|
44
|
+
finalScopes,
|
|
45
|
+
organizationSlug: input.organizationSlug,
|
|
46
|
+
projectSlug: input.projectSlug
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { finalize, formatInvalid };
|
|
52
|
+
//# sourceMappingURL=resolve-B_Fq13Dk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-B_Fq13Dk.js","names":["invalid: string[]","envName?: string","input: MergedArgs","finalScopes: Set<Scope> | undefined"],"sources":["../src/cli/resolve.ts"],"sourcesContent":["import {\n ALL_SCOPES,\n parseScopes,\n resolveScopes,\n type Scope,\n} from \"../permissions\";\nimport { DEFAULT_SCOPES } from \"../constants\";\nimport {\n validateAndParseSentryUrlThrows,\n validateSentryHostThrows,\n} from \"../utils/url-utils\";\nimport type { MergedArgs, ResolvedConfig } from \"./types\";\n\nexport function formatInvalid(invalid: string[], envName?: string): string {\n const where = envName ? `${envName} provided` : \"Invalid scopes provided\";\n return `Error: ${where}: ${invalid.join(\", \")}\\nAvailable scopes: ${ALL_SCOPES.join(\", \")}`;\n}\n\nexport function finalize(input: MergedArgs): ResolvedConfig {\n // Access token required\n if (!input.accessToken) {\n throw new Error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n // Determine host from url/host with validation\n let sentryHost = \"sentry.io\";\n if (input.url) {\n sentryHost = validateAndParseSentryUrlThrows(input.url);\n } else if (input.host) {\n validateSentryHostThrows(input.host);\n sentryHost = input.host;\n }\n\n // Scopes resolution\n let finalScopes: Set<Scope> | undefined = undefined;\n if (input.allScopes) {\n finalScopes = new Set<Scope>(ALL_SCOPES as ReadonlyArray<Scope>);\n } else if (input.scopes || input.addScopes) {\n // Strict validation: any invalid token is an error\n if (input.scopes) {\n const { valid, invalid } = parseScopes(input.scopes);\n if (invalid.length > 0) {\n throw new Error(formatInvalid(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\n \"Error: Invalid scopes provided. No valid scopes found.\",\n );\n }\n finalScopes = resolveScopes({\n override: valid,\n defaults: DEFAULT_SCOPES,\n });\n } else if (input.addScopes) {\n const { valid, invalid } = parseScopes(input.addScopes);\n if (invalid.length > 0) {\n throw new Error(formatInvalid(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\n \"Error: Invalid additional scopes provided. No valid scopes found.\",\n );\n }\n finalScopes = resolveScopes({ add: valid, defaults: DEFAULT_SCOPES });\n }\n }\n\n return {\n accessToken: input.accessToken,\n sentryHost,\n mcpUrl: input.mcpUrl,\n sentryDsn: input.sentryDsn,\n finalScopes,\n organizationSlug: input.organizationSlug,\n projectSlug: input.projectSlug,\n };\n}\n"],"mappings":";;;;;AAaA,SAAgB,cAAcA,SAAmBC,SAA0B;CACzE,MAAM,QAAQ,aAAa,QAAQ,aAAa;AAChD,SAAQ,SAAS,MAAM,IAAI,QAAQ,KAAK,KAAK,CAAC,sBAAsB,WAAW,KAAK,KAAK;AAC1F;AAED,SAAgB,SAASC,OAAmC;AAE1D,MAAK,MAAM,YACT,OAAM,IAAI,MACR;CAKJ,IAAI,aAAa;AACjB,KAAI,MAAM,IACR,cAAa,gCAAgC,MAAM,IAAI;UAC9C,MAAM,MAAM;AACrB,2BAAyB,MAAM,KAAK;AACpC,eAAa,MAAM;CACpB;CAGD,IAAIC;AACJ,KAAI,MAAM,UACR,eAAc,IAAI,IAAW;UACpB,MAAM,UAAU,MAAM,WAE/B;MAAI,MAAM,QAAQ;GAChB,MAAM,EAAE,OAAO,SAAS,GAAG,YAAY,MAAM,OAAO;AACpD,OAAI,QAAQ,SAAS,EACnB,OAAM,IAAI,MAAM,cAAc,QAAQ;AAExC,OAAI,MAAM,SAAS,EACjB,OAAM,IAAI,MACR;AAGJ,iBAAc,cAAc;IAC1B,UAAU;IACV,UAAU;GACX,EAAC;EACH,WAAU,MAAM,WAAW;GAC1B,MAAM,EAAE,OAAO,SAAS,GAAG,YAAY,MAAM,UAAU;AACvD,OAAI,QAAQ,SAAS,EACnB,OAAM,IAAI,MAAM,cAAc,QAAQ;AAExC,OAAI,MAAM,SAAS,EACjB,OAAM,IAAI,MACR;AAGJ,iBAAc,cAAc;IAAE,KAAK;IAAO,UAAU;GAAgB,EAAC;EACtE;;AAGH,QAAO;EACL,aAAa,MAAM;EACnB;EACA,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB;EACA,kBAAkB,MAAM;EACxB,aAAa,MAAM;CACpB;AACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const require_constants = require('./constants-DJrjLmh5.cjs');
|
|
2
|
+
const require_url_utils = require('./url-utils-0OheI87i.cjs');
|
|
3
|
+
const require_permissions = require('./permissions-DuDYuCjy.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/cli/resolve.ts
|
|
6
|
+
function formatInvalid(invalid, envName) {
|
|
7
|
+
const where = envName ? `${envName} provided` : "Invalid scopes provided";
|
|
8
|
+
return `Error: ${where}: ${invalid.join(", ")}\nAvailable scopes: ${require_permissions.ALL_SCOPES.join(", ")}`;
|
|
9
|
+
}
|
|
10
|
+
function finalize(input) {
|
|
11
|
+
if (!input.accessToken) throw new Error("Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.");
|
|
12
|
+
let sentryHost = "sentry.io";
|
|
13
|
+
if (input.url) sentryHost = require_url_utils.validateAndParseSentryUrlThrows(input.url);
|
|
14
|
+
else if (input.host) {
|
|
15
|
+
require_url_utils.validateSentryHostThrows(input.host);
|
|
16
|
+
sentryHost = input.host;
|
|
17
|
+
}
|
|
18
|
+
let finalScopes = void 0;
|
|
19
|
+
if (input.allScopes) finalScopes = new Set(require_permissions.ALL_SCOPES);
|
|
20
|
+
else if (input.scopes || input.addScopes) {
|
|
21
|
+
if (input.scopes) {
|
|
22
|
+
const { valid, invalid } = require_permissions.parseScopes(input.scopes);
|
|
23
|
+
if (invalid.length > 0) throw new Error(formatInvalid(invalid));
|
|
24
|
+
if (valid.size === 0) throw new Error("Error: Invalid scopes provided. No valid scopes found.");
|
|
25
|
+
finalScopes = require_permissions.resolveScopes({
|
|
26
|
+
override: valid,
|
|
27
|
+
defaults: require_constants.DEFAULT_SCOPES
|
|
28
|
+
});
|
|
29
|
+
} else if (input.addScopes) {
|
|
30
|
+
const { valid, invalid } = require_permissions.parseScopes(input.addScopes);
|
|
31
|
+
if (invalid.length > 0) throw new Error(formatInvalid(invalid));
|
|
32
|
+
if (valid.size === 0) throw new Error("Error: Invalid additional scopes provided. No valid scopes found.");
|
|
33
|
+
finalScopes = require_permissions.resolveScopes({
|
|
34
|
+
add: valid,
|
|
35
|
+
defaults: require_constants.DEFAULT_SCOPES
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
accessToken: input.accessToken,
|
|
41
|
+
sentryHost,
|
|
42
|
+
mcpUrl: input.mcpUrl,
|
|
43
|
+
sentryDsn: input.sentryDsn,
|
|
44
|
+
finalScopes,
|
|
45
|
+
organizationSlug: input.organizationSlug,
|
|
46
|
+
projectSlug: input.projectSlug
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
Object.defineProperty(exports, 'finalize', {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return finalize;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, 'formatInvalid', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return formatInvalid;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=resolve-CAtC1wN-.cjs.map
|