@sentry/mcp-server 0.23.0 → 0.23.1
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/dist/{chunk-CUT6urMc.cjs → chunk-DoeelZqw.cjs} +21 -0
- package/dist/cli/parse.cjs +1 -1
- package/dist/cli/parse.d.cts +1 -3
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/parse.d.ts +1 -3
- package/dist/cli/parse.d.ts.map +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +1 -5
- package/dist/cli/resolve.d.cts +1 -3
- package/dist/cli/resolve.d.cts.map +1 -1
- package/dist/cli/resolve.d.ts +1 -3
- package/dist/cli/resolve.d.ts.map +1 -1
- package/dist/cli/resolve.js +1 -5
- package/dist/cli/types.d.cts +1 -3
- package/dist/cli/types.d.ts +1 -3
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.d.cts +2 -2
- package/dist/cli/usage.d.ts +2 -2
- package/dist/cli/usage.js +1 -1
- package/dist/config-Bs1p6XwV.js +3 -0
- package/dist/config-DFewJLVx.cjs +6 -0
- package/dist/{config-jAHLRqMZ.js → config-DtimzxvV-BItTrGiz.js} +3 -306
- package/dist/config-DtimzxvV-BItTrGiz.js.map +1 -0
- package/dist/{config-2JTOC4-d.cjs → config-DtimzxvV-D3ccpxhQ.cjs} +2 -311
- package/dist/config-DtimzxvV-D3ccpxhQ.cjs.map +1 -0
- package/dist/index.cjs +21355 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21379 -69
- package/dist/index.js.map +1 -1
- package/dist/{parse-Br-BwKdT.cjs → parse-By6nDBNs.cjs} +2 -2
- package/dist/{parse-Br-BwKdT.cjs.map → parse-By6nDBNs.cjs.map} +1 -1
- package/dist/{parse-BvHK_nys.js → parse-Dn9XeQSj.js} +1 -1
- package/dist/{parse-BvHK_nys.js.map → parse-Dn9XeQSj.js.map} +1 -1
- package/dist/resolve-BCdS4js5.js +590 -0
- package/dist/resolve-BCdS4js5.js.map +1 -0
- package/dist/resolve-BMmRdCFJ.cjs +692 -0
- package/dist/resolve-BMmRdCFJ.cjs.map +1 -0
- package/dist/{stdio-2BaHF2h-.js → stdio-232a22j4.js} +7 -3
- package/dist/stdio-232a22j4.js.map +1 -0
- package/dist/{stdio-DL-ID7Q4.cjs → stdio-aCI9XyaI.cjs} +20 -4
- package/dist/stdio-aCI9XyaI.cjs.map +1 -0
- package/dist/transports/stdio.cjs +1 -2
- package/dist/transports/stdio.d.cts +1 -3
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +1 -3
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +1 -2
- package/dist/{types-BeIzCAF1.d.cts → types-CM88pHH_.d.ts} +3 -3
- package/dist/{types-C70IdmF4.d.ts.map → types-CM88pHH_.d.ts.map} +1 -1
- package/dist/{types-C70IdmF4.d.ts → types-CnLRMjvf.d.cts} +3 -3
- package/dist/{types-BeIzCAF1.d.cts.map → types-CnLRMjvf.d.cts.map} +1 -1
- package/dist/{usage-CpguKuwi.js → usage-DMGbIpV-.js} +1 -1
- package/dist/usage-DMGbIpV-.js.map +1 -0
- package/dist/{usage-CMWaPhZv.cjs → usage-iwGZsu3a.cjs} +1 -1
- package/dist/usage-iwGZsu3a.cjs.map +1 -0
- package/package.json +19 -104
- package/README.md +0 -121
- package/dist/agent-9s0S2VUD.js +0 -43
- package/dist/agent-9s0S2VUD.js.map +0 -1
- package/dist/agent-BI-VWYjJ.d.ts +0 -93
- package/dist/agent-BI-VWYjJ.d.ts.map +0 -1
- package/dist/agent-Bm5Hsfal.d.cts +0 -32
- package/dist/agent-Bm5Hsfal.d.cts.map +0 -1
- package/dist/agent-BmPRmM9x.d.cts +0 -93
- package/dist/agent-BmPRmM9x.d.cts.map +0 -1
- package/dist/agent-BsCC60AU.js +0 -64
- package/dist/agent-BsCC60AU.js.map +0 -1
- package/dist/agent-CJ6SVqAB.d.ts +0 -32
- package/dist/agent-CJ6SVqAB.d.ts.map +0 -1
- package/dist/agent-CirZFiaJ.cjs +0 -55
- package/dist/agent-CirZFiaJ.cjs.map +0 -1
- package/dist/agent-CnHO6uyy.cjs +0 -76
- package/dist/agent-CnHO6uyy.cjs.map +0 -1
- package/dist/agent-D8Mz9ung.d.cts +0 -35
- package/dist/agent-D8Mz9ung.d.cts.map +0 -1
- package/dist/agent-DD0p64Dq.js +0 -29
- package/dist/agent-DD0p64Dq.js.map +0 -1
- package/dist/agent-DQdvMLcG.d.ts +0 -35
- package/dist/agent-DQdvMLcG.d.ts.map +0 -1
- package/dist/agent-DaUNg6Ut.cjs +0 -35
- package/dist/agent-DaUNg6Ut.cjs.map +0 -1
- package/dist/analyze-issue-with-seer-6OwT1RJP.js +0 -200
- package/dist/analyze-issue-with-seer-6OwT1RJP.js.map +0 -1
- package/dist/analyze-issue-with-seer-wsCEFdZs.cjs +0 -206
- package/dist/analyze-issue-with-seer-wsCEFdZs.cjs.map +0 -1
- package/dist/api-BCICbJoI.js +0 -63
- package/dist/api-BCICbJoI.js.map +0 -1
- package/dist/api-CfzBwheo.cjs +0 -80
- package/dist/api-CfzBwheo.cjs.map +0 -1
- package/dist/api-client/client.cjs +0 -9
- package/dist/api-client/client.d.cts +0 -4
- package/dist/api-client/client.d.ts +0 -4
- package/dist/api-client/client.js +0 -9
- package/dist/api-client/errors.cjs +0 -11
- package/dist/api-client/errors.d.cts +0 -2
- package/dist/api-client/errors.d.ts +0 -2
- package/dist/api-client/errors.js +0 -3
- package/dist/api-client/index.cjs +0 -70
- package/dist/api-client/index.d.cts +0 -6
- package/dist/api-client/index.d.ts +0 -6
- package/dist/api-client/index.js +0 -11
- package/dist/api-client/schema.cjs +0 -52
- package/dist/api-client/schema.d.cts +0 -2
- package/dist/api-client/schema.d.ts +0 -2
- package/dist/api-client/schema.js +0 -3
- package/dist/api-client/types.cjs +0 -1
- package/dist/api-client/types.d.cts +0 -3
- package/dist/api-client/types.d.ts +0 -3
- package/dist/api-client/types.js +0 -1
- package/dist/api-client-BGgaBFuD.cjs +0 -0
- package/dist/api-client-CSLxiNP9.js +0 -0
- package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts +0 -34
- package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts.map +0 -1
- package/dist/callEmbeddedAgent-CFHLQjFx.d.cts +0 -34
- package/dist/callEmbeddedAgent-CFHLQjFx.d.cts.map +0 -1
- package/dist/callEmbeddedAgent-COB8Jrcn.cjs +0 -51
- package/dist/callEmbeddedAgent-COB8Jrcn.cjs.map +0 -1
- package/dist/callEmbeddedAgent-rEUWAl2g.js +0 -45
- package/dist/callEmbeddedAgent-rEUWAl2g.js.map +0 -1
- package/dist/client-8_aKE-B-.d.cts +0 -844
- package/dist/client-8_aKE-B-.d.cts.map +0 -1
- package/dist/client-BGVY6gBL.d.ts +0 -844
- package/dist/client-BGVY6gBL.d.ts.map +0 -1
- package/dist/client-Be1DR1al.js +0 -1098
- package/dist/client-Be1DR1al.js.map +0 -1
- package/dist/client-DSxCsnqO.cjs +0 -1103
- package/dist/client-DSxCsnqO.cjs.map +0 -1
- package/dist/config-2JTOC4-d.cjs.map +0 -1
- package/dist/config-BFaJp4hW.js +0 -74
- package/dist/config-BFaJp4hW.js.map +0 -1
- package/dist/config-BMLvvgGQ.cjs +0 -37
- package/dist/config-BMLvvgGQ.cjs.map +0 -1
- package/dist/config-BacDkkdz.cjs +0 -80
- package/dist/config-BacDkkdz.cjs.map +0 -1
- package/dist/config-Dh25cVhL.js +0 -25
- package/dist/config-Dh25cVhL.js.map +0 -1
- package/dist/config-jAHLRqMZ.js.map +0 -1
- package/dist/constants-CgLLujFn.cjs +0 -220
- package/dist/constants-CgLLujFn.cjs.map +0 -1
- package/dist/constants-D8axTonA.js +0 -184
- package/dist/constants-D8axTonA.js.map +0 -1
- package/dist/constants.cjs +0 -10
- package/dist/constants.d.cts +0 -36
- package/dist/constants.d.cts.map +0 -1
- package/dist/constants.d.ts +0 -36
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -4
- package/dist/constraint-helpers-CBddlAo8.js +0 -64
- package/dist/constraint-helpers-CBddlAo8.js.map +0 -1
- package/dist/constraint-helpers-UEovDW_M.cjs +0 -76
- package/dist/constraint-helpers-UEovDW_M.cjs.map +0 -1
- package/dist/create-dsn-C5vd9Btg.cjs +0 -74
- package/dist/create-dsn-C5vd9Btg.cjs.map +0 -1
- package/dist/create-dsn-DBqCDM_6.js +0 -68
- package/dist/create-dsn-DBqCDM_6.js.map +0 -1
- package/dist/create-project-BsN4Q0cl.js +0 -86
- package/dist/create-project-BsN4Q0cl.js.map +0 -1
- package/dist/create-project-D4W66CxU.cjs +0 -92
- package/dist/create-project-D4W66CxU.cjs.map +0 -1
- package/dist/create-team-DUBAEGGr.js +0 -63
- package/dist/create-team-DUBAEGGr.js.map +0 -1
- package/dist/create-team-DV6XmZkb.cjs +0 -69
- package/dist/create-team-DV6XmZkb.cjs.map +0 -1
- package/dist/dataset-fields-Bp_g-sD6.cjs +0 -179
- package/dist/dataset-fields-Bp_g-sD6.cjs.map +0 -1
- package/dist/dataset-fields-dZ43jEgF.js +0 -155
- package/dist/dataset-fields-dZ43jEgF.js.map +0 -1
- package/dist/define-CLp6EtpZ.cjs +0 -14
- package/dist/define-CLp6EtpZ.cjs.map +0 -1
- package/dist/define-vA6uuVue.js +0 -8
- package/dist/define-vA6uuVue.js.map +0 -1
- package/dist/enhance-error-BULHg3Tl.js +0 -32
- package/dist/enhance-error-BULHg3Tl.js.map +0 -1
- package/dist/enhance-error-vihkdCX5.cjs +0 -37
- package/dist/enhance-error-vihkdCX5.cjs.map +0 -1
- package/dist/error-handling-CLnyY1TR.js +0 -97
- package/dist/error-handling-CLnyY1TR.js.map +0 -1
- package/dist/error-handling-FGjcJT8U.cjs +0 -132
- package/dist/error-handling-FGjcJT8U.cjs.map +0 -1
- package/dist/errors-BXmNwD2K.js +0 -26
- package/dist/errors-BXmNwD2K.js.map +0 -1
- package/dist/errors-BYClKbv4.d.cts +0 -20
- package/dist/errors-BYClKbv4.d.cts.map +0 -1
- package/dist/errors-Cn4l-BlC.d.ts +0 -20
- package/dist/errors-Cn4l-BlC.d.ts.map +0 -1
- package/dist/errors-CyAWBU2S.d.ts +0 -126
- package/dist/errors-CyAWBU2S.d.ts.map +0 -1
- package/dist/errors-DMiENfq7.d.cts +0 -126
- package/dist/errors-DMiENfq7.d.cts.map +0 -1
- package/dist/errors-DUEMWOr1.js +0 -217
- package/dist/errors-DUEMWOr1.js.map +0 -1
- package/dist/errors-DWysOIMw.cjs +0 -271
- package/dist/errors-DWysOIMw.cjs.map +0 -1
- package/dist/errors-umQzF_vW.cjs +0 -38
- package/dist/errors-umQzF_vW.cjs.map +0 -1
- package/dist/errors.cjs +0 -4
- package/dist/errors.d.cts +0 -2
- package/dist/errors.d.ts +0 -2
- package/dist/errors.js +0 -3
- package/dist/fetch-utils-C6qSgZai.js +0 -52
- package/dist/fetch-utils-C6qSgZai.js.map +0 -1
- package/dist/fetch-utils-DRgOJp3e.cjs +0 -64
- package/dist/fetch-utils-DRgOJp3e.cjs.map +0 -1
- package/dist/find-dsns-BabAfVEt.cjs +0 -64
- package/dist/find-dsns-BabAfVEt.cjs.map +0 -1
- package/dist/find-dsns-C-Q6yJT5.js +0 -58
- package/dist/find-dsns-C-Q6yJT5.js.map +0 -1
- package/dist/find-organizations-Bo-JdU-R.js +0 -59
- package/dist/find-organizations-Bo-JdU-R.js.map +0 -1
- package/dist/find-organizations-CEEqa1an.cjs +0 -64
- package/dist/find-organizations-CEEqa1an.cjs.map +0 -1
- package/dist/find-projects-BWyvosHM.cjs +0 -59
- package/dist/find-projects-BWyvosHM.cjs.map +0 -1
- package/dist/find-projects-zM4CM_xX.js +0 -53
- package/dist/find-projects-zM4CM_xX.js.map +0 -1
- package/dist/find-releases-DMJrj5wz.cjs +0 -105
- package/dist/find-releases-DMJrj5wz.cjs.map +0 -1
- package/dist/find-releases-DzdGLPSN.js +0 -99
- package/dist/find-releases-DzdGLPSN.js.map +0 -1
- package/dist/find-teams-CR_hdlun.js +0 -56
- package/dist/find-teams-CR_hdlun.js.map +0 -1
- package/dist/find-teams-lOqS_719.cjs +0 -62
- package/dist/find-teams-lOqS_719.cjs.map +0 -1
- package/dist/formatters-B6H5qTFe.cjs +0 -98
- package/dist/formatters-B6H5qTFe.cjs.map +0 -1
- package/dist/formatters-BOJNlDKG.js +0 -223
- package/dist/formatters-BOJNlDKG.js.map +0 -1
- package/dist/formatters-C9MhdNDX.js +0 -86
- package/dist/formatters-C9MhdNDX.js.map +0 -1
- package/dist/formatters-ObdzRwld.cjs +0 -247
- package/dist/formatters-ObdzRwld.cjs.map +0 -1
- package/dist/formatting-BatGC-29.cjs +0 -984
- package/dist/formatting-BatGC-29.cjs.map +0 -1
- package/dist/formatting-Bm1GxhEu.d.ts +0 -54
- package/dist/formatting-Bm1GxhEu.d.ts.map +0 -1
- package/dist/formatting-C6hyL-Yv.cjs +0 -20
- package/dist/formatting-C6hyL-Yv.cjs.map +0 -1
- package/dist/formatting-DJFcfTJG.js +0 -14
- package/dist/formatting-DJFcfTJG.js.map +0 -1
- package/dist/formatting-DUODx6N5.js +0 -967
- package/dist/formatting-DUODx6N5.js.map +0 -1
- package/dist/formatting-GZdM57wq.d.cts +0 -54
- package/dist/formatting-GZdM57wq.d.cts.map +0 -1
- package/dist/get-doc-CbVw4ada.cjs +0 -93
- package/dist/get-doc-CbVw4ada.cjs.map +0 -1
- package/dist/get-doc-FuILofQP.js +0 -87
- package/dist/get-doc-FuILofQP.js.map +0 -1
- package/dist/get-event-attachment-DuyBT68p.cjs +0 -150
- package/dist/get-event-attachment-DuyBT68p.cjs.map +0 -1
- package/dist/get-event-attachment-Dzg2R7ng.js +0 -144
- package/dist/get-event-attachment-Dzg2R7ng.js.map +0 -1
- package/dist/get-issue-details-BY7S1YyX.cjs +0 -201
- package/dist/get-issue-details-BY7S1YyX.cjs.map +0 -1
- package/dist/get-issue-details-BxJzOzFQ.js +0 -195
- package/dist/get-issue-details-BxJzOzFQ.js.map +0 -1
- package/dist/get-trace-details-DD0p3apU.cjs +0 -313
- package/dist/get-trace-details-DD0p3apU.cjs.map +0 -1
- package/dist/get-trace-details-Dv2FB534.js +0 -307
- package/dist/get-trace-details-Dv2FB534.js.map +0 -1
- package/dist/handler-0iIvlYwy.d.cts +0 -11
- package/dist/handler-0iIvlYwy.d.cts.map +0 -1
- package/dist/handler-8JzODzam.d.cts +0 -15
- package/dist/handler-8JzODzam.d.cts.map +0 -1
- package/dist/handler-9UUkphzv.d.ts +0 -15
- package/dist/handler-9UUkphzv.d.ts.map +0 -1
- package/dist/handler-BfTAwyrq.js +0 -153
- package/dist/handler-BfTAwyrq.js.map +0 -1
- package/dist/handler-BhjeSo2N.js +0 -132
- package/dist/handler-BhjeSo2N.js.map +0 -1
- package/dist/handler-BjTPOR8v.cjs +0 -138
- package/dist/handler-BjTPOR8v.cjs.map +0 -1
- package/dist/handler-C5Tgh1wj.cjs +0 -159
- package/dist/handler-C5Tgh1wj.cjs.map +0 -1
- package/dist/handler-ClZBIn0B.d.cts +0 -15
- package/dist/handler-ClZBIn0B.d.cts.map +0 -1
- package/dist/handler-CmAbLcaV.d.ts +0 -15
- package/dist/handler-CmAbLcaV.d.ts.map +0 -1
- package/dist/handler-DbUy8Z54.d.ts +0 -11
- package/dist/handler-DbUy8Z54.d.ts.map +0 -1
- package/dist/index-CmCelmEL.d.cts +0 -1
- package/dist/index-NfFbnYt3.d.ts +0 -1
- package/dist/internal/agents/callEmbeddedAgent.cjs +0 -6
- package/dist/internal/agents/callEmbeddedAgent.d.cts +0 -2
- package/dist/internal/agents/callEmbeddedAgent.d.ts +0 -2
- package/dist/internal/agents/callEmbeddedAgent.js +0 -6
- package/dist/internal/agents/openai-provider.cjs +0 -5
- package/dist/internal/agents/openai-provider.d.cts +0 -22
- package/dist/internal/agents/openai-provider.d.cts.map +0 -1
- package/dist/internal/agents/openai-provider.d.ts +0 -22
- package/dist/internal/agents/openai-provider.d.ts.map +0 -1
- package/dist/internal/agents/openai-provider.js +0 -4
- package/dist/internal/agents/tools/dataset-fields.cjs +0 -16
- package/dist/internal/agents/tools/dataset-fields.d.cts +0 -58
- package/dist/internal/agents/tools/dataset-fields.d.cts.map +0 -1
- package/dist/internal/agents/tools/dataset-fields.d.ts +0 -58
- package/dist/internal/agents/tools/dataset-fields.d.ts.map +0 -1
- package/dist/internal/agents/tools/dataset-fields.js +0 -13
- package/dist/internal/agents/tools/otel-semantics.cjs +0 -14
- package/dist/internal/agents/tools/otel-semantics.d.cts +0 -41
- package/dist/internal/agents/tools/otel-semantics.d.cts.map +0 -1
- package/dist/internal/agents/tools/otel-semantics.d.ts +0 -41
- package/dist/internal/agents/tools/otel-semantics.d.ts.map +0 -1
- package/dist/internal/agents/tools/otel-semantics.js +0 -13
- package/dist/internal/agents/tools/utils.cjs +0 -12
- package/dist/internal/agents/tools/utils.d.cts +0 -2
- package/dist/internal/agents/tools/utils.d.ts +0 -2
- package/dist/internal/agents/tools/utils.js +0 -12
- package/dist/internal/agents/tools/whoami.cjs +0 -14
- package/dist/internal/agents/tools/whoami.d.cts +0 -33
- package/dist/internal/agents/tools/whoami.d.cts.map +0 -1
- package/dist/internal/agents/tools/whoami.d.ts +0 -33
- package/dist/internal/agents/tools/whoami.d.ts.map +0 -1
- package/dist/internal/agents/tools/whoami.js +0 -13
- package/dist/internal/constraint-helpers.cjs +0 -4
- package/dist/internal/constraint-helpers.d.cts +0 -54
- package/dist/internal/constraint-helpers.d.cts.map +0 -1
- package/dist/internal/constraint-helpers.d.ts +0 -54
- package/dist/internal/constraint-helpers.d.ts.map +0 -1
- package/dist/internal/constraint-helpers.js +0 -3
- package/dist/internal/error-handling.cjs +0 -17
- package/dist/internal/error-handling.d.cts +0 -40
- package/dist/internal/error-handling.d.cts.map +0 -1
- package/dist/internal/error-handling.d.ts +0 -40
- package/dist/internal/error-handling.d.ts.map +0 -1
- package/dist/internal/error-handling.js +0 -12
- package/dist/internal/fetch-utils.cjs +0 -4
- package/dist/internal/fetch-utils.d.cts +0 -33
- package/dist/internal/fetch-utils.d.cts.map +0 -1
- package/dist/internal/fetch-utils.d.ts +0 -33
- package/dist/internal/fetch-utils.d.ts.map +0 -1
- package/dist/internal/fetch-utils.js +0 -3
- package/dist/internal/formatting.cjs +0 -7
- package/dist/internal/formatting.d.cts +0 -7
- package/dist/internal/formatting.d.ts +0 -7
- package/dist/internal/formatting.js +0 -5
- package/dist/internal/issue-helpers.cjs +0 -6
- package/dist/internal/issue-helpers.d.cts +0 -2
- package/dist/internal/issue-helpers.d.ts +0 -2
- package/dist/internal/issue-helpers.js +0 -4
- package/dist/internal/test-fixtures.cjs +0 -224
- package/dist/internal/test-fixtures.cjs.map +0 -1
- package/dist/internal/test-fixtures.d.cts +0 -130
- package/dist/internal/test-fixtures.d.cts.map +0 -1
- package/dist/internal/test-fixtures.d.ts +0 -130
- package/dist/internal/test-fixtures.d.ts.map +0 -1
- package/dist/internal/test-fixtures.js +0 -215
- package/dist/internal/test-fixtures.js.map +0 -1
- package/dist/internal/tool-helpers/api.cjs +0 -17
- package/dist/internal/tool-helpers/api.d.cts +0 -42
- package/dist/internal/tool-helpers/api.d.cts.map +0 -1
- package/dist/internal/tool-helpers/api.d.ts +0 -42
- package/dist/internal/tool-helpers/api.d.ts.map +0 -1
- package/dist/internal/tool-helpers/api.js +0 -15
- package/dist/internal/tool-helpers/define.cjs +0 -3
- package/dist/internal/tool-helpers/define.d.cts +0 -13
- package/dist/internal/tool-helpers/define.d.cts.map +0 -1
- package/dist/internal/tool-helpers/define.d.ts +0 -13
- package/dist/internal/tool-helpers/define.d.ts.map +0 -1
- package/dist/internal/tool-helpers/define.js +0 -3
- package/dist/internal/tool-helpers/enhance-error.cjs +0 -12
- package/dist/internal/tool-helpers/enhance-error.d.cts +0 -29
- package/dist/internal/tool-helpers/enhance-error.d.cts.map +0 -1
- package/dist/internal/tool-helpers/enhance-error.d.ts +0 -29
- package/dist/internal/tool-helpers/enhance-error.d.ts.map +0 -1
- package/dist/internal/tool-helpers/enhance-error.js +0 -12
- package/dist/internal/tool-helpers/formatting.cjs +0 -3
- package/dist/internal/tool-helpers/formatting.d.cts +0 -16
- package/dist/internal/tool-helpers/formatting.d.cts.map +0 -1
- package/dist/internal/tool-helpers/formatting.d.ts +0 -16
- package/dist/internal/tool-helpers/formatting.d.ts.map +0 -1
- package/dist/internal/tool-helpers/formatting.js +0 -3
- package/dist/internal/tool-helpers/issue.cjs +0 -9
- package/dist/internal/tool-helpers/issue.d.cts +0 -8
- package/dist/internal/tool-helpers/issue.d.ts +0 -8
- package/dist/internal/tool-helpers/issue.js +0 -8
- package/dist/internal/tool-helpers/seer.cjs +0 -11
- package/dist/internal/tool-helpers/seer.d.cts +0 -31
- package/dist/internal/tool-helpers/seer.d.cts.map +0 -1
- package/dist/internal/tool-helpers/seer.d.ts +0 -31
- package/dist/internal/tool-helpers/seer.d.ts.map +0 -1
- package/dist/internal/tool-helpers/seer.js +0 -3
- package/dist/internal/tool-helpers/validate-region-url.cjs +0 -6
- package/dist/internal/tool-helpers/validate-region-url.d.cts +0 -20
- package/dist/internal/tool-helpers/validate-region-url.d.cts.map +0 -1
- package/dist/internal/tool-helpers/validate-region-url.d.ts +0 -20
- package/dist/internal/tool-helpers/validate-region-url.d.ts.map +0 -1
- package/dist/internal/tool-helpers/validate-region-url.js +0 -6
- package/dist/issue-1C6txnk3.js +0 -0
- package/dist/issue-ChNk4cuO.cjs +0 -0
- package/dist/issue-helpers-D-hBnXTk.cjs +0 -97
- package/dist/issue-helpers-D-hBnXTk.cjs.map +0 -1
- package/dist/issue-helpers-D4NRLqkR.d.ts +0 -52
- package/dist/issue-helpers-D4NRLqkR.d.ts.map +0 -1
- package/dist/issue-helpers-DtCbXiRZ.js +0 -80
- package/dist/issue-helpers-DtCbXiRZ.js.map +0 -1
- package/dist/issue-helpers-ILmSPsJZ.d.cts +0 -52
- package/dist/issue-helpers-ILmSPsJZ.d.cts.map +0 -1
- package/dist/logging-BgTqJ4mI.d.ts +0 -31
- package/dist/logging-BgTqJ4mI.d.ts.map +0 -1
- package/dist/logging-BjKioF_x.d.cts +0 -31
- package/dist/logging-BjKioF_x.d.cts.map +0 -1
- package/dist/logging-C-ST7-Ow.cjs +0 -298
- package/dist/logging-C-ST7-Ow.cjs.map +0 -1
- package/dist/logging-ChQnSEmD.js +0 -256
- package/dist/logging-ChQnSEmD.js.map +0 -1
- package/dist/openai-provider-BsMAb6zY.js +0 -48
- package/dist/openai-provider-BsMAb6zY.js.map +0 -1
- package/dist/openai-provider-BycgrQgi.cjs +0 -60
- package/dist/openai-provider-BycgrQgi.cjs.map +0 -1
- package/dist/otel-semantics-CWWWmiNy.js +0 -5070
- package/dist/otel-semantics-CWWWmiNy.js.map +0 -1
- package/dist/otel-semantics-n8_5Ib9C.cjs +0 -5082
- package/dist/otel-semantics-n8_5Ib9C.cjs.map +0 -1
- package/dist/permissions-Berbg2vC.cjs +0 -209
- package/dist/permissions-Berbg2vC.cjs.map +0 -1
- package/dist/permissions-CiIVEs4_.d.ts +0 -79
- package/dist/permissions-CiIVEs4_.d.ts.map +0 -1
- package/dist/permissions-Cm5e34n2.d.cts +0 -79
- package/dist/permissions-Cm5e34n2.d.cts.map +0 -1
- package/dist/permissions-DvkVlUJ1.js +0 -155
- package/dist/permissions-DvkVlUJ1.js.map +0 -1
- package/dist/permissions.cjs +0 -11
- package/dist/permissions.d.cts +0 -2
- package/dist/permissions.d.ts +0 -2
- package/dist/permissions.js +0 -3
- package/dist/resolve-CrYQ5aF_.cjs +0 -107
- package/dist/resolve-CrYQ5aF_.cjs.map +0 -1
- package/dist/resolve-DQ-6eLec.js +0 -90
- package/dist/resolve-DQ-6eLec.js.map +0 -1
- package/dist/schema-1xQ4asuW.cjs +0 -801
- package/dist/schema-1xQ4asuW.cjs.map +0 -1
- package/dist/schema-BGVOjcD7.cjs +0 -141
- package/dist/schema-BGVOjcD7.cjs.map +0 -1
- package/dist/schema-CZXkkfj-.d.cts +0 -16950
- package/dist/schema-CZXkkfj-.d.cts.map +0 -1
- package/dist/schema-Cfvy5rTy.d.ts +0 -16950
- package/dist/schema-Cfvy5rTy.d.ts.map +0 -1
- package/dist/schema-ChlpIaqA.js +0 -39
- package/dist/schema-ChlpIaqA.js.map +0 -1
- package/dist/schema-oeFNxyo_.js +0 -501
- package/dist/schema-oeFNxyo_.js.map +0 -1
- package/dist/schema.cjs +0 -22
- package/dist/schema.d.cts +0 -34
- package/dist/schema.d.cts.map +0 -1
- package/dist/schema.d.ts +0 -34
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -6
- package/dist/search-docs-C5x-ZRhd.cjs +0 -97
- package/dist/search-docs-C5x-ZRhd.cjs.map +0 -1
- package/dist/search-docs-UCe9oXQt.js +0 -91
- package/dist/search-docs-UCe9oXQt.js.map +0 -1
- package/dist/search-events-B-MXKSB_.js +0 -0
- package/dist/search-events-BrEw3wC-.cjs +0 -0
- package/dist/search-issues-C7Zs6rFB.cjs +0 -0
- package/dist/search-issues-DUSkomYp.js +0 -0
- package/dist/seer-CSFgx4AP.js +0 -89
- package/dist/seer-CSFgx4AP.js.map +0 -1
- package/dist/seer-sA1asAZs.cjs +0 -143
- package/dist/seer-sA1asAZs.cjs.map +0 -1
- package/dist/sentry-3DC3Kob2.cjs +0 -110
- package/dist/sentry-3DC3Kob2.cjs.map +0 -1
- package/dist/sentry-CfePWwtE.d.cts +0 -9
- package/dist/sentry-CfePWwtE.d.cts.map +0 -1
- package/dist/sentry-Cfj4OGMQ.js +0 -104
- package/dist/sentry-Cfj4OGMQ.js.map +0 -1
- package/dist/sentry-DKiJwGZX.d.ts +0 -9
- package/dist/sentry-DKiJwGZX.d.ts.map +0 -1
- package/dist/server-BbJwtfJr.js +0 -336
- package/dist/server-BbJwtfJr.js.map +0 -1
- package/dist/server-OW--pQOQ.cjs +0 -354
- package/dist/server-OW--pQOQ.cjs.map +0 -1
- package/dist/server.cjs +0 -65
- package/dist/server.d.cts +0 -59
- package/dist/server.d.cts.map +0 -1
- package/dist/server.d.ts +0 -59
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -65
- package/dist/skillDefinitions.cjs +0 -258
- package/dist/skillDefinitions.cjs.map +0 -1
- package/dist/skillDefinitions.d.cts +0 -18
- package/dist/skillDefinitions.d.cts.map +0 -1
- package/dist/skillDefinitions.d.ts +0 -18
- package/dist/skillDefinitions.d.ts.map +0 -1
- package/dist/skillDefinitions.js +0 -257
- package/dist/skillDefinitions.js.map +0 -1
- package/dist/skills-BmFl7P6V.js +0 -94
- package/dist/skills-BmFl7P6V.js.map +0 -1
- package/dist/skills-COOuBrrA.cjs +0 -148
- package/dist/skills-COOuBrrA.cjs.map +0 -1
- package/dist/skills-HlAeBq_E.d.cts +0 -33
- package/dist/skills-HlAeBq_E.d.cts.map +0 -1
- package/dist/skills-g0WCenTA.d.ts +0 -33
- package/dist/skills-g0WCenTA.d.ts.map +0 -1
- package/dist/skills.cjs +0 -11
- package/dist/skills.d.cts +0 -2
- package/dist/skills.d.ts +0 -2
- package/dist/skills.js +0 -3
- package/dist/slug-validation-Bkteg65O.js +0 -93
- package/dist/slug-validation-Bkteg65O.js.map +0 -1
- package/dist/slug-validation-D5VJqMwH.cjs +0 -111
- package/dist/slug-validation-D5VJqMwH.cjs.map +0 -1
- package/dist/stdio-2BaHF2h-.js.map +0 -1
- package/dist/stdio-DL-ID7Q4.cjs.map +0 -1
- package/dist/telem/index.cjs +0 -10
- package/dist/telem/index.d.cts +0 -3
- package/dist/telem/index.d.ts +0 -3
- package/dist/telem/index.js +0 -4
- package/dist/telem/logging.cjs +0 -9
- package/dist/telem/logging.d.cts +0 -2
- package/dist/telem/logging.d.ts +0 -2
- package/dist/telem/logging.js +0 -3
- package/dist/telem/sentry.cjs +0 -3
- package/dist/telem/sentry.d.cts +0 -2
- package/dist/telem/sentry.d.ts +0 -2
- package/dist/telem/sentry.js +0 -3
- package/dist/test-setup.cjs +0 -56
- package/dist/test-setup.cjs.map +0 -1
- package/dist/test-setup.d.cts +0 -33
- package/dist/test-setup.d.cts.map +0 -1
- package/dist/test-setup.d.ts +0 -33
- package/dist/test-setup.d.ts.map +0 -1
- package/dist/test-setup.js +0 -55
- package/dist/test-setup.js.map +0 -1
- package/dist/test-utils/context.cjs +0 -32
- package/dist/test-utils/context.cjs.map +0 -1
- package/dist/test-utils/context.d.cts +0 -18
- package/dist/test-utils/context.d.cts.map +0 -1
- package/dist/test-utils/context.d.ts +0 -18
- package/dist/test-utils/context.d.ts.map +0 -1
- package/dist/test-utils/context.js +0 -30
- package/dist/test-utils/context.js.map +0 -1
- package/dist/toolDefinitions.cjs +0 -838
- package/dist/toolDefinitions.cjs.map +0 -1
- package/dist/toolDefinitions.d.cts +0 -13
- package/dist/toolDefinitions.d.cts.map +0 -1
- package/dist/toolDefinitions.d.ts +0 -13
- package/dist/toolDefinitions.d.ts.map +0 -1
- package/dist/toolDefinitions.js +0 -837
- package/dist/toolDefinitions.js.map +0 -1
- package/dist/tools/analyze-issue-with-seer.cjs +0 -24
- package/dist/tools/analyze-issue-with-seer.d.cts +0 -17
- package/dist/tools/analyze-issue-with-seer.d.cts.map +0 -1
- package/dist/tools/analyze-issue-with-seer.d.ts +0 -17
- package/dist/tools/analyze-issue-with-seer.d.ts.map +0 -1
- package/dist/tools/analyze-issue-with-seer.js +0 -24
- package/dist/tools/create-dsn.cjs +0 -19
- package/dist/tools/create-dsn.d.cts +0 -16
- package/dist/tools/create-dsn.d.cts.map +0 -1
- package/dist/tools/create-dsn.d.ts +0 -16
- package/dist/tools/create-dsn.d.ts.map +0 -1
- package/dist/tools/create-dsn.js +0 -19
- package/dist/tools/create-project.cjs +0 -19
- package/dist/tools/create-project.d.cts +0 -17
- package/dist/tools/create-project.d.cts.map +0 -1
- package/dist/tools/create-project.d.ts +0 -17
- package/dist/tools/create-project.d.ts.map +0 -1
- package/dist/tools/create-project.js +0 -19
- package/dist/tools/create-team.cjs +0 -19
- package/dist/tools/create-team.d.cts +0 -15
- package/dist/tools/create-team.d.cts.map +0 -1
- package/dist/tools/create-team.d.ts +0 -15
- package/dist/tools/create-team.d.ts.map +0 -1
- package/dist/tools/create-team.js +0 -19
- package/dist/tools/find-dsns.cjs +0 -19
- package/dist/tools/find-dsns.d.cts +0 -15
- package/dist/tools/find-dsns.d.cts.map +0 -1
- package/dist/tools/find-dsns.d.ts +0 -15
- package/dist/tools/find-dsns.d.ts.map +0 -1
- package/dist/tools/find-dsns.js +0 -19
- package/dist/tools/find-organizations.cjs +0 -19
- package/dist/tools/find-organizations.d.cts +0 -13
- package/dist/tools/find-organizations.d.cts.map +0 -1
- package/dist/tools/find-organizations.d.ts +0 -13
- package/dist/tools/find-organizations.d.ts.map +0 -1
- package/dist/tools/find-organizations.js +0 -19
- package/dist/tools/find-projects.cjs +0 -19
- package/dist/tools/find-projects.d.cts +0 -15
- package/dist/tools/find-projects.d.cts.map +0 -1
- package/dist/tools/find-projects.d.ts +0 -15
- package/dist/tools/find-projects.d.ts.map +0 -1
- package/dist/tools/find-projects.js +0 -19
- package/dist/tools/find-releases.cjs +0 -19
- package/dist/tools/find-releases.d.cts +0 -16
- package/dist/tools/find-releases.d.cts.map +0 -1
- package/dist/tools/find-releases.d.ts +0 -16
- package/dist/tools/find-releases.d.ts.map +0 -1
- package/dist/tools/find-releases.js +0 -19
- package/dist/tools/find-teams.cjs +0 -19
- package/dist/tools/find-teams.d.cts +0 -15
- package/dist/tools/find-teams.d.cts.map +0 -1
- package/dist/tools/find-teams.d.ts +0 -15
- package/dist/tools/find-teams.d.ts.map +0 -1
- package/dist/tools/find-teams.js +0 -19
- package/dist/tools/get-doc.cjs +0 -14
- package/dist/tools/get-doc.d.cts +0 -13
- package/dist/tools/get-doc.d.cts.map +0 -1
- package/dist/tools/get-doc.d.ts +0 -13
- package/dist/tools/get-doc.d.ts.map +0 -1
- package/dist/tools/get-doc.js +0 -14
- package/dist/tools/get-event-attachment.cjs +0 -19
- package/dist/tools/get-event-attachment.d.cts +0 -17
- package/dist/tools/get-event-attachment.d.cts.map +0 -1
- package/dist/tools/get-event-attachment.d.ts +0 -17
- package/dist/tools/get-event-attachment.d.ts.map +0 -1
- package/dist/tools/get-event-attachment.js +0 -19
- package/dist/tools/get-issue-details.cjs +0 -24
- package/dist/tools/get-issue-details.d.cts +0 -17
- package/dist/tools/get-issue-details.d.cts.map +0 -1
- package/dist/tools/get-issue-details.d.ts +0 -17
- package/dist/tools/get-issue-details.d.ts.map +0 -1
- package/dist/tools/get-issue-details.js +0 -24
- package/dist/tools/get-trace-details.cjs +0 -19
- package/dist/tools/get-trace-details.d.cts +0 -15
- package/dist/tools/get-trace-details.d.cts.map +0 -1
- package/dist/tools/get-trace-details.d.ts +0 -15
- package/dist/tools/get-trace-details.d.ts.map +0 -1
- package/dist/tools/get-trace-details.js +0 -19
- package/dist/tools/index.cjs +0 -65
- package/dist/tools/index.d.cts +0 -129
- package/dist/tools/index.d.cts.map +0 -1
- package/dist/tools/index.d.ts +0 -129
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -65
- package/dist/tools/search-docs.cjs +0 -18
- package/dist/tools/search-docs.d.cts +0 -15
- package/dist/tools/search-docs.d.cts.map +0 -1
- package/dist/tools/search-docs.d.ts +0 -15
- package/dist/tools/search-docs.d.ts.map +0 -1
- package/dist/tools/search-docs.js +0 -18
- package/dist/tools/search-events/agent.cjs +0 -20
- package/dist/tools/search-events/agent.d.cts +0 -7
- package/dist/tools/search-events/agent.d.ts +0 -7
- package/dist/tools/search-events/agent.js +0 -19
- package/dist/tools/search-events/config.cjs +0 -8
- package/dist/tools/search-events/config.d.cts +0 -132
- package/dist/tools/search-events/config.d.cts.map +0 -1
- package/dist/tools/search-events/config.d.ts +0 -132
- package/dist/tools/search-events/config.d.ts.map +0 -1
- package/dist/tools/search-events/config.js +0 -3
- package/dist/tools/search-events/formatters.cjs +0 -17
- package/dist/tools/search-events/formatters.d.cts +0 -43
- package/dist/tools/search-events/formatters.d.cts.map +0 -1
- package/dist/tools/search-events/formatters.d.ts +0 -43
- package/dist/tools/search-events/formatters.d.ts.map +0 -1
- package/dist/tools/search-events/formatters.js +0 -14
- package/dist/tools/search-events/handler.cjs +0 -28
- package/dist/tools/search-events/handler.d.cts +0 -6
- package/dist/tools/search-events/handler.d.ts +0 -6
- package/dist/tools/search-events/handler.js +0 -28
- package/dist/tools/search-events/index.cjs +0 -31
- package/dist/tools/search-events/index.d.cts +0 -12
- package/dist/tools/search-events/index.d.ts +0 -12
- package/dist/tools/search-events/index.js +0 -29
- package/dist/tools/search-events/utils.cjs +0 -17
- package/dist/tools/search-events/utils.d.cts +0 -8
- package/dist/tools/search-events/utils.d.ts +0 -8
- package/dist/tools/search-events/utils.js +0 -13
- package/dist/tools/search-issues/agent.cjs +0 -19
- package/dist/tools/search-issues/agent.d.cts +0 -7
- package/dist/tools/search-issues/agent.d.ts +0 -7
- package/dist/tools/search-issues/agent.js +0 -18
- package/dist/tools/search-issues/config.cjs +0 -3
- package/dist/tools/search-issues/config.d.cts +0 -9
- package/dist/tools/search-issues/config.d.cts.map +0 -1
- package/dist/tools/search-issues/config.d.ts +0 -9
- package/dist/tools/search-issues/config.d.ts.map +0 -1
- package/dist/tools/search-issues/config.js +0 -3
- package/dist/tools/search-issues/formatters.cjs +0 -5
- package/dist/tools/search-issues/formatters.d.cts +0 -28
- package/dist/tools/search-issues/formatters.d.cts.map +0 -1
- package/dist/tools/search-issues/formatters.d.ts +0 -28
- package/dist/tools/search-issues/formatters.d.ts.map +0 -1
- package/dist/tools/search-issues/formatters.js +0 -4
- package/dist/tools/search-issues/handler.cjs +0 -27
- package/dist/tools/search-issues/handler.d.cts +0 -6
- package/dist/tools/search-issues/handler.d.ts +0 -6
- package/dist/tools/search-issues/handler.js +0 -27
- package/dist/tools/search-issues/index.cjs +0 -30
- package/dist/tools/search-issues/index.d.cts +0 -12
- package/dist/tools/search-issues/index.d.ts +0 -12
- package/dist/tools/search-issues/index.js +0 -28
- package/dist/tools/types.cjs +0 -0
- package/dist/tools/types.d.cts +0 -5
- package/dist/tools/types.d.ts +0 -5
- package/dist/tools/types.js +0 -0
- package/dist/tools/update-issue.cjs +0 -24
- package/dist/tools/update-issue.d.cts +0 -18
- package/dist/tools/update-issue.d.cts.map +0 -1
- package/dist/tools/update-issue.d.ts +0 -18
- package/dist/tools/update-issue.d.ts.map +0 -1
- package/dist/tools/update-issue.js +0 -24
- package/dist/tools/update-project.cjs +0 -19
- package/dist/tools/update-project.d.cts +0 -19
- package/dist/tools/update-project.d.cts.map +0 -1
- package/dist/tools/update-project.d.ts +0 -19
- package/dist/tools/update-project.d.ts.map +0 -1
- package/dist/tools/update-project.js +0 -19
- package/dist/tools/use-sentry/agent.cjs +0 -8
- package/dist/tools/use-sentry/agent.d.cts +0 -3
- package/dist/tools/use-sentry/agent.d.ts +0 -3
- package/dist/tools/use-sentry/agent.js +0 -8
- package/dist/tools/use-sentry/config.cjs +0 -4
- package/dist/tools/use-sentry/config.d.cts +0 -21
- package/dist/tools/use-sentry/config.d.cts.map +0 -1
- package/dist/tools/use-sentry/config.d.ts +0 -21
- package/dist/tools/use-sentry/config.d.ts.map +0 -1
- package/dist/tools/use-sentry/config.js +0 -3
- package/dist/tools/use-sentry/handler.cjs +0 -65
- package/dist/tools/use-sentry/handler.d.cts +0 -6
- package/dist/tools/use-sentry/handler.d.ts +0 -6
- package/dist/tools/use-sentry/handler.js +0 -65
- package/dist/tools/use-sentry/index.cjs +0 -67
- package/dist/tools/use-sentry/index.d.cts +0 -8
- package/dist/tools/use-sentry/index.d.ts +0 -8
- package/dist/tools/use-sentry/index.js +0 -65
- package/dist/tools/use-sentry/tool-wrapper.cjs +0 -63
- package/dist/tools/use-sentry/tool-wrapper.cjs.map +0 -1
- package/dist/tools/use-sentry/tool-wrapper.d.cts +0 -119
- package/dist/tools/use-sentry/tool-wrapper.d.cts.map +0 -1
- package/dist/tools/use-sentry/tool-wrapper.d.ts +0 -119
- package/dist/tools/use-sentry/tool-wrapper.d.ts.map +0 -1
- package/dist/tools/use-sentry/tool-wrapper.js +0 -62
- package/dist/tools/use-sentry/tool-wrapper.js.map +0 -1
- package/dist/tools/whoami.cjs +0 -17
- package/dist/tools/whoami.d.cts +0 -10
- package/dist/tools/whoami.d.cts.map +0 -1
- package/dist/tools/whoami.d.ts +0 -10
- package/dist/tools/whoami.d.ts.map +0 -1
- package/dist/tools/whoami.js +0 -17
- package/dist/types-B_3dsqbN.d.cts +0 -38
- package/dist/types-B_3dsqbN.d.cts.map +0 -1
- package/dist/types-Cet6uyS6.d.ts +0 -41
- package/dist/types-Cet6uyS6.d.ts.map +0 -1
- package/dist/types-CokRupPo.d.cts +0 -33
- package/dist/types-CokRupPo.d.cts.map +0 -1
- package/dist/types-D1CEiyup.d.cts +0 -41
- package/dist/types-D1CEiyup.d.cts.map +0 -1
- package/dist/types-D670-rDz.js +0 -0
- package/dist/types-OrkP7cEA.d.ts +0 -33
- package/dist/types-OrkP7cEA.d.ts.map +0 -1
- package/dist/types-n3wuZu5X.cjs +0 -0
- package/dist/types-u52qwG59.d.ts +0 -38
- package/dist/types-u52qwG59.d.ts.map +0 -1
- package/dist/types.cjs +0 -16
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -4
- package/dist/types.d.ts +0 -4
- package/dist/types.js +0 -15
- package/dist/types.js.map +0 -1
- package/dist/update-issue-BGm8g4G0.js +0 -118
- package/dist/update-issue-BGm8g4G0.js.map +0 -1
- package/dist/update-issue-Dx2EZ5pY.cjs +0 -124
- package/dist/update-issue-Dx2EZ5pY.cjs.map +0 -1
- package/dist/update-project-B0clXxii.js +0 -128
- package/dist/update-project-B0clXxii.js.map +0 -1
- package/dist/update-project-BJkzcapF.cjs +0 -134
- package/dist/update-project-BJkzcapF.cjs.map +0 -1
- package/dist/url-utils-CbcNJVYS.cjs +0 -235
- package/dist/url-utils-CbcNJVYS.cjs.map +0 -1
- package/dist/url-utils-CfKwo6s5.js +0 -175
- package/dist/url-utils-CfKwo6s5.js.map +0 -1
- package/dist/usage-CMWaPhZv.cjs.map +0 -1
- package/dist/usage-CpguKuwi.js.map +0 -1
- package/dist/utils/slug-validation.cjs +0 -5
- package/dist/utils/slug-validation.d.cts +0 -51
- package/dist/utils/slug-validation.d.cts.map +0 -1
- package/dist/utils/slug-validation.d.ts +0 -51
- package/dist/utils/slug-validation.d.ts.map +0 -1
- package/dist/utils/slug-validation.js +0 -3
- package/dist/utils/url-utils.cjs +0 -12
- package/dist/utils/url-utils.d.cts +0 -87
- package/dist/utils/url-utils.d.cts.map +0 -1
- package/dist/utils/url-utils.d.ts +0 -87
- package/dist/utils/url-utils.d.ts.map +0 -1
- package/dist/utils/url-utils.js +0 -3
- package/dist/utils-C7sQWgE3.d.cts +0 -39
- package/dist/utils-C7sQWgE3.d.cts.map +0 -1
- package/dist/utils-CIt6Amml.cjs +0 -124
- package/dist/utils-CIt6Amml.cjs.map +0 -1
- package/dist/utils-CaNeCYCH.js +0 -94
- package/dist/utils-CaNeCYCH.js.map +0 -1
- package/dist/utils-CmH2wxA_.d.ts +0 -39
- package/dist/utils-CmH2wxA_.d.ts.map +0 -1
- package/dist/utils-DJIwl8YR.cjs +0 -96
- package/dist/utils-DJIwl8YR.cjs.map +0 -1
- package/dist/utils-DOb7bs5_.js +0 -90
- package/dist/utils-DOb7bs5_.js.map +0 -1
- package/dist/utils-R15EJutP.d.ts +0 -43
- package/dist/utils-R15EJutP.d.ts.map +0 -1
- package/dist/utils-RPc9DHgJ.d.cts +0 -43
- package/dist/utils-RPc9DHgJ.d.cts.map +0 -1
- package/dist/validate-region-url-Bdokgz65.js +0 -37
- package/dist/validate-region-url-Bdokgz65.js.map +0 -1
- package/dist/validate-region-url-BvT-IgKg.cjs +0 -42
- package/dist/validate-region-url-BvT-IgKg.cjs.map +0 -1
- package/dist/version-CaFsr_xb.cjs +0 -19
- package/dist/version-CaFsr_xb.cjs.map +0 -1
- package/dist/version-DY1nl1TZ.js +0 -7
- package/dist/version-DY1nl1TZ.js.map +0 -1
- package/dist/version.cjs +0 -4
- package/dist/version.d.cts +0 -8
- package/dist/version.d.cts.map +0 -1
- package/dist/version.d.ts +0 -8
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -3
- package/dist/whoami-9JymZ3NV.cjs +0 -46
- package/dist/whoami-9JymZ3NV.cjs.map +0 -1
- package/dist/whoami-BsX-LoXG.js +0 -34
- package/dist/whoami-BsX-LoXG.js.map +0 -1
- package/dist/whoami-DRDjyhDL.cjs +0 -44
- package/dist/whoami-DRDjyhDL.cjs.map +0 -1
- package/dist/whoami-FliA3IrX.js +0 -39
- package/dist/whoami-FliA3IrX.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-attachment-DuyBT68p.cjs","names":["ParamOrganizationSlug","ParamProjectSlug","ParamEventId","context: ServerContext","contentParts: (TextContent | ImageContent | EmbeddedResource)[]","image: ImageContent","resource: EmbeddedResource","output","text: TextContent"],"sources":["../src/tools/get-event-attachment.ts"],"sourcesContent":["import { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport type { ServerContext } from \"../types\";\nimport type {\n TextContent,\n ImageContent,\n EmbeddedResource,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n ParamOrganizationSlug,\n ParamProjectSlug,\n ParamEventId,\n ParamAttachmentId,\n ParamRegionUrl,\n} from \"../schema\";\nimport { setTag } from \"@sentry/core\";\n\nexport default defineTool({\n name: \"get_event_attachment\",\n requiredSkills: [\"inspect\"], // Only available in inspect skill\n requiredScopes: [\"event:read\"],\n description: [\n \"Download attachments from a Sentry event.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Download files attached to a specific event\",\n \"- Access screenshots, log files, or other attachments uploaded with an error report\",\n \"- Retrieve attachment metadata and download URLs\",\n \"\",\n \"<examples>\",\n \"### Download a specific attachment by ID\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n \"```\",\n \"\",\n \"### List all attachments for an event\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n \"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n \"- The `projectSlug` is required to identify which project the event belongs to\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n projectSlug: ParamProjectSlug,\n eventId: ParamEventId,\n attachmentId: ParamAttachmentId.nullable().default(null),\n regionUrl: ParamRegionUrl.nullable().default(null),\n },\n annotations: {\n readOnlyHint: true,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n setTag(\"organization.slug\", params.organizationSlug);\n\n // If attachmentId is provided, download the specific attachment\n if (params.attachmentId) {\n const attachment = await apiService.getEventAttachment({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n attachmentId: params.attachmentId,\n });\n\n const contentParts: (TextContent | ImageContent | EmbeddedResource)[] =\n [];\n const isBinary = !attachment.attachment.mimetype?.startsWith(\"text/\");\n\n if (isBinary) {\n const isImage = attachment.attachment.mimetype?.startsWith(\"image/\");\n // Base64 encode the binary attachment content\n // and add to the content as an embedded resource\n const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());\n let binary = \"\";\n for (let i = 0; i < uint8Array.byteLength; i++) {\n binary += String.fromCharCode(uint8Array[i]);\n }\n if (isImage) {\n const image: ImageContent = {\n type: \"image\",\n mimeType: attachment.attachment.mimetype,\n data: btoa(binary),\n };\n contentParts.push(image);\n } else {\n const resource: EmbeddedResource = {\n id: params.attachmentId,\n type: \"resource\",\n resource: {\n uri: `file://${attachment.filename}`,\n mimeType: attachment.attachment.mimetype,\n blob: btoa(binary),\n },\n };\n contentParts.push(resource);\n }\n }\n\n let output = `# Event Attachment Download\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Attachment ID:** ${params.attachmentId}\\n`;\n output += `**Filename:** ${attachment.filename}\\n`;\n output += `**Type:** ${attachment.attachment.type}\\n`;\n output += `**Size:** ${attachment.attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.attachment.sha1}\\n\\n`;\n output += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\n if (isBinary) {\n output += `## Binary Content\\n\\n`;\n output += `The attachment is included as a resource and accessible through your client.\\n`;\n } else {\n // If it's a text file and we have blob content, decode and display it instead\n // of embedding it as an image or resource\n const textContent = await attachment.blob.text();\n output += `## File Content\\n\\n`;\n output += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n }\n\n const text: TextContent = {\n type: \"text\",\n text: output,\n };\n contentParts.push(text);\n\n return contentParts;\n }\n\n // List all attachments for the event\n const attachments = await apiService.listEventAttachments({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n });\n\n let output = `# Event Attachments\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Project:** ${params.projectSlug}\\n\\n`;\n\n if (attachments.length === 0) {\n output += \"No attachments found for this event.\\n\";\n return output;\n }\n\n output += `Found ${attachments.length} attachment(s):\\n\\n`;\n\n attachments.forEach((attachment, index) => {\n output += `## Attachment ${index + 1}\\n\\n`;\n output += `**ID:** ${attachment.id}\\n`;\n output += `**Name:** ${attachment.name}\\n`;\n output += `**Type:** ${attachment.type}\\n`;\n output += `**Size:** ${attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.sha1}\\n\\n`;\n output += `To download this attachment, use the \"get_event_attachment\" tool with the attachmentId provided:\\n`;\n output += `\\`get_event_attachment(organizationSlug=\"${params.organizationSlug}\", projectSlug=\"${params.projectSlug}\", eventId=\"${params.eventId}\", attachmentId=\"${attachment.id}\")\\`\\n\\n`;\n });\n\n return output;\n },\n});\n"],"mappings":"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"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { defineTool } from "./define-vA6uuVue.js";
|
|
2
|
-
import { apiServiceFromContext } from "./api-BCICbJoI.js";
|
|
3
|
-
import { ParamAttachmentId, ParamEventId, ParamOrganizationSlug, ParamProjectSlug, ParamRegionUrl } from "./schema-ChlpIaqA.js";
|
|
4
|
-
import { setTag } from "@sentry/core";
|
|
5
|
-
|
|
6
|
-
//#region src/tools/get-event-attachment.ts
|
|
7
|
-
var get_event_attachment_default = defineTool({
|
|
8
|
-
name: "get_event_attachment",
|
|
9
|
-
requiredSkills: ["inspect"],
|
|
10
|
-
requiredScopes: ["event:read"],
|
|
11
|
-
description: [
|
|
12
|
-
"Download attachments from a Sentry event.",
|
|
13
|
-
"",
|
|
14
|
-
"Use this tool when you need to:",
|
|
15
|
-
"- Download files attached to a specific event",
|
|
16
|
-
"- Access screenshots, log files, or other attachments uploaded with an error report",
|
|
17
|
-
"- Retrieve attachment metadata and download URLs",
|
|
18
|
-
"",
|
|
19
|
-
"<examples>",
|
|
20
|
-
"### Download a specific attachment by ID",
|
|
21
|
-
"",
|
|
22
|
-
"```",
|
|
23
|
-
"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')",
|
|
24
|
-
"```",
|
|
25
|
-
"",
|
|
26
|
-
"### List all attachments for an event",
|
|
27
|
-
"",
|
|
28
|
-
"```",
|
|
29
|
-
"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
|
|
30
|
-
"```",
|
|
31
|
-
"",
|
|
32
|
-
"</examples>",
|
|
33
|
-
"",
|
|
34
|
-
"<hints>",
|
|
35
|
-
"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource",
|
|
36
|
-
"- If `attachmentId` is omitted, all attachments for the event will be listed with download information",
|
|
37
|
-
"- The `projectSlug` is required to identify which project the event belongs to",
|
|
38
|
-
"</hints>"
|
|
39
|
-
].join("\n"),
|
|
40
|
-
inputSchema: {
|
|
41
|
-
organizationSlug: ParamOrganizationSlug,
|
|
42
|
-
projectSlug: ParamProjectSlug,
|
|
43
|
-
eventId: ParamEventId,
|
|
44
|
-
attachmentId: ParamAttachmentId.nullable().default(null),
|
|
45
|
-
regionUrl: ParamRegionUrl.nullable().default(null)
|
|
46
|
-
},
|
|
47
|
-
annotations: {
|
|
48
|
-
readOnlyHint: true,
|
|
49
|
-
openWorldHint: true
|
|
50
|
-
},
|
|
51
|
-
async handler(params, context) {
|
|
52
|
-
const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
|
|
53
|
-
setTag("organization.slug", params.organizationSlug);
|
|
54
|
-
if (params.attachmentId) {
|
|
55
|
-
const attachment = await apiService.getEventAttachment({
|
|
56
|
-
organizationSlug: params.organizationSlug,
|
|
57
|
-
projectSlug: params.projectSlug,
|
|
58
|
-
eventId: params.eventId,
|
|
59
|
-
attachmentId: params.attachmentId
|
|
60
|
-
});
|
|
61
|
-
const contentParts = [];
|
|
62
|
-
const isBinary = !attachment.attachment.mimetype?.startsWith("text/");
|
|
63
|
-
if (isBinary) {
|
|
64
|
-
const isImage = attachment.attachment.mimetype?.startsWith("image/");
|
|
65
|
-
const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());
|
|
66
|
-
let binary = "";
|
|
67
|
-
for (let i = 0; i < uint8Array.byteLength; i++) binary += String.fromCharCode(uint8Array[i]);
|
|
68
|
-
if (isImage) {
|
|
69
|
-
const image = {
|
|
70
|
-
type: "image",
|
|
71
|
-
mimeType: attachment.attachment.mimetype,
|
|
72
|
-
data: btoa(binary)
|
|
73
|
-
};
|
|
74
|
-
contentParts.push(image);
|
|
75
|
-
} else {
|
|
76
|
-
const resource = {
|
|
77
|
-
id: params.attachmentId,
|
|
78
|
-
type: "resource",
|
|
79
|
-
resource: {
|
|
80
|
-
uri: `file://${attachment.filename}`,
|
|
81
|
-
mimeType: attachment.attachment.mimetype,
|
|
82
|
-
blob: btoa(binary)
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
contentParts.push(resource);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
let output$1 = `# Event Attachment Download\n\n`;
|
|
89
|
-
output$1 += `**Event ID:** ${params.eventId}\n`;
|
|
90
|
-
output$1 += `**Attachment ID:** ${params.attachmentId}\n`;
|
|
91
|
-
output$1 += `**Filename:** ${attachment.filename}\n`;
|
|
92
|
-
output$1 += `**Type:** ${attachment.attachment.type}\n`;
|
|
93
|
-
output$1 += `**Size:** ${attachment.attachment.size} bytes\n`;
|
|
94
|
-
output$1 += `**MIME Type:** ${attachment.attachment.mimetype}\n`;
|
|
95
|
-
output$1 += `**Created:** ${attachment.attachment.dateCreated}\n`;
|
|
96
|
-
output$1 += `**SHA1:** ${attachment.attachment.sha1}\n\n`;
|
|
97
|
-
output$1 += `**Download URL:** ${attachment.downloadUrl}\n\n`;
|
|
98
|
-
if (isBinary) {
|
|
99
|
-
output$1 += `## Binary Content\n\n`;
|
|
100
|
-
output$1 += `The attachment is included as a resource and accessible through your client.\n`;
|
|
101
|
-
} else {
|
|
102
|
-
const textContent = await attachment.blob.text();
|
|
103
|
-
output$1 += `## File Content\n\n`;
|
|
104
|
-
output$1 += `\`\`\`\n${textContent}\n\`\`\`\n\n`;
|
|
105
|
-
}
|
|
106
|
-
const text = {
|
|
107
|
-
type: "text",
|
|
108
|
-
text: output$1
|
|
109
|
-
};
|
|
110
|
-
contentParts.push(text);
|
|
111
|
-
return contentParts;
|
|
112
|
-
}
|
|
113
|
-
const attachments = await apiService.listEventAttachments({
|
|
114
|
-
organizationSlug: params.organizationSlug,
|
|
115
|
-
projectSlug: params.projectSlug,
|
|
116
|
-
eventId: params.eventId
|
|
117
|
-
});
|
|
118
|
-
let output = `# Event Attachments\n\n`;
|
|
119
|
-
output += `**Event ID:** ${params.eventId}\n`;
|
|
120
|
-
output += `**Project:** ${params.projectSlug}\n\n`;
|
|
121
|
-
if (attachments.length === 0) {
|
|
122
|
-
output += "No attachments found for this event.\n";
|
|
123
|
-
return output;
|
|
124
|
-
}
|
|
125
|
-
output += `Found ${attachments.length} attachment(s):\n\n`;
|
|
126
|
-
attachments.forEach((attachment, index) => {
|
|
127
|
-
output += `## Attachment ${index + 1}\n\n`;
|
|
128
|
-
output += `**ID:** ${attachment.id}\n`;
|
|
129
|
-
output += `**Name:** ${attachment.name}\n`;
|
|
130
|
-
output += `**Type:** ${attachment.type}\n`;
|
|
131
|
-
output += `**Size:** ${attachment.size} bytes\n`;
|
|
132
|
-
output += `**MIME Type:** ${attachment.mimetype}\n`;
|
|
133
|
-
output += `**Created:** ${attachment.dateCreated}\n`;
|
|
134
|
-
output += `**SHA1:** ${attachment.sha1}\n\n`;
|
|
135
|
-
output += `To download this attachment, use the "get_event_attachment" tool with the attachmentId provided:\n`;
|
|
136
|
-
output += `\`get_event_attachment(organizationSlug="${params.organizationSlug}", projectSlug="${params.projectSlug}", eventId="${params.eventId}", attachmentId="${attachment.id}")\`\n\n`;
|
|
137
|
-
});
|
|
138
|
-
return output;
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
//#endregion
|
|
143
|
-
export { get_event_attachment_default };
|
|
144
|
-
//# sourceMappingURL=get-event-attachment-Dzg2R7ng.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-event-attachment-Dzg2R7ng.js","names":["context: ServerContext","contentParts: (TextContent | ImageContent | EmbeddedResource)[]","image: ImageContent","resource: EmbeddedResource","output","text: TextContent"],"sources":["../src/tools/get-event-attachment.ts"],"sourcesContent":["import { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport type { ServerContext } from \"../types\";\nimport type {\n TextContent,\n ImageContent,\n EmbeddedResource,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n ParamOrganizationSlug,\n ParamProjectSlug,\n ParamEventId,\n ParamAttachmentId,\n ParamRegionUrl,\n} from \"../schema\";\nimport { setTag } from \"@sentry/core\";\n\nexport default defineTool({\n name: \"get_event_attachment\",\n requiredSkills: [\"inspect\"], // Only available in inspect skill\n requiredScopes: [\"event:read\"],\n description: [\n \"Download attachments from a Sentry event.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Download files attached to a specific event\",\n \"- Access screenshots, log files, or other attachments uploaded with an error report\",\n \"- Retrieve attachment metadata and download URLs\",\n \"\",\n \"<examples>\",\n \"### Download a specific attachment by ID\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243', attachmentId='12345')\",\n \"```\",\n \"\",\n \"### List all attachments for an event\",\n \"\",\n \"```\",\n \"get_event_attachment(organizationSlug='my-organization', projectSlug='my-project', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If `attachmentId` is provided, the specific attachment will be downloaded as an embedded resource\",\n \"- If `attachmentId` is omitted, all attachments for the event will be listed with download information\",\n \"- The `projectSlug` is required to identify which project the event belongs to\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n projectSlug: ParamProjectSlug,\n eventId: ParamEventId,\n attachmentId: ParamAttachmentId.nullable().default(null),\n regionUrl: ParamRegionUrl.nullable().default(null),\n },\n annotations: {\n readOnlyHint: true,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n setTag(\"organization.slug\", params.organizationSlug);\n\n // If attachmentId is provided, download the specific attachment\n if (params.attachmentId) {\n const attachment = await apiService.getEventAttachment({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n attachmentId: params.attachmentId,\n });\n\n const contentParts: (TextContent | ImageContent | EmbeddedResource)[] =\n [];\n const isBinary = !attachment.attachment.mimetype?.startsWith(\"text/\");\n\n if (isBinary) {\n const isImage = attachment.attachment.mimetype?.startsWith(\"image/\");\n // Base64 encode the binary attachment content\n // and add to the content as an embedded resource\n const uint8Array = new Uint8Array(await attachment.blob.arrayBuffer());\n let binary = \"\";\n for (let i = 0; i < uint8Array.byteLength; i++) {\n binary += String.fromCharCode(uint8Array[i]);\n }\n if (isImage) {\n const image: ImageContent = {\n type: \"image\",\n mimeType: attachment.attachment.mimetype,\n data: btoa(binary),\n };\n contentParts.push(image);\n } else {\n const resource: EmbeddedResource = {\n id: params.attachmentId,\n type: \"resource\",\n resource: {\n uri: `file://${attachment.filename}`,\n mimeType: attachment.attachment.mimetype,\n blob: btoa(binary),\n },\n };\n contentParts.push(resource);\n }\n }\n\n let output = `# Event Attachment Download\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Attachment ID:** ${params.attachmentId}\\n`;\n output += `**Filename:** ${attachment.filename}\\n`;\n output += `**Type:** ${attachment.attachment.type}\\n`;\n output += `**Size:** ${attachment.attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.attachment.sha1}\\n\\n`;\n output += `**Download URL:** ${attachment.downloadUrl}\\n\\n`;\n\n if (isBinary) {\n output += `## Binary Content\\n\\n`;\n output += `The attachment is included as a resource and accessible through your client.\\n`;\n } else {\n // If it's a text file and we have blob content, decode and display it instead\n // of embedding it as an image or resource\n const textContent = await attachment.blob.text();\n output += `## File Content\\n\\n`;\n output += `\\`\\`\\`\\n${textContent}\\n\\`\\`\\`\\n\\n`;\n }\n\n const text: TextContent = {\n type: \"text\",\n text: output,\n };\n contentParts.push(text);\n\n return contentParts;\n }\n\n // List all attachments for the event\n const attachments = await apiService.listEventAttachments({\n organizationSlug: params.organizationSlug,\n projectSlug: params.projectSlug,\n eventId: params.eventId,\n });\n\n let output = `# Event Attachments\\n\\n`;\n output += `**Event ID:** ${params.eventId}\\n`;\n output += `**Project:** ${params.projectSlug}\\n\\n`;\n\n if (attachments.length === 0) {\n output += \"No attachments found for this event.\\n\";\n return output;\n }\n\n output += `Found ${attachments.length} attachment(s):\\n\\n`;\n\n attachments.forEach((attachment, index) => {\n output += `## Attachment ${index + 1}\\n\\n`;\n output += `**ID:** ${attachment.id}\\n`;\n output += `**Name:** ${attachment.name}\\n`;\n output += `**Type:** ${attachment.type}\\n`;\n output += `**Size:** ${attachment.size} bytes\\n`;\n output += `**MIME Type:** ${attachment.mimetype}\\n`;\n output += `**Created:** ${attachment.dateCreated}\\n`;\n output += `**SHA1:** ${attachment.sha1}\\n\\n`;\n output += `To download this attachment, use the \"get_event_attachment\" tool with the attachmentId provided:\\n`;\n output += `\\`get_event_attachment(organizationSlug=\"${params.organizationSlug}\", projectSlug=\"${params.projectSlug}\", eventId=\"${params.eventId}\", attachmentId=\"${attachment.id}\")\\`\\n\\n`;\n });\n\n return output;\n },\n});\n"],"mappings":"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"}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_errors = require('./errors-umQzF_vW.cjs');
|
|
3
|
-
const require_define = require('./define-CLp6EtpZ.cjs');
|
|
4
|
-
const require_logging = require('./logging-C-ST7-Ow.cjs');
|
|
5
|
-
const require_errors$1 = require('./errors-DWysOIMw.cjs');
|
|
6
|
-
const require_api = require('./api-CfzBwheo.cjs');
|
|
7
|
-
const require_schema = require('./schema-BGVOjcD7.cjs');
|
|
8
|
-
const require_issue_helpers = require('./issue-helpers-D-hBnXTk.cjs');
|
|
9
|
-
const require_formatting = require('./formatting-BatGC-29.cjs');
|
|
10
|
-
const require_enhance_error = require('./enhance-error-vihkdCX5.cjs');
|
|
11
|
-
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
12
|
-
const zod = require_chunk.__toESM(require("zod"));
|
|
13
|
-
|
|
14
|
-
//#region src/tools/get-issue-details.ts
|
|
15
|
-
var get_issue_details_default = require_define.defineTool({
|
|
16
|
-
name: "get_issue_details",
|
|
17
|
-
requiredSkills: [
|
|
18
|
-
"inspect",
|
|
19
|
-
"triage",
|
|
20
|
-
"seer"
|
|
21
|
-
],
|
|
22
|
-
requiredScopes: ["event:read"],
|
|
23
|
-
description: [
|
|
24
|
-
"Get detailed information about a specific Sentry issue by ID.",
|
|
25
|
-
"",
|
|
26
|
-
"USE THIS TOOL WHEN USERS:",
|
|
27
|
-
"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')",
|
|
28
|
-
"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'",
|
|
29
|
-
"- Want details/stacktrace/analysis for a known issue",
|
|
30
|
-
"- Provide a Sentry issue URL",
|
|
31
|
-
"",
|
|
32
|
-
"DO NOT USE for:",
|
|
33
|
-
"- General searching or listing issues (use search_issues)",
|
|
34
|
-
"- Root cause analysis (use analyze_issue_with_seer)",
|
|
35
|
-
"",
|
|
36
|
-
"TRIGGER PATTERNS:",
|
|
37
|
-
"- 'Explain ISSUE-123' → use get_issue_details",
|
|
38
|
-
"- 'Tell me about PROJECT-456' → use get_issue_details",
|
|
39
|
-
"- 'What happened in [issue URL]' → use get_issue_details",
|
|
40
|
-
"",
|
|
41
|
-
"<examples>",
|
|
42
|
-
"### With Sentry URL (recommended - simplest approach)",
|
|
43
|
-
"```",
|
|
44
|
-
"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')",
|
|
45
|
-
"```",
|
|
46
|
-
"",
|
|
47
|
-
"### With issue ID and organization",
|
|
48
|
-
"```",
|
|
49
|
-
"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')",
|
|
50
|
-
"```",
|
|
51
|
-
"",
|
|
52
|
-
"### With event ID and organization",
|
|
53
|
-
"```",
|
|
54
|
-
"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
|
|
55
|
-
"```",
|
|
56
|
-
"</examples>",
|
|
57
|
-
"",
|
|
58
|
-
"<hints>",
|
|
59
|
-
"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged",
|
|
60
|
-
"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately",
|
|
61
|
-
"- If using issueId (not URL), then organizationSlug is required",
|
|
62
|
-
"</hints>"
|
|
63
|
-
].join("\n"),
|
|
64
|
-
inputSchema: {
|
|
65
|
-
organizationSlug: require_schema.ParamOrganizationSlug.optional(),
|
|
66
|
-
regionUrl: require_schema.ParamRegionUrl.nullable().default(null),
|
|
67
|
-
issueId: require_schema.ParamIssueShortId.optional(),
|
|
68
|
-
eventId: zod.z.string().trim().describe("The ID of the event.").optional(),
|
|
69
|
-
issueUrl: require_schema.ParamIssueUrl.optional()
|
|
70
|
-
},
|
|
71
|
-
annotations: {
|
|
72
|
-
readOnlyHint: true,
|
|
73
|
-
openWorldHint: true
|
|
74
|
-
},
|
|
75
|
-
async handler(params, context) {
|
|
76
|
-
const apiService = require_api.apiServiceFromContext(context, { regionUrl: params.regionUrl });
|
|
77
|
-
if (params.eventId) {
|
|
78
|
-
const orgSlug$1 = params.organizationSlug;
|
|
79
|
-
const eventId = params.eventId;
|
|
80
|
-
if (!orgSlug$1) throw new require_errors.UserInputError("`organizationSlug` is required when providing `eventId`");
|
|
81
|
-
(0, __sentry_core.setTag)("organization.slug", orgSlug$1);
|
|
82
|
-
const [issue$1] = await apiService.listIssues({
|
|
83
|
-
organizationSlug: orgSlug$1,
|
|
84
|
-
query: eventId
|
|
85
|
-
});
|
|
86
|
-
if (!issue$1) return `# Event Not Found\n\nNo issue found for Event ID: ${eventId}`;
|
|
87
|
-
let event$1;
|
|
88
|
-
try {
|
|
89
|
-
event$1 = await apiService.getEventForIssue({
|
|
90
|
-
organizationSlug: orgSlug$1,
|
|
91
|
-
issueId: issue$1.shortId,
|
|
92
|
-
eventId
|
|
93
|
-
});
|
|
94
|
-
} catch (error) {
|
|
95
|
-
if (error instanceof require_errors$1.ApiNotFoundError) throw require_enhance_error.enhanceNotFoundError(error, {
|
|
96
|
-
organizationSlug: orgSlug$1,
|
|
97
|
-
issueId: issue$1.shortId,
|
|
98
|
-
eventId
|
|
99
|
-
});
|
|
100
|
-
throw error;
|
|
101
|
-
}
|
|
102
|
-
let autofixState$1;
|
|
103
|
-
try {
|
|
104
|
-
autofixState$1 = await apiService.getAutofixState({
|
|
105
|
-
organizationSlug: orgSlug$1,
|
|
106
|
-
issueId: issue$1.shortId
|
|
107
|
-
});
|
|
108
|
-
} catch (error) {}
|
|
109
|
-
const performanceTrace$1 = await maybeFetchPerformanceTrace({
|
|
110
|
-
apiService,
|
|
111
|
-
organizationSlug: orgSlug$1,
|
|
112
|
-
event: event$1
|
|
113
|
-
});
|
|
114
|
-
return require_formatting.formatIssueOutput({
|
|
115
|
-
organizationSlug: orgSlug$1,
|
|
116
|
-
issue: issue$1,
|
|
117
|
-
event: event$1,
|
|
118
|
-
apiService,
|
|
119
|
-
autofixState: autofixState$1,
|
|
120
|
-
performanceTrace: performanceTrace$1
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
if (!params.issueUrl && !params.issueId) throw new require_errors.UserInputError("Either `issueId` or `issueUrl` must be provided");
|
|
124
|
-
if (!params.issueUrl && !params.organizationSlug) throw new require_errors.UserInputError("`organizationSlug` is required when providing `issueId`");
|
|
125
|
-
const { organizationSlug: orgSlug, issueId: parsedIssueId } = require_issue_helpers.parseIssueParams({
|
|
126
|
-
organizationSlug: params.organizationSlug,
|
|
127
|
-
issueId: params.issueId,
|
|
128
|
-
issueUrl: params.issueUrl
|
|
129
|
-
});
|
|
130
|
-
(0, __sentry_core.setTag)("organization.slug", orgSlug);
|
|
131
|
-
let issue;
|
|
132
|
-
try {
|
|
133
|
-
issue = await apiService.getIssue({
|
|
134
|
-
organizationSlug: orgSlug,
|
|
135
|
-
issueId: parsedIssueId
|
|
136
|
-
});
|
|
137
|
-
} catch (error) {
|
|
138
|
-
if (error instanceof require_errors$1.ApiNotFoundError) throw require_enhance_error.enhanceNotFoundError(error, {
|
|
139
|
-
organizationSlug: orgSlug,
|
|
140
|
-
issueId: parsedIssueId
|
|
141
|
-
});
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
const event = await apiService.getLatestEventForIssue({
|
|
145
|
-
organizationSlug: orgSlug,
|
|
146
|
-
issueId: issue.shortId
|
|
147
|
-
});
|
|
148
|
-
let autofixState;
|
|
149
|
-
try {
|
|
150
|
-
autofixState = await apiService.getAutofixState({
|
|
151
|
-
organizationSlug: orgSlug,
|
|
152
|
-
issueId: issue.shortId
|
|
153
|
-
});
|
|
154
|
-
} catch (error) {}
|
|
155
|
-
const performanceTrace = await maybeFetchPerformanceTrace({
|
|
156
|
-
apiService,
|
|
157
|
-
organizationSlug: orgSlug,
|
|
158
|
-
event
|
|
159
|
-
});
|
|
160
|
-
return require_formatting.formatIssueOutput({
|
|
161
|
-
organizationSlug: orgSlug,
|
|
162
|
-
issue,
|
|
163
|
-
event,
|
|
164
|
-
apiService,
|
|
165
|
-
autofixState,
|
|
166
|
-
performanceTrace
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
async function maybeFetchPerformanceTrace({ apiService, organizationSlug, event }) {
|
|
171
|
-
const context = shouldFetchTraceForEvent(event);
|
|
172
|
-
if (!context) return void 0;
|
|
173
|
-
try {
|
|
174
|
-
return await apiService.getTrace({
|
|
175
|
-
organizationSlug,
|
|
176
|
-
traceId: context.traceId,
|
|
177
|
-
limit: 1e4
|
|
178
|
-
});
|
|
179
|
-
} catch (error) {
|
|
180
|
-
require_logging.logError(error);
|
|
181
|
-
return void 0;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function isErrorEvent(event) {
|
|
185
|
-
return event.type === "error" || event.type === "default";
|
|
186
|
-
}
|
|
187
|
-
function shouldFetchTraceForEvent(event) {
|
|
188
|
-
if (isErrorEvent(event)) return null;
|
|
189
|
-
const traceId = event.contexts?.trace?.trace_id;
|
|
190
|
-
if (typeof traceId !== "string" || traceId.length === 0) return null;
|
|
191
|
-
return { traceId };
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
//#endregion
|
|
195
|
-
Object.defineProperty(exports, 'get_issue_details_default', {
|
|
196
|
-
enumerable: true,
|
|
197
|
-
get: function () {
|
|
198
|
-
return get_issue_details_default;
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
//# sourceMappingURL=get-issue-details-BY7S1YyX.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue-details-BY7S1YyX.cjs","names":["context: ServerContext","orgSlug","UserInputError","issue","event: Awaited<ReturnType<typeof apiService.getEventForIssue>>","ApiNotFoundError","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","performanceTrace","issue: Awaited<ReturnType<typeof apiService.getIssue>>","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","event: Event"],"sources":["../src/tools/get-issue-details.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport {\n parseIssueParams,\n formatIssueOutput,\n} from \"../internal/tool-helpers/issue\";\nimport { enhanceNotFoundError } from \"../internal/tool-helpers/enhance-error\";\nimport { ApiNotFoundError } from \"../api-client\";\nimport type { SentryApiService } from \"../api-client\";\nimport type {\n Event,\n ErrorEvent,\n DefaultEvent,\n TransactionEvent,\n Trace,\n} from \"../api-client/types\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport { logError } from \"../telem/logging\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"get_issue_details\",\n requiredSkills: [\"inspect\", \"triage\", \"seer\"], // Available in inspect, triage, and seer skills\n requiredScopes: [\"event:read\"],\n description: [\n \"Get detailed information about a specific Sentry issue by ID.\",\n \"\",\n \"USE THIS TOOL WHEN USERS:\",\n \"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')\",\n \"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'\",\n \"- Want details/stacktrace/analysis for a known issue\",\n \"- Provide a Sentry issue URL\",\n \"\",\n \"DO NOT USE for:\",\n \"- General searching or listing issues (use search_issues)\",\n \"- Root cause analysis (use analyze_issue_with_seer)\",\n \"\",\n \"TRIGGER PATTERNS:\",\n \"- 'Explain ISSUE-123' → use get_issue_details\",\n \"- 'Tell me about PROJECT-456' → use get_issue_details\",\n \"- 'What happened in [issue URL]' → use get_issue_details\",\n \"\",\n \"<examples>\",\n \"### With Sentry URL (recommended - simplest approach)\",\n \"```\",\n \"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')\",\n \"```\",\n \"\",\n \"### With issue ID and organization\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n \"```\",\n \"\",\n \"### With event ID and organization\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged\",\n \"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately\",\n \"- If using issueId (not URL), then organizationSlug is required\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.nullable().default(null),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n annotations: {\n readOnlyHint: true,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n const eventId = params.eventId; // Capture eventId for type safety\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n // API client will throw ApiClientError/ApiServerError which the MCP server wrapper handles\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${eventId}`;\n }\n // For this call, we might want to provide context if it fails\n let event: Awaited<ReturnType<typeof apiService.getEventForIssue>>;\n try {\n event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId,\n });\n } catch (error) {\n // Optionally enhance 404 errors with parameter context\n if (error instanceof ApiNotFoundError) {\n throw enhanceNotFoundError(error, {\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId,\n });\n }\n throw error;\n }\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n const performanceTrace = await maybeFetchPerformanceTrace({\n apiService,\n organizationSlug: orgSlug,\n event,\n });\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n performanceTrace,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // For the main issue lookup, provide parameter context on 404\n let issue: Awaited<ReturnType<typeof apiService.getIssue>>;\n try {\n issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n } catch (error) {\n if (error instanceof ApiNotFoundError) {\n throw enhanceNotFoundError(error, {\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n }\n throw error;\n }\n\n const event = await apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n const performanceTrace = await maybeFetchPerformanceTrace({\n apiService,\n organizationSlug: orgSlug,\n event,\n });\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n performanceTrace,\n });\n },\n});\n\nasync function maybeFetchPerformanceTrace({\n apiService,\n organizationSlug,\n event,\n}: {\n apiService: SentryApiService;\n organizationSlug: string;\n event: Event;\n}): Promise<Trace | undefined> {\n const context = shouldFetchTraceForEvent(event);\n if (!context) {\n return undefined;\n }\n\n try {\n return await apiService.getTrace({\n organizationSlug,\n traceId: context.traceId,\n limit: 10000,\n });\n } catch (error) {\n logError(error);\n return undefined;\n }\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent | DefaultEvent {\n // \"default\" type represents error events without exception data\n return event.type === \"error\" || event.type === \"default\";\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === \"transaction\";\n}\n\nfunction shouldFetchTraceForEvent(event: Event): { traceId: string } | null {\n // Only fetch traces for non-error events (transactions, profiling, etc.)\n if (isErrorEvent(event)) {\n return null;\n }\n\n // Check if we have a trace ID\n const traceId = event.contexts?.trace?.trace_id;\n\n if (typeof traceId !== \"string\" || traceId.length === 0) {\n return null;\n }\n\n return { traceId };\n}\n"],"mappings":"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"}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { UserInputError } from "./errors-BXmNwD2K.js";
|
|
2
|
-
import { defineTool } from "./define-vA6uuVue.js";
|
|
3
|
-
import { logError } from "./logging-ChQnSEmD.js";
|
|
4
|
-
import { ApiNotFoundError } from "./errors-DUEMWOr1.js";
|
|
5
|
-
import { apiServiceFromContext } from "./api-BCICbJoI.js";
|
|
6
|
-
import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from "./schema-ChlpIaqA.js";
|
|
7
|
-
import { parseIssueParams } from "./issue-helpers-DtCbXiRZ.js";
|
|
8
|
-
import { formatIssueOutput } from "./formatting-DUODx6N5.js";
|
|
9
|
-
import { enhanceNotFoundError } from "./enhance-error-BULHg3Tl.js";
|
|
10
|
-
import { setTag } from "@sentry/core";
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
|
|
13
|
-
//#region src/tools/get-issue-details.ts
|
|
14
|
-
var get_issue_details_default = defineTool({
|
|
15
|
-
name: "get_issue_details",
|
|
16
|
-
requiredSkills: [
|
|
17
|
-
"inspect",
|
|
18
|
-
"triage",
|
|
19
|
-
"seer"
|
|
20
|
-
],
|
|
21
|
-
requiredScopes: ["event:read"],
|
|
22
|
-
description: [
|
|
23
|
-
"Get detailed information about a specific Sentry issue by ID.",
|
|
24
|
-
"",
|
|
25
|
-
"USE THIS TOOL WHEN USERS:",
|
|
26
|
-
"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')",
|
|
27
|
-
"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'",
|
|
28
|
-
"- Want details/stacktrace/analysis for a known issue",
|
|
29
|
-
"- Provide a Sentry issue URL",
|
|
30
|
-
"",
|
|
31
|
-
"DO NOT USE for:",
|
|
32
|
-
"- General searching or listing issues (use search_issues)",
|
|
33
|
-
"- Root cause analysis (use analyze_issue_with_seer)",
|
|
34
|
-
"",
|
|
35
|
-
"TRIGGER PATTERNS:",
|
|
36
|
-
"- 'Explain ISSUE-123' → use get_issue_details",
|
|
37
|
-
"- 'Tell me about PROJECT-456' → use get_issue_details",
|
|
38
|
-
"- 'What happened in [issue URL]' → use get_issue_details",
|
|
39
|
-
"",
|
|
40
|
-
"<examples>",
|
|
41
|
-
"### With Sentry URL (recommended - simplest approach)",
|
|
42
|
-
"```",
|
|
43
|
-
"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')",
|
|
44
|
-
"```",
|
|
45
|
-
"",
|
|
46
|
-
"### With issue ID and organization",
|
|
47
|
-
"```",
|
|
48
|
-
"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')",
|
|
49
|
-
"```",
|
|
50
|
-
"",
|
|
51
|
-
"### With event ID and organization",
|
|
52
|
-
"```",
|
|
53
|
-
"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')",
|
|
54
|
-
"```",
|
|
55
|
-
"</examples>",
|
|
56
|
-
"",
|
|
57
|
-
"<hints>",
|
|
58
|
-
"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged",
|
|
59
|
-
"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately",
|
|
60
|
-
"- If using issueId (not URL), then organizationSlug is required",
|
|
61
|
-
"</hints>"
|
|
62
|
-
].join("\n"),
|
|
63
|
-
inputSchema: {
|
|
64
|
-
organizationSlug: ParamOrganizationSlug.optional(),
|
|
65
|
-
regionUrl: ParamRegionUrl.nullable().default(null),
|
|
66
|
-
issueId: ParamIssueShortId.optional(),
|
|
67
|
-
eventId: z.string().trim().describe("The ID of the event.").optional(),
|
|
68
|
-
issueUrl: ParamIssueUrl.optional()
|
|
69
|
-
},
|
|
70
|
-
annotations: {
|
|
71
|
-
readOnlyHint: true,
|
|
72
|
-
openWorldHint: true
|
|
73
|
-
},
|
|
74
|
-
async handler(params, context) {
|
|
75
|
-
const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
|
|
76
|
-
if (params.eventId) {
|
|
77
|
-
const orgSlug$1 = params.organizationSlug;
|
|
78
|
-
const eventId = params.eventId;
|
|
79
|
-
if (!orgSlug$1) throw new UserInputError("`organizationSlug` is required when providing `eventId`");
|
|
80
|
-
setTag("organization.slug", orgSlug$1);
|
|
81
|
-
const [issue$1] = await apiService.listIssues({
|
|
82
|
-
organizationSlug: orgSlug$1,
|
|
83
|
-
query: eventId
|
|
84
|
-
});
|
|
85
|
-
if (!issue$1) return `# Event Not Found\n\nNo issue found for Event ID: ${eventId}`;
|
|
86
|
-
let event$1;
|
|
87
|
-
try {
|
|
88
|
-
event$1 = await apiService.getEventForIssue({
|
|
89
|
-
organizationSlug: orgSlug$1,
|
|
90
|
-
issueId: issue$1.shortId,
|
|
91
|
-
eventId
|
|
92
|
-
});
|
|
93
|
-
} catch (error) {
|
|
94
|
-
if (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {
|
|
95
|
-
organizationSlug: orgSlug$1,
|
|
96
|
-
issueId: issue$1.shortId,
|
|
97
|
-
eventId
|
|
98
|
-
});
|
|
99
|
-
throw error;
|
|
100
|
-
}
|
|
101
|
-
let autofixState$1;
|
|
102
|
-
try {
|
|
103
|
-
autofixState$1 = await apiService.getAutofixState({
|
|
104
|
-
organizationSlug: orgSlug$1,
|
|
105
|
-
issueId: issue$1.shortId
|
|
106
|
-
});
|
|
107
|
-
} catch (error) {}
|
|
108
|
-
const performanceTrace$1 = await maybeFetchPerformanceTrace({
|
|
109
|
-
apiService,
|
|
110
|
-
organizationSlug: orgSlug$1,
|
|
111
|
-
event: event$1
|
|
112
|
-
});
|
|
113
|
-
return formatIssueOutput({
|
|
114
|
-
organizationSlug: orgSlug$1,
|
|
115
|
-
issue: issue$1,
|
|
116
|
-
event: event$1,
|
|
117
|
-
apiService,
|
|
118
|
-
autofixState: autofixState$1,
|
|
119
|
-
performanceTrace: performanceTrace$1
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
|
|
123
|
-
if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
|
|
124
|
-
const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
|
|
125
|
-
organizationSlug: params.organizationSlug,
|
|
126
|
-
issueId: params.issueId,
|
|
127
|
-
issueUrl: params.issueUrl
|
|
128
|
-
});
|
|
129
|
-
setTag("organization.slug", orgSlug);
|
|
130
|
-
let issue;
|
|
131
|
-
try {
|
|
132
|
-
issue = await apiService.getIssue({
|
|
133
|
-
organizationSlug: orgSlug,
|
|
134
|
-
issueId: parsedIssueId
|
|
135
|
-
});
|
|
136
|
-
} catch (error) {
|
|
137
|
-
if (error instanceof ApiNotFoundError) throw enhanceNotFoundError(error, {
|
|
138
|
-
organizationSlug: orgSlug,
|
|
139
|
-
issueId: parsedIssueId
|
|
140
|
-
});
|
|
141
|
-
throw error;
|
|
142
|
-
}
|
|
143
|
-
const event = await apiService.getLatestEventForIssue({
|
|
144
|
-
organizationSlug: orgSlug,
|
|
145
|
-
issueId: issue.shortId
|
|
146
|
-
});
|
|
147
|
-
let autofixState;
|
|
148
|
-
try {
|
|
149
|
-
autofixState = await apiService.getAutofixState({
|
|
150
|
-
organizationSlug: orgSlug,
|
|
151
|
-
issueId: issue.shortId
|
|
152
|
-
});
|
|
153
|
-
} catch (error) {}
|
|
154
|
-
const performanceTrace = await maybeFetchPerformanceTrace({
|
|
155
|
-
apiService,
|
|
156
|
-
organizationSlug: orgSlug,
|
|
157
|
-
event
|
|
158
|
-
});
|
|
159
|
-
return formatIssueOutput({
|
|
160
|
-
organizationSlug: orgSlug,
|
|
161
|
-
issue,
|
|
162
|
-
event,
|
|
163
|
-
apiService,
|
|
164
|
-
autofixState,
|
|
165
|
-
performanceTrace
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
async function maybeFetchPerformanceTrace({ apiService, organizationSlug, event }) {
|
|
170
|
-
const context = shouldFetchTraceForEvent(event);
|
|
171
|
-
if (!context) return void 0;
|
|
172
|
-
try {
|
|
173
|
-
return await apiService.getTrace({
|
|
174
|
-
organizationSlug,
|
|
175
|
-
traceId: context.traceId,
|
|
176
|
-
limit: 1e4
|
|
177
|
-
});
|
|
178
|
-
} catch (error) {
|
|
179
|
-
logError(error);
|
|
180
|
-
return void 0;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
function isErrorEvent(event) {
|
|
184
|
-
return event.type === "error" || event.type === "default";
|
|
185
|
-
}
|
|
186
|
-
function shouldFetchTraceForEvent(event) {
|
|
187
|
-
if (isErrorEvent(event)) return null;
|
|
188
|
-
const traceId = event.contexts?.trace?.trace_id;
|
|
189
|
-
if (typeof traceId !== "string" || traceId.length === 0) return null;
|
|
190
|
-
return { traceId };
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
//#endregion
|
|
194
|
-
export { get_issue_details_default };
|
|
195
|
-
//# sourceMappingURL=get-issue-details-BxJzOzFQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-issue-details-BxJzOzFQ.js","names":["context: ServerContext","orgSlug","issue","event: Awaited<ReturnType<typeof apiService.getEventForIssue>>","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","performanceTrace","issue: Awaited<ReturnType<typeof apiService.getIssue>>","autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined","event: Event"],"sources":["../src/tools/get-issue-details.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport {\n parseIssueParams,\n formatIssueOutput,\n} from \"../internal/tool-helpers/issue\";\nimport { enhanceNotFoundError } from \"../internal/tool-helpers/enhance-error\";\nimport { ApiNotFoundError } from \"../api-client\";\nimport type { SentryApiService } from \"../api-client\";\nimport type {\n Event,\n ErrorEvent,\n DefaultEvent,\n TransactionEvent,\n Trace,\n} from \"../api-client/types\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport { logError } from \"../telem/logging\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"get_issue_details\",\n requiredSkills: [\"inspect\", \"triage\", \"seer\"], // Available in inspect, triage, and seer skills\n requiredScopes: [\"event:read\"],\n description: [\n \"Get detailed information about a specific Sentry issue by ID.\",\n \"\",\n \"USE THIS TOOL WHEN USERS:\",\n \"- Provide a specific issue ID (e.g., 'CLOUDFLARE-MCP-41', 'PROJECT-123')\",\n \"- Ask to 'explain [ISSUE-ID]', 'tell me about [ISSUE-ID]'\",\n \"- Want details/stacktrace/analysis for a known issue\",\n \"- Provide a Sentry issue URL\",\n \"\",\n \"DO NOT USE for:\",\n \"- General searching or listing issues (use search_issues)\",\n \"- Root cause analysis (use analyze_issue_with_seer)\",\n \"\",\n \"TRIGGER PATTERNS:\",\n \"- 'Explain ISSUE-123' → use get_issue_details\",\n \"- 'Tell me about PROJECT-456' → use get_issue_details\",\n \"- 'What happened in [issue URL]' → use get_issue_details\",\n \"\",\n \"<examples>\",\n \"### With Sentry URL (recommended - simplest approach)\",\n \"```\",\n \"get_issue_details(issueUrl='https://sentry.sentry.io/issues/6916805731/?project=4509062593708032&query=is%3Aunresolved')\",\n \"```\",\n \"\",\n \"### With issue ID and organization\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', issueId='CLOUDFLARE-MCP-41')\",\n \"```\",\n \"\",\n \"### With event ID and organization\",\n \"```\",\n \"get_issue_details(organizationSlug='my-organization', eventId='c49541c747cb4d8aa3efb70ca5aba243')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- **IMPORTANT**: If user provides a Sentry URL, pass the ENTIRE URL to issueUrl parameter unchanged\",\n \"- When using issueUrl, all other parameters are automatically extracted - don't provide them separately\",\n \"- If using issueId (not URL), then organizationSlug is required\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.nullable().default(null),\n issueId: ParamIssueShortId.optional(),\n eventId: z.string().trim().describe(\"The ID of the event.\").optional(),\n issueUrl: ParamIssueUrl.optional(),\n },\n annotations: {\n readOnlyHint: true,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n if (params.eventId) {\n const orgSlug = params.organizationSlug;\n const eventId = params.eventId; // Capture eventId for type safety\n if (!orgSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `eventId`\",\n );\n }\n\n setTag(\"organization.slug\", orgSlug);\n // API client will throw ApiClientError/ApiServerError which the MCP server wrapper handles\n const [issue] = await apiService.listIssues({\n organizationSlug: orgSlug,\n query: eventId,\n });\n if (!issue) {\n return `# Event Not Found\\n\\nNo issue found for Event ID: ${eventId}`;\n }\n // For this call, we might want to provide context if it fails\n let event: Awaited<ReturnType<typeof apiService.getEventForIssue>>;\n try {\n event = await apiService.getEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId,\n });\n } catch (error) {\n // Optionally enhance 404 errors with parameter context\n if (error instanceof ApiNotFoundError) {\n throw enhanceNotFoundError(error, {\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n eventId,\n });\n }\n throw error;\n }\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n const performanceTrace = await maybeFetchPerformanceTrace({\n apiService,\n organizationSlug: orgSlug,\n event,\n });\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n performanceTrace,\n });\n }\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // For the main issue lookup, provide parameter context on 404\n let issue: Awaited<ReturnType<typeof apiService.getIssue>>;\n try {\n issue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n } catch (error) {\n if (error instanceof ApiNotFoundError) {\n throw enhanceNotFoundError(error, {\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n });\n }\n throw error;\n }\n\n const event = await apiService.getLatestEventForIssue({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n\n // Try to fetch Seer analysis context (non-blocking)\n let autofixState:\n | Awaited<ReturnType<typeof apiService.getAutofixState>>\n | undefined;\n try {\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: issue.shortId,\n });\n } catch (error) {\n // Silently continue if Seer analysis is not available\n // This ensures the tool works even if Seer is not enabled\n }\n\n const performanceTrace = await maybeFetchPerformanceTrace({\n apiService,\n organizationSlug: orgSlug,\n event,\n });\n\n return formatIssueOutput({\n organizationSlug: orgSlug,\n issue,\n event,\n apiService,\n autofixState,\n performanceTrace,\n });\n },\n});\n\nasync function maybeFetchPerformanceTrace({\n apiService,\n organizationSlug,\n event,\n}: {\n apiService: SentryApiService;\n organizationSlug: string;\n event: Event;\n}): Promise<Trace | undefined> {\n const context = shouldFetchTraceForEvent(event);\n if (!context) {\n return undefined;\n }\n\n try {\n return await apiService.getTrace({\n organizationSlug,\n traceId: context.traceId,\n limit: 10000,\n });\n } catch (error) {\n logError(error);\n return undefined;\n }\n}\n\nfunction isErrorEvent(event: Event): event is ErrorEvent | DefaultEvent {\n // \"default\" type represents error events without exception data\n return event.type === \"error\" || event.type === \"default\";\n}\n\nfunction isTransactionEvent(event: Event): event is TransactionEvent {\n return event.type === \"transaction\";\n}\n\nfunction shouldFetchTraceForEvent(event: Event): { traceId: string } | null {\n // Only fetch traces for non-error events (transactions, profiling, etc.)\n if (isErrorEvent(event)) {\n return null;\n }\n\n // Check if we have a trace ID\n const traceId = event.contexts?.trace?.trace_id;\n\n if (typeof traceId !== \"string\" || traceId.length === 0) {\n return null;\n }\n\n return { traceId };\n}\n"],"mappings":"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"}
|