@sentry/mcp-server 0.17.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -19
- package/dist/agent-ADO0sPxf.d.cts +92 -0
- package/dist/agent-ADO0sPxf.d.cts.map +1 -0
- package/dist/agent-BA98dlM7.d.cts +34 -0
- package/dist/agent-BA98dlM7.d.cts.map +1 -0
- package/dist/agent-BL7Xae0U.js +60 -0
- package/dist/agent-BL7Xae0U.js.map +1 -0
- package/dist/agent-CbJ6lvV3.cjs +49 -0
- package/dist/agent-CbJ6lvV3.cjs.map +1 -0
- package/dist/agent-D7MuFRwE.cjs +66 -0
- package/dist/agent-D7MuFRwE.cjs.map +1 -0
- package/dist/agent-D9DV11tZ.d.ts +34 -0
- package/dist/agent-D9DV11tZ.d.ts.map +1 -0
- package/dist/agent-DXya3Bcy.js +43 -0
- package/dist/agent-DXya3Bcy.js.map +1 -0
- package/dist/agent-DhHtOQmP.d.ts +92 -0
- package/dist/agent-DhHtOQmP.d.ts.map +1 -0
- package/dist/{analyze-issue-with-seer-ByoDTsq-.cjs → analyze-issue-with-seer-CI8pvCnf.cjs} +41 -38
- package/dist/analyze-issue-with-seer-CI8pvCnf.cjs.map +1 -0
- package/dist/{analyze-issue-with-seer-CpwtN4UA.js → analyze-issue-with-seer-DvuKEcbu.js} +20 -17
- package/dist/analyze-issue-with-seer-DvuKEcbu.js.map +1 -0
- package/dist/{api-utils-DFWUfQ83.cjs → api-CZD9zwQ-.cjs} +15 -20
- package/dist/api-CZD9zwQ-.cjs.map +1 -0
- package/dist/{api-utils-BlUSO8xh.js → api-CkLTFexT.js} +15 -20
- package/dist/api-CkLTFexT.js.map +1 -0
- package/dist/api-client/client.cjs +5 -4
- package/dist/api-client/client.d.cts +4 -4
- package/dist/api-client/client.d.ts +4 -4
- package/dist/api-client/client.js +6 -4
- package/dist/api-client/errors.cjs +11 -0
- package/dist/api-client/errors.d.cts +2 -0
- package/dist/api-client/errors.d.ts +2 -0
- package/dist/api-client/errors.js +3 -0
- package/dist/api-client/index.cjs +22 -7
- package/dist/api-client/index.d.cts +6 -5
- package/dist/api-client/index.d.ts +6 -5
- package/dist/api-client/index.js +8 -6
- package/dist/api-client/schema.cjs +6 -1
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/callEmbeddedAgent-B_BMEB_u.js +38 -0
- package/dist/callEmbeddedAgent-B_BMEB_u.js.map +1 -0
- package/dist/callEmbeddedAgent-BaGxBAdM.cjs +44 -0
- package/dist/callEmbeddedAgent-BaGxBAdM.cjs.map +1 -0
- package/dist/cli/parse.cjs +5 -0
- package/dist/cli/parse.d.cts +12 -0
- package/dist/cli/parse.d.cts.map +1 -0
- package/dist/cli/parse.d.ts +12 -0
- package/dist/cli/parse.d.ts.map +1 -0
- package/dist/cli/parse.js +3 -0
- package/dist/cli/resolve.cjs +7 -0
- package/dist/cli/resolve.d.cts +11 -0
- package/dist/cli/resolve.d.cts.map +1 -0
- package/dist/cli/resolve.d.ts +11 -0
- package/dist/cli/resolve.d.ts.map +1 -0
- package/dist/cli/resolve.js +6 -0
- package/dist/cli/types.d.cts +3 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/cli/usage.cjs +3 -0
- package/dist/cli/usage.d.cts +9 -0
- package/dist/cli/usage.d.cts.map +1 -0
- package/dist/cli/usage.d.ts +9 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +3 -0
- package/dist/{client-CPrEfAwa.cjs → client-C2TwbSm-.cjs} +197 -86
- package/dist/client-C2TwbSm-.cjs.map +1 -0
- package/dist/{client-MaVV1gVC.js → client-CWgvrDHH.js} +198 -81
- package/dist/client-CWgvrDHH.js.map +1 -0
- package/dist/{client-DLkUGS7r.d.ts → client-C_fNdaX8.d.cts} +118 -22
- package/dist/client-C_fNdaX8.d.cts.map +1 -0
- package/dist/{client-DV68BdcS.d.cts → client-VVhTv_ej.d.ts} +115 -19
- package/dist/client-VVhTv_ej.d.ts.map +1 -0
- package/dist/config-BMC-126h.js +74 -0
- package/dist/config-BMC-126h.js.map +1 -0
- package/dist/{config-CD-5FpOO.cjs → config-CllFlx5w.cjs} +178 -1
- package/dist/config-CllFlx5w.cjs.map +1 -0
- package/dist/config-DbQP60oo.cjs +80 -0
- package/dist/config-DbQP60oo.cjs.map +1 -0
- package/dist/{config-BvtWiL3I.js → config-DlhHLHjD.js} +173 -2
- package/dist/config-DlhHLHjD.js.map +1 -0
- package/dist/{constants-Fe-4NTUo.js → constants-BPM_OWt0.js} +18 -2
- package/dist/constants-BPM_OWt0.js.map +1 -0
- package/dist/{constants-wrEbre3j.cjs → constants-DJrjLmh5.cjs} +29 -1
- package/dist/constants-DJrjLmh5.cjs.map +1 -0
- package/dist/constants.cjs +3 -1
- package/dist/constants.d.cts +8 -1
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +8 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -2
- package/dist/constraint-helpers-Bey-Pii6.js +64 -0
- package/dist/constraint-helpers-Bey-Pii6.js.map +1 -0
- package/dist/constraint-helpers-BqcuWXad.cjs +76 -0
- package/dist/constraint-helpers-BqcuWXad.cjs.map +1 -0
- package/dist/context-storage-B8onP4Pw.cjs +69 -0
- package/dist/context-storage-B8onP4Pw.cjs.map +1 -0
- package/dist/context-storage-BRwdNVKx.js +51 -0
- package/dist/context-storage-BRwdNVKx.js.map +1 -0
- package/dist/{create-dsn-BT3t-MDA.js → create-dsn-Bx2s8Bik.js} +11 -5
- package/dist/create-dsn-Bx2s8Bik.js.map +1 -0
- package/dist/{create-dsn-Bgwi-Ygi.cjs → create-dsn-ggGt0lZf.cjs} +13 -7
- package/dist/create-dsn-ggGt0lZf.cjs.map +1 -0
- package/dist/{create-project-Ca1Sy1_F.js → create-project-C0pm6zUK.js} +13 -7
- package/dist/create-project-C0pm6zUK.js.map +1 -0
- package/dist/{create-project-4R4aZMoc.cjs → create-project-CZBklXm8.cjs} +15 -9
- package/dist/create-project-CZBklXm8.cjs.map +1 -0
- package/dist/{create-team-D0dUl7Zo.js → create-team-BQIns3VD.js} +11 -5
- package/dist/create-team-BQIns3VD.js.map +1 -0
- package/dist/{create-team-CSBXDcoD.cjs → create-team-DmqKw2c1.cjs} +13 -7
- package/dist/create-team-DmqKw2c1.cjs.map +1 -0
- package/dist/{discover-dataset-fields-Cl7HpVkm.cjs → dataset-fields-C0m-vwNH.cjs} +13 -14
- package/dist/dataset-fields-C0m-vwNH.cjs.map +1 -0
- package/dist/{discover-dataset-fields-BEnyqPSq.js → dataset-fields-C1o_cZrM.js} +13 -14
- package/dist/dataset-fields-C1o_cZrM.js.map +1 -0
- package/dist/define-2Lj8Lm1t.js +8 -0
- package/dist/define-2Lj8Lm1t.js.map +1 -0
- package/dist/{defineTool-lWNTzWl_.cjs → define-BfP4rFlE.cjs} +2 -2
- package/dist/define-BfP4rFlE.cjs.map +1 -0
- package/dist/enhance-error-D3QfZOhm.js +32 -0
- package/dist/enhance-error-D3QfZOhm.js.map +1 -0
- package/dist/enhance-error-DzXrKg85.cjs +37 -0
- package/dist/enhance-error-DzXrKg85.cjs.map +1 -0
- package/dist/error-handling-CxV2m_Dr.cjs +132 -0
- package/dist/error-handling-CxV2m_Dr.cjs.map +1 -0
- package/dist/error-handling-R4SJQ7n0.js +97 -0
- package/dist/error-handling-R4SJQ7n0.js.map +1 -0
- package/dist/errors-00Iz6Wmy.d.cts +20 -0
- package/dist/errors-00Iz6Wmy.d.cts.map +1 -0
- package/dist/errors-Bmqdg5Q6.cjs +271 -0
- package/dist/errors-Bmqdg5Q6.cjs.map +1 -0
- package/dist/errors-Bvit2_Qs.d.ts +20 -0
- package/dist/errors-Bvit2_Qs.d.ts.map +1 -0
- package/dist/errors-CQZ-QlOB.js +217 -0
- package/dist/errors-CQZ-QlOB.js.map +1 -0
- package/dist/errors-DMiENfq7.d.cts +126 -0
- package/dist/errors-DMiENfq7.d.cts.map +1 -0
- package/dist/errors-JbBt1G2l.d.ts +126 -0
- package/dist/errors-JbBt1G2l.d.ts.map +1 -0
- package/dist/errors.d.cts +2 -20
- package/dist/errors.d.ts +2 -20
- package/dist/{fetch-utils-C_Xj921x.js → fetch-utils-BetJhSli.js} +1 -1
- package/dist/{fetch-utils-C_Xj921x.js.map → fetch-utils-BetJhSli.js.map} +1 -1
- package/dist/{fetch-utils-DkcYwqBo.cjs → fetch-utils-Cp3P-Ai3.cjs} +1 -1
- package/dist/{fetch-utils-DkcYwqBo.cjs.map → fetch-utils-Cp3P-Ai3.cjs.map} +1 -1
- package/dist/{find-dsns-DrNAfU_Q.js → find-dsns-BPN8wnUr.js} +9 -4
- package/dist/find-dsns-BPN8wnUr.js.map +1 -0
- package/dist/{find-dsns-CkvahHwJ.cjs → find-dsns-Ct6uFZMB.cjs} +11 -6
- package/dist/find-dsns-Ct6uFZMB.cjs.map +1 -0
- package/dist/{find-organizations-BDtHkcFV.cjs → find-organizations-BGI_WW2q.cjs} +22 -10
- package/dist/find-organizations-BGI_WW2q.cjs.map +1 -0
- package/dist/{find-organizations-Cs1GvZtJ.js → find-organizations-DxH9SS3w.js} +20 -8
- package/dist/find-organizations-DxH9SS3w.js.map +1 -0
- package/dist/find-projects-B80qSPpP.cjs +57 -0
- package/dist/find-projects-B80qSPpP.cjs.map +1 -0
- package/dist/find-projects-DOMBBYAP.js +51 -0
- package/dist/find-projects-DOMBBYAP.js.map +1 -0
- package/dist/{find-releases-Do_CywRr.js → find-releases-CfZRMBvh.js} +10 -5
- package/dist/find-releases-CfZRMBvh.js.map +1 -0
- package/dist/{find-releases-BsAkl--F.cjs → find-releases-Cy-Q-Qje.cjs} +12 -7
- package/dist/find-releases-Cy-Q-Qje.cjs.map +1 -0
- package/dist/find-teams-BuH2ddaL.cjs +57 -0
- package/dist/find-teams-BuH2ddaL.cjs.map +1 -0
- package/dist/find-teams-D5770X0I.js +51 -0
- package/dist/find-teams-D5770X0I.js.map +1 -0
- package/dist/{formatters-DSYXBiQx.js → formatters-B9XiCNZ_.js} +33 -27
- package/dist/formatters-B9XiCNZ_.js.map +1 -0
- package/dist/{formatters-DbqofIoy.cjs → formatters-CkbVfXEE.cjs} +17 -4
- package/dist/formatters-CkbVfXEE.cjs.map +1 -0
- package/dist/{formatters-CfeBjhXZ.cjs → formatters-DMlTJcHW.cjs} +38 -26
- package/dist/formatters-DMlTJcHW.cjs.map +1 -0
- package/dist/{formatters-B3ONbRhI.js → formatters-MEWHZ83Y.js} +12 -5
- package/dist/formatters-MEWHZ83Y.js.map +1 -0
- package/dist/{formatting-utils-C3sej5ER.js → formatting-CAQbf0su.js} +2 -2
- package/dist/formatting-CAQbf0su.js.map +1 -0
- package/dist/formatting-Cu1Skk_Y.cjs +897 -0
- package/dist/formatting-Cu1Skk_Y.cjs.map +1 -0
- package/dist/formatting-DytLf-hH.js +880 -0
- package/dist/formatting-DytLf-hH.js.map +1 -0
- package/dist/{formatting-utils-DDz14xeB.cjs → formatting-EM76FrY3.cjs} +2 -2
- package/dist/formatting-EM76FrY3.cjs.map +1 -0
- package/dist/{formatting-C3qu84cm.d.ts → formatting-FJne_W9i.d.cts} +11 -6
- package/dist/formatting-FJne_W9i.d.cts.map +1 -0
- package/dist/{formatting-CmBYkI_e.d.cts → formatting-ar_6QZRE.d.ts} +11 -6
- package/dist/formatting-ar_6QZRE.d.ts.map +1 -0
- package/dist/{get-doc-DyqJe6TP.js → get-doc-D9Xq7et9.js} +10 -5
- package/dist/get-doc-D9Xq7et9.js.map +1 -0
- package/dist/{get-doc-BfMg0GIa.cjs → get-doc-MxWNTA8R.cjs} +12 -7
- package/dist/get-doc-MxWNTA8R.cjs.map +1 -0
- package/dist/{get-event-attachment-CVoMrETq.js → get-event-attachment-B_BzSfcE.js} +9 -4
- package/dist/get-event-attachment-B_BzSfcE.js.map +1 -0
- package/dist/{get-event-attachment-BzhDeM6z.cjs → get-event-attachment-CrtS0QRV.cjs} +11 -6
- package/dist/get-event-attachment-CrtS0QRV.cjs.map +1 -0
- package/dist/{get-issue-details-_uS_AZ_v.js → get-issue-details-Bvw1Xi8I.js} +83 -23
- package/dist/get-issue-details-Bvw1Xi8I.js.map +1 -0
- package/dist/{get-issue-details-C96fhps3.cjs → get-issue-details-DTQ-jXyu.cjs} +85 -25
- package/dist/get-issue-details-DTQ-jXyu.cjs.map +1 -0
- package/dist/get-trace-details-BL5_jvgs.js +306 -0
- package/dist/get-trace-details-BL5_jvgs.js.map +1 -0
- package/dist/get-trace-details-iDp34mms.cjs +312 -0
- package/dist/get-trace-details-iDp34mms.cjs.map +1 -0
- package/dist/{handler-DTN2HYXt.js → handler-B08ITQl8.js} +45 -26
- package/dist/handler-B08ITQl8.js.map +1 -0
- package/dist/{handler-DEjS3yks.cjs → handler-B7-KeBak.cjs} +47 -28
- package/dist/handler-B7-KeBak.cjs.map +1 -0
- package/dist/{handler-BGhr9FJM.d.cts → handler-BcRR_2MX.d.cts} +4 -4
- package/dist/handler-BcRR_2MX.d.cts.map +1 -0
- package/dist/{handler-BPPTAi7I.d.ts → handler-CdSvAOl6.d.ts} +4 -4
- package/dist/handler-CdSvAOl6.d.ts.map +1 -0
- package/dist/{handler-7T1iMsQU.cjs → handler-DIiYPQGL.cjs} +46 -44
- package/dist/handler-DIiYPQGL.cjs.map +1 -0
- package/dist/{handler-BZ3hKPb8.d.cts → handler-LaesAQaD.d.cts} +4 -4
- package/dist/handler-LaesAQaD.d.cts.map +1 -0
- package/dist/{handler-B0bLvFFX.js → handler-nILS77E9.js} +44 -42
- package/dist/handler-nILS77E9.js.map +1 -0
- package/dist/{handler-cUB6XcUV.d.ts → handler-uWae09YN.d.ts} +4 -4
- package/dist/handler-uWae09YN.d.ts.map +1 -0
- package/dist/index.cjs +109 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +109 -103
- package/dist/index.js.map +1 -1
- package/dist/internal/agents/callEmbeddedAgent.cjs +4 -0
- package/dist/internal/agents/callEmbeddedAgent.d.cts +33 -0
- package/dist/internal/agents/callEmbeddedAgent.d.cts.map +1 -0
- package/dist/internal/agents/callEmbeddedAgent.d.ts +33 -0
- package/dist/internal/agents/callEmbeddedAgent.d.ts.map +1 -0
- package/dist/internal/agents/callEmbeddedAgent.js +4 -0
- package/dist/internal/agents/openai-provider.cjs +4 -0
- package/dist/internal/agents/openai-provider.d.cts +24 -0
- package/dist/internal/agents/openai-provider.d.cts.map +1 -0
- package/dist/internal/agents/openai-provider.d.ts +24 -0
- package/dist/internal/agents/openai-provider.d.ts.map +1 -0
- package/dist/internal/agents/openai-provider.js +3 -0
- package/dist/internal/agents/tools/dataset-fields.cjs +15 -0
- package/dist/{agent-tools/discover-dataset-fields.d.ts → internal/agents/tools/dataset-fields.d.cts} +18 -19
- package/dist/internal/agents/tools/dataset-fields.d.cts.map +1 -0
- package/dist/{agent-tools/discover-dataset-fields.d.cts → internal/agents/tools/dataset-fields.d.ts} +18 -19
- package/dist/internal/agents/tools/dataset-fields.d.ts.map +1 -0
- package/dist/internal/agents/tools/dataset-fields.js +12 -0
- package/dist/internal/agents/tools/otel-semantics.cjs +13 -0
- package/dist/internal/agents/tools/otel-semantics.d.cts +41 -0
- package/dist/internal/agents/tools/otel-semantics.d.cts.map +1 -0
- package/dist/internal/agents/tools/otel-semantics.d.ts +41 -0
- package/dist/internal/agents/tools/otel-semantics.d.ts.map +1 -0
- package/dist/internal/agents/tools/otel-semantics.js +12 -0
- package/dist/internal/agents/tools/utils.cjs +11 -0
- package/dist/internal/agents/tools/utils.d.cts +2 -0
- package/dist/internal/agents/tools/utils.d.ts +2 -0
- package/dist/internal/agents/tools/utils.js +11 -0
- package/dist/internal/agents/tools/whoami.cjs +13 -0
- package/dist/internal/agents/tools/whoami.d.cts +33 -0
- package/dist/internal/agents/tools/whoami.d.cts.map +1 -0
- package/dist/internal/agents/tools/whoami.d.ts +33 -0
- package/dist/internal/agents/tools/whoami.d.ts.map +1 -0
- package/dist/internal/agents/tools/whoami.js +12 -0
- package/dist/internal/constraint-helpers.cjs +4 -0
- package/dist/internal/constraint-helpers.d.cts +53 -0
- package/dist/internal/constraint-helpers.d.cts.map +1 -0
- package/dist/internal/constraint-helpers.d.ts +53 -0
- package/dist/internal/constraint-helpers.d.ts.map +1 -0
- package/dist/internal/constraint-helpers.js +3 -0
- package/dist/internal/context-storage.cjs +5 -0
- package/dist/internal/context-storage.d.cts +48 -0
- package/dist/internal/context-storage.d.cts.map +1 -0
- package/dist/internal/context-storage.d.ts +48 -0
- package/dist/internal/context-storage.d.ts.map +1 -0
- package/dist/internal/context-storage.js +3 -0
- package/dist/internal/error-handling.cjs +16 -0
- package/dist/internal/error-handling.d.cts +40 -0
- package/dist/internal/error-handling.d.cts.map +1 -0
- package/dist/internal/error-handling.d.ts +40 -0
- package/dist/internal/error-handling.d.ts.map +1 -0
- package/dist/internal/error-handling.js +11 -0
- package/dist/internal/fetch-utils.cjs +1 -1
- package/dist/internal/fetch-utils.d.cts +33 -2
- package/dist/internal/fetch-utils.d.cts.map +1 -0
- package/dist/internal/fetch-utils.d.ts +33 -2
- package/dist/internal/fetch-utils.d.ts.map +1 -0
- package/dist/internal/fetch-utils.js +1 -1
- package/dist/internal/formatting.cjs +2 -2
- package/dist/internal/formatting.d.cts +6 -5
- package/dist/internal/formatting.d.ts +6 -5
- package/dist/internal/formatting.js +2 -2
- package/dist/internal/issue-helpers.cjs +1 -1
- package/dist/internal/issue-helpers.d.cts +1 -1
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/test-fixtures.cjs +12 -2
- package/dist/internal/test-fixtures.cjs.map +1 -1
- package/dist/internal/test-fixtures.d.cts +35 -2043
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +35 -2043
- package/dist/internal/test-fixtures.d.ts.map +1 -1
- package/dist/internal/test-fixtures.js +12 -2
- package/dist/internal/test-fixtures.js.map +1 -1
- package/dist/internal/tool-helpers/api.cjs +15 -0
- package/dist/{tools/utils/api-utils.d.cts → internal/tool-helpers/api.d.cts} +10 -10
- package/dist/internal/tool-helpers/api.d.cts.map +1 -0
- package/dist/{tools/utils/api-utils.d.ts → internal/tool-helpers/api.d.ts} +10 -10
- package/dist/internal/tool-helpers/api.d.ts.map +1 -0
- package/dist/internal/tool-helpers/api.js +13 -0
- package/dist/internal/tool-helpers/define.cjs +3 -0
- package/dist/internal/tool-helpers/define.d.cts +12 -0
- package/dist/internal/tool-helpers/define.d.cts.map +1 -0
- package/dist/internal/tool-helpers/define.d.ts +12 -0
- package/dist/internal/tool-helpers/define.d.ts.map +1 -0
- package/dist/internal/tool-helpers/define.js +3 -0
- package/dist/internal/tool-helpers/enhance-error.cjs +11 -0
- package/dist/internal/tool-helpers/enhance-error.d.cts +29 -0
- package/dist/internal/tool-helpers/enhance-error.d.cts.map +1 -0
- package/dist/internal/tool-helpers/enhance-error.d.ts +29 -0
- package/dist/internal/tool-helpers/enhance-error.d.ts.map +1 -0
- package/dist/internal/tool-helpers/enhance-error.js +11 -0
- package/dist/internal/tool-helpers/formatting.cjs +3 -0
- package/dist/internal/tool-helpers/formatting.d.cts +16 -0
- package/dist/internal/tool-helpers/formatting.d.cts.map +1 -0
- package/dist/internal/tool-helpers/formatting.d.ts +16 -0
- package/dist/internal/tool-helpers/formatting.d.ts.map +1 -0
- package/dist/internal/tool-helpers/formatting.js +3 -0
- package/dist/internal/tool-helpers/issue.cjs +8 -0
- package/dist/internal/tool-helpers/issue.d.cts +8 -0
- package/dist/internal/tool-helpers/issue.d.ts +8 -0
- package/dist/internal/tool-helpers/issue.js +7 -0
- package/dist/internal/tool-helpers/seer.cjs +11 -0
- package/dist/{tools/utils/seer-utils.d.cts → internal/tool-helpers/seer.d.cts} +8 -7
- package/dist/internal/tool-helpers/seer.d.cts.map +1 -0
- package/dist/{tools/utils/seer-utils.d.ts → internal/tool-helpers/seer.d.ts} +8 -7
- package/dist/internal/tool-helpers/seer.d.ts.map +1 -0
- package/dist/{tools/utils/seer-utils.js → internal/tool-helpers/seer.js} +1 -1
- package/dist/internal/tool-helpers/validate-region-url.cjs +5 -0
- package/dist/internal/tool-helpers/validate-region-url.d.cts +20 -0
- package/dist/internal/tool-helpers/validate-region-url.d.cts.map +1 -0
- package/dist/internal/tool-helpers/validate-region-url.d.ts +20 -0
- package/dist/internal/tool-helpers/validate-region-url.d.ts.map +1 -0
- package/dist/internal/tool-helpers/validate-region-url.js +5 -0
- package/dist/{issue-helpers-CRx45FYG.js → issue-helpers-8Bubch8E.js} +1 -1
- package/dist/{issue-helpers-CRx45FYG.js.map → issue-helpers-8Bubch8E.js.map} +1 -1
- package/dist/{issue-helpers-Cz01Ipvl.d.cts → issue-helpers-CD46ia7_.d.cts} +1 -1
- package/dist/{issue-helpers-Cz01Ipvl.d.cts.map → issue-helpers-CD46ia7_.d.cts.map} +1 -1
- package/dist/{issue-helpers-s5fKLwJZ.cjs → issue-helpers-DbPTv_qC.cjs} +1 -1
- package/dist/{issue-helpers-s5fKLwJZ.cjs.map → issue-helpers-DbPTv_qC.cjs.map} +1 -1
- package/dist/{issue-helpers-D1_Uqr-F.d.ts → issue-helpers-bECziPOG.d.ts} +1 -1
- package/dist/{issue-helpers-D1_Uqr-F.d.ts.map → issue-helpers-bECziPOG.d.ts.map} +1 -1
- package/dist/logging-CDYnh7ho.d.cts +31 -0
- package/dist/logging-CDYnh7ho.d.cts.map +1 -0
- package/dist/logging-CkAJKyq2.cjs +298 -0
- package/dist/logging-CkAJKyq2.cjs.map +1 -0
- package/dist/logging-DqqDTe02.js +256 -0
- package/dist/logging-DqqDTe02.js.map +1 -0
- package/dist/logging-PY270KtN.d.ts +31 -0
- package/dist/logging-PY270KtN.d.ts.map +1 -0
- package/dist/openai-provider-BELCfis6.js +29 -0
- package/dist/openai-provider-BELCfis6.js.map +1 -0
- package/dist/openai-provider-CRxXeC9G.cjs +41 -0
- package/dist/openai-provider-CRxXeC9G.cjs.map +1 -0
- package/dist/{lookup-otel-semantics-Dt667kdR.js → otel-semantics-CArUzarp.js} +88 -94
- package/dist/otel-semantics-CArUzarp.js.map +1 -0
- package/dist/{lookup-otel-semantics-BbriXZAx.cjs → otel-semantics-onvZv7i9.cjs} +88 -94
- package/dist/otel-semantics-onvZv7i9.cjs.map +1 -0
- package/dist/parse-8lpnm_2Z.js +92 -0
- package/dist/parse-8lpnm_2Z.js.map +1 -0
- package/dist/parse-shlhKlaL.cjs +110 -0
- package/dist/parse-shlhKlaL.cjs.map +1 -0
- package/dist/permissions-40d2hxK-.d.ts +79 -0
- package/dist/permissions-40d2hxK-.d.ts.map +1 -0
- package/dist/permissions-B1meXGie.d.cts +79 -0
- package/dist/permissions-B1meXGie.d.cts.map +1 -0
- package/dist/permissions-C_xHmYV4.js +157 -0
- package/dist/permissions-C_xHmYV4.js.map +1 -0
- package/dist/permissions-D5kR-bZw.cjs +211 -0
- package/dist/permissions-D5kR-bZw.cjs.map +1 -0
- package/dist/permissions.cjs +11 -0
- package/dist/permissions.d.cts +2 -0
- package/dist/permissions.d.ts +2 -0
- package/dist/permissions.js +3 -0
- package/dist/resolve-CBipUzux.cjs +65 -0
- package/dist/resolve-CBipUzux.cjs.map +1 -0
- package/dist/resolve-CZduTbDq.js +54 -0
- package/dist/resolve-CZduTbDq.js.map +1 -0
- package/dist/{schema-DWmx8lgm.d.ts → schema-0uEmsoCr.d.ts} +3043 -495
- package/dist/schema-0uEmsoCr.d.ts.map +1 -0
- package/dist/{schema-CcFmBoEf.js → schema-CuB-30t5.js} +116 -6
- package/dist/schema-CuB-30t5.js.map +1 -0
- package/dist/{schema-BL3kwfOA.cjs → schema-Cv_VNAHz.cjs} +21 -6
- package/dist/schema-Cv_VNAHz.cjs.map +1 -0
- package/dist/{schema-C0LznFvu.cjs → schema-DoWJbcHt.cjs} +145 -5
- package/dist/schema-DoWJbcHt.cjs.map +1 -0
- package/dist/{schema-DMfkTR1l.js → schema-rwexXWFL.js} +10 -7
- package/dist/schema-rwexXWFL.js.map +1 -0
- package/dist/{schema-xbTf44Hn.d.cts → schema-xhCkX5uD.d.cts} +2988 -440
- package/dist/schema-xhCkX5uD.d.cts.map +1 -0
- package/dist/schema.cjs +5 -2
- package/dist/schema.d.cts +8 -5
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +8 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +4 -3
- package/dist/{search-docs-DIm3ykOg.js → search-docs-B9qNTw49.js} +10 -5
- package/dist/search-docs-B9qNTw49.js.map +1 -0
- package/dist/{search-docs-EbjJuL9Q.cjs → search-docs-CTT1Bt1U.cjs} +12 -7
- package/dist/search-docs-CTT1Bt1U.cjs.map +1 -0
- package/dist/{seer-utils-C7Kv0gr8.cjs → seer-B63P5CPi.cjs} +2 -2
- package/dist/seer-B63P5CPi.cjs.map +1 -0
- package/dist/{seer-utils-NPHv8KYY.js → seer-CderEQ-X.js} +2 -2
- package/dist/seer-CderEQ-X.js.map +1 -0
- package/dist/sentry-BhTMff8f.js +104 -0
- package/dist/sentry-BhTMff8f.js.map +1 -0
- package/dist/sentry-DZNWcvcy.d.ts +9 -0
- package/dist/sentry-DZNWcvcy.d.ts.map +1 -0
- package/dist/sentry-Da9wc8eP.cjs +110 -0
- package/dist/sentry-Da9wc8eP.cjs.map +1 -0
- package/dist/sentry-De4G2HDR.d.cts +9 -0
- package/dist/sentry-De4G2HDR.d.cts.map +1 -0
- package/dist/server-B0jJJdAd.js +157 -0
- package/dist/server-B0jJJdAd.js.map +1 -0
- package/dist/server-Bk2YVj60.cjs +163 -0
- package/dist/server-Bk2YVj60.cjs.map +1 -0
- package/dist/server.cjs +62 -54
- package/dist/server.d.cts +32 -18
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +32 -18
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +62 -54
- package/dist/slug-validation-58wajHeL.js +93 -0
- package/dist/slug-validation-58wajHeL.js.map +1 -0
- package/dist/slug-validation-DMk8Dyuh.cjs +111 -0
- package/dist/slug-validation-DMk8Dyuh.cjs.map +1 -0
- package/dist/{stdio-C6MAgHmA.cjs → stdio-D_myxOG-.cjs} +17 -15
- package/dist/stdio-D_myxOG-.cjs.map +1 -0
- package/dist/{stdio-DnAY4MSF.js → stdio-Uv0oXx1a.js} +17 -15
- package/dist/stdio-Uv0oXx1a.js.map +1 -0
- package/dist/telem/index.cjs +10 -0
- package/dist/telem/index.d.cts +3 -0
- package/dist/telem/index.d.ts +3 -0
- package/dist/telem/index.js +4 -0
- package/dist/telem/logging.cjs +9 -0
- package/dist/telem/logging.d.cts +2 -0
- package/dist/telem/logging.d.ts +2 -0
- package/dist/telem/logging.js +3 -0
- package/dist/telem/sentry.cjs +3 -0
- package/dist/telem/sentry.d.cts +2 -0
- package/dist/telem/sentry.d.ts +2 -0
- package/dist/telem/sentry.js +3 -0
- package/dist/test-setup.cjs +33843 -1525
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.d.cts +32 -1
- package/dist/test-setup.d.cts.map +1 -0
- package/dist/test-setup.d.ts +32 -1
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/test-setup.js +33896 -1578
- package/dist/test-setup.js.map +1 -1
- package/dist/test-utils/context.cjs +32 -0
- package/dist/test-utils/context.cjs.map +1 -0
- package/dist/test-utils/context.d.cts +17 -0
- package/dist/test-utils/context.d.cts.map +1 -0
- package/dist/test-utils/context.d.ts +17 -0
- package/dist/test-utils/context.d.ts.map +1 -0
- package/dist/test-utils/context.js +30 -0
- package/dist/test-utils/context.js.map +1 -0
- package/dist/toolDefinitions.cjs +638 -120
- package/dist/toolDefinitions.cjs.map +1 -1
- package/dist/toolDefinitions.d.cts +5 -5
- package/dist/toolDefinitions.d.cts.map +1 -1
- package/dist/toolDefinitions.d.ts +5 -5
- package/dist/toolDefinitions.d.ts.map +1 -1
- package/dist/toolDefinitions.js +638 -120
- package/dist/toolDefinitions.js.map +1 -1
- package/dist/tools/analyze-issue-with-seer.cjs +19 -15
- package/dist/tools/analyze-issue-with-seer.d.cts +4 -4
- package/dist/tools/analyze-issue-with-seer.d.ts +4 -4
- package/dist/tools/analyze-issue-with-seer.js +19 -15
- package/dist/tools/create-dsn.cjs +14 -10
- package/dist/tools/create-dsn.d.cts +5 -5
- package/dist/tools/create-dsn.d.ts +5 -5
- package/dist/tools/create-dsn.js +14 -10
- package/dist/tools/create-project.cjs +14 -11
- package/dist/tools/create-project.d.cts +5 -5
- package/dist/tools/create-project.d.ts +5 -5
- package/dist/tools/create-project.js +14 -11
- package/dist/tools/create-team.cjs +14 -10
- package/dist/tools/create-team.d.cts +4 -4
- package/dist/tools/create-team.d.ts +4 -4
- package/dist/tools/create-team.js +14 -10
- package/dist/tools/find-dsns.cjs +14 -10
- package/dist/tools/find-dsns.d.cts +7 -7
- package/dist/tools/find-dsns.d.cts.map +1 -1
- package/dist/tools/find-dsns.d.ts +7 -7
- package/dist/tools/find-dsns.d.ts.map +1 -1
- package/dist/tools/find-dsns.js +14 -10
- package/dist/tools/find-organizations.cjs +14 -8
- package/dist/tools/find-organizations.d.cts +7 -4
- package/dist/tools/find-organizations.d.ts +7 -4
- package/dist/tools/find-organizations.js +14 -8
- package/dist/tools/find-projects.cjs +14 -10
- package/dist/tools/find-projects.d.cts +7 -6
- package/dist/tools/find-projects.d.cts.map +1 -1
- package/dist/tools/find-projects.d.ts +7 -6
- package/dist/tools/find-projects.d.ts.map +1 -1
- package/dist/tools/find-projects.js +14 -10
- package/dist/tools/find-releases.cjs +14 -10
- package/dist/tools/find-releases.d.cts +5 -5
- package/dist/tools/find-releases.d.ts +5 -5
- package/dist/tools/find-releases.js +14 -10
- package/dist/tools/find-teams.cjs +14 -10
- package/dist/tools/find-teams.d.cts +7 -6
- package/dist/tools/find-teams.d.cts.map +1 -1
- package/dist/tools/find-teams.d.ts +7 -6
- package/dist/tools/find-teams.d.ts.map +1 -1
- package/dist/tools/find-teams.js +14 -10
- package/dist/tools/get-doc.cjs +10 -9
- package/dist/tools/get-doc.d.cts +3 -3
- package/dist/tools/get-doc.d.ts +3 -3
- package/dist/tools/get-doc.js +10 -9
- package/dist/tools/get-event-attachment.cjs +14 -10
- package/dist/tools/get-event-attachment.d.cts +9 -9
- package/dist/tools/get-event-attachment.d.cts.map +1 -1
- package/dist/tools/get-event-attachment.d.ts +9 -9
- package/dist/tools/get-event-attachment.d.ts.map +1 -1
- package/dist/tools/get-event-attachment.js +14 -10
- package/dist/tools/get-issue-details.cjs +19 -14
- package/dist/tools/get-issue-details.d.cts +4 -4
- package/dist/tools/get-issue-details.d.ts +4 -4
- package/dist/tools/get-issue-details.js +19 -14
- package/dist/tools/get-trace-details.cjs +17 -0
- package/dist/tools/get-trace-details.d.cts +14 -0
- package/dist/tools/get-trace-details.d.cts.map +1 -0
- package/dist/tools/get-trace-details.d.ts +14 -0
- package/dist/tools/get-trace-details.d.ts.map +1 -0
- package/dist/tools/get-trace-details.js +17 -0
- package/dist/tools/index.cjs +55 -48
- package/dist/tools/index.d.cts +81 -72
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +81 -72
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +55 -48
- package/dist/tools/search-docs.cjs +13 -11
- package/dist/tools/search-docs.d.cts +3 -3
- package/dist/tools/search-docs.d.ts +3 -3
- package/dist/tools/search-docs.js +13 -11
- package/dist/tools/search-events/agent.cjs +16 -6
- package/dist/tools/search-events/agent.d.cts +7 -43
- package/dist/tools/search-events/agent.d.ts +7 -43
- package/dist/tools/search-events/agent.js +16 -6
- package/dist/tools/search-events/config.cjs +3 -2
- package/dist/tools/search-events/config.d.cts +2 -1
- package/dist/tools/search-events/config.d.cts.map +1 -1
- package/dist/tools/search-events/config.d.ts +2 -1
- package/dist/tools/search-events/config.d.ts.map +1 -1
- package/dist/tools/search-events/config.js +2 -2
- package/dist/tools/search-events/formatters.cjs +11 -3
- package/dist/tools/search-events/formatters.d.cts +28 -17
- package/dist/tools/search-events/formatters.d.cts.map +1 -1
- package/dist/tools/search-events/formatters.d.ts +28 -17
- package/dist/tools/search-events/formatters.d.ts.map +1 -1
- package/dist/tools/search-events/formatters.js +11 -4
- package/dist/tools/search-events/handler.cjs +23 -17
- package/dist/tools/search-events/handler.d.cts +4 -4
- package/dist/tools/search-events/handler.d.ts +4 -4
- package/dist/tools/search-events/handler.js +23 -17
- package/dist/tools/search-events/index.cjs +27 -19
- package/dist/tools/search-events/index.d.cts +11 -5
- package/dist/tools/search-events/index.d.ts +11 -5
- package/dist/tools/search-events/index.js +25 -19
- package/dist/tools/search-events/utils.cjs +14 -7
- package/dist/tools/search-events/utils.d.cts +7 -5
- package/dist/tools/search-events/utils.d.ts +7 -5
- package/dist/tools/search-events/utils.js +9 -2
- package/dist/tools/search-issues/agent.cjs +15 -5
- package/dist/tools/search-issues/agent.d.cts +7 -33
- package/dist/tools/search-issues/agent.d.ts +7 -33
- package/dist/tools/search-issues/agent.js +15 -5
- package/dist/tools/search-issues/config.cjs +1 -1
- package/dist/tools/search-issues/config.d.cts +1 -1
- package/dist/tools/search-issues/config.d.ts +1 -1
- package/dist/tools/search-issues/config.js +1 -1
- package/dist/tools/search-issues/formatters.cjs +3 -2
- package/dist/tools/search-issues/formatters.d.cts +20 -7
- package/dist/tools/search-issues/formatters.d.cts.map +1 -1
- package/dist/tools/search-issues/formatters.d.ts +20 -7
- package/dist/tools/search-issues/formatters.d.ts.map +1 -1
- package/dist/tools/search-issues/formatters.js +3 -3
- package/dist/tools/search-issues/handler.cjs +22 -15
- package/dist/tools/search-issues/handler.d.cts +4 -4
- package/dist/tools/search-issues/handler.d.ts +4 -4
- package/dist/tools/search-issues/handler.js +22 -15
- package/dist/tools/search-issues/index.cjs +26 -17
- package/dist/tools/search-issues/index.d.cts +11 -5
- package/dist/tools/search-issues/index.d.ts +11 -5
- package/dist/tools/search-issues/index.js +24 -17
- package/dist/tools/types.d.cts +3 -3
- package/dist/tools/types.d.ts +3 -3
- package/dist/tools/update-issue.cjs +19 -15
- package/dist/tools/update-issue.d.cts +10 -10
- package/dist/tools/update-issue.d.cts.map +1 -1
- package/dist/tools/update-issue.d.ts +10 -10
- package/dist/tools/update-issue.d.ts.map +1 -1
- package/dist/tools/update-issue.js +19 -15
- package/dist/tools/update-project.cjs +14 -11
- package/dist/tools/update-project.d.cts +6 -6
- package/dist/tools/update-project.d.ts +6 -6
- package/dist/tools/update-project.js +14 -11
- package/dist/tools/whoami.cjs +12 -8
- package/dist/tools/whoami.d.cts +3 -3
- package/dist/tools/whoami.d.ts +3 -3
- package/dist/tools/whoami.js +12 -8
- package/dist/{tools-qfk-QAo0.cjs → tools-DcCN34Xz.cjs} +21 -19
- package/dist/tools-DcCN34Xz.cjs.map +1 -0
- package/dist/tools-Du5wLts3.js +46 -0
- package/dist/tools-Du5wLts3.js.map +1 -0
- package/dist/transports/stdio.cjs +3 -55
- package/dist/transports/stdio.d.cts +12 -8
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +12 -8
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +3 -55
- package/dist/types-4O1B8U0e.d.ts +40 -0
- package/dist/types-4O1B8U0e.d.ts.map +1 -0
- package/dist/types-B9_8hSal.d.cts +58 -0
- package/dist/types-B9_8hSal.d.cts.map +1 -0
- package/dist/types-BU11bcu2.d.ts +58 -0
- package/dist/types-BU11bcu2.d.ts.map +1 -0
- package/dist/{types-BOcoP3Na.d.ts → types-CZUp4Xzk.d.ts} +10 -3
- package/dist/types-CZUp4Xzk.d.ts.map +1 -0
- package/dist/types-CtnbvcEw.d.cts +40 -0
- package/dist/types-CtnbvcEw.d.cts.map +1 -0
- package/dist/{types-aOEJ0KgQ.d.cts → types-DkmHqy15.d.cts} +10 -3
- package/dist/types-DkmHqy15.d.cts.map +1 -0
- package/dist/types-NVsIso1A.d.ts +31 -0
- package/dist/types-NVsIso1A.d.ts.map +1 -0
- package/dist/types-Z4mR2AFK.d.cts +31 -0
- package/dist/types-Z4mR2AFK.d.cts.map +1 -0
- package/dist/types.cjs +16 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -0
- package/dist/{update-issue-DoQYEQjf.js → update-issue-CoAkoO66.js} +15 -14
- package/dist/update-issue-CoAkoO66.js.map +1 -0
- package/dist/{update-issue-DqUsAuTd.cjs → update-issue-eELBq_Uy.cjs} +19 -18
- package/dist/update-issue-eELBq_Uy.cjs.map +1 -0
- package/dist/{update-project-C9CLxNfF.js → update-project-CuZlyBPN.js} +15 -8
- package/dist/update-project-CuZlyBPN.js.map +1 -0
- package/dist/{update-project-DQu5PnE3.cjs → update-project-DMRBdOZ5.cjs} +17 -10
- package/dist/update-project-DMRBdOZ5.cjs.map +1 -0
- package/dist/{url-utils-vJo2ER5v.cjs → url-utils-Bn5EoScr.cjs} +38 -9
- package/dist/url-utils-Bn5EoScr.cjs.map +1 -0
- package/dist/{url-utils-IqgSmI-B.js → url-utils-d9bPTnOl.js} +33 -10
- package/dist/url-utils-d9bPTnOl.js.map +1 -0
- package/dist/usage-CP6e39yF.cjs +39 -0
- package/dist/usage-CP6e39yF.cjs.map +1 -0
- package/dist/usage-CihInDyq.js +33 -0
- package/dist/usage-CihInDyq.js.map +1 -0
- package/dist/utils/slug-validation.cjs +5 -0
- package/dist/utils/slug-validation.d.cts +51 -0
- package/dist/utils/slug-validation.d.cts.map +1 -0
- package/dist/utils/slug-validation.d.ts +51 -0
- package/dist/utils/slug-validation.d.ts.map +1 -0
- package/dist/utils/slug-validation.js +3 -0
- package/dist/utils/url-utils.cjs +2 -1
- package/dist/utils/url-utils.d.cts +14 -6
- package/dist/utils/url-utils.d.cts.map +1 -1
- package/dist/utils/url-utils.d.ts +14 -6
- package/dist/utils/url-utils.d.ts.map +1 -1
- package/dist/utils/url-utils.js +2 -2
- package/dist/{utils-CqbeJfE1.cjs → utils-C5DuiZoe.cjs} +39 -53
- package/dist/utils-C5DuiZoe.cjs.map +1 -0
- package/dist/utils-CwvZS30K.js +94 -0
- package/dist/utils-CwvZS30K.js.map +1 -0
- package/dist/utils-DKQuo7b2.d.ts +43 -0
- package/dist/utils-DKQuo7b2.d.ts.map +1 -0
- package/dist/{utils-CzV_Tz2C.d.ts → utils-DKgPcA6i.d.cts} +16 -12
- package/dist/utils-DKgPcA6i.d.cts.map +1 -0
- package/dist/utils-DUJcA3eH.cjs +96 -0
- package/dist/utils-DUJcA3eH.cjs.map +1 -0
- package/dist/{utils-Fm-dODdb.d.cts → utils-DpeFMEgH.d.ts} +16 -12
- package/dist/utils-DpeFMEgH.d.ts.map +1 -0
- package/dist/utils-HNrRwq-a.d.cts +43 -0
- package/dist/utils-HNrRwq-a.d.cts.map +1 -0
- package/dist/utils-iC0Uutcf.js +90 -0
- package/dist/utils-iC0Uutcf.js.map +1 -0
- package/dist/validate-region-url-CaR6XWB_.js +37 -0
- package/dist/validate-region-url-CaR6XWB_.js.map +1 -0
- package/dist/validate-region-url-dzz6t54w.cjs +42 -0
- package/dist/validate-region-url-dzz6t54w.cjs.map +1 -0
- package/dist/version-6dHij-Gk.js +6 -0
- package/dist/{version-DvjTvYJs.js.map → version-6dHij-Gk.js.map} +1 -1
- package/dist/{version-Bu9nGzm5.cjs → version-Cq6vA9Kc.cjs} +2 -2
- package/dist/{version-Bu9nGzm5.cjs.map → version-Cq6vA9Kc.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/whoami-Bh_uOPqO.js +37 -0
- package/dist/whoami-Bh_uOPqO.js.map +1 -0
- package/dist/{whoami-xBAWvzG4.js → whoami-D8-XCgVJ.js} +7 -5
- package/dist/whoami-D8-XCgVJ.js.map +1 -0
- package/dist/{whoami-CoZJKpys.cjs → whoami-DBSqcCGl.cjs} +7 -5
- package/dist/whoami-DBSqcCGl.cjs.map +1 -0
- package/dist/whoami-DBlwuDZf.cjs +42 -0
- package/dist/whoami-DBlwuDZf.cjs.map +1 -0
- package/package.json +55 -28
- package/dist/agent-COgY789I.js +0 -225
- package/dist/agent-COgY789I.js.map +0 -1
- package/dist/agent-Cody_f0d.cjs +0 -59
- package/dist/agent-Cody_f0d.cjs.map +0 -1
- package/dist/agent-DZRRChrO.js +0 -53
- package/dist/agent-DZRRChrO.js.map +0 -1
- package/dist/agent-DpCCnhh5.cjs +0 -231
- package/dist/agent-DpCCnhh5.cjs.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.cjs +0 -6
- package/dist/agent-tools/discover-dataset-fields.d.cts.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.d.ts.map +0 -1
- package/dist/agent-tools/discover-dataset-fields.js +0 -3
- package/dist/agent-tools/lookup-otel-semantics.cjs +0 -5
- package/dist/agent-tools/lookup-otel-semantics.d.cts +0 -38
- package/dist/agent-tools/lookup-otel-semantics.d.cts.map +0 -1
- package/dist/agent-tools/lookup-otel-semantics.d.ts +0 -38
- package/dist/agent-tools/lookup-otel-semantics.d.ts.map +0 -1
- package/dist/agent-tools/lookup-otel-semantics.js +0 -4
- package/dist/agent-tools/whoami.cjs +0 -4
- package/dist/agent-tools/whoami.d.cts +0 -28
- package/dist/agent-tools/whoami.d.cts.map +0 -1
- package/dist/agent-tools/whoami.d.ts +0 -28
- package/dist/agent-tools/whoami.d.ts.map +0 -1
- package/dist/agent-tools/whoami.js +0 -3
- package/dist/analyze-issue-with-seer-ByoDTsq-.cjs.map +0 -1
- package/dist/analyze-issue-with-seer-CpwtN4UA.js.map +0 -1
- package/dist/api-utils-BlUSO8xh.js.map +0 -1
- package/dist/api-utils-DFWUfQ83.cjs.map +0 -1
- package/dist/client-CPrEfAwa.cjs.map +0 -1
- package/dist/client-DLkUGS7r.d.ts.map +0 -1
- package/dist/client-DV68BdcS.d.cts.map +0 -1
- package/dist/client-MaVV1gVC.js.map +0 -1
- package/dist/config-BUmDxVLS.js +0 -52
- package/dist/config-BUmDxVLS.js.map +0 -1
- package/dist/config-BvtWiL3I.js.map +0 -1
- package/dist/config-CD-5FpOO.cjs.map +0 -1
- package/dist/config-FWsgDbm7.cjs +0 -58
- package/dist/config-FWsgDbm7.cjs.map +0 -1
- package/dist/constants-Fe-4NTUo.js.map +0 -1
- package/dist/constants-wrEbre3j.cjs.map +0 -1
- package/dist/create-dsn-BT3t-MDA.js.map +0 -1
- package/dist/create-dsn-Bgwi-Ygi.cjs.map +0 -1
- package/dist/create-project-4R4aZMoc.cjs.map +0 -1
- package/dist/create-project-Ca1Sy1_F.js.map +0 -1
- package/dist/create-team-CSBXDcoD.cjs.map +0 -1
- package/dist/create-team-D0dUl7Zo.js.map +0 -1
- package/dist/defineTool-77H4nSna.js +0 -8
- package/dist/defineTool-77H4nSna.js.map +0 -1
- package/dist/defineTool-lWNTzWl_.cjs.map +0 -1
- package/dist/discover-dataset-fields-BEnyqPSq.js.map +0 -1
- package/dist/discover-dataset-fields-Cl7HpVkm.cjs.map +0 -1
- package/dist/errors.d.cts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/fetch-utils-CTLoW1R8.d.cts +0 -33
- package/dist/fetch-utils-CTLoW1R8.d.cts.map +0 -1
- package/dist/fetch-utils-JDZw4XaU.d.ts +0 -33
- package/dist/fetch-utils-JDZw4XaU.d.ts.map +0 -1
- package/dist/find-dsns-CkvahHwJ.cjs.map +0 -1
- package/dist/find-dsns-DrNAfU_Q.js.map +0 -1
- package/dist/find-organizations-BDtHkcFV.cjs.map +0 -1
- package/dist/find-organizations-Cs1GvZtJ.js.map +0 -1
- package/dist/find-projects-CZCMck_0.js +0 -39
- package/dist/find-projects-CZCMck_0.js.map +0 -1
- package/dist/find-projects-Dh-1AK-m.cjs +0 -45
- package/dist/find-projects-Dh-1AK-m.cjs.map +0 -1
- package/dist/find-releases-BsAkl--F.cjs.map +0 -1
- package/dist/find-releases-Do_CywRr.js.map +0 -1
- package/dist/find-teams-BylQQ4FO.js +0 -39
- package/dist/find-teams-BylQQ4FO.js.map +0 -1
- package/dist/find-teams-DXyzyQOy.cjs +0 -45
- package/dist/find-teams-DXyzyQOy.cjs.map +0 -1
- package/dist/formatters-B3ONbRhI.js.map +0 -1
- package/dist/formatters-CfeBjhXZ.cjs.map +0 -1
- package/dist/formatters-DSYXBiQx.js.map +0 -1
- package/dist/formatters-DbqofIoy.cjs.map +0 -1
- package/dist/formatting-C180PVwd.cjs +0 -419
- package/dist/formatting-C180PVwd.cjs.map +0 -1
- package/dist/formatting-C3qu84cm.d.ts.map +0 -1
- package/dist/formatting-CmBYkI_e.d.cts.map +0 -1
- package/dist/formatting-DIvCVunN.js +0 -402
- package/dist/formatting-DIvCVunN.js.map +0 -1
- package/dist/formatting-utils-C3sej5ER.js.map +0 -1
- package/dist/formatting-utils-DDz14xeB.cjs.map +0 -1
- package/dist/get-doc-BfMg0GIa.cjs.map +0 -1
- package/dist/get-doc-DyqJe6TP.js.map +0 -1
- package/dist/get-event-attachment-BzhDeM6z.cjs.map +0 -1
- package/dist/get-event-attachment-CVoMrETq.js.map +0 -1
- package/dist/get-issue-details-C96fhps3.cjs.map +0 -1
- package/dist/get-issue-details-_uS_AZ_v.js.map +0 -1
- package/dist/handler-7T1iMsQU.cjs.map +0 -1
- package/dist/handler-B0bLvFFX.js.map +0 -1
- package/dist/handler-BGhr9FJM.d.cts.map +0 -1
- package/dist/handler-BPPTAi7I.d.ts.map +0 -1
- package/dist/handler-BZ3hKPb8.d.cts.map +0 -1
- package/dist/handler-DEjS3yks.cjs.map +0 -1
- package/dist/handler-DTN2HYXt.js.map +0 -1
- package/dist/handler-cUB6XcUV.d.ts.map +0 -1
- package/dist/logging-BpL53bY6.cjs +0 -31
- package/dist/logging-BpL53bY6.cjs.map +0 -1
- package/dist/logging-tGU_SYcA.js +0 -25
- package/dist/logging-tGU_SYcA.js.map +0 -1
- package/dist/logging.cjs +0 -3
- package/dist/logging.d.cts +0 -37
- package/dist/logging.d.cts.map +0 -1
- package/dist/logging.d.ts +0 -37
- package/dist/logging.d.ts.map +0 -1
- package/dist/logging.js +0 -3
- package/dist/lookup-otel-semantics-BbriXZAx.cjs.map +0 -1
- package/dist/lookup-otel-semantics-Dt667kdR.js.map +0 -1
- package/dist/promptDefinitions-CVHtYaj8.d.cts +0 -34
- package/dist/promptDefinitions-CVHtYaj8.d.cts.map +0 -1
- package/dist/promptDefinitions-CWV8hsUX.cjs +0 -37
- package/dist/promptDefinitions-CWV8hsUX.cjs.map +0 -1
- package/dist/promptDefinitions-DF8nuJVq.js +0 -31
- package/dist/promptDefinitions-DF8nuJVq.js.map +0 -1
- package/dist/promptDefinitions-DehpwJfn.d.ts +0 -34
- package/dist/promptDefinitions-DehpwJfn.d.ts.map +0 -1
- package/dist/promptDefinitions.cjs +0 -5
- package/dist/promptDefinitions.d.cts +0 -2
- package/dist/promptDefinitions.d.ts +0 -2
- package/dist/promptDefinitions.js +0 -5
- package/dist/prompts-BTtNbKQR.cjs +0 -41
- package/dist/prompts-BTtNbKQR.cjs.map +0 -1
- package/dist/prompts-CYcvIxWR.js +0 -36
- package/dist/prompts-CYcvIxWR.js.map +0 -1
- package/dist/prompts.cjs +0 -4
- package/dist/prompts.d.cts +0 -30
- package/dist/prompts.d.cts.map +0 -1
- package/dist/prompts.d.ts +0 -30
- package/dist/prompts.d.ts.map +0 -1
- package/dist/prompts.js +0 -4
- package/dist/resources-Dadvq5Fm.cjs +0 -72
- package/dist/resources-Dadvq5Fm.cjs.map +0 -1
- package/dist/resources-jcFoc4JU.js +0 -60
- package/dist/resources-jcFoc4JU.js.map +0 -1
- package/dist/resources.cjs +0 -6
- package/dist/resources.d.cts +0 -37
- package/dist/resources.d.cts.map +0 -1
- package/dist/resources.d.ts +0 -37
- package/dist/resources.d.ts.map +0 -1
- package/dist/resources.js +0 -5
- package/dist/schema-BL3kwfOA.cjs.map +0 -1
- package/dist/schema-C0LznFvu.cjs.map +0 -1
- package/dist/schema-CcFmBoEf.js.map +0 -1
- package/dist/schema-DMfkTR1l.js.map +0 -1
- package/dist/schema-DWmx8lgm.d.ts.map +0 -1
- package/dist/schema-xbTf44Hn.d.cts.map +0 -1
- package/dist/search-docs-DIm3ykOg.js.map +0 -1
- package/dist/search-docs-EbjJuL9Q.cjs.map +0 -1
- package/dist/seer-utils-C7Kv0gr8.cjs.map +0 -1
- package/dist/seer-utils-NPHv8KYY.js.map +0 -1
- package/dist/server-CnJvaT0s.js +0 -292
- package/dist/server-CnJvaT0s.js.map +0 -1
- package/dist/server-Dv9HxoRk.cjs +0 -298
- package/dist/server-Dv9HxoRk.cjs.map +0 -1
- package/dist/stdio-C6MAgHmA.cjs.map +0 -1
- package/dist/stdio-DnAY4MSF.js.map +0 -1
- package/dist/tools/search-events/agent.d.cts.map +0 -1
- package/dist/tools/search-events/agent.d.ts.map +0 -1
- package/dist/tools/search-issues/agent.d.cts.map +0 -1
- package/dist/tools/search-issues/agent.d.ts.map +0 -1
- package/dist/tools/utils/api-utils.cjs +0 -11
- package/dist/tools/utils/api-utils.d.cts.map +0 -1
- package/dist/tools/utils/api-utils.d.ts.map +0 -1
- package/dist/tools/utils/api-utils.js +0 -9
- package/dist/tools/utils/defineTool.cjs +0 -3
- package/dist/tools/utils/defineTool.d.cts +0 -12
- package/dist/tools/utils/defineTool.d.cts.map +0 -1
- package/dist/tools/utils/defineTool.d.ts +0 -12
- package/dist/tools/utils/defineTool.d.ts.map +0 -1
- package/dist/tools/utils/defineTool.js +0 -3
- package/dist/tools/utils/fetch-utils.cjs +0 -5
- package/dist/tools/utils/fetch-utils.d.cts +0 -2
- package/dist/tools/utils/fetch-utils.d.ts +0 -2
- package/dist/tools/utils/fetch-utils.js +0 -4
- package/dist/tools/utils/formatting-utils.cjs +0 -3
- package/dist/tools/utils/formatting-utils.d.cts +0 -15
- package/dist/tools/utils/formatting-utils.d.cts.map +0 -1
- package/dist/tools/utils/formatting-utils.d.ts +0 -15
- package/dist/tools/utils/formatting-utils.d.ts.map +0 -1
- package/dist/tools/utils/formatting-utils.js +0 -3
- package/dist/tools/utils/issue-utils.cjs +0 -8
- package/dist/tools/utils/issue-utils.d.cts +0 -7
- package/dist/tools/utils/issue-utils.d.ts +0 -7
- package/dist/tools/utils/issue-utils.js +0 -7
- package/dist/tools/utils/seer-utils.cjs +0 -11
- package/dist/tools/utils/seer-utils.d.cts.map +0 -1
- package/dist/tools/utils/seer-utils.d.ts.map +0 -1
- package/dist/tools-B0wbxDty.js +0 -44
- package/dist/tools-B0wbxDty.js.map +0 -1
- package/dist/tools-qfk-QAo0.cjs.map +0 -1
- package/dist/types-BOcoP3Na.d.ts.map +0 -1
- package/dist/types-BV-G5sBp.d.cts +0 -31
- package/dist/types-BV-G5sBp.d.cts.map +0 -1
- package/dist/types-C1Fih0eQ.d.ts +0 -31
- package/dist/types-C1Fih0eQ.d.ts.map +0 -1
- package/dist/types-DE-njuHe.d.cts +0 -31
- package/dist/types-DE-njuHe.d.cts.map +0 -1
- package/dist/types-DRywojVB.d.ts +0 -31
- package/dist/types-DRywojVB.d.ts.map +0 -1
- package/dist/types-aOEJ0KgQ.d.cts.map +0 -1
- package/dist/update-issue-DoQYEQjf.js.map +0 -1
- package/dist/update-issue-DqUsAuTd.cjs.map +0 -1
- package/dist/update-project-C9CLxNfF.js.map +0 -1
- package/dist/update-project-DQu5PnE3.cjs.map +0 -1
- package/dist/url-utils-IqgSmI-B.js.map +0 -1
- package/dist/url-utils-vJo2ER5v.cjs.map +0 -1
- package/dist/utils-CqbeJfE1.cjs.map +0 -1
- package/dist/utils-CzV_Tz2C.d.ts.map +0 -1
- package/dist/utils-Fm-dODdb.d.cts.map +0 -1
- package/dist/utils-OgYE-imr.js +0 -108
- package/dist/utils-OgYE-imr.js.map +0 -1
- package/dist/version-DvjTvYJs.js +0 -6
- package/dist/whoami-BOJHfdih.cjs +0 -28
- package/dist/whoami-BOJHfdih.cjs.map +0 -1
- package/dist/whoami-Bswhb72a.js +0 -23
- package/dist/whoami-Bswhb72a.js.map +0 -1
- package/dist/whoami-CoZJKpys.cjs.map +0 -1
- package/dist/whoami-xBAWvzG4.js.map +0 -1
- /package/dist/{api-client-BWt6M7ij.cjs → api-client-BR5WolLe.js} +0 -0
- /package/dist/{api-client-CNv_hbPO.js → api-client-BsHWi0-I.cjs} +0 -0
- /package/dist/{fetch-utils-BqMx2KQr.js → cli/types.cjs} +0 -0
- /package/dist/{fetch-utils-DeZcERfe.cjs → cli/types.js} +0 -0
- /package/dist/{index-BPSCxsMC.d.cts → index-CmCelmEL.d.cts} +0 -0
- /package/dist/{index-DE1muTvw.d.ts → index-DZJ9s9rm.d.ts} +0 -0
- /package/dist/{issue-utils-BVAB6I-Z.js → issue-B7cgiWKp.cjs} +0 -0
- /package/dist/{issue-utils-pdbo-5LW.cjs → issue-BLm6gohl.js} +0 -0
- /package/dist/{search-events-BBFPuvRq.cjs → search-events-Bc2a_R3A.cjs} +0 -0
- /package/dist/{search-events-bV3-kK78.js → search-events-Bo5bAsOv.js} +0 -0
- /package/dist/{search-issues-BFgCvRYe.js → search-issues-AaiYCZ6J.cjs} +0 -0
- /package/dist/{search-issues-Biu64RkQ.cjs → search-issues-DVHuKDdB.js} +0 -0
- /package/dist/{types-6zHoEWAx.js → types-Bx1EKe0v.js} +0 -0
- /package/dist/{types-DdloOYgD.cjs → types-D10T4PdD.cjs} +0 -0
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { UserInputError } from "./errors-D_R568zP.js";
|
|
2
|
-
import { defineTool } from "./defineTool-77H4nSna.js";
|
|
3
|
-
import { apiServiceFromContext } from "./api-utils-BlUSO8xh.js";
|
|
4
|
-
import { ParamOrganizationSlug, ParamRegionUrl } from "./schema-DMfkTR1l.js";
|
|
5
|
-
import { setTag } from "@sentry/core";
|
|
6
|
-
|
|
7
|
-
//#region src/tools/find-teams.ts
|
|
8
|
-
var find_teams_default = defineTool({
|
|
9
|
-
name: "find_teams",
|
|
10
|
-
description: [
|
|
11
|
-
"Find teams in an organization in Sentry.",
|
|
12
|
-
"",
|
|
13
|
-
"Use this tool when you need to:",
|
|
14
|
-
"- View all teams in a Sentry organization",
|
|
15
|
-
"- Find a team's slug to aid other tool requests"
|
|
16
|
-
].join("\n"),
|
|
17
|
-
inputSchema: {
|
|
18
|
-
organizationSlug: ParamOrganizationSlug,
|
|
19
|
-
regionUrl: ParamRegionUrl.optional()
|
|
20
|
-
},
|
|
21
|
-
async handler(params, context) {
|
|
22
|
-
const apiService = apiServiceFromContext(context, { regionUrl: params.regionUrl });
|
|
23
|
-
const organizationSlug = params.organizationSlug;
|
|
24
|
-
if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
|
|
25
|
-
setTag("organization.slug", organizationSlug);
|
|
26
|
-
const teams = await apiService.listTeams(organizationSlug);
|
|
27
|
-
let output = `# Teams in **${organizationSlug}**\n\n`;
|
|
28
|
-
if (teams.length === 0) {
|
|
29
|
-
output += "No teams found.\n";
|
|
30
|
-
return output;
|
|
31
|
-
}
|
|
32
|
-
output += teams.map((team) => `- ${team.slug}\n`).join("");
|
|
33
|
-
return output;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
export { find_teams_default };
|
|
39
|
-
//# sourceMappingURL=find-teams-BylQQ4FO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-teams-BylQQ4FO.js","names":["context: ServerContext"],"sources":["../src/tools/find-teams.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"../schema\";\n\nexport default defineTool({\n name: \"find_teams\",\n description: [\n \"Find teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find a team's slug to aid other tool requests\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n});\n"],"mappings":";;;;;;;AAQA,yBAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB;EAClB,WAAW,eAAe,UAAU;CACrC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,OAAK,iBACH,OAAM,IAAI,eACR;AAIJ,SAAO,qBAAqB,iBAAiB;EAE7C,MAAM,QAAQ,MAAM,WAAW,UAAU,iBAAiB;EAC1D,IAAI,UAAU,eAAe,iBAAiB;AAC9C,MAAI,MAAM,WAAW,GAAG;AACtB,aAAU;AACV,UAAO;EACR;AACD,YAAU,MAAM,IAAI,CAAC,UAAU,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG;AAC1D,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
|
-
const require_errors = require('./errors-BtJEw2Z-.cjs');
|
|
3
|
-
const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
4
|
-
const require_api_utils = require('./api-utils-DFWUfQ83.cjs');
|
|
5
|
-
const require_schema = require('./schema-BL3kwfOA.cjs');
|
|
6
|
-
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
7
|
-
|
|
8
|
-
//#region src/tools/find-teams.ts
|
|
9
|
-
var find_teams_default = require_defineTool.defineTool({
|
|
10
|
-
name: "find_teams",
|
|
11
|
-
description: [
|
|
12
|
-
"Find teams in an organization in Sentry.",
|
|
13
|
-
"",
|
|
14
|
-
"Use this tool when you need to:",
|
|
15
|
-
"- View all teams in a Sentry organization",
|
|
16
|
-
"- Find a team's slug to aid other tool requests"
|
|
17
|
-
].join("\n"),
|
|
18
|
-
inputSchema: {
|
|
19
|
-
organizationSlug: require_schema.ParamOrganizationSlug,
|
|
20
|
-
regionUrl: require_schema.ParamRegionUrl.optional()
|
|
21
|
-
},
|
|
22
|
-
async handler(params, context) {
|
|
23
|
-
const apiService = require_api_utils.apiServiceFromContext(context, { regionUrl: params.regionUrl });
|
|
24
|
-
const organizationSlug = params.organizationSlug;
|
|
25
|
-
if (!organizationSlug) throw new require_errors.UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
|
|
26
|
-
(0, __sentry_core.setTag)("organization.slug", organizationSlug);
|
|
27
|
-
const teams = await apiService.listTeams(organizationSlug);
|
|
28
|
-
let output = `# Teams in **${organizationSlug}**\n\n`;
|
|
29
|
-
if (teams.length === 0) {
|
|
30
|
-
output += "No teams found.\n";
|
|
31
|
-
return output;
|
|
32
|
-
}
|
|
33
|
-
output += teams.map((team) => `- ${team.slug}\n`).join("");
|
|
34
|
-
return output;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
Object.defineProperty(exports, 'find_teams_default', {
|
|
40
|
-
enumerable: true,
|
|
41
|
-
get: function () {
|
|
42
|
-
return find_teams_default;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=find-teams-DXyzyQOy.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-teams-DXyzyQOy.cjs","names":["ParamOrganizationSlug","context: ServerContext","UserInputError"],"sources":["../src/tools/find-teams.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport { ParamOrganizationSlug, ParamRegionUrl } from \"../schema\";\n\nexport default defineTool({\n name: \"find_teams\",\n description: [\n \"Find teams in an organization in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- View all teams in a Sentry organization\",\n \"- Find a team's slug to aid other tool requests\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n if (!organizationSlug) {\n throw new UserInputError(\n \"Organization slug is required. Please provide an organizationSlug parameter.\",\n );\n }\n\n setTag(\"organization.slug\", organizationSlug);\n\n const teams = await apiService.listTeams(organizationSlug);\n let output = `# Teams in **${organizationSlug}**\\n\\n`;\n if (teams.length === 0) {\n output += \"No teams found.\\n\";\n return output;\n }\n output += teams.map((team) => `- ${team.slug}\\n`).join(\"\");\n return output;\n },\n});\n"],"mappings":";;;;;;;;AAQA,yBAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkBA;EAClB,WAAW,8BAAe,UAAU;CACrC;CACD,MAAM,QAAQ,QAAQC,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,OAAK,iBACH,OAAM,IAAIC,8BACR;AAIJ,4BAAO,qBAAqB,iBAAiB;EAE7C,MAAM,QAAQ,MAAM,WAAW,UAAU,iBAAiB;EAC1D,IAAI,UAAU,eAAe,iBAAiB;AAC9C,MAAI,MAAM,WAAW,GAAG;AACtB,aAAU;AACV,UAAO;EACR;AACD,YAAU,MAAM,IAAI,CAAC,UAAU,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG;AAC1D,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters-B3ONbRhI.js","names":["issues: Issue[]","organizationSlug: string","projectSlugOrId: string | undefined","query: string","regionUrl?: string","naturalLanguageQuery?: string","dateString?: string | null"],"sources":["../src/tools/search-issues/formatters.ts"],"sourcesContent":["import type { Issue } from \"../../api-client\";\nimport { getIssueUrl, getIssuesSearchUrl } from \"../../utils/url-utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format issue search results for display\n */\nexport function formatIssueResults(\n issues: Issue[],\n organizationSlug: string,\n projectSlugOrId: string | undefined,\n query: string,\n regionUrl?: string,\n naturalLanguageQuery?: string,\n skipHeader = false,\n): string {\n const host = regionUrl ? new URL(regionUrl).host : \"sentry.io\";\n\n let output = \"\";\n\n // Skip header section if requested (when called from handler with includeExplanation)\n if (!skipHeader) {\n // Use natural language query in title if provided, otherwise fall back to org/project\n if (naturalLanguageQuery) {\n output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n } else {\n output = `# Issues in **${organizationSlug}`;\n if (projectSlugOrId) {\n output += `/${projectSlugOrId}`;\n }\n output += \"**\\n\\n\";\n }\n\n // Add display instructions for UI\n output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\\n\\n`;\n }\n\n if (issues.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No issues found for query: ${naturalLanguageQuery || query}`,\n {\n query: query,\n organizationSlug: organizationSlug,\n projectSlug: projectSlugOrId,\n naturalLanguageQuery: naturalLanguageQuery,\n },\n );\n output += \"No issues found matching your search criteria.\\n\\n\";\n output += \"Try adjusting your search criteria or time range.\";\n return output;\n }\n\n // Generate search URL for viewing results\n const searchUrl = getIssuesSearchUrl(\n host,\n organizationSlug,\n query,\n projectSlugOrId,\n );\n\n // Add view link with emoji and guidance text (like search_events)\n output += `**📊 View these results in Sentry**: ${searchUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n output += `Found **${issues.length}** issue${issues.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // Format each issue\n issues.forEach((issue, index) => {\n // Generate issue URL using the utility function\n const issueUrl = getIssueUrl(host, organizationSlug, issue.shortId);\n\n output += `## ${index + 1}. [${issue.shortId}](${issueUrl})\\n\\n`;\n output += `**${issue.title}**\\n\\n`;\n\n // Issue metadata\n // Issues don't have a level field in the API response\n output += `- **Status**: ${issue.status}\\n`;\n output += `- **Users**: ${issue.userCount || 0}\\n`;\n output += `- **Events**: ${issue.count || 0}\\n`;\n\n if (issue.assignedTo) {\n const assignee = issue.assignedTo;\n if (typeof assignee === \"string\") {\n output += `- **Assigned to**: ${assignee}\\n`;\n } else if (\n assignee &&\n typeof assignee === \"object\" &&\n \"name\" in assignee\n ) {\n output += `- **Assigned to**: ${assignee.name}\\n`;\n }\n }\n\n output += `- **First seen**: ${formatDate(issue.firstSeen)}\\n`;\n output += `- **Last seen**: ${formatDate(issue.lastSeen)}\\n`;\n\n if (issue.culprit) {\n output += `- **Culprit**: \\`${issue.culprit}\\`\\n`;\n }\n\n output += \"\\n\";\n });\n\n // Add next steps section (like search_events)\n output += \"## Next Steps\\n\\n\";\n output +=\n \"- Get more details about a specific issue: Use the Issue ID with get_issue_details\\n\";\n output +=\n \"- Update issue status: Use update_issue to resolve or assign issues\\n\";\n output +=\n \"- View event counts: Use search_events for aggregated statistics\\n\";\n\n return output;\n}\n\n/**\n * Format date for display\n */\nfunction formatDate(dateString?: string | null): string {\n if (!dateString) return \"N/A\";\n\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\n if (diffHours < 1) {\n const diffMinutes = Math.floor(diffMs / (1000 * 60));\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n return date.toLocaleDateString();\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,mBACdA,QACAC,kBACAC,iBACAC,OACAC,WACAC,sBACA,aAAa,OACL;CACR,MAAM,OAAO,YAAY,IAAI,IAAI,WAAW,OAAO;CAEnD,IAAI,SAAS;AAGb,MAAK,YAAY;AAEf,MAAI,qBACF,WAAU,wBAAwB,qBAAqB;OAClD;AACL,aAAU,gBAAgB;AAC1B,OAAI,gBACF,YAAW,GAAG;AAEhB,aAAU;EACX;AAGD,aAAW;CACZ;AAED,KAAI,OAAO,WAAW,GAAG;AACvB,SAAO,OAAO,KACZ,OAAO,OACJ,IAAI,6BAA6B,wBAAwB,SAC5D;GACS;GACW;GAClB,aAAa;GACS;EACvB,EACF;AACD,YAAU;AACV,YAAU;AACV,SAAO;CACR;CAGD,MAAM,YAAY,mBAChB,MACA,kBACA,OACA,gBACD;AAGD,YAAW,uCAAuC,UAAU;AAC5D,YAAW;AAEX,YAAW,UAAU,OAAO,OAAO,UAAU,OAAO,WAAW,IAAI,KAAK,IAAI;AAG5E,QAAO,QAAQ,CAAC,OAAO,UAAU;EAE/B,MAAM,WAAW,YAAY,MAAM,kBAAkB,MAAM,QAAQ;AAEnE,aAAW,KAAK,QAAQ,EAAE,KAAK,MAAM,QAAQ,IAAI,SAAS;AAC1D,aAAW,IAAI,MAAM,MAAM;AAI3B,aAAW,gBAAgB,MAAM,OAAO;AACxC,aAAW,eAAe,MAAM,aAAa,EAAE;AAC/C,aAAW,gBAAgB,MAAM,SAAS,EAAE;AAE5C,MAAI,MAAM,YAAY;GACpB,MAAM,WAAW,MAAM;AACvB,cAAW,aAAa,SACtB,YAAW,qBAAqB,SAAS;YAEzC,mBACO,aAAa,YACpB,UAAU,SAEV,YAAW,qBAAqB,SAAS,KAAK;EAEjD;AAED,aAAW,oBAAoB,WAAW,MAAM,UAAU,CAAC;AAC3D,aAAW,mBAAmB,WAAW,MAAM,SAAS,CAAC;AAEzD,MAAI,MAAM,QACR,YAAW,mBAAmB,MAAM,QAAQ;AAG9C,YAAU;CACX,EAAC;AAGF,WAAU;AACV,WACE;AACF,WACE;AACF,WACE;AAEF,QAAO;AACR;;;;AAKD,SAAS,WAAWC,YAAoC;AACtD,MAAK,WAAY,QAAO;CAExB,MAAM,OAAO,IAAI,KAAK;CACtB,MAAM,sBAAM,IAAI;CAChB,MAAM,SAAS,IAAI,SAAS,GAAG,KAAK,SAAS;CAC7C,MAAM,YAAY,KAAK,MAAM,UAAU,MAAO,KAAK,IAAI;AAEvD,KAAI,YAAY,GAAG;EACjB,MAAM,cAAc,KAAK,MAAM,UAAU,MAAO,IAAI;AACpD,YAAU,YAAY,SAAS,gBAAgB,IAAI,KAAK,IAAI;CAC7D;AACD,KAAI,YAAY,GACd,WAAU,UAAU,OAAO,cAAc,IAAI,KAAK,IAAI;CAExD,MAAM,WAAW,KAAK,MAAM,YAAY,GAAG;AAC3C,KAAI,WAAW,GACb,WAAU,SAAS,MAAM,aAAa,IAAI,KAAK,IAAI;AAErD,QAAO,KAAK,oBAAoB;AACjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters-CfeBjhXZ.cjs","names":["eventData: FlexibleEventData[]","params: { naturalLanguageQuery: string; includeExplanation?: boolean }","apiService: SentryApiService","organizationSlug: string","explorerUrl: string","sentryQuery: string","fields: string[]","severityEmojis: Record<string, string>"],"sources":["../src/tools/search-events/formatters.ts"],"sourcesContent":["import type { SentryApiService } from \"../../api-client\";\nimport {\n type FlexibleEventData,\n getStringValue,\n getNumberValue,\n isAggregateQuery,\n} from \"./utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format error event results for display\n */\nexport function formatErrorResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these errors as highlighted alert cards with color-coded severity levels and clickable Event IDs.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No error events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"errors\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"error\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual errors, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"title\",\n \"issue\",\n \"project\",\n \"level\",\n \"error.type\",\n \"message\",\n \"culprit\",\n \"timestamp\",\n \"last_seen()\", // Aggregate field - when the issue was last seen\n \"count()\", // Aggregate field - total occurrences of this issue\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"title\") ||\n getStringValue(event, \"message\") ||\n getStringValue(event, \"error.value\") ||\n \"Error Event\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first if they exist\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"issue\" && typeof value === \"string\") {\n output += `**Issue ID**: ${value}\\n`;\n output += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields that weren't in the priority list\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- Get more details about a specific error: Use the Issue ID\\n\";\n output += \"- View error groups: Navigate to the Issues page in Sentry\\n\";\n output += \"- Set up alerts: Configure alert rules for these error patterns\\n\";\n\n return output;\n}\n\n/**\n * Format log event results for display\n */\nexport function formatLogResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these logs in console format with monospace font, color-coded severity (🔴 ERROR, 🟡 WARN, 🔵 INFO), and preserve timestamps.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No log events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"logs\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"log\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual logs, format as console output\n output += \"```console\\n\";\n\n for (const event of eventData) {\n const timestamp = getStringValue(event, \"timestamp\", \"N/A\");\n const severity = getStringValue(event, \"severity\", \"info\");\n const message = getStringValue(event, \"message\", \"No message\");\n\n // Safely uppercase the severity\n const severityUpper = severity.toUpperCase();\n\n // Get severity emoji with proper typing\n const severityEmojis: Record<string, string> = {\n ERROR: \"🔴\",\n FATAL: \"🔴\",\n WARN: \"🟡\",\n WARNING: \"🟡\",\n INFO: \"🔵\",\n DEBUG: \"⚫\",\n TRACE: \"⚫\",\n };\n const severityEmoji = severityEmojis[severityUpper] || \"🔵\";\n\n // Standard log format with emoji and proper spacing\n output += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\\n`;\n }\n\n output += \"```\\n\\n\";\n\n // Add detailed metadata for each log entry\n output += \"## Log Details\\n\\n\";\n\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"message\",\n \"severity\",\n \"severity_number\",\n \"timestamp\",\n \"project\",\n \"trace\",\n \"sentry.item_id\",\n ];\n\n for (let i = 0; i < eventData.length; i++) {\n const event = eventData[i];\n\n output += `### Log ${i + 1}\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `- **Trace ID**: ${value}\\n`;\n output += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else {\n output += `- **${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `- **${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View related traces: Click on the Trace URL if available\\n\";\n output +=\n \"- Filter by severity: Adjust your query to focus on specific log levels\\n\";\n output += \"- Export logs: Use the Sentry web interface for bulk export\\n\";\n\n return output;\n}\n\n/**\n * Format span/trace event results for display\n */\nexport function formatSpanResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these traces as a performance timeline with duration bars and hierarchical span relationships.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No span events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"spans\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `trace${eventData.length === 1 ? \"\" : \"s\"}/span${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual spans, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"transaction\",\n \"span.duration\",\n \"span.status\",\n \"trace\",\n \"project\",\n \"timestamp\",\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"span.description\") ||\n getStringValue(event, \"transaction\") ||\n getStringValue(event, \"span.op\") ||\n \"Span\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `**Trace ID**: ${value}\\n`;\n output += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else if (field === \"span.duration\" && typeof value === \"number\") {\n output += `**${field}**: ${value}ms\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View the full trace: Click on the Trace URL above\\n\";\n output +=\n \"- Search for related spans: Modify your query to be more specific\\n\";\n output +=\n \"- Export data: Use the Sentry web interface for advanced analysis\\n\";\n\n return output;\n}\n"],"mappings":";;;;;;;;AAYA,SAAgB,mBACdA,WACAC,QACAC,YACAC,kBACAC,aACAC,aACAC,QACQ;CACR,IAAI,UAAU,wBAAwB,OAAO,qBAAqB;AAGlE,KAAI,+BAAiB,OAAO,CAC1B,YAAW;KAEX,YAAW;AAGb,KAAI,OAAO,oBAAoB;AAC7B,aAAW;AACX,aAAW,qBAAqB,OAAO,qBAAqB;AAC5D,aAAW,kBAAkB,YAAY;CAC1C;AAED,YAAW,uCAAuC,YAAY;AAC9D,YAAW;AAEX,KAAI,UAAU,WAAW,GAAG;AAC1B,gBAAO,OAAO,KACZ,cAAO,OACJ,IAAI,mCAAmC,OAAO,wBACjD;GACE,OAAO;GACC;GACU;GAClB,SAAS;EACV,EACF;AACD,aAAW;AACX,aAAW;AACX,SAAO;CACR;AAED,YAAW,QAAQ,UAAU,OAAO,GAAG,+BAAiB,OAAO,GAAG,qBAAqB,UAAU,UAAU,WAAW,IAAI,KAAK,IAAI;AAGnI,KAAI,+BAAiB,OAAO,EAAE;AAC5B,YAAU;AACV,YAAU,KAAK,UAAU,WAAW,MAAM,EAAE;AAC5C,YAAU;CACX,OAAM;EAGL,MAAM,iBAAiB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;AAED,OAAK,MAAM,SAAS,WAAW;GAE7B,MAAM,QACJ,6BAAe,OAAO,QAAQ,IAC9B,6BAAe,OAAO,UAAU,IAChC,6BAAe,OAAO,cAAc,IACpC;AAEF,cAAW,KAA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AAW,IAAI,MAAM,MAAM,MAAM;QAEjC,YAAW,IAAI,MAAM,MAAM,MAAM;GAEpC;GAIH,MAAM,kBAAkB,IAAI,IAAI,CAAC,GAAG,gBAAgB,IAAK;AACzD,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,CAC9C,MACG,gBAAgB,IAAI,IAAI,IACzB,UAAU,QACV,iBAEA,YAAW,IAAI,IAAI,MAAM,MAAM;AAInC,aAAU;EACX;CACF;AAED,WAAU;AACV,WAAU;AACV,WACE;AACF,WACE;AAEF,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters-DSYXBiQx.js","names":["eventData: FlexibleEventData[]","params: { naturalLanguageQuery: string; includeExplanation?: boolean }","apiService: SentryApiService","organizationSlug: string","explorerUrl: string","sentryQuery: string","fields: string[]","severityEmojis: Record<string, string>"],"sources":["../src/tools/search-events/formatters.ts"],"sourcesContent":["import type { SentryApiService } from \"../../api-client\";\nimport {\n type FlexibleEventData,\n getStringValue,\n getNumberValue,\n isAggregateQuery,\n} from \"./utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format error event results for display\n */\nexport function formatErrorResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these errors as highlighted alert cards with color-coded severity levels and clickable Event IDs.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No error events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"errors\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"error\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual errors, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"title\",\n \"issue\",\n \"project\",\n \"level\",\n \"error.type\",\n \"message\",\n \"culprit\",\n \"timestamp\",\n \"last_seen()\", // Aggregate field - when the issue was last seen\n \"count()\", // Aggregate field - total occurrences of this issue\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"title\") ||\n getStringValue(event, \"message\") ||\n getStringValue(event, \"error.value\") ||\n \"Error Event\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first if they exist\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"issue\" && typeof value === \"string\") {\n output += `**Issue ID**: ${value}\\n`;\n output += `**Issue URL**: ${apiService.getIssueUrl(organizationSlug, value)}\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields that weren't in the priority list\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- Get more details about a specific error: Use the Issue ID\\n\";\n output += \"- View error groups: Navigate to the Issues page in Sentry\\n\";\n output += \"- Set up alerts: Configure alert rules for these error patterns\\n\";\n\n return output;\n}\n\n/**\n * Format log event results for display\n */\nexport function formatLogResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these logs in console format with monospace font, color-coded severity (🔴 ERROR, 🟡 WARN, 🔵 INFO), and preserve timestamps.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No log events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"logs\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? \"aggregate result\" : \"log\"}${eventData.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual logs, format as console output\n output += \"```console\\n\";\n\n for (const event of eventData) {\n const timestamp = getStringValue(event, \"timestamp\", \"N/A\");\n const severity = getStringValue(event, \"severity\", \"info\");\n const message = getStringValue(event, \"message\", \"No message\");\n\n // Safely uppercase the severity\n const severityUpper = severity.toUpperCase();\n\n // Get severity emoji with proper typing\n const severityEmojis: Record<string, string> = {\n ERROR: \"🔴\",\n FATAL: \"🔴\",\n WARN: \"🟡\",\n WARNING: \"🟡\",\n INFO: \"🔵\",\n DEBUG: \"⚫\",\n TRACE: \"⚫\",\n };\n const severityEmoji = severityEmojis[severityUpper] || \"🔵\";\n\n // Standard log format with emoji and proper spacing\n output += `${timestamp} ${severityEmoji} [${severityUpper.padEnd(5)}] ${message}\\n`;\n }\n\n output += \"```\\n\\n\";\n\n // Add detailed metadata for each log entry\n output += \"## Log Details\\n\\n\";\n\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"message\",\n \"severity\",\n \"severity_number\",\n \"timestamp\",\n \"project\",\n \"trace\",\n \"sentry.item_id\",\n ];\n\n for (let i = 0; i < eventData.length; i++) {\n const event = eventData[i];\n\n output += `### Log ${i + 1}\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `- **Trace ID**: ${value}\\n`;\n output += `- **Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else {\n output += `- **${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `- **${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View related traces: Click on the Trace URL if available\\n\";\n output +=\n \"- Filter by severity: Adjust your query to focus on specific log levels\\n\";\n output += \"- Export logs: Use the Sentry web interface for bulk export\\n\";\n\n return output;\n}\n\n/**\n * Format span/trace event results for display\n */\nexport function formatSpanResults(\n eventData: FlexibleEventData[],\n params: { naturalLanguageQuery: string; includeExplanation?: boolean },\n apiService: SentryApiService,\n organizationSlug: string,\n explorerUrl: string,\n sentryQuery: string,\n fields: string[],\n): string {\n let output = `# Search Results for \"${params.naturalLanguageQuery}\"\\n\\n`;\n\n // Check if this is an aggregate query and adjust display instructions\n if (isAggregateQuery(fields)) {\n output += `⚠️ **IMPORTANT**: Display these aggregate results as a data table with proper column alignment and formatting.\\n\\n`;\n } else {\n output += `⚠️ **IMPORTANT**: Display these traces as a performance timeline with duration bars and hierarchical span relationships.\\n\\n`;\n }\n\n if (params.includeExplanation) {\n output += `## Query Translation\\n`;\n output += `Natural language: \"${params.naturalLanguageQuery}\"\\n`;\n output += `Sentry query: \\`${sentryQuery}\\`\\n\\n`;\n }\n\n output += `**📊 View these results in Sentry**: ${explorerUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n if (eventData.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No span events found for query: ${params.naturalLanguageQuery}`,\n {\n query: sentryQuery,\n fields: fields,\n organizationSlug: organizationSlug,\n dataset: \"spans\",\n },\n );\n output += `No results found.\\n\\n`;\n output += `Try being more specific or using different terms in your search.\\n`;\n return output;\n }\n\n output += `Found ${eventData.length} ${isAggregateQuery(fields) ? `aggregate result${eventData.length === 1 ? \"\" : \"s\"}` : `trace${eventData.length === 1 ? \"\" : \"s\"}/span${eventData.length === 1 ? \"\" : \"s\"}`}:\\n\\n`;\n\n // For aggregate queries, just output the raw data - the agent will format it as a table\n if (isAggregateQuery(fields)) {\n output += \"```json\\n\";\n output += JSON.stringify(eventData, null, 2);\n output += \"\\n```\\n\\n\";\n } else {\n // For individual spans, format with details\n // Define priority fields that should appear first if present\n const priorityFields = [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"transaction\",\n \"span.duration\",\n \"span.status\",\n \"trace\",\n \"project\",\n \"timestamp\",\n ];\n\n for (const event of eventData) {\n // Try to get a title from various possible fields\n const title =\n getStringValue(event, \"span.description\") ||\n getStringValue(event, \"transaction\") ||\n getStringValue(event, \"span.op\") ||\n \"Span\";\n\n output += `## ${title}\\n\\n`;\n\n // Display priority fields first\n for (const field of priorityFields) {\n if (\n field in event &&\n event[field] !== null &&\n event[field] !== undefined\n ) {\n const value = event[field];\n\n if (field === \"trace\" && typeof value === \"string\") {\n output += `**Trace ID**: ${value}\\n`;\n output += `**Trace URL**: ${apiService.getTraceUrl(organizationSlug, value)}\\n`;\n } else if (field === \"span.duration\" && typeof value === \"number\") {\n output += `**${field}**: ${value}ms\\n`;\n } else {\n output += `**${field}**: ${value}\\n`;\n }\n }\n }\n\n // Display any additional fields\n const displayedFields = new Set([...priorityFields, \"id\"]);\n for (const [key, value] of Object.entries(event)) {\n if (\n !displayedFields.has(key) &&\n value !== null &&\n value !== undefined\n ) {\n output += `**${key}**: ${value}\\n`;\n }\n }\n\n output += \"\\n\";\n }\n }\n\n output += \"## Next Steps\\n\\n\";\n output += \"- View the full trace: Click on the Trace URL above\\n\";\n output +=\n \"- Search for related spans: Modify your query to be more specific\\n\";\n output +=\n \"- Export data: Use the Sentry web interface for advanced analysis\\n\";\n\n return output;\n}\n"],"mappings":";;;;;;;AAYA,SAAgB,mBACdA,WACAC,QACAC,YACAC,kBACAC,aACAC,aACAC,QACQ;CACR,IAAI,UAAU,wBAAwB,OAAO,qBAAqB;AAGlE,KAAI,iBAAiB,OAAO,CAC1B,YAAW;KAEX,YAAW;AAGb,KAAI,OAAO,oBAAoB;AAC7B,aAAW;AACX,aAAW,qBAAqB,OAAO,qBAAqB;AAC5D,aAAW,kBAAkB,YAAY;CAC1C;AAED,YAAW,uCAAuC,YAAY;AAC9D,YAAW;AAEX,KAAI,UAAU,WAA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AAO,EAAE;AAC5B,YAAU;AACV,YAAU,KAAK,UAAU,WAAW,MAAM,EAAE;AAC5C,YAAU;CACX,OAAM;EAGL,MAAM,iBAAiB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;AAED,OAAK,MAAM,SAAS,WAAW;GAE7B,MAAM,QACJ,eAAe,OAAO,mBAAmB,IACzC,eAAe,OAAO,cAAc,IACpC,eAAe,OAAO,UAAU,IAChC;AAEF,cAAW,KAAK,MAAM;AAGtB,QAAK,MAAM,SAAS,eAClB,KACE,SAAS,SACT,MAAM,WAAW,QACjB,MAAM,mBACN;IACA,MAAM,QAAQ,MAAM;AAEpB,QAAI,UAAU,kBAAkB,UAAU,UAAU;AAClD,gBAAW,gBAAgB,MAAM;AACjC,gBAAW,iBAAiB,WAAW,YAAY,kBAAkB,MAAM,CAAC;IAC7E,WAAU,UAAU,0BAA0B,UAAU,SACvD,YAAW,IAAI,MAAM,MAAM,MAAM;QAEjC,YAAW,IAAI,MAAM,MAAM,MAAM;GAEpC;GAIH,MAAM,kBAAkB,IAAI,IAAI,CAAC,GAAG,gBAAgB,IAAK;AACzD,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,MAAM,CAC9C,MACG,gBAAgB,IAAI,IAAI,IACzB,UAAU,QACV,iBAEA,YAAW,IAAI,IAAI,MAAM,MAAM;AAInC,aAAU;EACX;CACF;AAED,WAAU;AACV,WAAU;AACV,WACE;AACF,WACE;AAEF,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatters-DbqofIoy.cjs","names":["issues: Issue[]","organizationSlug: string","projectSlugOrId: string | undefined","query: string","regionUrl?: string","naturalLanguageQuery?: string","dateString?: string | null"],"sources":["../src/tools/search-issues/formatters.ts"],"sourcesContent":["import type { Issue } from \"../../api-client\";\nimport { getIssueUrl, getIssuesSearchUrl } from \"../../utils/url-utils\";\nimport * as Sentry from \"@sentry/node\";\n\n/**\n * Format issue search results for display\n */\nexport function formatIssueResults(\n issues: Issue[],\n organizationSlug: string,\n projectSlugOrId: string | undefined,\n query: string,\n regionUrl?: string,\n naturalLanguageQuery?: string,\n skipHeader = false,\n): string {\n const host = regionUrl ? new URL(regionUrl).host : \"sentry.io\";\n\n let output = \"\";\n\n // Skip header section if requested (when called from handler with includeExplanation)\n if (!skipHeader) {\n // Use natural language query in title if provided, otherwise fall back to org/project\n if (naturalLanguageQuery) {\n output = `# Search Results for \"${naturalLanguageQuery}\"\\n\\n`;\n } else {\n output = `# Issues in **${organizationSlug}`;\n if (projectSlugOrId) {\n output += `/${projectSlugOrId}`;\n }\n output += \"**\\n\\n\";\n }\n\n // Add display instructions for UI\n output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\\n\\n`;\n }\n\n if (issues.length === 0) {\n Sentry.logger.info(\n Sentry.logger\n .fmt`No issues found for query: ${naturalLanguageQuery || query}`,\n {\n query: query,\n organizationSlug: organizationSlug,\n projectSlug: projectSlugOrId,\n naturalLanguageQuery: naturalLanguageQuery,\n },\n );\n output += \"No issues found matching your search criteria.\\n\\n\";\n output += \"Try adjusting your search criteria or time range.\";\n return output;\n }\n\n // Generate search URL for viewing results\n const searchUrl = getIssuesSearchUrl(\n host,\n organizationSlug,\n query,\n projectSlugOrId,\n );\n\n // Add view link with emoji and guidance text (like search_events)\n output += `**📊 View these results in Sentry**: ${searchUrl}\\n`;\n output += `_Please share this link with the user to view the search results in their Sentry dashboard._\\n\\n`;\n\n output += `Found **${issues.length}** issue${issues.length === 1 ? \"\" : \"s\"}:\\n\\n`;\n\n // Format each issue\n issues.forEach((issue, index) => {\n // Generate issue URL using the utility function\n const issueUrl = getIssueUrl(host, organizationSlug, issue.shortId);\n\n output += `## ${index + 1}. [${issue.shortId}](${issueUrl})\\n\\n`;\n output += `**${issue.title}**\\n\\n`;\n\n // Issue metadata\n // Issues don't have a level field in the API response\n output += `- **Status**: ${issue.status}\\n`;\n output += `- **Users**: ${issue.userCount || 0}\\n`;\n output += `- **Events**: ${issue.count || 0}\\n`;\n\n if (issue.assignedTo) {\n const assignee = issue.assignedTo;\n if (typeof assignee === \"string\") {\n output += `- **Assigned to**: ${assignee}\\n`;\n } else if (\n assignee &&\n typeof assignee === \"object\" &&\n \"name\" in assignee\n ) {\n output += `- **Assigned to**: ${assignee.name}\\n`;\n }\n }\n\n output += `- **First seen**: ${formatDate(issue.firstSeen)}\\n`;\n output += `- **Last seen**: ${formatDate(issue.lastSeen)}\\n`;\n\n if (issue.culprit) {\n output += `- **Culprit**: \\`${issue.culprit}\\`\\n`;\n }\n\n output += \"\\n\";\n });\n\n // Add next steps section (like search_events)\n output += \"## Next Steps\\n\\n\";\n output +=\n \"- Get more details about a specific issue: Use the Issue ID with get_issue_details\\n\";\n output +=\n \"- Update issue status: Use update_issue to resolve or assign issues\\n\";\n output +=\n \"- View event counts: Use search_events for aggregated statistics\\n\";\n\n return output;\n}\n\n/**\n * Format date for display\n */\nfunction formatDate(dateString?: string | null): string {\n if (!dateString) return \"N/A\";\n\n const date = new Date(dateString);\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n const diffHours = Math.floor(diffMs / (1000 * 60 * 60));\n\n if (diffHours < 1) {\n const diffMinutes = Math.floor(diffMs / (1000 * 60));\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n const diffDays = Math.floor(diffHours / 24);\n if (diffDays < 30) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n return date.toLocaleDateString();\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,mBACdA,QACAC,kBACAC,iBACAC,OACAC,WACAC,sBACA,aAAa,OACL;CACR,MAAM,OAAO,YAAY,IAAI,IAAI,WAAW,OAAO;CAEnD,IAAI,SAAS;AAGb,MAAK,YAAY;AAEf,MAAI,qBACF,WAA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ChB,MAAM,SAAS,IAAI,SAAS,GAAG,KAAK,SAAS;CAC7C,MAAM,YAAY,KAAK,MAAM,UAAU,MAAO,KAAK,IAAI;AAEvD,KAAI,YAAY,GAAG;EACjB,MAAM,cAAc,KAAK,MAAM,UAAU,MAAO,IAAI;AACpD,YAAU,YAAY,SAAS,gBAAgB,IAAI,KAAK,IAAI;CAC7D;AACD,KAAI,YAAY,GACd,WAAU,UAAU,OAAO,cAAc,IAAI,KAAK,IAAI;CAExD,MAAM,WAAW,KAAK,MAAM,YAAY,GAAG;AAC3C,KAAI,WAAW,GACb,WAAU,SAAS,MAAM,aAAa,IAAI,KAAK,IAAI;AAErD,QAAO,KAAK,oBAAoB;AACjC"}
|
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
const require_seer_utils = require('./seer-utils-C7Kv0gr8.cjs');
|
|
2
|
-
|
|
3
|
-
//#region src/internal/formatting.ts
|
|
4
|
-
const LANGUAGE_EXTENSIONS = {
|
|
5
|
-
".java": "java",
|
|
6
|
-
".py": "python",
|
|
7
|
-
".js": "javascript",
|
|
8
|
-
".jsx": "javascript",
|
|
9
|
-
".ts": "javascript",
|
|
10
|
-
".tsx": "javascript",
|
|
11
|
-
".rb": "ruby",
|
|
12
|
-
".php": "php"
|
|
13
|
-
};
|
|
14
|
-
const LANGUAGE_MODULE_PATTERNS = [[/^(java\.|com\.|org\.)/, "java"]];
|
|
15
|
-
/**
|
|
16
|
-
* Detects the programming language of a stack frame based on the file extension.
|
|
17
|
-
* Falls back to the platform parameter if no filename is available or extension is unrecognized.
|
|
18
|
-
*
|
|
19
|
-
* @param frame - The stack frame containing file and location information
|
|
20
|
-
* @param platform - Optional platform hint to use as fallback
|
|
21
|
-
* @returns The detected language or platform fallback or "unknown"
|
|
22
|
-
*/
|
|
23
|
-
function detectLanguage(frame, platform) {
|
|
24
|
-
if (frame.filename) {
|
|
25
|
-
const ext = frame.filename.toLowerCase().match(/\.[^.]+$/)?.[0];
|
|
26
|
-
if (ext && LANGUAGE_EXTENSIONS[ext]) return LANGUAGE_EXTENSIONS[ext];
|
|
27
|
-
}
|
|
28
|
-
if (frame.module) {
|
|
29
|
-
for (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) if (pattern.test(frame.module)) return language;
|
|
30
|
-
}
|
|
31
|
-
return platform || "unknown";
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Formats a stack frame into a language-specific string representation.
|
|
35
|
-
* Different languages have different conventions for displaying stack traces.
|
|
36
|
-
*
|
|
37
|
-
* @param frame - The stack frame to format
|
|
38
|
-
* @param frameIndex - Optional frame index for languages that display frame numbers
|
|
39
|
-
* @param platform - Optional platform hint for language detection fallback
|
|
40
|
-
* @returns Formatted stack frame string
|
|
41
|
-
*/
|
|
42
|
-
function formatFrameHeader(frame, frameIndex, platform) {
|
|
43
|
-
const language = detectLanguage(frame, platform);
|
|
44
|
-
switch (language) {
|
|
45
|
-
case "java": {
|
|
46
|
-
const className = frame.module || "UnknownClass";
|
|
47
|
-
const method = frame.function || "<unknown>";
|
|
48
|
-
const source = frame.filename || "Unknown Source";
|
|
49
|
-
const location = frame.lineNo ? `:${frame.lineNo}` : "";
|
|
50
|
-
return `at ${className}.${method}(${source}${location})`;
|
|
51
|
-
}
|
|
52
|
-
case "python": {
|
|
53
|
-
const file = frame.filename || frame.absPath || frame.module || "<unknown>";
|
|
54
|
-
const func = frame.function || "<module>";
|
|
55
|
-
const line = frame.lineNo ? `, line ${frame.lineNo}` : "";
|
|
56
|
-
return ` File "${file}"${line}, in ${func}`;
|
|
57
|
-
}
|
|
58
|
-
case "javascript": return `${[
|
|
59
|
-
frame.filename,
|
|
60
|
-
frame.lineNo,
|
|
61
|
-
frame.colNo
|
|
62
|
-
].filter((i) => !!i).join(":")}${frame.function ? ` (${frame.function})` : ""}`;
|
|
63
|
-
case "ruby": {
|
|
64
|
-
const file = frame.filename || frame.module || "<unknown>";
|
|
65
|
-
const func = frame.function ? ` \`${frame.function}\`` : "";
|
|
66
|
-
const line = frame.lineNo ? `:${frame.lineNo}:in` : "";
|
|
67
|
-
return ` from ${file}${line}${func}`;
|
|
68
|
-
}
|
|
69
|
-
case "php": {
|
|
70
|
-
const file = frame.filename || "<unknown>";
|
|
71
|
-
const line = frame.lineNo ? `(${frame.lineNo})` : "";
|
|
72
|
-
const func = frame.function || "<unknown>";
|
|
73
|
-
const prefix = frameIndex !== void 0 ? `#${frameIndex} ` : "";
|
|
74
|
-
return `${prefix}${file}${line}: ${func}()`;
|
|
75
|
-
}
|
|
76
|
-
default: {
|
|
77
|
-
const func = frame.function || "<unknown>";
|
|
78
|
-
const location = frame.filename || frame.module || "<unknown>";
|
|
79
|
-
const line = frame.lineNo ? `:${frame.lineNo}` : "";
|
|
80
|
-
const col = frame.colNo != null ? `:${frame.colNo}` : "";
|
|
81
|
-
return ` at ${func} (${location}${line}${col})`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Formats a Sentry event into a structured markdown output.
|
|
87
|
-
* Includes error messages, stack traces, request info, and contextual data.
|
|
88
|
-
*
|
|
89
|
-
* @param event - The Sentry event to format
|
|
90
|
-
* @returns Formatted markdown string
|
|
91
|
-
*/
|
|
92
|
-
function formatEventOutput(event) {
|
|
93
|
-
let output = "";
|
|
94
|
-
const messageEntry = event.entries.find((e) => e.type === "message");
|
|
95
|
-
const exceptionEntry = event.entries.find((e) => e.type === "exception");
|
|
96
|
-
const threadsEntry = event.entries.find((e) => e.type === "threads");
|
|
97
|
-
const requestEntry = event.entries.find((e) => e.type === "request");
|
|
98
|
-
if (messageEntry) output += formatMessageInterfaceOutput(event, messageEntry.data);
|
|
99
|
-
if (exceptionEntry) output += formatExceptionInterfaceOutput(event, exceptionEntry.data);
|
|
100
|
-
else if (threadsEntry) output += formatThreadsInterfaceOutput(event, threadsEntry.data);
|
|
101
|
-
if (requestEntry) output += formatRequestInterfaceOutput(event, requestEntry.data);
|
|
102
|
-
output += formatContexts(event.contexts);
|
|
103
|
-
return output;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Extracts the context line matching the frame's line number for inline display.
|
|
107
|
-
* This is used in the full stacktrace view to show the actual line of code
|
|
108
|
-
* that caused the error inline with the stack frame.
|
|
109
|
-
*
|
|
110
|
-
* @param frame - The stack frame containing context lines
|
|
111
|
-
* @returns The line of code at the frame's line number, or empty string if not available
|
|
112
|
-
*/
|
|
113
|
-
function renderInlineContext(frame) {
|
|
114
|
-
if (!frame.context?.length || !frame.lineNo) return "";
|
|
115
|
-
const contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);
|
|
116
|
-
return contextLine ? `\n${contextLine[1]}` : "";
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Renders an enhanced view of a stack frame with context lines and variables.
|
|
120
|
-
* Used for the "Most Relevant Frame" section to provide detailed information
|
|
121
|
-
* about the most relevant application frame where the error occurred.
|
|
122
|
-
*
|
|
123
|
-
* @param frame - The stack frame to render with enhanced information
|
|
124
|
-
* @param event - The Sentry event containing platform information for language detection
|
|
125
|
-
* @returns Formatted string with frame header, context lines, and variables table
|
|
126
|
-
*/
|
|
127
|
-
function renderEnhancedFrame(frame, event) {
|
|
128
|
-
const parts = [];
|
|
129
|
-
parts.push("**Most Relevant Frame:**");
|
|
130
|
-
parts.push("─────────────────────");
|
|
131
|
-
parts.push(formatFrameHeader(frame, void 0, event.platform));
|
|
132
|
-
if (frame.context?.length) {
|
|
133
|
-
const contextLines = renderContextLines(frame);
|
|
134
|
-
if (contextLines) {
|
|
135
|
-
parts.push("");
|
|
136
|
-
parts.push(contextLines);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (frame.vars && Object.keys(frame.vars).length > 0) {
|
|
140
|
-
parts.push("");
|
|
141
|
-
parts.push(renderVariablesTable(frame.vars));
|
|
142
|
-
}
|
|
143
|
-
return parts.join("\n");
|
|
144
|
-
}
|
|
145
|
-
function formatExceptionInterfaceOutput(event, data) {
|
|
146
|
-
const parts = [];
|
|
147
|
-
const exceptions = data.values || (data.value ? [data.value] : []);
|
|
148
|
-
if (exceptions.length === 0) return "";
|
|
149
|
-
const isChained = exceptions.length > 1;
|
|
150
|
-
[...exceptions].reverse().forEach((exception, index) => {
|
|
151
|
-
if (!exception) return;
|
|
152
|
-
if (isChained && index > 0) {
|
|
153
|
-
parts.push("");
|
|
154
|
-
parts.push(getExceptionChainMessage(event.platform || null, index, exceptions.length));
|
|
155
|
-
parts.push("");
|
|
156
|
-
}
|
|
157
|
-
const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : ""}`;
|
|
158
|
-
parts.push(index === 0 ? "### Error" : `### ${exceptionTitle}`);
|
|
159
|
-
parts.push("");
|
|
160
|
-
if (index === 0) {
|
|
161
|
-
parts.push("```");
|
|
162
|
-
parts.push(exceptionTitle);
|
|
163
|
-
parts.push("```");
|
|
164
|
-
parts.push("");
|
|
165
|
-
}
|
|
166
|
-
if (!exception.stacktrace || !exception.stacktrace.frames) {
|
|
167
|
-
parts.push("**Stacktrace:**");
|
|
168
|
-
parts.push("```");
|
|
169
|
-
parts.push("No stacktrace available");
|
|
170
|
-
parts.push("```");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
const frames = exception.stacktrace.frames;
|
|
174
|
-
if (index === 0) {
|
|
175
|
-
const firstInAppFrame = findFirstInAppFrame(frames);
|
|
176
|
-
if (firstInAppFrame && (firstInAppFrame.context?.length || firstInAppFrame.vars)) {
|
|
177
|
-
parts.push(renderEnhancedFrame(firstInAppFrame, event));
|
|
178
|
-
parts.push("");
|
|
179
|
-
parts.push("**Full Stacktrace:**");
|
|
180
|
-
parts.push("────────────────");
|
|
181
|
-
} else parts.push("**Stacktrace:**");
|
|
182
|
-
} else parts.push("**Stacktrace:**");
|
|
183
|
-
parts.push("```");
|
|
184
|
-
parts.push(frames.map((frame) => {
|
|
185
|
-
const header = formatFrameHeader(frame, void 0, event.platform);
|
|
186
|
-
const context = renderInlineContext(frame);
|
|
187
|
-
return `${header}${context}`;
|
|
188
|
-
}).join("\n"));
|
|
189
|
-
parts.push("```");
|
|
190
|
-
});
|
|
191
|
-
parts.push("");
|
|
192
|
-
parts.push("");
|
|
193
|
-
return parts.join("\n");
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Get the appropriate exception chain message based on the platform
|
|
197
|
-
*/
|
|
198
|
-
function getExceptionChainMessage(platform, index, totalExceptions) {
|
|
199
|
-
const defaultMessage = "**During handling of the above exception, another exception occurred:**";
|
|
200
|
-
if (!platform) return defaultMessage;
|
|
201
|
-
switch (platform.toLowerCase()) {
|
|
202
|
-
case "python": return "**During handling of the above exception, another exception occurred:**";
|
|
203
|
-
case "java": return "**Caused by:**";
|
|
204
|
-
case "csharp":
|
|
205
|
-
case "dotnet": return "**---> Inner Exception:**";
|
|
206
|
-
case "ruby": return "**Caused by:**";
|
|
207
|
-
case "go": return "**Wrapped error:**";
|
|
208
|
-
case "rust": return `**Caused by (${index}):**`;
|
|
209
|
-
default: return defaultMessage;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
function formatRequestInterfaceOutput(event, data) {
|
|
213
|
-
if (!data.method || !data.url) return "";
|
|
214
|
-
return `### HTTP Request\n\n**Method:** ${data.method}\n**URL:** ${data.url}\n\n`;
|
|
215
|
-
}
|
|
216
|
-
function formatMessageInterfaceOutput(event, data) {
|
|
217
|
-
if (!data.formatted && !data.message) return "";
|
|
218
|
-
const message = data.formatted || data.message || "";
|
|
219
|
-
return `### Error\n\n\`\`\`\n${message}\n\`\`\`\n\n`;
|
|
220
|
-
}
|
|
221
|
-
function formatThreadsInterfaceOutput(event, data) {
|
|
222
|
-
if (!data.values || data.values.length === 0) return "";
|
|
223
|
-
const crashedThread = data.values.find((t) => t.crashed);
|
|
224
|
-
if (!crashedThread?.stacktrace?.frames) return "";
|
|
225
|
-
const parts = [];
|
|
226
|
-
if (crashedThread.name) {
|
|
227
|
-
parts.push(`**Thread** (${crashedThread.name})`);
|
|
228
|
-
parts.push("");
|
|
229
|
-
}
|
|
230
|
-
const frames = crashedThread.stacktrace.frames;
|
|
231
|
-
const firstInAppFrame = findFirstInAppFrame(frames);
|
|
232
|
-
if (firstInAppFrame && (firstInAppFrame.context?.length || firstInAppFrame.vars)) {
|
|
233
|
-
parts.push(renderEnhancedFrame(firstInAppFrame, event));
|
|
234
|
-
parts.push("");
|
|
235
|
-
parts.push("**Full Stacktrace:**");
|
|
236
|
-
parts.push("────────────────");
|
|
237
|
-
} else parts.push("**Stacktrace:**");
|
|
238
|
-
parts.push("```");
|
|
239
|
-
parts.push(frames.map((frame) => {
|
|
240
|
-
const header = formatFrameHeader(frame, void 0, event.platform);
|
|
241
|
-
const context = renderInlineContext(frame);
|
|
242
|
-
return `${header}${context}`;
|
|
243
|
-
}).join("\n"));
|
|
244
|
-
parts.push("```");
|
|
245
|
-
parts.push("");
|
|
246
|
-
return parts.join("\n");
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Renders surrounding source code context for a stack frame.
|
|
250
|
-
* Shows a window of code lines around the error line with visual indicators.
|
|
251
|
-
*
|
|
252
|
-
* @param frame - The stack frame containing context lines
|
|
253
|
-
* @param contextSize - Number of lines to show before and after the error line (default: 3)
|
|
254
|
-
* @returns Formatted context lines with line numbers and arrow indicator for the error line
|
|
255
|
-
*/
|
|
256
|
-
function renderContextLines(frame, contextSize = 3) {
|
|
257
|
-
if (!frame.context || frame.context.length === 0 || !frame.lineNo) return "";
|
|
258
|
-
const lines = [];
|
|
259
|
-
const errorLine = frame.lineNo;
|
|
260
|
-
const maxLineNoWidth = Math.max(...frame.context.map(([lineNo]) => lineNo.toString().length));
|
|
261
|
-
for (const [lineNo, code] of frame.context) {
|
|
262
|
-
const isErrorLine = lineNo === errorLine;
|
|
263
|
-
const lineNoStr = lineNo.toString().padStart(maxLineNoWidth, " ");
|
|
264
|
-
if (Math.abs(lineNo - errorLine) <= contextSize) if (isErrorLine) lines.push(` → ${lineNoStr} │ ${code}`);
|
|
265
|
-
else lines.push(` ${lineNoStr} │ ${code}`);
|
|
266
|
-
}
|
|
267
|
-
return lines.join("\n");
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Formats a variable value for display in the variables table.
|
|
271
|
-
* Handles different types appropriately and safely, converting complex objects
|
|
272
|
-
* to readable representations and handling edge cases like circular references.
|
|
273
|
-
*
|
|
274
|
-
* @param value - The variable value to format (can be any type)
|
|
275
|
-
* @param maxLength - Maximum length for stringified objects/arrays (default: 80)
|
|
276
|
-
* @returns Human-readable string representation of the value
|
|
277
|
-
*/
|
|
278
|
-
function formatVariableValue(value, maxLength = 80) {
|
|
279
|
-
try {
|
|
280
|
-
if (typeof value === "string") return `"${value}"`;
|
|
281
|
-
if (value === null) return "null";
|
|
282
|
-
if (value === void 0) return "undefined";
|
|
283
|
-
if (typeof value === "object") {
|
|
284
|
-
const stringified = JSON.stringify(value);
|
|
285
|
-
if (stringified.length > maxLength) {
|
|
286
|
-
const truncateAt = maxLength - 6;
|
|
287
|
-
let truncated = stringified.substring(0, truncateAt);
|
|
288
|
-
const lastComma = truncated.lastIndexOf(",");
|
|
289
|
-
if (lastComma > 0) truncated = truncated.substring(0, lastComma);
|
|
290
|
-
if (Array.isArray(value)) return `${truncated}, ...]`;
|
|
291
|
-
return `${truncated}, ...}`;
|
|
292
|
-
}
|
|
293
|
-
return stringified;
|
|
294
|
-
}
|
|
295
|
-
return String(value);
|
|
296
|
-
} catch {
|
|
297
|
-
return `<${typeof value}>`;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Renders a table of local variables in a tree-like format.
|
|
302
|
-
* Uses box-drawing characters to create a visual hierarchy of variables
|
|
303
|
-
* and their values at the point where the error occurred.
|
|
304
|
-
*
|
|
305
|
-
* @param vars - Object containing variable names as keys and their values
|
|
306
|
-
* @returns Formatted variables table with tree-style prefix characters
|
|
307
|
-
*/
|
|
308
|
-
function renderVariablesTable(vars) {
|
|
309
|
-
const entries = Object.entries(vars);
|
|
310
|
-
if (entries.length === 0) return "";
|
|
311
|
-
const lines = ["Local Variables:"];
|
|
312
|
-
const lastIndex = entries.length - 1;
|
|
313
|
-
entries.forEach(([key, value], index) => {
|
|
314
|
-
const prefix = index === lastIndex ? "└─" : "├─";
|
|
315
|
-
const valueStr = formatVariableValue(value);
|
|
316
|
-
lines.push(`${prefix} ${key}: ${valueStr}`);
|
|
317
|
-
});
|
|
318
|
-
return lines.join("\n");
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Finds the first application frame (in_app) in a stack trace.
|
|
322
|
-
* Searches from the bottom of the stack (oldest frame) to find the first
|
|
323
|
-
* frame that belongs to the user's application code rather than libraries.
|
|
324
|
-
*
|
|
325
|
-
* @param frames - Array of stack frames, typically in reverse chronological order
|
|
326
|
-
* @returns The first in-app frame found, or undefined if none exist
|
|
327
|
-
*/
|
|
328
|
-
function findFirstInAppFrame(frames) {
|
|
329
|
-
for (let i = frames.length - 1; i >= 0; i--) if (frames[i].inApp === true) return frames[i];
|
|
330
|
-
return void 0;
|
|
331
|
-
}
|
|
332
|
-
function formatContexts(contexts) {
|
|
333
|
-
if (!contexts || Object.keys(contexts).length === 0) return "";
|
|
334
|
-
return `### Additional Context\n\nThese are additional context provided by the user when they're instrumenting their application.\n\n${Object.entries(contexts).map(([name, data]) => `**${name}**\n${Object.entries(data).filter(([key, _]) => key !== "type").map(([key, value]) => {
|
|
335
|
-
return `${key}: ${JSON.stringify(value, void 0, 2)}`;
|
|
336
|
-
}).join("\n")}`).join("\n\n")}\n\n`;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Formats Seer AI analysis context for inclusion in issue details.
|
|
340
|
-
* Provides a minimal summary showing just the key solution when available.
|
|
341
|
-
*
|
|
342
|
-
* @param autofixState - The autofix state containing Seer analysis data
|
|
343
|
-
* @returns Formatted markdown string with Seer context, or empty string if no analysis exists
|
|
344
|
-
*/
|
|
345
|
-
function formatSeerContext(autofixState) {
|
|
346
|
-
if (!autofixState.autofix) return "";
|
|
347
|
-
const { autofix } = autofixState;
|
|
348
|
-
const parts = [];
|
|
349
|
-
parts.push("## Seer AI Analysis");
|
|
350
|
-
parts.push("");
|
|
351
|
-
if (require_seer_utils.isTerminalStatus(autofix.status) && autofix.steps.length > 0) {
|
|
352
|
-
const completedSteps = autofix.steps.filter((step) => step.status === "COMPLETED");
|
|
353
|
-
const solutionStep = completedSteps.find((step) => step.type === "solution");
|
|
354
|
-
if (solutionStep) {
|
|
355
|
-
const solutionDescription = solutionStep.description;
|
|
356
|
-
if (solutionDescription && typeof solutionDescription === "string" && solutionDescription.trim()) parts.push(solutionDescription.trim());
|
|
357
|
-
else {
|
|
358
|
-
const solutionOutput = require_seer_utils.getOutputForAutofixStep(solutionStep);
|
|
359
|
-
const lines = solutionOutput.split("\n");
|
|
360
|
-
const firstParagraph = lines.find((line) => line.trim().length > 50 && !line.startsWith("#") && !line.startsWith("*"));
|
|
361
|
-
if (firstParagraph) parts.push(firstParagraph.trim());
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return `${parts.join("\n")}\n\n`;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Formats a Sentry issue with its latest event into comprehensive markdown output.
|
|
369
|
-
* Includes issue metadata, event details, and usage instructions.
|
|
370
|
-
*
|
|
371
|
-
* @param params - Object containing organization slug, issue, event, and API service
|
|
372
|
-
* @returns Formatted markdown string with complete issue information
|
|
373
|
-
*/
|
|
374
|
-
function formatIssueOutput({ organizationSlug, issue, event, apiService, autofixState }) {
|
|
375
|
-
let output = `# Issue ${issue.shortId} in **${organizationSlug}**\n\n`;
|
|
376
|
-
output += `**Description**: ${issue.title}\n`;
|
|
377
|
-
output += `**Culprit**: ${issue.culprit}\n`;
|
|
378
|
-
output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\n`;
|
|
379
|
-
output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\n`;
|
|
380
|
-
output += `**Occurrences**: ${issue.count}\n`;
|
|
381
|
-
output += `**Users Impacted**: ${issue.userCount}\n`;
|
|
382
|
-
output += `**Status**: ${issue.status}\n`;
|
|
383
|
-
output += `**Platform**: ${issue.platform}\n`;
|
|
384
|
-
output += `**Project**: ${issue.project.name}\n`;
|
|
385
|
-
output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\n`;
|
|
386
|
-
output += "\n";
|
|
387
|
-
output += "## Event Details\n\n";
|
|
388
|
-
output += `**Event ID**: ${event.id}\n`;
|
|
389
|
-
if (event.type === "error") output += `**Occurred At**: ${new Date(event.dateCreated).toISOString()}\n`;
|
|
390
|
-
if (event.message) output += `**Message**:\n${event.message}\n`;
|
|
391
|
-
output += "\n";
|
|
392
|
-
output += formatEventOutput(event);
|
|
393
|
-
if (autofixState) output += formatSeerContext(autofixState);
|
|
394
|
-
output += "# Using this information\n\n";
|
|
395
|
-
output += `- You can reference the IssueID in commit messages (e.g. \`Fixes ${issue.shortId}\`) to automatically close the issue when the commit is merged.\n`;
|
|
396
|
-
output += "- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\n";
|
|
397
|
-
return output;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
//#endregion
|
|
401
|
-
Object.defineProperty(exports, 'formatEventOutput', {
|
|
402
|
-
enumerable: true,
|
|
403
|
-
get: function () {
|
|
404
|
-
return formatEventOutput;
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
Object.defineProperty(exports, 'formatFrameHeader', {
|
|
408
|
-
enumerable: true,
|
|
409
|
-
get: function () {
|
|
410
|
-
return formatFrameHeader;
|
|
411
|
-
}
|
|
412
|
-
});
|
|
413
|
-
Object.defineProperty(exports, 'formatIssueOutput', {
|
|
414
|
-
enumerable: true,
|
|
415
|
-
get: function () {
|
|
416
|
-
return formatIssueOutput;
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
//# sourceMappingURL=formatting-C180PVwd.cjs.map
|