@sentry/mcp-server 0.20.0 → 0.22.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 +55 -27
- package/dist/{agent-CRc61dcC.js → agent-0WAnUgat.js} +11 -11
- package/dist/agent-0WAnUgat.js.map +1 -0
- package/dist/{agent-DoYdEiCJ.d.ts → agent-BeTXxskw.d.ts} +12 -11
- package/dist/agent-BeTXxskw.d.ts.map +1 -0
- package/dist/{agent-BbMg6UEA.d.cts → agent-Bm5Hsfal.d.cts} +2 -2
- package/dist/{agent-BbMg6UEA.d.cts.map → agent-Bm5Hsfal.d.cts.map} +1 -1
- package/dist/{agent-tLRcGXXr.js → agent-C1Ros3Xx.js} +4 -4
- package/dist/{agent-tLRcGXXr.js.map → agent-C1Ros3Xx.js.map} +1 -1
- package/dist/{agent-Dnr67ykA.d.ts → agent-CJ6SVqAB.d.ts} +2 -2
- package/dist/{agent-Dnr67ykA.d.ts.map → agent-CJ6SVqAB.d.ts.map} +1 -1
- package/dist/{agent-DzfX6_dM.cjs → agent-Cm9hEq5d.cjs} +25 -15
- package/dist/agent-Cm9hEq5d.cjs.map +1 -0
- package/dist/{agent-D_WfZ67H.d.ts → agent-Cu85yHYm.d.ts} +25 -24
- package/dist/agent-Cu85yHYm.d.ts.map +1 -0
- package/dist/{agent-BMCJjVaJ.cjs → agent-CyyRLYbF.cjs} +17 -11
- package/dist/agent-CyyRLYbF.cjs.map +1 -0
- package/dist/{agent-4SliQ-uj.d.cts → agent-DYfi9MFV.d.cts} +29 -28
- package/dist/agent-DYfi9MFV.d.cts.map +1 -0
- package/dist/{agent-FoPk5psd.js → agent-Dkgkv7Iz.js} +19 -15
- package/dist/agent-Dkgkv7Iz.js.map +1 -0
- package/dist/{agent-DT4ic52w.cjs → agent-DtCRTWPZ.cjs} +5 -5
- package/dist/{agent-DT4ic52w.cjs.map → agent-DtCRTWPZ.cjs.map} +1 -1
- package/dist/{agent-D-dMHrZ1.d.cts → agent-TEZG63ug.d.cts} +12 -11
- package/dist/agent-TEZG63ug.d.cts.map +1 -0
- package/dist/{analyze-issue-with-seer-CI8pvCnf.cjs → analyze-issue-with-seer-B90r4g5J.cjs} +11 -10
- package/dist/analyze-issue-with-seer-B90r4g5J.cjs.map +1 -0
- package/dist/{analyze-issue-with-seer-DvuKEcbu.js → analyze-issue-with-seer-Ji3KDm0O.js} +10 -9
- package/dist/analyze-issue-with-seer-Ji3KDm0O.js.map +1 -0
- package/dist/{api-CkLTFexT.js → api-CBHyxA3Q.js} +5 -5
- package/dist/{api-CkLTFexT.js.map → api-CBHyxA3Q.js.map} +1 -1
- package/dist/{api-CZD9zwQ-.cjs → api-CHgBJOv9.cjs} +5 -5
- package/dist/{api-CZD9zwQ-.cjs.map → api-CHgBJOv9.cjs.map} +1 -1
- package/dist/api-client/client.cjs +7 -6
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +7 -6
- package/dist/api-client/errors.cjs +1 -1
- package/dist/api-client/errors.js +1 -1
- package/dist/api-client/index.cjs +9 -8
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +3 -3
- package/dist/api-client/index.js +9 -8
- package/dist/api-client/schema.cjs +1 -1
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/schema.js +1 -1
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/api-client/types.js +1 -1
- package/dist/{callEmbeddedAgent-D83njSgs.d.cts → callEmbeddedAgent-BIfQ-_5T.d.ts} +4 -4
- package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts.map +1 -0
- package/dist/{callEmbeddedAgent-KKTSTD7W.cjs → callEmbeddedAgent-BPS472yg.cjs} +9 -4
- package/dist/callEmbeddedAgent-BPS472yg.cjs.map +1 -0
- package/dist/{callEmbeddedAgent-RskCqVav.d.ts → callEmbeddedAgent-CFHLQjFx.d.cts} +4 -4
- package/dist/callEmbeddedAgent-CFHLQjFx.d.cts.map +1 -0
- package/dist/{callEmbeddedAgent-BSnzLPfW.js → callEmbeddedAgent-DavTx3Qo.js} +8 -3
- package/dist/callEmbeddedAgent-DavTx3Qo.js.map +1 -0
- package/dist/{chunk-DWy1uDak.cjs → chunk-CUT6urMc.cjs} +0 -9
- package/dist/cli/parse.cjs +1 -1
- package/dist/cli/parse.d.cts +3 -2
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/parse.d.ts +3 -2
- package/dist/cli/parse.d.ts.map +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +7 -5
- package/dist/cli/resolve.d.cts +5 -3
- package/dist/cli/resolve.d.cts.map +1 -1
- package/dist/cli/resolve.d.ts +5 -3
- package/dist/cli/resolve.d.ts.map +1 -1
- package/dist/cli/resolve.js +6 -5
- package/dist/cli/types.d.cts +3 -2
- package/dist/cli/types.d.ts +3 -2
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.d.cts +3 -2
- package/dist/cli/usage.d.cts.map +1 -1
- package/dist/cli/usage.d.ts +3 -2
- package/dist/cli/usage.d.ts.map +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/{client-DeGFkGAD.d.cts → client-0n2-4zOO.d.cts} +7 -7
- package/dist/{client-DeGFkGAD.d.cts.map → client-0n2-4zOO.d.cts.map} +1 -1
- package/dist/{client-CWgvrDHH.js → client-B7hvqupZ.js} +8 -7
- package/dist/client-B7hvqupZ.js.map +1 -0
- package/dist/{client-njqQAP-R.d.ts → client-ByOC8aCf.d.ts} +4 -4
- package/dist/{client-njqQAP-R.d.ts.map → client-ByOC8aCf.d.ts.map} +1 -1
- package/dist/{client-C2TwbSm-.cjs → client-cC79LUJ5.cjs} +8 -7
- package/dist/client-cC79LUJ5.cjs.map +1 -0
- package/dist/{config-CllFlx5w.cjs → config-2JTOC4-d.cjs} +1 -1
- package/dist/{config-CllFlx5w.cjs.map → config-2JTOC4-d.cjs.map} +1 -1
- package/dist/{config-BMC-126h.js → config-BFaJp4hW.js} +1 -1
- package/dist/{config-BMC-126h.js.map → config-BFaJp4hW.js.map} +1 -1
- package/dist/{config-ClFI6orZ.cjs → config-BMLvvgGQ.cjs} +1 -1
- package/dist/{config-ClFI6orZ.cjs.map → config-BMLvvgGQ.cjs.map} +1 -1
- package/dist/{config-DbQP60oo.cjs → config-BacDkkdz.cjs} +1 -1
- package/dist/{config-DbQP60oo.cjs.map → config-BacDkkdz.cjs.map} +1 -1
- package/dist/{config-CTRUv0J3.js → config-Dh25cVhL.js} +1 -1
- package/dist/{config-CTRUv0J3.js.map → config-Dh25cVhL.js.map} +1 -1
- package/dist/{config-DlhHLHjD.js → config-jAHLRqMZ.js} +1 -1
- package/dist/{config-DlhHLHjD.js.map → config-jAHLRqMZ.js.map} +1 -1
- package/dist/{constants-DJrjLmh5.cjs → constants-CgLLujFn.cjs} +1 -1
- package/dist/{constants-DJrjLmh5.cjs.map → constants-CgLLujFn.cjs.map} +1 -1
- package/dist/{constants-BPM_OWt0.js → constants-D8axTonA.js} +1 -1
- package/dist/{constants-BPM_OWt0.js.map → constants-D8axTonA.js.map} +1 -1
- package/dist/constants.cjs +3 -1
- package/dist/constants.d.cts +4 -2
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +4 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -2
- package/dist/{constraint-helpers-0jgp7p3K.js → constraint-helpers-CBddlAo8.js} +1 -1
- package/dist/{constraint-helpers-0jgp7p3K.js.map → constraint-helpers-CBddlAo8.js.map} +1 -1
- package/dist/{constraint-helpers-BJPdGLZ3.cjs → constraint-helpers-UEovDW_M.cjs} +1 -1
- package/dist/{constraint-helpers-BJPdGLZ3.cjs.map → constraint-helpers-UEovDW_M.cjs.map} +1 -1
- package/dist/{create-dsn-ggGt0lZf.cjs → create-dsn-9yIHr10B.cjs} +6 -5
- package/dist/create-dsn-9yIHr10B.cjs.map +1 -0
- package/dist/{create-dsn-Bx2s8Bik.js → create-dsn-p2Ep6zDn.js} +5 -4
- package/dist/create-dsn-p2Ep6zDn.js.map +1 -0
- package/dist/{create-project-CZBklXm8.cjs → create-project-BQQx1iLm.cjs} +7 -6
- package/dist/create-project-BQQx1iLm.cjs.map +1 -0
- package/dist/{create-project-C0pm6zUK.js → create-project-CN0UneBm.js} +6 -5
- package/dist/create-project-CN0UneBm.js.map +1 -0
- package/dist/{create-team-BQIns3VD.js → create-team-CzFrsVdw.js} +5 -4
- package/dist/create-team-CzFrsVdw.js.map +1 -0
- package/dist/{create-team-DmqKw2c1.cjs → create-team-DFSriKVL.cjs} +6 -5
- package/dist/create-team-DFSriKVL.cjs.map +1 -0
- package/dist/{dataset-fields-C0m-vwNH.cjs → dataset-fields-Bp_g-sD6.cjs} +3 -3
- package/dist/{dataset-fields-C0m-vwNH.cjs.map → dataset-fields-Bp_g-sD6.cjs.map} +1 -1
- package/dist/{dataset-fields-C1o_cZrM.js → dataset-fields-dZ43jEgF.js} +2 -2
- package/dist/{dataset-fields-C1o_cZrM.js.map → dataset-fields-dZ43jEgF.js.map} +1 -1
- package/dist/{define-BfP4rFlE.cjs → define-CLp6EtpZ.cjs} +1 -1
- package/dist/{define-BfP4rFlE.cjs.map → define-CLp6EtpZ.cjs.map} +1 -1
- package/dist/{define-2Lj8Lm1t.js → define-vA6uuVue.js} +1 -1
- package/dist/{define-2Lj8Lm1t.js.map → define-vA6uuVue.js.map} +1 -1
- package/dist/{enhance-error-D3QfZOhm.js → enhance-error-BULHg3Tl.js} +2 -2
- package/dist/{enhance-error-D3QfZOhm.js.map → enhance-error-BULHg3Tl.js.map} +1 -1
- package/dist/{enhance-error-DzXrKg85.cjs → enhance-error-vihkdCX5.cjs} +2 -2
- package/dist/{enhance-error-DzXrKg85.cjs.map → enhance-error-vihkdCX5.cjs.map} +1 -1
- package/dist/{error-handling-D_4c-JgK.js → error-handling-CLnyY1TR.js} +4 -4
- package/dist/{error-handling-D_4c-JgK.js.map → error-handling-CLnyY1TR.js.map} +1 -1
- package/dist/{error-handling-ZVmZRXZb.cjs → error-handling-FGjcJT8U.cjs} +4 -4
- package/dist/{error-handling-ZVmZRXZb.cjs.map → error-handling-FGjcJT8U.cjs.map} +1 -1
- package/dist/{errors-D_R568zP.js → errors-BXmNwD2K.js} +1 -1
- package/dist/{errors-D_R568zP.js.map → errors-BXmNwD2K.js.map} +1 -1
- package/dist/{errors-00Iz6Wmy.d.cts → errors-BYClKbv4.d.cts} +1 -1
- package/dist/{errors-00Iz6Wmy.d.cts.map → errors-BYClKbv4.d.cts.map} +1 -1
- package/dist/{errors-D9WEvbBw.d.ts → errors-Cn4l-BlC.d.ts} +1 -1
- package/dist/{errors-D9WEvbBw.d.ts.map → errors-Cn4l-BlC.d.ts.map} +1 -1
- package/dist/{errors-CQZ-QlOB.js → errors-DUEMWOr1.js} +1 -1
- package/dist/{errors-CQZ-QlOB.js.map → errors-DUEMWOr1.js.map} +1 -1
- package/dist/{errors-Bmqdg5Q6.cjs → errors-DWysOIMw.cjs} +1 -1
- package/dist/{errors-Bmqdg5Q6.cjs.map → errors-DWysOIMw.cjs.map} +1 -1
- package/dist/{errors-BtJEw2Z-.cjs → errors-umQzF_vW.cjs} +1 -1
- package/dist/{errors-BtJEw2Z-.cjs.map → errors-umQzF_vW.cjs.map} +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.d.cts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/{fetch-utils-BetJhSli.js → fetch-utils-C6qSgZai.js} +1 -1
- package/dist/{fetch-utils-BetJhSli.js.map → fetch-utils-C6qSgZai.js.map} +1 -1
- package/dist/{fetch-utils-Cp3P-Ai3.cjs → fetch-utils-DRgOJp3e.cjs} +1 -1
- package/dist/{fetch-utils-Cp3P-Ai3.cjs.map → fetch-utils-DRgOJp3e.cjs.map} +1 -1
- package/dist/{find-dsns-BPN8wnUr.js → find-dsns-BzfYjE06.js} +5 -4
- package/dist/find-dsns-BzfYjE06.js.map +1 -0
- package/dist/{find-dsns-Ct6uFZMB.cjs → find-dsns-DhHHtvpj.cjs} +6 -5
- package/dist/find-dsns-DhHHtvpj.cjs.map +1 -0
- package/dist/{find-organizations-BGI_WW2q.cjs → find-organizations-7ooGnnmP.cjs} +6 -4
- package/dist/find-organizations-7ooGnnmP.cjs.map +1 -0
- package/dist/{find-organizations-DxH9SS3w.js → find-organizations-BJFAElbh.js} +6 -4
- package/dist/find-organizations-BJFAElbh.js.map +1 -0
- package/dist/{find-projects-B80qSPpP.cjs → find-projects-BpEGRZya.cjs} +8 -6
- package/dist/find-projects-BpEGRZya.cjs.map +1 -0
- package/dist/{find-projects-DOMBBYAP.js → find-projects-E5CMFbwU.js} +7 -5
- package/dist/find-projects-E5CMFbwU.js.map +1 -0
- package/dist/{find-releases-CfZRMBvh.js → find-releases-DWWonhlV.js} +5 -4
- package/dist/find-releases-DWWonhlV.js.map +1 -0
- package/dist/{find-releases-Cy-Q-Qje.cjs → find-releases-Du5euXKS.cjs} +6 -5
- package/dist/find-releases-Du5euXKS.cjs.map +1 -0
- package/dist/{find-teams-D5770X0I.js → find-teams-BM4yWKe_.js} +10 -5
- package/dist/find-teams-BM4yWKe_.js.map +1 -0
- package/dist/{find-teams-BuH2ddaL.cjs → find-teams-Bp6-Iu62.cjs} +11 -6
- package/dist/find-teams-Bp6-Iu62.cjs.map +1 -0
- package/dist/{formatters-CkbVfXEE.cjs → formatters-B6H5qTFe.cjs} +3 -3
- package/dist/{formatters-CkbVfXEE.cjs.map → formatters-B6H5qTFe.cjs.map} +1 -1
- package/dist/{formatters-B9XiCNZ_.js → formatters-BOJNlDKG.js} +2 -2
- package/dist/{formatters-B9XiCNZ_.js.map → formatters-BOJNlDKG.js.map} +1 -1
- package/dist/{formatters-MEWHZ83Y.js → formatters-C9MhdNDX.js} +2 -2
- package/dist/{formatters-MEWHZ83Y.js.map → formatters-C9MhdNDX.js.map} +1 -1
- package/dist/{formatters-DMlTJcHW.cjs → formatters-ObdzRwld.cjs} +3 -3
- package/dist/{formatters-DMlTJcHW.cjs.map → formatters-ObdzRwld.cjs.map} +1 -1
- package/dist/{formatting-Cu1Skk_Y.cjs → formatting-5u-ZFz8H.cjs} +2 -2
- package/dist/{formatting-Cu1Skk_Y.cjs.map → formatting-5u-ZFz8H.cjs.map} +1 -1
- package/dist/{formatting-DytLf-hH.js → formatting-BEgp4WO_.js} +2 -2
- package/dist/{formatting-DytLf-hH.js.map → formatting-BEgp4WO_.js.map} +1 -1
- package/dist/{formatting-iJThzXT4.d.cts → formatting-Bw0FWiCH.d.cts} +4 -4
- package/dist/{formatting-iJThzXT4.d.cts.map → formatting-Bw0FWiCH.d.cts.map} +1 -1
- package/dist/{formatting-EM76FrY3.cjs → formatting-C6hyL-Yv.cjs} +1 -1
- package/dist/{formatting-EM76FrY3.cjs.map → formatting-C6hyL-Yv.cjs.map} +1 -1
- package/dist/{formatting-D5u7lYGU.d.ts → formatting-ClM7RU4L.d.ts} +4 -4
- package/dist/{formatting-D5u7lYGU.d.ts.map → formatting-ClM7RU4L.d.ts.map} +1 -1
- package/dist/{formatting-CAQbf0su.js → formatting-DJFcfTJG.js} +1 -1
- package/dist/{formatting-CAQbf0su.js.map → formatting-DJFcfTJG.js.map} +1 -1
- package/dist/{get-doc-D9Xq7et9.js → get-doc-CWhlUoJe.js} +8 -6
- package/dist/get-doc-CWhlUoJe.js.map +1 -0
- package/dist/{get-doc-MxWNTA8R.cjs → get-doc-DsOaSMIe.cjs} +9 -7
- package/dist/get-doc-DsOaSMIe.cjs.map +1 -0
- package/dist/{get-event-attachment-CrtS0QRV.cjs → get-event-attachment-CTF-k6op.cjs} +6 -5
- package/dist/{get-event-attachment-B_BzSfcE.js.map → get-event-attachment-CTF-k6op.cjs.map} +1 -1
- package/dist/{get-event-attachment-B_BzSfcE.js → get-event-attachment-DDvsu6IQ.js} +5 -4
- package/dist/get-event-attachment-DDvsu6IQ.js.map +1 -0
- package/dist/{get-issue-details-CucQ2nf7.js → get-issue-details-Bsax2jTY.js} +15 -10
- package/dist/get-issue-details-Bsax2jTY.js.map +1 -0
- package/dist/{get-issue-details-lQmdKAfJ.cjs → get-issue-details-CIZSksmd.cjs} +16 -11
- package/dist/get-issue-details-CIZSksmd.cjs.map +1 -0
- package/dist/{get-trace-details-iDp34mms.cjs → get-trace-details-Bc9GgkSs.cjs} +7 -6
- package/dist/get-trace-details-Bc9GgkSs.cjs.map +1 -0
- package/dist/{get-trace-details-BL5_jvgs.js → get-trace-details-Bkilw5oH.js} +6 -5
- package/dist/get-trace-details-Bkilw5oH.js.map +1 -0
- package/dist/{handler-ABnXxpHJ.d.ts → handler-CASDrJ7z.d.ts} +4 -4
- package/dist/{handler-ABnXxpHJ.d.ts.map → handler-CASDrJ7z.d.ts.map} +1 -1
- package/dist/{handler-D8I4qhcy.d.ts → handler-CXY05zhR.d.ts} +2 -2
- package/dist/handler-CXY05zhR.d.ts.map +1 -0
- package/dist/{handler-CT6BNjub.d.ts → handler-CZEMKP9p.d.cts} +4 -4
- package/dist/{handler-CGUL1Gvj.d.cts.map → handler-CZEMKP9p.d.cts.map} +1 -1
- package/dist/{handler-TWOoomKr.cjs → handler-ChOaafS-.cjs} +16 -11
- package/dist/handler-ChOaafS-.cjs.map +1 -0
- package/dist/{handler-BT1XWqc_.d.cts → handler-CmTBmIt9.d.cts} +4 -4
- package/dist/{handler-BT1XWqc_.d.cts.map → handler-CmTBmIt9.d.cts.map} +1 -1
- package/dist/{handler-CGUL1Gvj.d.cts → handler-Cs5DcdpF.d.ts} +4 -4
- package/dist/{handler-CT6BNjub.d.ts.map → handler-Cs5DcdpF.d.ts.map} +1 -1
- package/dist/{handler-DxsxiLrw.d.cts → handler-D6OGs2Ok.d.cts} +2 -2
- package/dist/handler-D6OGs2Ok.d.cts.map +1 -0
- package/dist/{handler-Fsqncg_W.cjs → handler-DQbc5eAJ.cjs} +15 -10
- package/dist/handler-DQbc5eAJ.cjs.map +1 -0
- package/dist/{handler-JBRPTNfu.js → handler-bf2qu8DQ.js} +14 -9
- package/dist/handler-bf2qu8DQ.js.map +1 -0
- package/dist/{handler-B3-dKrMX.js → handler-y6EMhG0y.js} +15 -10
- package/dist/handler-y6EMhG0y.js.map +1 -0
- package/dist/index.cjs +76 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -72
- package/dist/index.js.map +1 -1
- package/dist/internal/agents/callEmbeddedAgent.cjs +4 -2
- package/dist/internal/agents/callEmbeddedAgent.d.cts +1 -1
- package/dist/internal/agents/callEmbeddedAgent.d.ts +1 -1
- package/dist/internal/agents/callEmbeddedAgent.js +4 -2
- package/dist/internal/agents/openai-provider.cjs +4 -3
- package/dist/internal/agents/openai-provider.d.cts +10 -18
- package/dist/internal/agents/openai-provider.d.cts.map +1 -1
- package/dist/internal/agents/openai-provider.d.ts +10 -18
- package/dist/internal/agents/openai-provider.d.ts.map +1 -1
- package/dist/internal/agents/openai-provider.js +3 -2
- package/dist/internal/agents/tools/dataset-fields.cjs +11 -10
- package/dist/internal/agents/tools/dataset-fields.d.cts +7 -7
- package/dist/internal/agents/tools/dataset-fields.d.ts +7 -7
- package/dist/internal/agents/tools/dataset-fields.js +11 -10
- package/dist/internal/agents/tools/otel-semantics.cjs +11 -10
- package/dist/internal/agents/tools/otel-semantics.d.cts +7 -7
- package/dist/internal/agents/tools/otel-semantics.d.ts +7 -7
- package/dist/internal/agents/tools/otel-semantics.js +11 -10
- package/dist/internal/agents/tools/utils.cjs +10 -9
- package/dist/internal/agents/tools/utils.d.cts +1 -1
- package/dist/internal/agents/tools/utils.d.ts +1 -1
- package/dist/internal/agents/tools/utils.js +10 -9
- package/dist/internal/agents/tools/whoami.cjs +11 -10
- package/dist/internal/agents/tools/whoami.d.cts +7 -7
- package/dist/internal/agents/tools/whoami.d.ts +7 -7
- package/dist/internal/agents/tools/whoami.js +11 -10
- package/dist/internal/constraint-helpers.cjs +1 -1
- package/dist/internal/constraint-helpers.d.cts +3 -2
- package/dist/internal/constraint-helpers.d.cts.map +1 -1
- package/dist/internal/constraint-helpers.d.ts +3 -2
- package/dist/internal/constraint-helpers.d.ts.map +1 -1
- package/dist/internal/constraint-helpers.js +1 -1
- package/dist/internal/error-handling.cjs +10 -9
- package/dist/internal/error-handling.d.cts +4 -4
- package/dist/internal/error-handling.d.ts +4 -4
- package/dist/internal/error-handling.js +10 -9
- package/dist/internal/fetch-utils.cjs +1 -1
- package/dist/internal/fetch-utils.js +1 -1
- package/dist/internal/formatting.cjs +2 -2
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +4 -4
- package/dist/internal/formatting.js +2 -2
- package/dist/internal/issue-helpers.cjs +2 -2
- package/dist/internal/issue-helpers.d.cts +1 -1
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/issue-helpers.js +2 -2
- package/dist/internal/test-fixtures.d.cts +2 -2
- package/dist/internal/test-fixtures.d.ts +2 -2
- package/dist/internal/tool-helpers/api.cjs +13 -11
- package/dist/internal/tool-helpers/api.d.cts +6 -5
- package/dist/internal/tool-helpers/api.d.cts.map +1 -1
- package/dist/internal/tool-helpers/api.d.ts +6 -5
- package/dist/internal/tool-helpers/api.d.ts.map +1 -1
- package/dist/internal/tool-helpers/api.js +13 -11
- package/dist/internal/tool-helpers/define.cjs +1 -1
- package/dist/internal/tool-helpers/define.d.cts +4 -3
- package/dist/internal/tool-helpers/define.d.cts.map +1 -1
- package/dist/internal/tool-helpers/define.d.ts +4 -3
- package/dist/internal/tool-helpers/define.d.ts.map +1 -1
- package/dist/internal/tool-helpers/define.js +1 -1
- package/dist/internal/tool-helpers/enhance-error.cjs +10 -9
- package/dist/internal/tool-helpers/enhance-error.d.cts +3 -3
- package/dist/internal/tool-helpers/enhance-error.d.ts +3 -3
- package/dist/internal/tool-helpers/enhance-error.js +10 -9
- package/dist/internal/tool-helpers/formatting.cjs +1 -1
- package/dist/internal/tool-helpers/formatting.d.cts +3 -3
- package/dist/internal/tool-helpers/formatting.d.ts +3 -3
- package/dist/internal/tool-helpers/formatting.js +1 -1
- package/dist/internal/tool-helpers/issue.cjs +5 -5
- package/dist/internal/tool-helpers/issue.d.cts +5 -5
- package/dist/internal/tool-helpers/issue.d.ts +5 -5
- package/dist/internal/tool-helpers/issue.js +5 -5
- package/dist/internal/tool-helpers/seer.cjs +1 -1
- package/dist/internal/tool-helpers/seer.d.cts +3 -3
- package/dist/internal/tool-helpers/seer.d.ts +3 -3
- package/dist/internal/tool-helpers/seer.js +1 -1
- package/dist/internal/tool-helpers/validate-region-url.cjs +4 -3
- package/dist/internal/tool-helpers/validate-region-url.js +4 -3
- package/dist/{issue-helpers-DbPTv_qC.cjs → issue-helpers-D-hBnXTk.cjs} +2 -2
- package/dist/{issue-helpers-DbPTv_qC.cjs.map → issue-helpers-D-hBnXTk.cjs.map} +1 -1
- package/dist/{issue-helpers-BUtEHFKi.d.ts → issue-helpers-D4NRLqkR.d.ts} +1 -1
- package/dist/{issue-helpers-BUtEHFKi.d.ts.map → issue-helpers-D4NRLqkR.d.ts.map} +1 -1
- package/dist/{issue-helpers-8Bubch8E.js → issue-helpers-DtCbXiRZ.js} +2 -2
- package/dist/{issue-helpers-8Bubch8E.js.map → issue-helpers-DtCbXiRZ.js.map} +1 -1
- package/dist/{issue-helpers-Cyxq87SP.d.cts → issue-helpers-ILmSPsJZ.d.cts} +1 -1
- package/dist/{issue-helpers-Cyxq87SP.d.cts.map → issue-helpers-ILmSPsJZ.d.cts.map} +1 -1
- package/dist/{logging-BWajuCoz.d.ts → logging-BgTqJ4mI.d.ts} +1 -1
- package/dist/{logging-BWajuCoz.d.ts.map → logging-BgTqJ4mI.d.ts.map} +1 -1
- package/dist/{logging-99Uppado.d.cts → logging-BjKioF_x.d.cts} +1 -1
- package/dist/{logging-99Uppado.d.cts.map → logging-BjKioF_x.d.cts.map} +1 -1
- package/dist/{logging-CkAJKyq2.cjs → logging-C-ST7-Ow.cjs} +2 -2
- package/dist/{logging-CkAJKyq2.cjs.map → logging-C-ST7-Ow.cjs.map} +1 -1
- package/dist/{logging-DqqDTe02.js → logging-ChQnSEmD.js} +1 -1
- package/dist/{logging-DqqDTe02.js.map → logging-ChQnSEmD.js.map} +1 -1
- package/dist/openai-provider-B7uvGxoI.cjs +60 -0
- package/dist/openai-provider-B7uvGxoI.cjs.map +1 -0
- package/dist/openai-provider-DphaqrmX.js +48 -0
- package/dist/openai-provider-DphaqrmX.js.map +1 -0
- package/dist/{otel-semantics-CArUzarp.js → otel-semantics-CWWWmiNy.js} +2 -2
- package/dist/{otel-semantics-CArUzarp.js.map → otel-semantics-CWWWmiNy.js.map} +1 -1
- package/dist/{otel-semantics-onvZv7i9.cjs → otel-semantics-n8_5Ib9C.cjs} +3 -3
- package/dist/{otel-semantics-onvZv7i9.cjs.map → otel-semantics-n8_5Ib9C.cjs.map} +1 -1
- package/dist/{parse-BOPxttSm.cjs → parse-Br-BwKdT.cjs} +22 -4
- package/dist/parse-Br-BwKdT.cjs.map +1 -0
- package/dist/{parse-Da0oa8W8.js → parse-BvHK_nys.js} +21 -3
- package/dist/parse-BvHK_nys.js.map +1 -0
- package/dist/{permissions-CpuEzSxz.cjs → permissions-Berbg2vC.cjs} +3 -5
- package/dist/permissions-Berbg2vC.cjs.map +1 -0
- package/dist/{permissions-BBgPgD70.d.ts → permissions-CiIVEs4_.d.ts} +2 -2
- package/dist/permissions-CiIVEs4_.d.ts.map +1 -0
- package/dist/{permissions-B1meXGie.d.cts → permissions-Cm5e34n2.d.cts} +2 -2
- package/dist/permissions-Cm5e34n2.d.cts.map +1 -0
- package/dist/{permissions-xBjHy6Qx.js → permissions-DvkVlUJ1.js} +3 -5
- package/dist/permissions-DvkVlUJ1.js.map +1 -0
- package/dist/permissions.cjs +1 -1
- package/dist/permissions.d.cts +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.js +1 -1
- package/dist/resolve-CrYQ5aF_.cjs +107 -0
- package/dist/resolve-CrYQ5aF_.cjs.map +1 -0
- package/dist/resolve-DQ-6eLec.js +90 -0
- package/dist/resolve-DQ-6eLec.js.map +1 -0
- package/dist/{schema-Cv_VNAHz.cjs → schema-BGVOjcD7.cjs} +4 -4
- package/dist/{schema-Cv_VNAHz.cjs.map → schema-BGVOjcD7.cjs.map} +1 -1
- package/dist/{schema-rwexXWFL.js → schema-ChlpIaqA.js} +3 -3
- package/dist/{schema-rwexXWFL.js.map → schema-ChlpIaqA.js.map} +1 -1
- package/dist/{schema-BogGdbdV.d.ts → schema-Cp8XI7-D.d.ts} +347 -347
- package/dist/{schema-BogGdbdV.d.ts.map → schema-Cp8XI7-D.d.ts.map} +1 -1
- package/dist/{schema-Y6BzAUmc.d.cts → schema-D5oT-Zi7.d.cts} +309 -309
- package/dist/{schema-Y6BzAUmc.d.cts.map → schema-D5oT-Zi7.d.cts.map} +1 -1
- package/dist/{schema-DoWJbcHt.cjs → schema-DE4JpUSi.cjs} +2 -2
- package/dist/{schema-DoWJbcHt.cjs.map → schema-DE4JpUSi.cjs.map} +1 -1
- package/dist/{schema-CuB-30t5.js → schema-DkZXVCQJ.js} +1 -1
- package/dist/{schema-CuB-30t5.js.map → schema-DkZXVCQJ.js.map} +1 -1
- package/dist/schema.cjs +4 -3
- package/dist/schema.js +4 -3
- package/dist/{search-docs-CTT1Bt1U.cjs → search-docs-DdOFZY3t.cjs} +11 -27
- package/dist/search-docs-DdOFZY3t.cjs.map +1 -0
- package/dist/{search-docs-B9qNTw49.js → search-docs-YYBTOWY5.js} +10 -26
- package/dist/search-docs-YYBTOWY5.js.map +1 -0
- package/dist/{seer-CderEQ-X.js → seer-CSFgx4AP.js} +1 -1
- package/dist/{seer-CderEQ-X.js.map → seer-CSFgx4AP.js.map} +1 -1
- package/dist/{seer-B63P5CPi.cjs → seer-sA1asAZs.cjs} +1 -1
- package/dist/{seer-B63P5CPi.cjs.map → seer-sA1asAZs.cjs.map} +1 -1
- package/dist/{sentry-Da9wc8eP.cjs → sentry-3DC3Kob2.cjs} +1 -1
- package/dist/{sentry-Da9wc8eP.cjs.map → sentry-3DC3Kob2.cjs.map} +1 -1
- package/dist/{sentry-DAPJGZoR.d.cts → sentry-CfePWwtE.d.cts} +1 -1
- package/dist/sentry-CfePWwtE.d.cts.map +1 -0
- package/dist/{sentry-BhTMff8f.js → sentry-Cfj4OGMQ.js} +1 -1
- package/dist/{sentry-BhTMff8f.js.map → sentry-Cfj4OGMQ.js.map} +1 -1
- package/dist/{sentry-Bgt0wrtI.d.ts → sentry-DKiJwGZX.d.ts} +1 -1
- package/dist/sentry-DKiJwGZX.d.ts.map +1 -0
- package/dist/{server-J1RALwYS.cjs → server-BQBA0VNe.cjs} +111 -40
- package/dist/server-BQBA0VNe.cjs.map +1 -0
- package/dist/{server-CDG3HfVV.js → server-BVqPcPfx.js} +110 -39
- package/dist/server-BVqPcPfx.js.map +1 -0
- package/dist/server.cjs +63 -62
- package/dist/server.d.cts +6 -3
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +6 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +63 -62
- package/dist/skillDefinitions.cjs +53 -0
- package/dist/skillDefinitions.cjs.map +1 -0
- package/dist/skillDefinitions.d.cts +13 -0
- package/dist/skillDefinitions.d.cts.map +1 -0
- package/dist/skillDefinitions.d.ts +13 -0
- package/dist/skillDefinitions.d.ts.map +1 -0
- package/dist/skillDefinitions.js +52 -0
- package/dist/skillDefinitions.js.map +1 -0
- package/dist/skills-BmFl7P6V.js +94 -0
- package/dist/skills-BmFl7P6V.js.map +1 -0
- package/dist/skills-COOuBrrA.cjs +148 -0
- package/dist/skills-COOuBrrA.cjs.map +1 -0
- package/dist/skills-HlAeBq_E.d.cts +33 -0
- package/dist/skills-HlAeBq_E.d.cts.map +1 -0
- package/dist/skills-g0WCenTA.d.ts +33 -0
- package/dist/skills-g0WCenTA.d.ts.map +1 -0
- package/dist/skills.cjs +11 -0
- package/dist/skills.d.cts +2 -0
- package/dist/skills.d.ts +2 -0
- package/dist/skills.js +3 -0
- package/dist/{slug-validation-58wajHeL.js → slug-validation-Bkteg65O.js} +1 -1
- package/dist/{slug-validation-58wajHeL.js.map → slug-validation-Bkteg65O.js.map} +1 -1
- package/dist/{slug-validation-DMk8Dyuh.cjs → slug-validation-D5VJqMwH.cjs} +2 -2
- package/dist/{slug-validation-DMk8Dyuh.cjs.map → slug-validation-D5VJqMwH.cjs.map} +1 -1
- package/dist/{stdio-CV8Yynj8.cjs → stdio-DPvrKLnJ.cjs} +3 -3
- package/dist/{stdio-CV8Yynj8.cjs.map → stdio-DPvrKLnJ.cjs.map} +1 -1
- package/dist/{stdio-BfZ7eu3Q.js → stdio-YKMCj_QV.js} +2 -2
- package/dist/{stdio-BfZ7eu3Q.js.map → stdio-YKMCj_QV.js.map} +1 -1
- package/dist/telem/index.cjs +2 -2
- package/dist/telem/index.d.cts +2 -2
- package/dist/telem/index.d.ts +2 -2
- package/dist/telem/index.js +2 -2
- package/dist/telem/logging.cjs +1 -1
- package/dist/telem/logging.d.cts +1 -1
- package/dist/telem/logging.d.ts +1 -1
- package/dist/telem/logging.js +1 -1
- package/dist/telem/sentry.cjs +1 -1
- package/dist/telem/sentry.d.cts +1 -1
- package/dist/telem/sentry.d.ts +1 -1
- package/dist/telem/sentry.js +1 -1
- package/dist/test-setup.cjs +3 -51873
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.d.cts +3 -2
- package/dist/test-setup.d.cts.map +1 -1
- package/dist/test-setup.d.ts +3 -2
- package/dist/test-setup.d.ts.map +1 -1
- package/dist/test-setup.js +1 -51899
- package/dist/test-setup.js.map +1 -1
- package/dist/test-utils/context.d.cts +3 -2
- package/dist/test-utils/context.d.cts.map +1 -1
- package/dist/test-utils/context.d.ts +3 -2
- package/dist/test-utils/context.d.ts.map +1 -1
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.cjs.map +1 -1
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +3 -3
- package/dist/toolDefinitions.js.map +1 -1
- package/dist/tools/analyze-issue-with-seer.cjs +22 -20
- package/dist/tools/analyze-issue-with-seer.d.cts +4 -3
- package/dist/tools/analyze-issue-with-seer.d.cts.map +1 -1
- package/dist/tools/analyze-issue-with-seer.d.ts +4 -3
- package/dist/tools/analyze-issue-with-seer.d.ts.map +1 -1
- package/dist/tools/analyze-issue-with-seer.js +22 -20
- package/dist/tools/create-dsn.cjs +17 -15
- package/dist/tools/create-dsn.d.cts +4 -3
- package/dist/tools/create-dsn.d.cts.map +1 -1
- package/dist/tools/create-dsn.d.ts +4 -3
- package/dist/tools/create-dsn.d.ts.map +1 -1
- package/dist/tools/create-dsn.js +17 -15
- package/dist/tools/create-project.cjs +17 -15
- package/dist/tools/create-project.d.cts +4 -3
- package/dist/tools/create-project.d.cts.map +1 -1
- package/dist/tools/create-project.d.ts +4 -3
- package/dist/tools/create-project.d.ts.map +1 -1
- package/dist/tools/create-project.js +17 -15
- package/dist/tools/create-team.cjs +17 -15
- package/dist/tools/create-team.d.cts +4 -3
- package/dist/tools/create-team.d.cts.map +1 -1
- package/dist/tools/create-team.d.ts +4 -3
- package/dist/tools/create-team.d.ts.map +1 -1
- package/dist/tools/create-team.js +17 -15
- package/dist/tools/find-dsns.cjs +17 -15
- package/dist/tools/find-dsns.d.cts +8 -7
- package/dist/tools/find-dsns.d.ts +8 -7
- package/dist/tools/find-dsns.js +17 -15
- package/dist/tools/find-organizations.cjs +17 -15
- package/dist/tools/find-organizations.d.cts +6 -5
- package/dist/tools/find-organizations.d.ts +6 -5
- package/dist/tools/find-organizations.js +17 -15
- package/dist/tools/find-projects.cjs +17 -15
- package/dist/tools/find-projects.d.cts +8 -7
- package/dist/tools/find-projects.d.ts +8 -7
- package/dist/tools/find-projects.js +17 -15
- package/dist/tools/find-releases.cjs +17 -15
- package/dist/tools/find-releases.d.cts +4 -3
- package/dist/tools/find-releases.d.cts.map +1 -1
- package/dist/tools/find-releases.d.ts +4 -3
- package/dist/tools/find-releases.d.ts.map +1 -1
- package/dist/tools/find-releases.js +17 -15
- package/dist/tools/find-teams.cjs +17 -15
- package/dist/tools/find-teams.d.cts +8 -7
- package/dist/tools/find-teams.d.ts +8 -7
- package/dist/tools/find-teams.js +17 -15
- package/dist/tools/get-doc.cjs +12 -11
- package/dist/tools/get-doc.d.cts +4 -3
- package/dist/tools/get-doc.d.cts.map +1 -1
- package/dist/tools/get-doc.d.ts +4 -3
- package/dist/tools/get-doc.d.ts.map +1 -1
- package/dist/tools/get-doc.js +12 -11
- package/dist/tools/get-event-attachment.cjs +17 -15
- package/dist/tools/get-event-attachment.d.cts +10 -9
- package/dist/tools/get-event-attachment.d.ts +10 -9
- package/dist/tools/get-event-attachment.js +17 -15
- package/dist/tools/get-issue-details.cjs +22 -20
- package/dist/tools/get-issue-details.d.cts +4 -3
- package/dist/tools/get-issue-details.d.cts.map +1 -1
- package/dist/tools/get-issue-details.d.ts +4 -3
- package/dist/tools/get-issue-details.d.ts.map +1 -1
- package/dist/tools/get-issue-details.js +22 -20
- package/dist/tools/get-trace-details.cjs +17 -15
- package/dist/tools/get-trace-details.d.cts +8 -7
- package/dist/tools/get-trace-details.d.ts +8 -7
- package/dist/tools/get-trace-details.js +17 -15
- package/dist/tools/index.cjs +63 -62
- package/dist/tools/index.d.cts +80 -79
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +80 -79
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +63 -62
- package/dist/tools/search-docs.cjs +16 -14
- package/dist/tools/search-docs.d.cts +4 -3
- package/dist/tools/search-docs.d.cts.map +1 -1
- package/dist/tools/search-docs.d.ts +4 -3
- package/dist/tools/search-docs.d.ts.map +1 -1
- package/dist/tools/search-docs.js +16 -14
- package/dist/tools/search-events/agent.cjs +19 -17
- package/dist/tools/search-events/agent.d.cts +5 -5
- package/dist/tools/search-events/agent.d.ts +5 -5
- package/dist/tools/search-events/agent.js +18 -17
- package/dist/tools/search-events/config.cjs +1 -1
- package/dist/tools/search-events/config.js +1 -1
- package/dist/tools/search-events/formatters.cjs +12 -11
- package/dist/tools/search-events/formatters.d.cts +5 -5
- package/dist/tools/search-events/formatters.d.ts +5 -5
- package/dist/tools/search-events/formatters.js +12 -11
- package/dist/tools/search-events/handler.cjs +26 -24
- package/dist/tools/search-events/handler.d.cts +5 -4
- package/dist/tools/search-events/handler.d.ts +5 -4
- package/dist/tools/search-events/handler.js +26 -24
- package/dist/tools/search-events/index.cjs +27 -25
- package/dist/tools/search-events/index.d.cts +9 -8
- package/dist/tools/search-events/index.d.ts +9 -8
- package/dist/tools/search-events/index.js +27 -25
- package/dist/tools/search-events/utils.cjs +11 -10
- package/dist/tools/search-events/utils.d.cts +5 -5
- package/dist/tools/search-events/utils.d.ts +5 -5
- package/dist/tools/search-events/utils.js +11 -10
- package/dist/tools/search-issues/agent.cjs +18 -16
- package/dist/tools/search-issues/agent.d.cts +5 -5
- package/dist/tools/search-issues/agent.d.ts +5 -5
- package/dist/tools/search-issues/agent.js +17 -16
- package/dist/tools/search-issues/config.cjs +1 -1
- package/dist/tools/search-issues/config.js +1 -1
- package/dist/tools/search-issues/formatters.cjs +2 -2
- package/dist/tools/search-issues/formatters.d.cts +3 -3
- package/dist/tools/search-issues/formatters.d.ts +3 -3
- package/dist/tools/search-issues/formatters.js +2 -2
- package/dist/tools/search-issues/handler.cjs +25 -23
- package/dist/tools/search-issues/handler.d.cts +5 -4
- package/dist/tools/search-issues/handler.d.ts +5 -4
- package/dist/tools/search-issues/handler.js +25 -23
- package/dist/tools/search-issues/index.cjs +26 -24
- package/dist/tools/search-issues/index.d.cts +9 -8
- package/dist/tools/search-issues/index.d.ts +9 -8
- package/dist/tools/search-issues/index.js +26 -24
- package/dist/tools/types.d.cts +4 -3
- package/dist/tools/types.d.ts +4 -3
- package/dist/tools/update-issue.cjs +22 -20
- package/dist/tools/update-issue.d.cts +11 -10
- package/dist/tools/update-issue.d.ts +11 -10
- package/dist/tools/update-issue.js +22 -20
- package/dist/tools/update-project.cjs +17 -15
- package/dist/tools/update-project.d.cts +4 -3
- package/dist/tools/update-project.d.cts.map +1 -1
- package/dist/tools/update-project.d.ts +4 -3
- package/dist/tools/update-project.d.ts.map +1 -1
- package/dist/tools/update-project.js +17 -15
- package/dist/tools/use-sentry/agent.cjs +6 -5
- package/dist/tools/use-sentry/agent.d.cts +2 -2
- package/dist/tools/use-sentry/agent.d.ts +2 -2
- package/dist/tools/use-sentry/agent.js +6 -5
- package/dist/tools/use-sentry/config.cjs +1 -1
- package/dist/tools/use-sentry/config.js +1 -1
- package/dist/tools/use-sentry/handler.cjs +63 -62
- package/dist/tools/use-sentry/handler.d.cts +5 -4
- package/dist/tools/use-sentry/handler.d.ts +5 -4
- package/dist/tools/use-sentry/handler.js +63 -62
- package/dist/tools/use-sentry/index.cjs +63 -62
- package/dist/tools/use-sentry/index.d.cts +7 -6
- package/dist/tools/use-sentry/index.d.ts +7 -6
- package/dist/tools/use-sentry/index.js +63 -62
- package/dist/tools/use-sentry/tool-wrapper.cjs +11 -10
- package/dist/tools/use-sentry/tool-wrapper.cjs.map +1 -1
- package/dist/tools/use-sentry/tool-wrapper.d.cts +10 -9
- package/dist/tools/use-sentry/tool-wrapper.d.cts.map +1 -1
- package/dist/tools/use-sentry/tool-wrapper.d.ts +10 -9
- package/dist/tools/use-sentry/tool-wrapper.d.ts.map +1 -1
- package/dist/tools/use-sentry/tool-wrapper.js +10 -9
- package/dist/tools/use-sentry/tool-wrapper.js.map +1 -1
- package/dist/tools/whoami.cjs +15 -13
- package/dist/tools/whoami.d.cts +4 -3
- package/dist/tools/whoami.d.ts +4 -3
- package/dist/tools/whoami.js +15 -13
- package/dist/transports/stdio.cjs +2 -2
- package/dist/transports/stdio.d.cts +3 -2
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +3 -2
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +2 -2
- package/dist/{types-Bu5blaB3.d.ts → types-B_3dsqbN.d.cts} +5 -3
- package/dist/types-B_3dsqbN.d.cts.map +1 -0
- package/dist/{types-jjNLngoj.d.cts → types-BeIzCAF1.d.cts} +11 -2
- package/dist/types-BeIzCAF1.d.cts.map +1 -0
- package/dist/{types-B3T3_E4s.d.ts → types-C70IdmF4.d.ts} +11 -2
- package/dist/types-C70IdmF4.d.ts.map +1 -0
- package/dist/{types-CLI02LNZ.d.cts → types-CZI-5yyV.d.cts} +2 -2
- package/dist/{types-CLI02LNZ.d.cts.map → types-CZI-5yyV.d.cts.map} +1 -1
- package/dist/{types-DNr8xzOR.d.cts → types-CokRupPo.d.cts} +4 -2
- package/dist/types-CokRupPo.d.cts.map +1 -0
- package/dist/{types-DjbiyvLT.d.ts → types-OrkP7cEA.d.ts} +4 -2
- package/dist/types-OrkP7cEA.d.ts.map +1 -0
- package/dist/{types-DoT0an28.d.ts → types-WcBA7ZSQ.d.ts} +2 -2
- package/dist/{types-DoT0an28.d.ts.map → types-WcBA7ZSQ.d.ts.map} +1 -1
- package/dist/{types-BeQSPXek.d.cts → types-u52qwG59.d.ts} +5 -3
- package/dist/types-u52qwG59.d.ts.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -2
- package/dist/types.d.ts +3 -2
- package/dist/types.js.map +1 -1
- package/dist/{update-issue-CoAkoO66.js → update-issue-B35n8MDT.js} +8 -7
- package/dist/update-issue-B35n8MDT.js.map +1 -0
- package/dist/{update-issue-eELBq_Uy.cjs → update-issue-DOVD2zXD.cjs} +9 -8
- package/dist/update-issue-DOVD2zXD.cjs.map +1 -0
- package/dist/{update-project-CuZlyBPN.js → update-project-D361nWlU.js} +7 -6
- package/dist/update-project-D361nWlU.js.map +1 -0
- package/dist/{update-project-DMRBdOZ5.cjs → update-project-DG3bwhNA.cjs} +8 -7
- package/dist/update-project-DG3bwhNA.cjs.map +1 -0
- package/dist/{url-utils-Bn5EoScr.cjs → url-utils-CbcNJVYS.cjs} +1 -1
- package/dist/{url-utils-Bn5EoScr.cjs.map → url-utils-CbcNJVYS.cjs.map} +1 -1
- package/dist/{url-utils-d9bPTnOl.js → url-utils-CfKwo6s5.js} +1 -1
- package/dist/{url-utils-d9bPTnOl.js.map → url-utils-CfKwo6s5.js.map} +1 -1
- package/dist/{usage-BV4cegeX.cjs → usage-CMWaPhZv.cjs} +13 -5
- package/dist/usage-CMWaPhZv.cjs.map +1 -0
- package/dist/{usage-DLck8shg.js → usage-CpguKuwi.js} +13 -5
- package/dist/usage-CpguKuwi.js.map +1 -0
- package/dist/utils/slug-validation.cjs +1 -1
- package/dist/utils/slug-validation.js +1 -1
- package/dist/utils/url-utils.cjs +1 -1
- package/dist/utils/url-utils.js +1 -1
- package/dist/{utils-yxWhi9hG.d.cts → utils-Bzaer0D1.d.ts} +4 -4
- package/dist/{utils-BV58GdRy.d.ts.map → utils-Bzaer0D1.d.ts.map} +1 -1
- package/dist/{utils-DlTCMJUW.d.cts → utils-C5oiuqkh.d.cts} +6 -6
- package/dist/{utils-DlTCMJUW.d.cts.map → utils-C5oiuqkh.d.cts.map} +1 -1
- package/dist/{utils-BV58GdRy.d.ts → utils-CAWsA9Cl.d.cts} +1 -1
- package/dist/{utils-yxWhi9hG.d.cts.map → utils-CAWsA9Cl.d.cts.map} +1 -1
- package/dist/{utils-C5DuiZoe.cjs → utils-CIt6Amml.cjs} +3 -3
- package/dist/{utils-C5DuiZoe.cjs.map → utils-CIt6Amml.cjs.map} +1 -1
- package/dist/{utils-CwvZS30K.js → utils-CaNeCYCH.js} +2 -2
- package/dist/{utils-CwvZS30K.js.map → utils-CaNeCYCH.js.map} +1 -1
- package/dist/{utils-gp7BwMLy.d.ts → utils-CrKFhSC3.d.ts} +6 -6
- package/dist/{utils-gp7BwMLy.d.ts.map → utils-CrKFhSC3.d.ts.map} +1 -1
- package/dist/{utils-DUJcA3eH.cjs → utils-DJIwl8YR.cjs} +5 -5
- package/dist/{utils-DUJcA3eH.cjs.map → utils-DJIwl8YR.cjs.map} +1 -1
- package/dist/{utils-iC0Uutcf.js → utils-DOb7bs5_.js} +4 -4
- package/dist/{utils-iC0Uutcf.js.map → utils-DOb7bs5_.js.map} +1 -1
- package/dist/{validate-region-url-CaR6XWB_.js → validate-region-url-Bdokgz65.js} +3 -3
- package/dist/{validate-region-url-CaR6XWB_.js.map → validate-region-url-Bdokgz65.js.map} +1 -1
- package/dist/{validate-region-url-dzz6t54w.cjs → validate-region-url-BvT-IgKg.cjs} +3 -3
- package/dist/{validate-region-url-dzz6t54w.cjs.map → validate-region-url-BvT-IgKg.cjs.map} +1 -1
- package/dist/version-CCICHYna.js +7 -0
- package/dist/version-CCICHYna.js.map +1 -0
- package/dist/version-CPcX-30c.cjs +19 -0
- package/dist/version-CPcX-30c.cjs.map +1 -0
- package/dist/version.cjs +3 -2
- package/dist/version.d.cts +2 -1
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +2 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -2
- package/dist/{whoami-DBSqcCGl.cjs → whoami-9JymZ3NV.cjs} +3 -3
- package/dist/{whoami-DBSqcCGl.cjs.map → whoami-9JymZ3NV.cjs.map} +1 -1
- package/dist/{whoami-D8-XCgVJ.js → whoami-BsX-LoXG.js} +2 -2
- package/dist/{whoami-D8-XCgVJ.js.map → whoami-BsX-LoXG.js.map} +1 -1
- package/dist/{whoami-DBlwuDZf.cjs → whoami-CRF9Ws25.cjs} +5 -3
- package/dist/whoami-CRF9Ws25.cjs.map +1 -0
- package/dist/{whoami-Bh_uOPqO.js → whoami-DCZN-m7R.js} +5 -3
- package/dist/whoami-DCZN-m7R.js.map +1 -0
- package/package.json +19 -5
- package/dist/agent-4SliQ-uj.d.cts.map +0 -1
- package/dist/agent-BMCJjVaJ.cjs.map +0 -1
- package/dist/agent-CRc61dcC.js.map +0 -1
- package/dist/agent-D-dMHrZ1.d.cts.map +0 -1
- package/dist/agent-D_WfZ67H.d.ts.map +0 -1
- package/dist/agent-DoYdEiCJ.d.ts.map +0 -1
- package/dist/agent-DzfX6_dM.cjs.map +0 -1
- package/dist/agent-FoPk5psd.js.map +0 -1
- package/dist/agent-tools-1J_Oub8P.cjs +0 -20
- package/dist/agent-tools-1J_Oub8P.cjs.map +0 -1
- package/dist/agent-tools-DodmjvZn.js +0 -15
- package/dist/agent-tools-DodmjvZn.js.map +0 -1
- package/dist/analyze-issue-with-seer-CI8pvCnf.cjs.map +0 -1
- package/dist/analyze-issue-with-seer-DvuKEcbu.js.map +0 -1
- package/dist/callEmbeddedAgent-BSnzLPfW.js.map +0 -1
- package/dist/callEmbeddedAgent-D83njSgs.d.cts.map +0 -1
- package/dist/callEmbeddedAgent-KKTSTD7W.cjs.map +0 -1
- package/dist/callEmbeddedAgent-RskCqVav.d.ts.map +0 -1
- package/dist/client-C2TwbSm-.cjs.map +0 -1
- package/dist/client-CWgvrDHH.js.map +0 -1
- package/dist/create-dsn-Bx2s8Bik.js.map +0 -1
- package/dist/create-dsn-ggGt0lZf.cjs.map +0 -1
- package/dist/create-project-C0pm6zUK.js.map +0 -1
- package/dist/create-project-CZBklXm8.cjs.map +0 -1
- package/dist/create-team-BQIns3VD.js.map +0 -1
- package/dist/create-team-DmqKw2c1.cjs.map +0 -1
- package/dist/find-dsns-BPN8wnUr.js.map +0 -1
- package/dist/find-dsns-Ct6uFZMB.cjs.map +0 -1
- package/dist/find-organizations-BGI_WW2q.cjs.map +0 -1
- package/dist/find-organizations-DxH9SS3w.js.map +0 -1
- package/dist/find-projects-B80qSPpP.cjs.map +0 -1
- package/dist/find-projects-DOMBBYAP.js.map +0 -1
- package/dist/find-releases-CfZRMBvh.js.map +0 -1
- package/dist/find-releases-Cy-Q-Qje.cjs.map +0 -1
- package/dist/find-teams-BuH2ddaL.cjs.map +0 -1
- package/dist/find-teams-D5770X0I.js.map +0 -1
- package/dist/get-doc-D9Xq7et9.js.map +0 -1
- package/dist/get-doc-MxWNTA8R.cjs.map +0 -1
- package/dist/get-event-attachment-CrtS0QRV.cjs.map +0 -1
- package/dist/get-issue-details-CucQ2nf7.js.map +0 -1
- package/dist/get-issue-details-lQmdKAfJ.cjs.map +0 -1
- package/dist/get-trace-details-BL5_jvgs.js.map +0 -1
- package/dist/get-trace-details-iDp34mms.cjs.map +0 -1
- package/dist/handler-B3-dKrMX.js.map +0 -1
- package/dist/handler-D8I4qhcy.d.ts.map +0 -1
- package/dist/handler-DxsxiLrw.d.cts.map +0 -1
- package/dist/handler-Fsqncg_W.cjs.map +0 -1
- package/dist/handler-JBRPTNfu.js.map +0 -1
- package/dist/handler-TWOoomKr.cjs.map +0 -1
- package/dist/openai-provider-CqpHDwSr.js +0 -32
- package/dist/openai-provider-CqpHDwSr.js.map +0 -1
- package/dist/openai-provider-DhSY7kTj.cjs +0 -44
- package/dist/openai-provider-DhSY7kTj.cjs.map +0 -1
- package/dist/parse-BOPxttSm.cjs.map +0 -1
- package/dist/parse-Da0oa8W8.js.map +0 -1
- package/dist/permissions-B1meXGie.d.cts.map +0 -1
- package/dist/permissions-BBgPgD70.d.ts.map +0 -1
- package/dist/permissions-CpuEzSxz.cjs.map +0 -1
- package/dist/permissions-xBjHy6Qx.js.map +0 -1
- package/dist/resolve-C95FW12c.js +0 -54
- package/dist/resolve-C95FW12c.js.map +0 -1
- package/dist/resolve-D6Cfnjdj.cjs +0 -65
- package/dist/resolve-D6Cfnjdj.cjs.map +0 -1
- package/dist/search-docs-B9qNTw49.js.map +0 -1
- package/dist/search-docs-CTT1Bt1U.cjs.map +0 -1
- package/dist/sentry-Bgt0wrtI.d.ts.map +0 -1
- package/dist/sentry-DAPJGZoR.d.cts.map +0 -1
- package/dist/server-CDG3HfVV.js.map +0 -1
- package/dist/server-J1RALwYS.cjs.map +0 -1
- package/dist/tools/agent-tools.cjs +0 -65
- package/dist/tools/agent-tools.d.cts +0 -25
- package/dist/tools/agent-tools.d.cts.map +0 -1
- package/dist/tools/agent-tools.d.ts +0 -25
- package/dist/tools/agent-tools.d.ts.map +0 -1
- package/dist/tools/agent-tools.js +0 -65
- package/dist/types-B3T3_E4s.d.ts.map +0 -1
- package/dist/types-BeQSPXek.d.cts.map +0 -1
- package/dist/types-Bu5blaB3.d.ts.map +0 -1
- package/dist/types-DNr8xzOR.d.cts.map +0 -1
- package/dist/types-DjbiyvLT.d.ts.map +0 -1
- package/dist/types-jjNLngoj.d.cts.map +0 -1
- package/dist/update-issue-CoAkoO66.js.map +0 -1
- package/dist/update-issue-eELBq_Uy.cjs.map +0 -1
- package/dist/update-project-CuZlyBPN.js.map +0 -1
- package/dist/update-project-DMRBdOZ5.cjs.map +0 -1
- package/dist/usage-BV4cegeX.cjs.map +0 -1
- package/dist/usage-DLck8shg.js.map +0 -1
- package/dist/version-BaA5pxTW.js +0 -6
- package/dist/version-BaA5pxTW.js.map +0 -1
- package/dist/version-CdN5Kpjv.cjs +0 -12
- package/dist/version-CdN5Kpjv.cjs.map +0 -1
- package/dist/whoami-Bh_uOPqO.js.map +0 -1
- package/dist/whoami-DBlwuDZf.cjs.map +0 -1
- /package/dist/{api-client-BR5WolLe.js → api-client-BGgaBFuD.cjs} +0 -0
- /package/dist/{api-client-BsHWi0-I.cjs → api-client-CSLxiNP9.js} +0 -0
- /package/dist/{issue-B7cgiWKp.cjs → issue-1C6txnk3.js} +0 -0
- /package/dist/{issue-BLm6gohl.js → issue-ChNk4cuO.cjs} +0 -0
- /package/dist/{search-events-Bc2a_R3A.cjs → search-events-B-MXKSB_.js} +0 -0
- /package/dist/{search-events-Bo5bAsOv.js → search-events-BrEw3wC-.cjs} +0 -0
- /package/dist/{search-issues-AaiYCZ6J.cjs → search-issues-C7Zs6rFB.cjs} +0 -0
- /package/dist/{search-issues-DVHuKDdB.js → search-issues-DUSkomYp.js} +0 -0
- /package/dist/{types-Bx1EKe0v.js → types-D670-rDz.js} +0 -0
- /package/dist/{types-D10T4PdD.cjs → types-n3wuZu5X.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-CllFlx5w.cjs","names":["NUMERIC_FIELDS: Record<string, Set<string>>"],"sources":["../src/tools/search-events/config.ts"],"sourcesContent":["// Build a dataset-agnostic system prompt\nexport const systemPrompt = `You are a Sentry query translator. You need to:\n1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query\n2. Query the available attributes for that dataset using the datasetAttributes tool\n3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions\n4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)\n5. Decide which fields to return in the results\n\nCRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.\n\nDATASET SELECTION GUIDELINES:\n- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, \"XYZ calls\", ambiguous operations (richest attribute set)\n- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors\n- logs: Log entries, log messages, severity levels, debugging information\n\nFor ambiguous queries like \"calls using XYZ\", prefer spans dataset first as it contains the most comprehensive telemetry data.\n\nCRITICAL - FIELD VERIFICATION REQUIREMENT:\nBefore constructing ANY query, you MUST verify field availability:\n1. You CANNOT assume ANY field exists without checking - not even common ones\n2. This includes ALL fields: custom attributes, database fields, HTTP fields, AI fields, user fields, etc.\n3. Fields vary by project based on what data is being sent to Sentry\n4. Using an unverified field WILL cause your query to fail with \"field not found\" errors\n5. The datasetAttributes tool tells you EXACTLY which fields are available\n\nTOOL USAGE GUIDELINES:\n1. Use datasetAttributes tool to discover available fields for your chosen dataset\n2. Use otelSemantics tool when you need specific OpenTelemetry semantic convention attributes\n3. Use whoami tool when queries contain \"me\" references for user.id or user.email fields\n4. IMPORTANT: For ambiguous terms like \"user agents\", \"browser\", \"client\" - use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nCRITICAL - HANDLING \"DISTINCT\" OR \"UNIQUE VALUES\" QUERIES:\nWhen user asks for \"distinct\", \"unique\", \"all values of\", or \"what are the X\" queries:\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts\n3. Sort by \"-count()\" to show most common values first\n4. Use datasetAttributes tool to verify the field exists before constructing query\n5. Examples:\n - \"distinct categories\" → fields=['category.name', 'count()'], sort='-count()'\n - \"unique types\" → fields=['item.type', 'count()'], sort='-count()'\n\nCRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:\nWhen user asks about \"traffic\", \"volume\", \"how much\", \"how many\" (without specific metrics):\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. For total counts: fields=['count()']\n3. For grouped counts: fields=['grouping_field', 'count()']\n4. Always include timeRange for period-specific queries\n5. Examples:\n - \"how much traffic in last 30 days\" → fields=['count()'], timeRange: {\"statsPeriod\": \"30d\"}\n - \"traffic on mcp-server\" → query: \"project:mcp-server\", fields=['count()']\n\nCRITICAL - HANDLING \"ME\" REFERENCES:\n- If the query contains \"me\", \"my\", \"myself\", or \"affecting me\" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email\n- For assignedTo fields, you can use \"me\" directly without translation (e.g., assignedTo:me works as-is)\n- After calling whoami, replace \"me\" references with the actual user.id or user.email values\n- If whoami fails, return an error explaining the issue\n\nQUERY MODES:\n1. INDIVIDUAL EVENTS (default): Returns raw event data\n - Used when fields contain no function() calls\n - Include recommended fields plus any user-requested fields\n\n2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)\n - Activated when ANY field contains a function() call\n - Fields should ONLY include: aggregate functions + groupBy fields\n - Automatically groups by ALL non-function fields\n - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.\n - You SHOULD sort aggregate results by \"-function_name()\" for descending order (highest values first)\n - For equations in aggregate queries: You SHOULD use \"-equation|...\" prefix unless user wants lowest values\n - When user asks \"how many total\", \"sum of\", or similar: They want the highest/total value, use descending sort\n\nCRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:\n- Queries asking for data \"over time\", \"by hour\", \"by day\", \"time series\", or similar temporal groupings are NOT currently supported\n- If user asks for \"X over time\", return an error explaining: \"Time series aggregations are not currently supported.\"\n\nCRITICAL - DO NOT USE SQL SYNTAX:\n- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL\n- NEVER use SQL date functions - use timeRange parameter instead\n- For \"yesterday\": Use timeRange: {\"statsPeriod\": \"24h\"}, NOT timestamp >= yesterday()\n- For field existence: Use has:field_name, NOT field_name IS NOT NULL\n- For field absence: Use !has:field_name, NOT field_name IS NULL\n\nMATHEMATICAL QUERY PATTERNS:\nWhen user asks mathematical questions like \"how many X\", \"total Y used\", \"sum of Z\":\n- Identify the appropriate dataset based on context\n- Use datasetAttributes tool to find available numeric fields\n- Use sum() function for totals, avg() for averages, count() for counts\n- For time-based queries (\"today\", \"yesterday\", \"this week\"), use timeRange parameter\n- For \"total\" or \"how many\" questions: Users typically want highest values first (descending sort)\n\nDERIVED METRICS AND CALCULATIONS (SPANS ONLY):\nWhen user asks for calculated metrics, ratios, or conversions:\n- Use equation fields with \"equation|\" prefix\n- Examples:\n - \"duration in milliseconds\" → fields: [\"equation|avg(span.duration) * 1000\"], sort: \"-equation|avg(span.duration) * 1000\"\n - \"combined metric total\" → fields: [\"equation|sum(metric.a) + sum(metric.b)\"], sort: \"-equation|sum(metric.a) + sum(metric.b)\"\n - \"error rate percentage\" → fields: [\"equation|failure_rate() * 100\"], sort: \"-equation|failure_rate() * 100\"\n - \"events per second\" → fields: [\"equation|count() / 3600\"], sort: \"-equation|count() / 3600\"\n- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs\n- IMPORTANT: When sorting by equations, use \"-equation|...\" for descending order (highest values first)\n\nSORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"level:error sort:-timestamp\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"level:error\", sort: \"-timestamp\" ← Sort in separate field\n\n2. DEFAULT SORTING:\n - errors dataset: Use \"-timestamp\" (newest first)\n - spans dataset: Use \"-span.duration\" (slowest first) \n - logs dataset: Use \"-timestamp\" (newest first)\n\n3. SORTING SYNTAX:\n - Use \"-\" prefix for descending order (e.g., \"-timestamp\" for newest first)\n - Use field name without prefix for ascending order\n - For aggregate queries: sort by aggregate function results (e.g., \"-count()\" for highest count first)\n - For equation fields: You SHOULD use \"-equation|...\" for descending order (e.g., \"-equation|sum(field1) + sum(field2)\")\n - Only omit the \"-\" prefix if the user clearly wants lowest values first (rare)\n\n4. IMPORTANT SORTING REQUIREMENTS:\n - YOU MUST ALWAYS INCLUDE A SORT PARAMETER\n - CRITICAL: The field you sort by MUST be included in your fields array\n - If sorting by \"-timestamp\", include \"timestamp\" in fields\n - If sorting by \"-count()\", include \"count()\" in fields\n - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with these fields:\n- \"dataset\": Which dataset you determined to use (\"spans\", \"errors\", or \"logs\")\n- \"query\": The Sentry query string for filtering results (use empty string \"\" for no filters)\n- \"fields\": Array of field names to return in results\n - For individual event queries: OPTIONAL (will use recommended fields if not provided)\n - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)\n- \"sort\": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)\n- \"timeRange\": Time range parameters (optional)\n - Relative: {\"statsPeriod\": \"24h\"} for last 24 hours, \"7d\" for last 7 days, etc.\n - Absolute: {\"start\": \"2025-06-19T07:00:00\", \"end\": \"2025-06-20T06:59:59\"} for specific date ranges\n\nCORRECT QUERY PATTERNS (FOLLOW THESE):\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions)\n- Example: \"items processed yesterday\" → query: \"has:item.processed\", timeRange: {\"statsPeriod\": \"24h\"}\n\nPROCESS:\n1. Analyze the user's query\n2. Determine appropriate dataset\n3. Use datasetAttributes tool to discover available fields\n4. Use otelSemantics tool if needed for OpenTelemetry attributes\n5. Construct the final query with proper fields and sort parameters\n\nCOMMON ERRORS TO AVOID:\n- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead\n- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields\n- Using incorrect field names (use the otelSemantics tool to look up correct names)\n- Missing required fields in the fields array for aggregate queries\n- Invalid sort parameter not included in fields array\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;\n\n// Base fields common to all datasets\nexport const BASE_COMMON_FIELDS = {\n project: \"Project slug\",\n timestamp: \"When the event occurred\",\n environment: \"Environment (production, staging, development)\",\n release: \"Release version\",\n platform: \"Platform (javascript, python, etc.)\",\n \"user.id\": \"User ID\",\n \"user.email\": \"User email\",\n \"sdk.name\": \"SDK name\",\n \"sdk.version\": \"SDK version\",\n};\n\n// Known numeric fields for each dataset\nexport const NUMERIC_FIELDS: Record<string, Set<string>> = {\n spans: new Set([\n \"span.duration\",\n \"span.self_time\",\n \"transaction.duration\",\n \"http.status_code\",\n \"gen_ai.usage.input_tokens\",\n \"gen_ai.usage.output_tokens\",\n \"gen_ai.request.max_tokens\",\n ]),\n errors: new Set([\n // Most error fields are strings/categories\n \"stack.lineno\",\n ]),\n logs: new Set([\"severity_number\", \"sentry.observed_timestamp_nanos\"]),\n};\n\n// Dataset-specific field definitions\nexport const DATASET_FIELDS = {\n spans: {\n // Span-specific fields\n \"span.op\": \"Span operation type (e.g., http.client, db.query, cache.get)\",\n \"span.description\": \"Detailed description of the span operation\",\n \"span.duration\": \"Duration of the span in milliseconds\",\n \"span.status\": \"Span status (ok, cancelled, unknown, etc.)\",\n \"span.self_time\": \"Time spent in this span excluding child spans\",\n\n // Transaction fields\n transaction: \"Transaction name/route\",\n \"transaction.duration\": \"Total transaction duration in milliseconds\",\n \"transaction.op\": \"Transaction operation type\",\n \"transaction.status\": \"Transaction status\",\n is_transaction: \"Whether this span is a transaction (true/false)\",\n\n // Trace fields\n trace: \"Trace ID\",\n \"trace.span_id\": \"Span ID within the trace\",\n \"trace.parent_span_id\": \"Parent span ID\",\n\n // HTTP fields\n \"http.method\": \"HTTP method (GET, POST, etc.)\",\n \"http.status_code\": \"HTTP response status code\",\n \"http.url\": \"Full HTTP URL\",\n\n // Database fields\n \"db.system\": \"Database system (postgresql, mysql, etc.)\",\n \"db.operation\": \"Database operation (SELECT, INSERT, etc.)\",\n\n // OpenTelemetry attribute namespaces for semantic queries\n // Use has:namespace.* to find spans with any attribute in that namespace\n // GenAI namespace (gen_ai.*) - for AI/LLM/Agent calls\n \"gen_ai.system\": \"AI system (e.g., anthropic, openai)\",\n \"gen_ai.request.model\": \"Model name (e.g., claude-3-5-sonnet-20241022)\",\n \"gen_ai.operation.name\": \"Operation type (e.g., chat, completion)\",\n \"gen_ai.usage.input_tokens\": \"Number of input tokens (numeric)\",\n \"gen_ai.usage.output_tokens\": \"Number of output tokens (numeric)\",\n\n // MCP namespace (mcp.*) - for Model Context Protocol tool calls\n \"mcp.tool.name\": \"Tool name (e.g., search_issues, search_events)\",\n \"mcp.session.id\": \"MCP session identifier\",\n\n // Aggregate functions (SPANS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of spans\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(span.duration)\",\n \"sum(field)\": \"Sum of numeric field, e.g. sum(span.self_time)\",\n \"min(field)\": \"Minimum of numeric field, e.g. min(span.duration)\",\n \"max(field)\": \"Maximum of numeric field, e.g. max(span.duration)\",\n \"p50(field)\": \"50th percentile (median), e.g. p50(span.duration)\",\n \"p75(field)\": \"75th percentile, e.g. p75(span.duration)\",\n \"p90(field)\": \"90th percentile, e.g. p90(span.duration)\",\n \"p95(field)\": \"95th percentile, e.g. p95(span.duration)\",\n \"p99(field)\": \"99th percentile, e.g. p99(span.duration)\",\n \"p100(field)\": \"100th percentile (max), e.g. p100(span.duration)\",\n \"epm()\": \"Events per minute rate\",\n \"failure_rate()\": \"Percentage of failed spans\",\n },\n errors: {\n // Error-specific fields\n message: \"Error message\",\n level: \"Error level (error, warning, info, debug)\",\n \"error.type\": \"Error type/exception class\",\n \"error.value\": \"Error value/description\",\n \"error.handled\": \"Whether the error was handled (true/false)\",\n culprit: \"Code location that caused the error\",\n title: \"Error title/grouping\",\n\n // Stack trace fields\n \"stack.filename\": \"File where error occurred\",\n \"stack.function\": \"Function where error occurred\",\n \"stack.module\": \"Module where error occurred\",\n \"stack.abs_path\": \"Absolute path to file\",\n\n // Additional context fields\n \"os.name\": \"Operating system name\",\n \"browser.name\": \"Browser name\",\n \"device.family\": \"Device family\",\n\n // Aggregate functions (ERRORS dataset only)\n \"count()\": \"Count of error events\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"count_if(field,equals,value)\":\n \"Conditional count, e.g. count_if(error.handled,equals,false)\",\n \"last_seen()\": \"Most recent timestamp of the group\",\n \"eps()\": \"Events per second rate\",\n \"epm()\": \"Events per minute rate\",\n },\n logs: {\n // Log-specific fields\n message: \"Log message\",\n severity: \"Log severity level\",\n severity_number: \"Numeric severity level\",\n \"sentry.item_id\": \"Sentry item ID\",\n \"sentry.observed_timestamp_nanos\": \"Observed timestamp in nanoseconds\",\n\n // Trace context\n trace: \"Trace ID\",\n\n // Aggregate functions (LOGS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of log entries\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(severity_number)\",\n \"sum(field)\": \"Sum of numeric field\",\n \"min(field)\": \"Minimum of numeric field\",\n \"max(field)\": \"Maximum of numeric field\",\n \"p50(field)\": \"50th percentile (median)\",\n \"p75(field)\": \"75th percentile\",\n \"p90(field)\": \"90th percentile\",\n \"p95(field)\": \"95th percentile\",\n \"p99(field)\": \"99th percentile\",\n \"p100(field)\": \"100th percentile (max)\",\n \"epm()\": \"Events per minute rate\",\n },\n};\n\n// Dataset-specific rules and examples\nexport const DATASET_CONFIGS = {\n errors: {\n rules: `- For errors, focus on: message, level, error.type, error.handled\n- Use level field for severity (error, warning, info, debug)\n- Use error.handled:false for unhandled exceptions/crashes\n- For filename searches: Use stack.filename for suffix-based search (e.g., stack.filename:\"**/index.js\" or stack.filename:\"**/components/Button.tsx\")\n- When searching for errors in specific files, prefer including the parent folder to avoid ambiguity (e.g., stack.filename:\"**/components/index.js\" instead of just stack.filename:\"**/index.js\")`,\n examples: `- \"null pointer exceptions\" → \n {\n \"query\": \"error.type:\\\\\"NullPointerException\\\\\" OR message:\\\\\"*null pointer*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"unhandled errors in production\" → \n {\n \"query\": \"error.handled:false AND environment:production\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"error.handled\", \"environment\"],\n \"sort\": \"-timestamp\"\n }\n- \"database connection errors\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\" AND message:\\\\\"*connection*\\\\\" AND level:error\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me user emails for authentication failures\" → \n {\n \"query\": \"message:\\\\\"*auth*\\\\\" AND (message:\\\\\"*failed*\\\\\" OR message:\\\\\"*denied*\\\\\")\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"errors in Button.tsx file\" → \n {\n \"query\": \"stack.filename:\\\\\"**/Button.tsx\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"stack.filename\"],\n \"sort\": \"-timestamp\"\n }\n- \"count errors by type in production\" → \n {\n \"query\": \"environment:production\",\n \"fields\": [\"error.type\", \"count()\", \"last_seen()\"],\n \"sort\": \"-count()\"\n }\n- \"most common errors last 24h\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"title\", \"error.type\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"unhandled errors rate by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"count_if(error.handled,equals,false)\", \"epm()\"],\n \"sort\": \"-count()\"\n }\n- \"errors in the last hour\" → \n {\n \"query\": \"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"1h\"}\n }\n- \"database errors between June 19-20\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"start\": \"2025-06-19T00:00:00\", \"end\": \"2025-06-20T23:59:59\"}\n }\n- \"unique users affected by errors\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"error.type\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count_unique(user.id)\"\n }\n- \"what is the most common error\" → \n {\n \"query\": \"\",\n \"fields\": [\"title\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"errors by browser\" → \n {\n \"query\": \"has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"which user agents have the most errors\" → \n {\n \"query\": \"level:error AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count()\"\n }`,\n },\n logs: {\n rules: `- For logs, focus on: message, severity, severity_number\n- Use severity field for log levels (fatal, error, warning, info, debug, trace)\n- severity_number is numeric (21=fatal, 17=error, 13=warning, 9=info, 5=debug, 1=trace)\n- IMPORTANT: For time-based filtering in logs, do NOT use timestamp filters in the query\n- Instead, time filtering for logs is handled by the statsPeriod parameter (not part of the query string)\n- Keep your query focused on message content, severity levels, and other attributes only\n- When user asks for \"error logs\", interpret this as logs with severity:error`,\n examples: `- \"warning logs about memory\" → \n {\n \"query\": \"severity:warning AND message:\\\\\"*memory*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"error logs from database\" → \n {\n \"query\": \"severity:error AND message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me error logs with user context\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\", \"user.id\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"what is the most common log\" → \n {\n \"query\": \"\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common error logs\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"count logs by severity\" → \n {\n \"query\": \"\",\n \"fields\": [\"severity\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"log volume by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"epm()\"],\n \"sort\": \"-count()\"\n }`,\n },\n spans: {\n rules: `- For traces/spans, focus on: span.op, span.description, span.duration, transaction\n- Use is_transaction:true for transaction spans only\n- Use span.duration for performance queries (value is in milliseconds)\n- IMPORTANT: Use has: queries for attribute-based filtering instead of span.op patterns:\n - For HTTP requests: use \"has:request.url\" instead of \"span.op:http*\"\n - For database queries: use \"has:db.statement\" or \"has:db.system\" instead of \"span.op:db*\"\n - For AI/LLM/Agent calls: use \"has:gen_ai.system\" or \"has:gen_ai.request.model\" (OpenTelemetry GenAI semantic conventions)\n - For MCP tool calls: use \"has:mcp.tool.name\" (Model Context Protocol semantic conventions)\n - This approach is more flexible and captures all relevant spans regardless of their operation type\n\nOpenTelemetry Semantic Conventions (2025 Stable):\nCore Namespaces:\n- gen_ai.*: GenAI attributes for AI/LLM/Agent calls (system, request.model, operation.name, usage.*)\n- db.*: Database attributes (system, statement, operation, name) - STABLE\n- http.*: HTTP attributes (method, status_code, url, request.*, response.*) - STABLE\n- rpc.*: RPC attributes (system, service, method, grpc.*)\n- messaging.*: Messaging attributes (system, operation, destination.*)\n- faas.*: Function as a Service attributes (name, version, runtime)\n- cloud.*: Cloud provider attributes (provider, region, zone)\n- k8s.*: Kubernetes attributes (namespace, pod, container, node)\n- host.*: Host attributes (name, type, arch, os.*)\n- service.*: Service attributes (name, version, instance.id)\n- process.*: Process attributes (pid, command, runtime.*)\n\nCustom Namespaces:\n- mcp.*: Model Context Protocol attributes for MCP tool calls (tool.name, session.id, transport)\n\nQuery Patterns:\n- Use has:namespace.* to find spans with any attribute in that namespace\n- Most common: has:gen_ai.system (agent calls), has:mcp.tool.name (MCP tools), has:db.statement (database), has:http.method (HTTP)`,\n examples: `- \"database queries\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"slow API calls over 5 seconds\" → \n {\n \"query\": \"has:request.url AND span.duration:>5000\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\", \"span.status_code\"],\n \"sort\": \"-span.duration\"\n }\n- \"show me database queries with their SQL\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"average response time by endpoint\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"slowest database queries by p95\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"db.statement\", \"count()\", \"p50(span.duration)\", \"p95(span.duration)\", \"max(span.duration)\"],\n \"sort\": \"-p95(span.duration)\"\n }\n- \"API calls in the last 30 minutes\" → \n {\n \"query\": \"has:request.url\",\n \"fields\": [\"id\", \"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"30m\"}\n }\n- \"most common transaction\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 tool call spans by usage\" → \n {\n \"query\": \"has:mcp.tool.name\",\n \"fields\": [\"mcp.tool.name\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 agent call spans by usage\" → \n {\n \"query\": \"has:gen_ai.system\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"slowest AI/LLM calls\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"gen_ai.operation.name\"],\n \"sort\": \"-span.duration\"\n }\n- \"agent calls by model usage\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"average agent call duration by model\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"token usage by AI system\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.system\", \"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"how many tokens used today\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"average response time in milliseconds\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"equation|avg(span.duration) * 1000\"],\n \"sort\": \"-equation|avg(span.duration) * 1000\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"total input tokens by model\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.request.model\", \"sum(gen_ai.usage.input_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"tokens used this week\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"7d\"}\n }\n- \"which user agents have the most tool calls yesterday\" → \n {\n \"query\": \"has:mcp.tool.name AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"top 10 browsers by API calls\" → \n {\n \"query\": \"has:http.method AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common clients making database queries\" → \n {\n \"query\": \"has:db.statement AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"avg(span.duration)\"],\n \"sort\": \"-count()\"\n }`,\n },\n};\n\n// Define recommended fields for each dataset\nexport const RECOMMENDED_FIELDS = {\n errors: {\n basic: [\n \"issue\",\n \"title\",\n \"project\",\n \"timestamp\",\n \"level\",\n \"message\",\n \"error.type\",\n \"culprit\",\n ],\n description:\n \"Basic error information including issue ID, title, timestamp, severity, and location\",\n },\n logs: {\n basic: [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n description: \"Essential log entry information\",\n },\n spans: {\n basic: [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"span.duration\",\n \"transaction\",\n \"timestamp\",\n \"project\",\n \"trace\",\n ],\n description:\n \"Core span/trace information including span ID, operation, duration, and trace context\",\n },\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"config-2JTOC4-d.cjs","names":["NUMERIC_FIELDS: Record<string, Set<string>>"],"sources":["../src/tools/search-events/config.ts"],"sourcesContent":["// Build a dataset-agnostic system prompt\nexport const systemPrompt = `You are a Sentry query translator. You need to:\n1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query\n2. Query the available attributes for that dataset using the datasetAttributes tool\n3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions\n4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)\n5. Decide which fields to return in the results\n\nCRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.\n\nDATASET SELECTION GUIDELINES:\n- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, \"XYZ calls\", ambiguous operations (richest attribute set)\n- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors\n- logs: Log entries, log messages, severity levels, debugging information\n\nFor ambiguous queries like \"calls using XYZ\", prefer spans dataset first as it contains the most comprehensive telemetry data.\n\nCRITICAL - FIELD VERIFICATION REQUIREMENT:\nBefore constructing ANY query, you MUST verify field availability:\n1. You CANNOT assume ANY field exists without checking - not even common ones\n2. This includes ALL fields: custom attributes, database fields, HTTP fields, AI fields, user fields, etc.\n3. Fields vary by project based on what data is being sent to Sentry\n4. Using an unverified field WILL cause your query to fail with \"field not found\" errors\n5. The datasetAttributes tool tells you EXACTLY which fields are available\n\nTOOL USAGE GUIDELINES:\n1. Use datasetAttributes tool to discover available fields for your chosen dataset\n2. Use otelSemantics tool when you need specific OpenTelemetry semantic convention attributes\n3. Use whoami tool when queries contain \"me\" references for user.id or user.email fields\n4. IMPORTANT: For ambiguous terms like \"user agents\", \"browser\", \"client\" - use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nCRITICAL - HANDLING \"DISTINCT\" OR \"UNIQUE VALUES\" QUERIES:\nWhen user asks for \"distinct\", \"unique\", \"all values of\", or \"what are the X\" queries:\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts\n3. Sort by \"-count()\" to show most common values first\n4. Use datasetAttributes tool to verify the field exists before constructing query\n5. Examples:\n - \"distinct categories\" → fields=['category.name', 'count()'], sort='-count()'\n - \"unique types\" → fields=['item.type', 'count()'], sort='-count()'\n\nCRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:\nWhen user asks about \"traffic\", \"volume\", \"how much\", \"how many\" (without specific metrics):\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. For total counts: fields=['count()']\n3. For grouped counts: fields=['grouping_field', 'count()']\n4. Always include timeRange for period-specific queries\n5. Examples:\n - \"how much traffic in last 30 days\" → fields=['count()'], timeRange: {\"statsPeriod\": \"30d\"}\n - \"traffic on mcp-server\" → query: \"project:mcp-server\", fields=['count()']\n\nCRITICAL - HANDLING \"ME\" REFERENCES:\n- If the query contains \"me\", \"my\", \"myself\", or \"affecting me\" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email\n- For assignedTo fields, you can use \"me\" directly without translation (e.g., assignedTo:me works as-is)\n- After calling whoami, replace \"me\" references with the actual user.id or user.email values\n- If whoami fails, return an error explaining the issue\n\nQUERY MODES:\n1. INDIVIDUAL EVENTS (default): Returns raw event data\n - Used when fields contain no function() calls\n - Include recommended fields plus any user-requested fields\n\n2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)\n - Activated when ANY field contains a function() call\n - Fields should ONLY include: aggregate functions + groupBy fields\n - Automatically groups by ALL non-function fields\n - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.\n - You SHOULD sort aggregate results by \"-function_name()\" for descending order (highest values first)\n - For equations in aggregate queries: You SHOULD use \"-equation|...\" prefix unless user wants lowest values\n - When user asks \"how many total\", \"sum of\", or similar: They want the highest/total value, use descending sort\n\nCRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:\n- Queries asking for data \"over time\", \"by hour\", \"by day\", \"time series\", or similar temporal groupings are NOT currently supported\n- If user asks for \"X over time\", return an error explaining: \"Time series aggregations are not currently supported.\"\n\nCRITICAL - DO NOT USE SQL SYNTAX:\n- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL\n- NEVER use SQL date functions - use timeRange parameter instead\n- For \"yesterday\": Use timeRange: {\"statsPeriod\": \"24h\"}, NOT timestamp >= yesterday()\n- For field existence: Use has:field_name, NOT field_name IS NOT NULL\n- For field absence: Use !has:field_name, NOT field_name IS NULL\n\nMATHEMATICAL QUERY PATTERNS:\nWhen user asks mathematical questions like \"how many X\", \"total Y used\", \"sum of Z\":\n- Identify the appropriate dataset based on context\n- Use datasetAttributes tool to find available numeric fields\n- Use sum() function for totals, avg() for averages, count() for counts\n- For time-based queries (\"today\", \"yesterday\", \"this week\"), use timeRange parameter\n- For \"total\" or \"how many\" questions: Users typically want highest values first (descending sort)\n\nDERIVED METRICS AND CALCULATIONS (SPANS ONLY):\nWhen user asks for calculated metrics, ratios, or conversions:\n- Use equation fields with \"equation|\" prefix\n- Examples:\n - \"duration in milliseconds\" → fields: [\"equation|avg(span.duration) * 1000\"], sort: \"-equation|avg(span.duration) * 1000\"\n - \"combined metric total\" → fields: [\"equation|sum(metric.a) + sum(metric.b)\"], sort: \"-equation|sum(metric.a) + sum(metric.b)\"\n - \"error rate percentage\" → fields: [\"equation|failure_rate() * 100\"], sort: \"-equation|failure_rate() * 100\"\n - \"events per second\" → fields: [\"equation|count() / 3600\"], sort: \"-equation|count() / 3600\"\n- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs\n- IMPORTANT: When sorting by equations, use \"-equation|...\" for descending order (highest values first)\n\nSORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"level:error sort:-timestamp\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"level:error\", sort: \"-timestamp\" ← Sort in separate field\n\n2. DEFAULT SORTING:\n - errors dataset: Use \"-timestamp\" (newest first)\n - spans dataset: Use \"-span.duration\" (slowest first) \n - logs dataset: Use \"-timestamp\" (newest first)\n\n3. SORTING SYNTAX:\n - Use \"-\" prefix for descending order (e.g., \"-timestamp\" for newest first)\n - Use field name without prefix for ascending order\n - For aggregate queries: sort by aggregate function results (e.g., \"-count()\" for highest count first)\n - For equation fields: You SHOULD use \"-equation|...\" for descending order (e.g., \"-equation|sum(field1) + sum(field2)\")\n - Only omit the \"-\" prefix if the user clearly wants lowest values first (rare)\n\n4. IMPORTANT SORTING REQUIREMENTS:\n - YOU MUST ALWAYS INCLUDE A SORT PARAMETER\n - CRITICAL: The field you sort by MUST be included in your fields array\n - If sorting by \"-timestamp\", include \"timestamp\" in fields\n - If sorting by \"-count()\", include \"count()\" in fields\n - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with these fields:\n- \"dataset\": Which dataset you determined to use (\"spans\", \"errors\", or \"logs\")\n- \"query\": The Sentry query string for filtering results (use empty string \"\" for no filters)\n- \"fields\": Array of field names to return in results\n - For individual event queries: OPTIONAL (will use recommended fields if not provided)\n - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)\n- \"sort\": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)\n- \"timeRange\": Time range parameters (optional)\n - Relative: {\"statsPeriod\": \"24h\"} for last 24 hours, \"7d\" for last 7 days, etc.\n - Absolute: {\"start\": \"2025-06-19T07:00:00\", \"end\": \"2025-06-20T06:59:59\"} for specific date ranges\n\nCORRECT QUERY PATTERNS (FOLLOW THESE):\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions)\n- Example: \"items processed yesterday\" → query: \"has:item.processed\", timeRange: {\"statsPeriod\": \"24h\"}\n\nPROCESS:\n1. Analyze the user's query\n2. Determine appropriate dataset\n3. Use datasetAttributes tool to discover available fields\n4. Use otelSemantics tool if needed for OpenTelemetry attributes\n5. Construct the final query with proper fields and sort parameters\n\nCOMMON ERRORS TO AVOID:\n- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead\n- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields\n- Using incorrect field names (use the otelSemantics tool to look up correct names)\n- Missing required fields in the fields array for aggregate queries\n- Invalid sort parameter not included in fields array\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;\n\n// Base fields common to all datasets\nexport const BASE_COMMON_FIELDS = {\n project: \"Project slug\",\n timestamp: \"When the event occurred\",\n environment: \"Environment (production, staging, development)\",\n release: \"Release version\",\n platform: \"Platform (javascript, python, etc.)\",\n \"user.id\": \"User ID\",\n \"user.email\": \"User email\",\n \"sdk.name\": \"SDK name\",\n \"sdk.version\": \"SDK version\",\n};\n\n// Known numeric fields for each dataset\nexport const NUMERIC_FIELDS: Record<string, Set<string>> = {\n spans: new Set([\n \"span.duration\",\n \"span.self_time\",\n \"transaction.duration\",\n \"http.status_code\",\n \"gen_ai.usage.input_tokens\",\n \"gen_ai.usage.output_tokens\",\n \"gen_ai.request.max_tokens\",\n ]),\n errors: new Set([\n // Most error fields are strings/categories\n \"stack.lineno\",\n ]),\n logs: new Set([\"severity_number\", \"sentry.observed_timestamp_nanos\"]),\n};\n\n// Dataset-specific field definitions\nexport const DATASET_FIELDS = {\n spans: {\n // Span-specific fields\n \"span.op\": \"Span operation type (e.g., http.client, db.query, cache.get)\",\n \"span.description\": \"Detailed description of the span operation\",\n \"span.duration\": \"Duration of the span in milliseconds\",\n \"span.status\": \"Span status (ok, cancelled, unknown, etc.)\",\n \"span.self_time\": \"Time spent in this span excluding child spans\",\n\n // Transaction fields\n transaction: \"Transaction name/route\",\n \"transaction.duration\": \"Total transaction duration in milliseconds\",\n \"transaction.op\": \"Transaction operation type\",\n \"transaction.status\": \"Transaction status\",\n is_transaction: \"Whether this span is a transaction (true/false)\",\n\n // Trace fields\n trace: \"Trace ID\",\n \"trace.span_id\": \"Span ID within the trace\",\n \"trace.parent_span_id\": \"Parent span ID\",\n\n // HTTP fields\n \"http.method\": \"HTTP method (GET, POST, etc.)\",\n \"http.status_code\": \"HTTP response status code\",\n \"http.url\": \"Full HTTP URL\",\n\n // Database fields\n \"db.system\": \"Database system (postgresql, mysql, etc.)\",\n \"db.operation\": \"Database operation (SELECT, INSERT, etc.)\",\n\n // OpenTelemetry attribute namespaces for semantic queries\n // Use has:namespace.* to find spans with any attribute in that namespace\n // GenAI namespace (gen_ai.*) - for AI/LLM/Agent calls\n \"gen_ai.system\": \"AI system (e.g., anthropic, openai)\",\n \"gen_ai.request.model\": \"Model name (e.g., claude-3-5-sonnet-20241022)\",\n \"gen_ai.operation.name\": \"Operation type (e.g., chat, completion)\",\n \"gen_ai.usage.input_tokens\": \"Number of input tokens (numeric)\",\n \"gen_ai.usage.output_tokens\": \"Number of output tokens (numeric)\",\n\n // MCP namespace (mcp.*) - for Model Context Protocol tool calls\n \"mcp.tool.name\": \"Tool name (e.g., search_issues, search_events)\",\n \"mcp.session.id\": \"MCP session identifier\",\n\n // Aggregate functions (SPANS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of spans\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(span.duration)\",\n \"sum(field)\": \"Sum of numeric field, e.g. sum(span.self_time)\",\n \"min(field)\": \"Minimum of numeric field, e.g. min(span.duration)\",\n \"max(field)\": \"Maximum of numeric field, e.g. max(span.duration)\",\n \"p50(field)\": \"50th percentile (median), e.g. p50(span.duration)\",\n \"p75(field)\": \"75th percentile, e.g. p75(span.duration)\",\n \"p90(field)\": \"90th percentile, e.g. p90(span.duration)\",\n \"p95(field)\": \"95th percentile, e.g. p95(span.duration)\",\n \"p99(field)\": \"99th percentile, e.g. p99(span.duration)\",\n \"p100(field)\": \"100th percentile (max), e.g. p100(span.duration)\",\n \"epm()\": \"Events per minute rate\",\n \"failure_rate()\": \"Percentage of failed spans\",\n },\n errors: {\n // Error-specific fields\n message: \"Error message\",\n level: \"Error level (error, warning, info, debug)\",\n \"error.type\": \"Error type/exception class\",\n \"error.value\": \"Error value/description\",\n \"error.handled\": \"Whether the error was handled (true/false)\",\n culprit: \"Code location that caused the error\",\n title: \"Error title/grouping\",\n\n // Stack trace fields\n \"stack.filename\": \"File where error occurred\",\n \"stack.function\": \"Function where error occurred\",\n \"stack.module\": \"Module where error occurred\",\n \"stack.abs_path\": \"Absolute path to file\",\n\n // Additional context fields\n \"os.name\": \"Operating system name\",\n \"browser.name\": \"Browser name\",\n \"device.family\": \"Device family\",\n\n // Aggregate functions (ERRORS dataset only)\n \"count()\": \"Count of error events\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"count_if(field,equals,value)\":\n \"Conditional count, e.g. count_if(error.handled,equals,false)\",\n \"last_seen()\": \"Most recent timestamp of the group\",\n \"eps()\": \"Events per second rate\",\n \"epm()\": \"Events per minute rate\",\n },\n logs: {\n // Log-specific fields\n message: \"Log message\",\n severity: \"Log severity level\",\n severity_number: \"Numeric severity level\",\n \"sentry.item_id\": \"Sentry item ID\",\n \"sentry.observed_timestamp_nanos\": \"Observed timestamp in nanoseconds\",\n\n // Trace context\n trace: \"Trace ID\",\n\n // Aggregate functions (LOGS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of log entries\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(severity_number)\",\n \"sum(field)\": \"Sum of numeric field\",\n \"min(field)\": \"Minimum of numeric field\",\n \"max(field)\": \"Maximum of numeric field\",\n \"p50(field)\": \"50th percentile (median)\",\n \"p75(field)\": \"75th percentile\",\n \"p90(field)\": \"90th percentile\",\n \"p95(field)\": \"95th percentile\",\n \"p99(field)\": \"99th percentile\",\n \"p100(field)\": \"100th percentile (max)\",\n \"epm()\": \"Events per minute rate\",\n },\n};\n\n// Dataset-specific rules and examples\nexport const DATASET_CONFIGS = {\n errors: {\n rules: `- For errors, focus on: message, level, error.type, error.handled\n- Use level field for severity (error, warning, info, debug)\n- Use error.handled:false for unhandled exceptions/crashes\n- For filename searches: Use stack.filename for suffix-based search (e.g., stack.filename:\"**/index.js\" or stack.filename:\"**/components/Button.tsx\")\n- When searching for errors in specific files, prefer including the parent folder to avoid ambiguity (e.g., stack.filename:\"**/components/index.js\" instead of just stack.filename:\"**/index.js\")`,\n examples: `- \"null pointer exceptions\" → \n {\n \"query\": \"error.type:\\\\\"NullPointerException\\\\\" OR message:\\\\\"*null pointer*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"unhandled errors in production\" → \n {\n \"query\": \"error.handled:false AND environment:production\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"error.handled\", \"environment\"],\n \"sort\": \"-timestamp\"\n }\n- \"database connection errors\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\" AND message:\\\\\"*connection*\\\\\" AND level:error\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me user emails for authentication failures\" → \n {\n \"query\": \"message:\\\\\"*auth*\\\\\" AND (message:\\\\\"*failed*\\\\\" OR message:\\\\\"*denied*\\\\\")\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"errors in Button.tsx file\" → \n {\n \"query\": \"stack.filename:\\\\\"**/Button.tsx\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"stack.filename\"],\n \"sort\": \"-timestamp\"\n }\n- \"count errors by type in production\" → \n {\n \"query\": \"environment:production\",\n \"fields\": [\"error.type\", \"count()\", \"last_seen()\"],\n \"sort\": \"-count()\"\n }\n- \"most common errors last 24h\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"title\", \"error.type\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"unhandled errors rate by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"count_if(error.handled,equals,false)\", \"epm()\"],\n \"sort\": \"-count()\"\n }\n- \"errors in the last hour\" → \n {\n \"query\": \"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"1h\"}\n }\n- \"database errors between June 19-20\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"start\": \"2025-06-19T00:00:00\", \"end\": \"2025-06-20T23:59:59\"}\n }\n- \"unique users affected by errors\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"error.type\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count_unique(user.id)\"\n }\n- \"what is the most common error\" → \n {\n \"query\": \"\",\n \"fields\": [\"title\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"errors by browser\" → \n {\n \"query\": \"has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"which user agents have the most errors\" → \n {\n \"query\": \"level:error AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count()\"\n }`,\n },\n logs: {\n rules: `- For logs, focus on: message, severity, severity_number\n- Use severity field for log levels (fatal, error, warning, info, debug, trace)\n- severity_number is numeric (21=fatal, 17=error, 13=warning, 9=info, 5=debug, 1=trace)\n- IMPORTANT: For time-based filtering in logs, do NOT use timestamp filters in the query\n- Instead, time filtering for logs is handled by the statsPeriod parameter (not part of the query string)\n- Keep your query focused on message content, severity levels, and other attributes only\n- When user asks for \"error logs\", interpret this as logs with severity:error`,\n examples: `- \"warning logs about memory\" → \n {\n \"query\": \"severity:warning AND message:\\\\\"*memory*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"error logs from database\" → \n {\n \"query\": \"severity:error AND message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me error logs with user context\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\", \"user.id\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"what is the most common log\" → \n {\n \"query\": \"\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common error logs\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"count logs by severity\" → \n {\n \"query\": \"\",\n \"fields\": [\"severity\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"log volume by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"epm()\"],\n \"sort\": \"-count()\"\n }`,\n },\n spans: {\n rules: `- For traces/spans, focus on: span.op, span.description, span.duration, transaction\n- Use is_transaction:true for transaction spans only\n- Use span.duration for performance queries (value is in milliseconds)\n- IMPORTANT: Use has: queries for attribute-based filtering instead of span.op patterns:\n - For HTTP requests: use \"has:request.url\" instead of \"span.op:http*\"\n - For database queries: use \"has:db.statement\" or \"has:db.system\" instead of \"span.op:db*\"\n - For AI/LLM/Agent calls: use \"has:gen_ai.system\" or \"has:gen_ai.request.model\" (OpenTelemetry GenAI semantic conventions)\n - For MCP tool calls: use \"has:mcp.tool.name\" (Model Context Protocol semantic conventions)\n - This approach is more flexible and captures all relevant spans regardless of their operation type\n\nOpenTelemetry Semantic Conventions (2025 Stable):\nCore Namespaces:\n- gen_ai.*: GenAI attributes for AI/LLM/Agent calls (system, request.model, operation.name, usage.*)\n- db.*: Database attributes (system, statement, operation, name) - STABLE\n- http.*: HTTP attributes (method, status_code, url, request.*, response.*) - STABLE\n- rpc.*: RPC attributes (system, service, method, grpc.*)\n- messaging.*: Messaging attributes (system, operation, destination.*)\n- faas.*: Function as a Service attributes (name, version, runtime)\n- cloud.*: Cloud provider attributes (provider, region, zone)\n- k8s.*: Kubernetes attributes (namespace, pod, container, node)\n- host.*: Host attributes (name, type, arch, os.*)\n- service.*: Service attributes (name, version, instance.id)\n- process.*: Process attributes (pid, command, runtime.*)\n\nCustom Namespaces:\n- mcp.*: Model Context Protocol attributes for MCP tool calls (tool.name, session.id, transport)\n\nQuery Patterns:\n- Use has:namespace.* to find spans with any attribute in that namespace\n- Most common: has:gen_ai.system (agent calls), has:mcp.tool.name (MCP tools), has:db.statement (database), has:http.method (HTTP)`,\n examples: `- \"database queries\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"slow API calls over 5 seconds\" → \n {\n \"query\": \"has:request.url AND span.duration:>5000\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\", \"span.status_code\"],\n \"sort\": \"-span.duration\"\n }\n- \"show me database queries with their SQL\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"average response time by endpoint\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"slowest database queries by p95\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"db.statement\", \"count()\", \"p50(span.duration)\", \"p95(span.duration)\", \"max(span.duration)\"],\n \"sort\": \"-p95(span.duration)\"\n }\n- \"API calls in the last 30 minutes\" → \n {\n \"query\": \"has:request.url\",\n \"fields\": [\"id\", \"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"30m\"}\n }\n- \"most common transaction\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 tool call spans by usage\" → \n {\n \"query\": \"has:mcp.tool.name\",\n \"fields\": [\"mcp.tool.name\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 agent call spans by usage\" → \n {\n \"query\": \"has:gen_ai.system\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"slowest AI/LLM calls\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"gen_ai.operation.name\"],\n \"sort\": \"-span.duration\"\n }\n- \"agent calls by model usage\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"average agent call duration by model\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"token usage by AI system\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.system\", \"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"how many tokens used today\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"average response time in milliseconds\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"equation|avg(span.duration) * 1000\"],\n \"sort\": \"-equation|avg(span.duration) * 1000\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"total input tokens by model\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.request.model\", \"sum(gen_ai.usage.input_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"tokens used this week\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"7d\"}\n }\n- \"which user agents have the most tool calls yesterday\" → \n {\n \"query\": \"has:mcp.tool.name AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"top 10 browsers by API calls\" → \n {\n \"query\": \"has:http.method AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common clients making database queries\" → \n {\n \"query\": \"has:db.statement AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"avg(span.duration)\"],\n \"sort\": \"-count()\"\n }`,\n },\n};\n\n// Define recommended fields for each dataset\nexport const RECOMMENDED_FIELDS = {\n errors: {\n basic: [\n \"issue\",\n \"title\",\n \"project\",\n \"timestamp\",\n \"level\",\n \"message\",\n \"error.type\",\n \"culprit\",\n ],\n description:\n \"Basic error information including issue ID, title, timestamp, severity, and location\",\n },\n logs: {\n basic: [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n description: \"Essential log entry information\",\n },\n spans: {\n basic: [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"span.duration\",\n \"transaction\",\n \"timestamp\",\n \"project\",\n \"trace\",\n ],\n description:\n \"Core span/trace information including span ID, operation, duration, and trace context\",\n },\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-BFaJp4hW.js","names":[],"sources":["../src/tools/search-issues/config.ts"],"sourcesContent":["/**\n * Configuration for the search-issues agent\n */\n\nexport const systemPrompt = `You are a Sentry issue search query translator. Convert natural language queries to Sentry issue search syntax.\n\nIMPORTANT RULES:\n1. Use Sentry issue search syntax, NOT SQL\n2. Time ranges use relative notation: -24h, -7d, -30d\n3. Comparisons: >, <, >=, <=\n4. Boolean operators: AND, OR, NOT (or !)\n5. Field values with spaces need quotes: environment:\"dev server\"\n\nBUILT-IN FIELDS:\n- is: Issue status (unresolved, resolved, ignored, archived)\n- level: Severity level (error, warning, info, debug, fatal)\n IMPORTANT: Almost NEVER use this field. Terms like \"critical\", \"important\", \"severe\" refer to IMPACT not level.\n Only use if user explicitly says \"error level\", \"warning level\", etc.\n- environment: Deployment environment (production, staging, development)\n- release: Version/release identifier\n- firstSeen: When the issue was FIRST encountered (use for \"new issues\", \"started\", \"began\")\n WARNING: Excludes ongoing issues that started before the time window\n- lastSeen: When the issue was LAST encountered (use for \"from the last\", \"recent\", \"active\")\n This includes ALL issues seen during the time window, regardless of when they started\n- assigned: Issues explicitly assigned to a user (email or \"me\") \n- assignedOrSuggested: Issues assigned to OR suggested for a user (broader match)\n- userCount: Number of unique users affected\n- eventCount: Total number of events\n\nCOMMON QUERY PATTERNS:\n- Unresolved issues: is:unresolved (NO level filter unless explicitly requested)\n- Critical/important issues: is:unresolved with sort:freq or sort:user (NOT level:error)\n- Recent activity: lastSeen:-24h\n- New issues: firstSeen:-7d\n- High impact: userCount:>100\n- My work: assignedOrSuggested:me\n\nSORTING RULES:\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"is:unresolved sort:user\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"is:unresolved\", sort: \"user\" ← Sort in separate field\n\n2. AVAILABLE SORT OPTIONS:\n - date: Last seen (default)\n - freq: Event frequency \n - new: First seen\n - user: User count\n\n3. IMPORTANT: Query field is for filtering only (is:, level:, environment:, etc.)\n\n'ME' REFERENCES:\n- When the user says \"assigned to me\" or similar, you MUST use the whoami tool to get the current user's email\n- Replace \"me\" with the actual email address in the query\n- Example: \"assigned to me\" → use whoami tool → assignedOrSuggested:user@example.com\n\nEXAMPLES:\n\"critical bugs\" → query: \"level:error is:unresolved\", sort: \"date\"\n\"worst issues affecting the most users\" → query: \"is:unresolved\", sort: \"user\"\n\"assigned to john@example.com\" → query: \"assignedOrSuggested:john@example.com\", sort: \"date\"\n\nNEVER: query: \"is:unresolved sort:user\" ← Sort goes in separate field!\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nAlways use the issueFields tool to discover available fields when needed.\nUse the whoami tool when you need to resolve 'me' references.`;\n"],"mappings":";;;;AAIA,MAAa,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-BMLvvgGQ.cjs","names":[],"sources":["../src/tools/use-sentry/config.ts"],"sourcesContent":["/**\n * Configuration for the use_sentry embedded agent.\n *\n * This agent translates natural language requests into Sentry operations\n * by intelligently calling available Sentry MCP tools.\n */\n\n/**\n * System prompt for the embedded agent.\n */\nexport const systemPrompt = `You are an agent responsible for assisting users on accessing information from Sentry (sentry.io) via MCP tools.\n\nALWAYS evaluate which tools are the most appropriate to use based on the user's prompt. You ALWAYS use tools to answer questions. Evaluating the tool descriptions and parameters thoroughly to answer the user's prompt.\n\nThe user may include various parameters to pass to those tools in their prompt. You MUST treat URLs as parameters for tool calls, as well as recognizing <organizationSlug>/<projectSlug> notation.\n\nYou MUST return tool results directly without interpreting them.`;\n\n/**\n * Additional configuration for the agent.\n */\nexport const agentConfig = {\n maxSteps: 10, // Allow more steps for complex multi-tool operations\n};\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,gBAAgB;;;;;;;;;;AAW7B,MAAa,cAAc,EACzB,UAAU,GACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-BacDkkdz.cjs","names":[],"sources":["../src/tools/search-issues/config.ts"],"sourcesContent":["/**\n * Configuration for the search-issues agent\n */\n\nexport const systemPrompt = `You are a Sentry issue search query translator. Convert natural language queries to Sentry issue search syntax.\n\nIMPORTANT RULES:\n1. Use Sentry issue search syntax, NOT SQL\n2. Time ranges use relative notation: -24h, -7d, -30d\n3. Comparisons: >, <, >=, <=\n4. Boolean operators: AND, OR, NOT (or !)\n5. Field values with spaces need quotes: environment:\"dev server\"\n\nBUILT-IN FIELDS:\n- is: Issue status (unresolved, resolved, ignored, archived)\n- level: Severity level (error, warning, info, debug, fatal)\n IMPORTANT: Almost NEVER use this field. Terms like \"critical\", \"important\", \"severe\" refer to IMPACT not level.\n Only use if user explicitly says \"error level\", \"warning level\", etc.\n- environment: Deployment environment (production, staging, development)\n- release: Version/release identifier\n- firstSeen: When the issue was FIRST encountered (use for \"new issues\", \"started\", \"began\")\n WARNING: Excludes ongoing issues that started before the time window\n- lastSeen: When the issue was LAST encountered (use for \"from the last\", \"recent\", \"active\")\n This includes ALL issues seen during the time window, regardless of when they started\n- assigned: Issues explicitly assigned to a user (email or \"me\") \n- assignedOrSuggested: Issues assigned to OR suggested for a user (broader match)\n- userCount: Number of unique users affected\n- eventCount: Total number of events\n\nCOMMON QUERY PATTERNS:\n- Unresolved issues: is:unresolved (NO level filter unless explicitly requested)\n- Critical/important issues: is:unresolved with sort:freq or sort:user (NOT level:error)\n- Recent activity: lastSeen:-24h\n- New issues: firstSeen:-7d\n- High impact: userCount:>100\n- My work: assignedOrSuggested:me\n\nSORTING RULES:\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"is:unresolved sort:user\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"is:unresolved\", sort: \"user\" ← Sort in separate field\n\n2. AVAILABLE SORT OPTIONS:\n - date: Last seen (default)\n - freq: Event frequency \n - new: First seen\n - user: User count\n\n3. IMPORTANT: Query field is for filtering only (is:, level:, environment:, etc.)\n\n'ME' REFERENCES:\n- When the user says \"assigned to me\" or similar, you MUST use the whoami tool to get the current user's email\n- Replace \"me\" with the actual email address in the query\n- Example: \"assigned to me\" → use whoami tool → assignedOrSuggested:user@example.com\n\nEXAMPLES:\n\"critical bugs\" → query: \"level:error is:unresolved\", sort: \"date\"\n\"worst issues affecting the most users\" → query: \"is:unresolved\", sort: \"user\"\n\"assigned to john@example.com\" → query: \"assignedOrSuggested:john@example.com\", sort: \"date\"\n\nNEVER: query: \"is:unresolved sort:user\" ← Sort goes in separate field!\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nAlways use the issueFields tool to discover available fields when needed.\nUse the whoami tool when you need to resolve 'me' references.`;\n"],"mappings":";;;;;AAIA,MAAa,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-Dh25cVhL.js","names":[],"sources":["../src/tools/use-sentry/config.ts"],"sourcesContent":["/**\n * Configuration for the use_sentry embedded agent.\n *\n * This agent translates natural language requests into Sentry operations\n * by intelligently calling available Sentry MCP tools.\n */\n\n/**\n * System prompt for the embedded agent.\n */\nexport const systemPrompt = `You are an agent responsible for assisting users on accessing information from Sentry (sentry.io) via MCP tools.\n\nALWAYS evaluate which tools are the most appropriate to use based on the user's prompt. You ALWAYS use tools to answer questions. Evaluating the tool descriptions and parameters thoroughly to answer the user's prompt.\n\nThe user may include various parameters to pass to those tools in their prompt. You MUST treat URLs as parameters for tool calls, as well as recognizing <organizationSlug>/<projectSlug> notation.\n\nYou MUST return tool results directly without interpreting them.`;\n\n/**\n * Additional configuration for the agent.\n */\nexport const agentConfig = {\n maxSteps: 10, // Allow more steps for complex multi-tool operations\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAa,gBAAgB;;;;;;;;;;AAW7B,MAAa,cAAc,EACzB,UAAU,GACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-DlhHLHjD.js","names":["NUMERIC_FIELDS: Record<string, Set<string>>"],"sources":["../src/tools/search-events/config.ts"],"sourcesContent":["// Build a dataset-agnostic system prompt\nexport const systemPrompt = `You are a Sentry query translator. You need to:\n1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query\n2. Query the available attributes for that dataset using the datasetAttributes tool\n3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions\n4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)\n5. Decide which fields to return in the results\n\nCRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.\n\nDATASET SELECTION GUIDELINES:\n- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, \"XYZ calls\", ambiguous operations (richest attribute set)\n- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors\n- logs: Log entries, log messages, severity levels, debugging information\n\nFor ambiguous queries like \"calls using XYZ\", prefer spans dataset first as it contains the most comprehensive telemetry data.\n\nCRITICAL - FIELD VERIFICATION REQUIREMENT:\nBefore constructing ANY query, you MUST verify field availability:\n1. You CANNOT assume ANY field exists without checking - not even common ones\n2. This includes ALL fields: custom attributes, database fields, HTTP fields, AI fields, user fields, etc.\n3. Fields vary by project based on what data is being sent to Sentry\n4. Using an unverified field WILL cause your query to fail with \"field not found\" errors\n5. The datasetAttributes tool tells you EXACTLY which fields are available\n\nTOOL USAGE GUIDELINES:\n1. Use datasetAttributes tool to discover available fields for your chosen dataset\n2. Use otelSemantics tool when you need specific OpenTelemetry semantic convention attributes\n3. Use whoami tool when queries contain \"me\" references for user.id or user.email fields\n4. IMPORTANT: For ambiguous terms like \"user agents\", \"browser\", \"client\" - use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nCRITICAL - HANDLING \"DISTINCT\" OR \"UNIQUE VALUES\" QUERIES:\nWhen user asks for \"distinct\", \"unique\", \"all values of\", or \"what are the X\" queries:\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts\n3. Sort by \"-count()\" to show most common values first\n4. Use datasetAttributes tool to verify the field exists before constructing query\n5. Examples:\n - \"distinct categories\" → fields=['category.name', 'count()'], sort='-count()'\n - \"unique types\" → fields=['item.type', 'count()'], sort='-count()'\n\nCRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:\nWhen user asks about \"traffic\", \"volume\", \"how much\", \"how many\" (without specific metrics):\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. For total counts: fields=['count()']\n3. For grouped counts: fields=['grouping_field', 'count()']\n4. Always include timeRange for period-specific queries\n5. Examples:\n - \"how much traffic in last 30 days\" → fields=['count()'], timeRange: {\"statsPeriod\": \"30d\"}\n - \"traffic on mcp-server\" → query: \"project:mcp-server\", fields=['count()']\n\nCRITICAL - HANDLING \"ME\" REFERENCES:\n- If the query contains \"me\", \"my\", \"myself\", or \"affecting me\" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email\n- For assignedTo fields, you can use \"me\" directly without translation (e.g., assignedTo:me works as-is)\n- After calling whoami, replace \"me\" references with the actual user.id or user.email values\n- If whoami fails, return an error explaining the issue\n\nQUERY MODES:\n1. INDIVIDUAL EVENTS (default): Returns raw event data\n - Used when fields contain no function() calls\n - Include recommended fields plus any user-requested fields\n\n2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)\n - Activated when ANY field contains a function() call\n - Fields should ONLY include: aggregate functions + groupBy fields\n - Automatically groups by ALL non-function fields\n - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.\n - You SHOULD sort aggregate results by \"-function_name()\" for descending order (highest values first)\n - For equations in aggregate queries: You SHOULD use \"-equation|...\" prefix unless user wants lowest values\n - When user asks \"how many total\", \"sum of\", or similar: They want the highest/total value, use descending sort\n\nCRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:\n- Queries asking for data \"over time\", \"by hour\", \"by day\", \"time series\", or similar temporal groupings are NOT currently supported\n- If user asks for \"X over time\", return an error explaining: \"Time series aggregations are not currently supported.\"\n\nCRITICAL - DO NOT USE SQL SYNTAX:\n- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL\n- NEVER use SQL date functions - use timeRange parameter instead\n- For \"yesterday\": Use timeRange: {\"statsPeriod\": \"24h\"}, NOT timestamp >= yesterday()\n- For field existence: Use has:field_name, NOT field_name IS NOT NULL\n- For field absence: Use !has:field_name, NOT field_name IS NULL\n\nMATHEMATICAL QUERY PATTERNS:\nWhen user asks mathematical questions like \"how many X\", \"total Y used\", \"sum of Z\":\n- Identify the appropriate dataset based on context\n- Use datasetAttributes tool to find available numeric fields\n- Use sum() function for totals, avg() for averages, count() for counts\n- For time-based queries (\"today\", \"yesterday\", \"this week\"), use timeRange parameter\n- For \"total\" or \"how many\" questions: Users typically want highest values first (descending sort)\n\nDERIVED METRICS AND CALCULATIONS (SPANS ONLY):\nWhen user asks for calculated metrics, ratios, or conversions:\n- Use equation fields with \"equation|\" prefix\n- Examples:\n - \"duration in milliseconds\" → fields: [\"equation|avg(span.duration) * 1000\"], sort: \"-equation|avg(span.duration) * 1000\"\n - \"combined metric total\" → fields: [\"equation|sum(metric.a) + sum(metric.b)\"], sort: \"-equation|sum(metric.a) + sum(metric.b)\"\n - \"error rate percentage\" → fields: [\"equation|failure_rate() * 100\"], sort: \"-equation|failure_rate() * 100\"\n - \"events per second\" → fields: [\"equation|count() / 3600\"], sort: \"-equation|count() / 3600\"\n- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs\n- IMPORTANT: When sorting by equations, use \"-equation|...\" for descending order (highest values first)\n\nSORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"level:error sort:-timestamp\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"level:error\", sort: \"-timestamp\" ← Sort in separate field\n\n2. DEFAULT SORTING:\n - errors dataset: Use \"-timestamp\" (newest first)\n - spans dataset: Use \"-span.duration\" (slowest first) \n - logs dataset: Use \"-timestamp\" (newest first)\n\n3. SORTING SYNTAX:\n - Use \"-\" prefix for descending order (e.g., \"-timestamp\" for newest first)\n - Use field name without prefix for ascending order\n - For aggregate queries: sort by aggregate function results (e.g., \"-count()\" for highest count first)\n - For equation fields: You SHOULD use \"-equation|...\" for descending order (e.g., \"-equation|sum(field1) + sum(field2)\")\n - Only omit the \"-\" prefix if the user clearly wants lowest values first (rare)\n\n4. IMPORTANT SORTING REQUIREMENTS:\n - YOU MUST ALWAYS INCLUDE A SORT PARAMETER\n - CRITICAL: The field you sort by MUST be included in your fields array\n - If sorting by \"-timestamp\", include \"timestamp\" in fields\n - If sorting by \"-count()\", include \"count()\" in fields\n - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with these fields:\n- \"dataset\": Which dataset you determined to use (\"spans\", \"errors\", or \"logs\")\n- \"query\": The Sentry query string for filtering results (use empty string \"\" for no filters)\n- \"fields\": Array of field names to return in results\n - For individual event queries: OPTIONAL (will use recommended fields if not provided)\n - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)\n- \"sort\": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)\n- \"timeRange\": Time range parameters (optional)\n - Relative: {\"statsPeriod\": \"24h\"} for last 24 hours, \"7d\" for last 7 days, etc.\n - Absolute: {\"start\": \"2025-06-19T07:00:00\", \"end\": \"2025-06-20T06:59:59\"} for specific date ranges\n\nCORRECT QUERY PATTERNS (FOLLOW THESE):\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions)\n- Example: \"items processed yesterday\" → query: \"has:item.processed\", timeRange: {\"statsPeriod\": \"24h\"}\n\nPROCESS:\n1. Analyze the user's query\n2. Determine appropriate dataset\n3. Use datasetAttributes tool to discover available fields\n4. Use otelSemantics tool if needed for OpenTelemetry attributes\n5. Construct the final query with proper fields and sort parameters\n\nCOMMON ERRORS TO AVOID:\n- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead\n- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields\n- Using incorrect field names (use the otelSemantics tool to look up correct names)\n- Missing required fields in the fields array for aggregate queries\n- Invalid sort parameter not included in fields array\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;\n\n// Base fields common to all datasets\nexport const BASE_COMMON_FIELDS = {\n project: \"Project slug\",\n timestamp: \"When the event occurred\",\n environment: \"Environment (production, staging, development)\",\n release: \"Release version\",\n platform: \"Platform (javascript, python, etc.)\",\n \"user.id\": \"User ID\",\n \"user.email\": \"User email\",\n \"sdk.name\": \"SDK name\",\n \"sdk.version\": \"SDK version\",\n};\n\n// Known numeric fields for each dataset\nexport const NUMERIC_FIELDS: Record<string, Set<string>> = {\n spans: new Set([\n \"span.duration\",\n \"span.self_time\",\n \"transaction.duration\",\n \"http.status_code\",\n \"gen_ai.usage.input_tokens\",\n \"gen_ai.usage.output_tokens\",\n \"gen_ai.request.max_tokens\",\n ]),\n errors: new Set([\n // Most error fields are strings/categories\n \"stack.lineno\",\n ]),\n logs: new Set([\"severity_number\", \"sentry.observed_timestamp_nanos\"]),\n};\n\n// Dataset-specific field definitions\nexport const DATASET_FIELDS = {\n spans: {\n // Span-specific fields\n \"span.op\": \"Span operation type (e.g., http.client, db.query, cache.get)\",\n \"span.description\": \"Detailed description of the span operation\",\n \"span.duration\": \"Duration of the span in milliseconds\",\n \"span.status\": \"Span status (ok, cancelled, unknown, etc.)\",\n \"span.self_time\": \"Time spent in this span excluding child spans\",\n\n // Transaction fields\n transaction: \"Transaction name/route\",\n \"transaction.duration\": \"Total transaction duration in milliseconds\",\n \"transaction.op\": \"Transaction operation type\",\n \"transaction.status\": \"Transaction status\",\n is_transaction: \"Whether this span is a transaction (true/false)\",\n\n // Trace fields\n trace: \"Trace ID\",\n \"trace.span_id\": \"Span ID within the trace\",\n \"trace.parent_span_id\": \"Parent span ID\",\n\n // HTTP fields\n \"http.method\": \"HTTP method (GET, POST, etc.)\",\n \"http.status_code\": \"HTTP response status code\",\n \"http.url\": \"Full HTTP URL\",\n\n // Database fields\n \"db.system\": \"Database system (postgresql, mysql, etc.)\",\n \"db.operation\": \"Database operation (SELECT, INSERT, etc.)\",\n\n // OpenTelemetry attribute namespaces for semantic queries\n // Use has:namespace.* to find spans with any attribute in that namespace\n // GenAI namespace (gen_ai.*) - for AI/LLM/Agent calls\n \"gen_ai.system\": \"AI system (e.g., anthropic, openai)\",\n \"gen_ai.request.model\": \"Model name (e.g., claude-3-5-sonnet-20241022)\",\n \"gen_ai.operation.name\": \"Operation type (e.g., chat, completion)\",\n \"gen_ai.usage.input_tokens\": \"Number of input tokens (numeric)\",\n \"gen_ai.usage.output_tokens\": \"Number of output tokens (numeric)\",\n\n // MCP namespace (mcp.*) - for Model Context Protocol tool calls\n \"mcp.tool.name\": \"Tool name (e.g., search_issues, search_events)\",\n \"mcp.session.id\": \"MCP session identifier\",\n\n // Aggregate functions (SPANS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of spans\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(span.duration)\",\n \"sum(field)\": \"Sum of numeric field, e.g. sum(span.self_time)\",\n \"min(field)\": \"Minimum of numeric field, e.g. min(span.duration)\",\n \"max(field)\": \"Maximum of numeric field, e.g. max(span.duration)\",\n \"p50(field)\": \"50th percentile (median), e.g. p50(span.duration)\",\n \"p75(field)\": \"75th percentile, e.g. p75(span.duration)\",\n \"p90(field)\": \"90th percentile, e.g. p90(span.duration)\",\n \"p95(field)\": \"95th percentile, e.g. p95(span.duration)\",\n \"p99(field)\": \"99th percentile, e.g. p99(span.duration)\",\n \"p100(field)\": \"100th percentile (max), e.g. p100(span.duration)\",\n \"epm()\": \"Events per minute rate\",\n \"failure_rate()\": \"Percentage of failed spans\",\n },\n errors: {\n // Error-specific fields\n message: \"Error message\",\n level: \"Error level (error, warning, info, debug)\",\n \"error.type\": \"Error type/exception class\",\n \"error.value\": \"Error value/description\",\n \"error.handled\": \"Whether the error was handled (true/false)\",\n culprit: \"Code location that caused the error\",\n title: \"Error title/grouping\",\n\n // Stack trace fields\n \"stack.filename\": \"File where error occurred\",\n \"stack.function\": \"Function where error occurred\",\n \"stack.module\": \"Module where error occurred\",\n \"stack.abs_path\": \"Absolute path to file\",\n\n // Additional context fields\n \"os.name\": \"Operating system name\",\n \"browser.name\": \"Browser name\",\n \"device.family\": \"Device family\",\n\n // Aggregate functions (ERRORS dataset only)\n \"count()\": \"Count of error events\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"count_if(field,equals,value)\":\n \"Conditional count, e.g. count_if(error.handled,equals,false)\",\n \"last_seen()\": \"Most recent timestamp of the group\",\n \"eps()\": \"Events per second rate\",\n \"epm()\": \"Events per minute rate\",\n },\n logs: {\n // Log-specific fields\n message: \"Log message\",\n severity: \"Log severity level\",\n severity_number: \"Numeric severity level\",\n \"sentry.item_id\": \"Sentry item ID\",\n \"sentry.observed_timestamp_nanos\": \"Observed timestamp in nanoseconds\",\n\n // Trace context\n trace: \"Trace ID\",\n\n // Aggregate functions (LOGS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of log entries\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(severity_number)\",\n \"sum(field)\": \"Sum of numeric field\",\n \"min(field)\": \"Minimum of numeric field\",\n \"max(field)\": \"Maximum of numeric field\",\n \"p50(field)\": \"50th percentile (median)\",\n \"p75(field)\": \"75th percentile\",\n \"p90(field)\": \"90th percentile\",\n \"p95(field)\": \"95th percentile\",\n \"p99(field)\": \"99th percentile\",\n \"p100(field)\": \"100th percentile (max)\",\n \"epm()\": \"Events per minute rate\",\n },\n};\n\n// Dataset-specific rules and examples\nexport const DATASET_CONFIGS = {\n errors: {\n rules: `- For errors, focus on: message, level, error.type, error.handled\n- Use level field for severity (error, warning, info, debug)\n- Use error.handled:false for unhandled exceptions/crashes\n- For filename searches: Use stack.filename for suffix-based search (e.g., stack.filename:\"**/index.js\" or stack.filename:\"**/components/Button.tsx\")\n- When searching for errors in specific files, prefer including the parent folder to avoid ambiguity (e.g., stack.filename:\"**/components/index.js\" instead of just stack.filename:\"**/index.js\")`,\n examples: `- \"null pointer exceptions\" → \n {\n \"query\": \"error.type:\\\\\"NullPointerException\\\\\" OR message:\\\\\"*null pointer*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"unhandled errors in production\" → \n {\n \"query\": \"error.handled:false AND environment:production\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"error.handled\", \"environment\"],\n \"sort\": \"-timestamp\"\n }\n- \"database connection errors\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\" AND message:\\\\\"*connection*\\\\\" AND level:error\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me user emails for authentication failures\" → \n {\n \"query\": \"message:\\\\\"*auth*\\\\\" AND (message:\\\\\"*failed*\\\\\" OR message:\\\\\"*denied*\\\\\")\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"errors in Button.tsx file\" → \n {\n \"query\": \"stack.filename:\\\\\"**/Button.tsx\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"stack.filename\"],\n \"sort\": \"-timestamp\"\n }\n- \"count errors by type in production\" → \n {\n \"query\": \"environment:production\",\n \"fields\": [\"error.type\", \"count()\", \"last_seen()\"],\n \"sort\": \"-count()\"\n }\n- \"most common errors last 24h\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"title\", \"error.type\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"unhandled errors rate by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"count_if(error.handled,equals,false)\", \"epm()\"],\n \"sort\": \"-count()\"\n }\n- \"errors in the last hour\" → \n {\n \"query\": \"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"1h\"}\n }\n- \"database errors between June 19-20\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"start\": \"2025-06-19T00:00:00\", \"end\": \"2025-06-20T23:59:59\"}\n }\n- \"unique users affected by errors\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"error.type\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count_unique(user.id)\"\n }\n- \"what is the most common error\" → \n {\n \"query\": \"\",\n \"fields\": [\"title\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"errors by browser\" → \n {\n \"query\": \"has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"which user agents have the most errors\" → \n {\n \"query\": \"level:error AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count()\"\n }`,\n },\n logs: {\n rules: `- For logs, focus on: message, severity, severity_number\n- Use severity field for log levels (fatal, error, warning, info, debug, trace)\n- severity_number is numeric (21=fatal, 17=error, 13=warning, 9=info, 5=debug, 1=trace)\n- IMPORTANT: For time-based filtering in logs, do NOT use timestamp filters in the query\n- Instead, time filtering for logs is handled by the statsPeriod parameter (not part of the query string)\n- Keep your query focused on message content, severity levels, and other attributes only\n- When user asks for \"error logs\", interpret this as logs with severity:error`,\n examples: `- \"warning logs about memory\" → \n {\n \"query\": \"severity:warning AND message:\\\\\"*memory*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"error logs from database\" → \n {\n \"query\": \"severity:error AND message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me error logs with user context\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\", \"user.id\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"what is the most common log\" → \n {\n \"query\": \"\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common error logs\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"count logs by severity\" → \n {\n \"query\": \"\",\n \"fields\": [\"severity\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"log volume by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"epm()\"],\n \"sort\": \"-count()\"\n }`,\n },\n spans: {\n rules: `- For traces/spans, focus on: span.op, span.description, span.duration, transaction\n- Use is_transaction:true for transaction spans only\n- Use span.duration for performance queries (value is in milliseconds)\n- IMPORTANT: Use has: queries for attribute-based filtering instead of span.op patterns:\n - For HTTP requests: use \"has:request.url\" instead of \"span.op:http*\"\n - For database queries: use \"has:db.statement\" or \"has:db.system\" instead of \"span.op:db*\"\n - For AI/LLM/Agent calls: use \"has:gen_ai.system\" or \"has:gen_ai.request.model\" (OpenTelemetry GenAI semantic conventions)\n - For MCP tool calls: use \"has:mcp.tool.name\" (Model Context Protocol semantic conventions)\n - This approach is more flexible and captures all relevant spans regardless of their operation type\n\nOpenTelemetry Semantic Conventions (2025 Stable):\nCore Namespaces:\n- gen_ai.*: GenAI attributes for AI/LLM/Agent calls (system, request.model, operation.name, usage.*)\n- db.*: Database attributes (system, statement, operation, name) - STABLE\n- http.*: HTTP attributes (method, status_code, url, request.*, response.*) - STABLE\n- rpc.*: RPC attributes (system, service, method, grpc.*)\n- messaging.*: Messaging attributes (system, operation, destination.*)\n- faas.*: Function as a Service attributes (name, version, runtime)\n- cloud.*: Cloud provider attributes (provider, region, zone)\n- k8s.*: Kubernetes attributes (namespace, pod, container, node)\n- host.*: Host attributes (name, type, arch, os.*)\n- service.*: Service attributes (name, version, instance.id)\n- process.*: Process attributes (pid, command, runtime.*)\n\nCustom Namespaces:\n- mcp.*: Model Context Protocol attributes for MCP tool calls (tool.name, session.id, transport)\n\nQuery Patterns:\n- Use has:namespace.* to find spans with any attribute in that namespace\n- Most common: has:gen_ai.system (agent calls), has:mcp.tool.name (MCP tools), has:db.statement (database), has:http.method (HTTP)`,\n examples: `- \"database queries\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"slow API calls over 5 seconds\" → \n {\n \"query\": \"has:request.url AND span.duration:>5000\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\", \"span.status_code\"],\n \"sort\": \"-span.duration\"\n }\n- \"show me database queries with their SQL\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"average response time by endpoint\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"slowest database queries by p95\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"db.statement\", \"count()\", \"p50(span.duration)\", \"p95(span.duration)\", \"max(span.duration)\"],\n \"sort\": \"-p95(span.duration)\"\n }\n- \"API calls in the last 30 minutes\" → \n {\n \"query\": \"has:request.url\",\n \"fields\": [\"id\", \"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"30m\"}\n }\n- \"most common transaction\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 tool call spans by usage\" → \n {\n \"query\": \"has:mcp.tool.name\",\n \"fields\": [\"mcp.tool.name\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 agent call spans by usage\" → \n {\n \"query\": \"has:gen_ai.system\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"slowest AI/LLM calls\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"gen_ai.operation.name\"],\n \"sort\": \"-span.duration\"\n }\n- \"agent calls by model usage\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"average agent call duration by model\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"token usage by AI system\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.system\", \"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"how many tokens used today\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"average response time in milliseconds\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"equation|avg(span.duration) * 1000\"],\n \"sort\": \"-equation|avg(span.duration) * 1000\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"total input tokens by model\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.request.model\", \"sum(gen_ai.usage.input_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"tokens used this week\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"7d\"}\n }\n- \"which user agents have the most tool calls yesterday\" → \n {\n \"query\": \"has:mcp.tool.name AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"top 10 browsers by API calls\" → \n {\n \"query\": \"has:http.method AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common clients making database queries\" → \n {\n \"query\": \"has:db.statement AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"avg(span.duration)\"],\n \"sort\": \"-count()\"\n }`,\n },\n};\n\n// Define recommended fields for each dataset\nexport const RECOMMENDED_FIELDS = {\n errors: {\n basic: [\n \"issue\",\n \"title\",\n \"project\",\n \"timestamp\",\n \"level\",\n \"message\",\n \"error.type\",\n \"culprit\",\n ],\n description:\n \"Basic error information including issue ID, title, timestamp, severity, and location\",\n },\n logs: {\n basic: [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n description: \"Essential log entry information\",\n },\n spans: {\n basic: [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"span.duration\",\n \"transaction\",\n \"timestamp\",\n \"project\",\n \"trace\",\n ],\n description:\n \"Core span/trace information including span ID, operation, duration, and trace context\",\n },\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"config-jAHLRqMZ.js","names":["NUMERIC_FIELDS: Record<string, Set<string>>"],"sources":["../src/tools/search-events/config.ts"],"sourcesContent":["// Build a dataset-agnostic system prompt\nexport const systemPrompt = `You are a Sentry query translator. You need to:\n1. FIRST determine which dataset (spans, errors, or logs) is most appropriate for the query\n2. Query the available attributes for that dataset using the datasetAttributes tool\n3. Use the otelSemantics tool if you need OpenTelemetry semantic conventions\n4. Convert the natural language query to Sentry's search syntax (NOT SQL syntax)\n5. Decide which fields to return in the results\n\nCRITICAL: Sentry does NOT use SQL syntax. Do NOT generate SQL-like queries.\n\nDATASET SELECTION GUIDELINES:\n- spans: Performance data, traces, AI/LLM calls, database queries, HTTP requests, token usage, costs, duration metrics, user agent data, \"XYZ calls\", ambiguous operations (richest attribute set)\n- errors: Exceptions, crashes, error messages, stack traces, unhandled errors, browser/client errors\n- logs: Log entries, log messages, severity levels, debugging information\n\nFor ambiguous queries like \"calls using XYZ\", prefer spans dataset first as it contains the most comprehensive telemetry data.\n\nCRITICAL - FIELD VERIFICATION REQUIREMENT:\nBefore constructing ANY query, you MUST verify field availability:\n1. You CANNOT assume ANY field exists without checking - not even common ones\n2. This includes ALL fields: custom attributes, database fields, HTTP fields, AI fields, user fields, etc.\n3. Fields vary by project based on what data is being sent to Sentry\n4. Using an unverified field WILL cause your query to fail with \"field not found\" errors\n5. The datasetAttributes tool tells you EXACTLY which fields are available\n\nTOOL USAGE GUIDELINES:\n1. Use datasetAttributes tool to discover available fields for your chosen dataset\n2. Use otelSemantics tool when you need specific OpenTelemetry semantic convention attributes\n3. Use whoami tool when queries contain \"me\" references for user.id or user.email fields\n4. IMPORTANT: For ambiguous terms like \"user agents\", \"browser\", \"client\" - use the datasetAttributes tool to find the correct field name (typically user_agent.original) instead of assuming it's related to user.id\n\nCRITICAL - TOOL RESPONSE HANDLING:\nAll tools return responses in this format: {error?: string, result?: data}\n- If 'error' is present: The tool failed - analyze the error message and potentially retry with corrections\n- If 'result' is present: The tool succeeded - use the result data for your query construction\n- Always check for errors before using results\n\nCRITICAL - HANDLING \"DISTINCT\" OR \"UNIQUE VALUES\" QUERIES:\nWhen user asks for \"distinct\", \"unique\", \"all values of\", or \"what are the X\" queries:\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. Pattern: fields=['field_name', 'count()'] to show distinct values with counts\n3. Sort by \"-count()\" to show most common values first\n4. Use datasetAttributes tool to verify the field exists before constructing query\n5. Examples:\n - \"distinct categories\" → fields=['category.name', 'count()'], sort='-count()'\n - \"unique types\" → fields=['item.type', 'count()'], sort='-count()'\n\nCRITICAL - TRAFFIC/VOLUME/COUNT QUERIES:\nWhen user asks about \"traffic\", \"volume\", \"how much\", \"how many\" (without specific metrics):\n1. This ALWAYS requires an AGGREGATE query with count() function\n2. For total counts: fields=['count()']\n3. For grouped counts: fields=['grouping_field', 'count()']\n4. Always include timeRange for period-specific queries\n5. Examples:\n - \"how much traffic in last 30 days\" → fields=['count()'], timeRange: {\"statsPeriod\": \"30d\"}\n - \"traffic on mcp-server\" → query: \"project:mcp-server\", fields=['count()']\n\nCRITICAL - HANDLING \"ME\" REFERENCES:\n- If the query contains \"me\", \"my\", \"myself\", or \"affecting me\" in the context of user.id or user.email fields, use the whoami tool to get the user's ID and email\n- For assignedTo fields, you can use \"me\" directly without translation (e.g., assignedTo:me works as-is)\n- After calling whoami, replace \"me\" references with the actual user.id or user.email values\n- If whoami fails, return an error explaining the issue\n\nQUERY MODES:\n1. INDIVIDUAL EVENTS (default): Returns raw event data\n - Used when fields contain no function() calls\n - Include recommended fields plus any user-requested fields\n\n2. AGGREGATE QUERIES: Grouping and aggregation (NOT SQL)\n - Activated when ANY field contains a function() call\n - Fields should ONLY include: aggregate functions + groupBy fields\n - Automatically groups by ALL non-function fields\n - For aggregate queries, ONLY include the aggregate functions and groupBy fields - do NOT include default fields like timestamp, id, etc.\n - You SHOULD sort aggregate results by \"-function_name()\" for descending order (highest values first)\n - For equations in aggregate queries: You SHOULD use \"-equation|...\" prefix unless user wants lowest values\n - When user asks \"how many total\", \"sum of\", or similar: They want the highest/total value, use descending sort\n\nCRITICAL LIMITATION - TIME SERIES NOT SUPPORTED:\n- Queries asking for data \"over time\", \"by hour\", \"by day\", \"time series\", or similar temporal groupings are NOT currently supported\n- If user asks for \"X over time\", return an error explaining: \"Time series aggregations are not currently supported.\"\n\nCRITICAL - DO NOT USE SQL SYNTAX:\n- NEVER use SQL functions like yesterday(), today(), now(), IS NOT NULL, IS NULL\n- NEVER use SQL date functions - use timeRange parameter instead\n- For \"yesterday\": Use timeRange: {\"statsPeriod\": \"24h\"}, NOT timestamp >= yesterday()\n- For field existence: Use has:field_name, NOT field_name IS NOT NULL\n- For field absence: Use !has:field_name, NOT field_name IS NULL\n\nMATHEMATICAL QUERY PATTERNS:\nWhen user asks mathematical questions like \"how many X\", \"total Y used\", \"sum of Z\":\n- Identify the appropriate dataset based on context\n- Use datasetAttributes tool to find available numeric fields\n- Use sum() function for totals, avg() for averages, count() for counts\n- For time-based queries (\"today\", \"yesterday\", \"this week\"), use timeRange parameter\n- For \"total\" or \"how many\" questions: Users typically want highest values first (descending sort)\n\nDERIVED METRICS AND CALCULATIONS (SPANS ONLY):\nWhen user asks for calculated metrics, ratios, or conversions:\n- Use equation fields with \"equation|\" prefix\n- Examples:\n - \"duration in milliseconds\" → fields: [\"equation|avg(span.duration) * 1000\"], sort: \"-equation|avg(span.duration) * 1000\"\n - \"combined metric total\" → fields: [\"equation|sum(metric.a) + sum(metric.b)\"], sort: \"-equation|sum(metric.a) + sum(metric.b)\"\n - \"error rate percentage\" → fields: [\"equation|failure_rate() * 100\"], sort: \"-equation|failure_rate() * 100\"\n - \"events per second\" → fields: [\"equation|count() / 3600\"], sort: \"-equation|count() / 3600\"\n- IMPORTANT: Equations are ONLY supported in the spans dataset, NOT in errors or logs\n- IMPORTANT: When sorting by equations, use \"-equation|...\" for descending order (highest values first)\n\nSORTING RULES (CRITICAL - YOU MUST ALWAYS SPECIFY A SORT):\n1. CRITICAL: Sort MUST go in the separate \"sort\" field, NEVER in the \"query\" field\n - WRONG: query: \"level:error sort:-timestamp\" ← Sort syntax in query field is FORBIDDEN\n - CORRECT: query: \"level:error\", sort: \"-timestamp\" ← Sort in separate field\n\n2. DEFAULT SORTING:\n - errors dataset: Use \"-timestamp\" (newest first)\n - spans dataset: Use \"-span.duration\" (slowest first) \n - logs dataset: Use \"-timestamp\" (newest first)\n\n3. SORTING SYNTAX:\n - Use \"-\" prefix for descending order (e.g., \"-timestamp\" for newest first)\n - Use field name without prefix for ascending order\n - For aggregate queries: sort by aggregate function results (e.g., \"-count()\" for highest count first)\n - For equation fields: You SHOULD use \"-equation|...\" for descending order (e.g., \"-equation|sum(field1) + sum(field2)\")\n - Only omit the \"-\" prefix if the user clearly wants lowest values first (rare)\n\n4. IMPORTANT SORTING REQUIREMENTS:\n - YOU MUST ALWAYS INCLUDE A SORT PARAMETER\n - CRITICAL: The field you sort by MUST be included in your fields array\n - If sorting by \"-timestamp\", include \"timestamp\" in fields\n - If sorting by \"-count()\", include \"count()\" in fields\n - This is MANDATORY - Sentry will reject queries where sort field is not in the selected fields\n\nYOUR RESPONSE FORMAT:\nReturn a JSON object with these fields:\n- \"dataset\": Which dataset you determined to use (\"spans\", \"errors\", or \"logs\")\n- \"query\": The Sentry query string for filtering results (use empty string \"\" for no filters)\n- \"fields\": Array of field names to return in results\n - For individual event queries: OPTIONAL (will use recommended fields if not provided)\n - For aggregate queries: REQUIRED (must include aggregate functions AND any groupBy fields)\n- \"sort\": Sort parameter for results (REQUIRED - YOU MUST ALWAYS SPECIFY THIS)\n- \"timeRange\": Time range parameters (optional)\n - Relative: {\"statsPeriod\": \"24h\"} for last 24 hours, \"7d\" for last 7 days, etc.\n - Absolute: {\"start\": \"2025-06-19T07:00:00\", \"end\": \"2025-06-20T06:59:59\"} for specific date ranges\n\nCORRECT QUERY PATTERNS (FOLLOW THESE):\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions)\n- Example: \"items processed yesterday\" → query: \"has:item.processed\", timeRange: {\"statsPeriod\": \"24h\"}\n\nPROCESS:\n1. Analyze the user's query\n2. Determine appropriate dataset\n3. Use datasetAttributes tool to discover available fields\n4. Use otelSemantics tool if needed for OpenTelemetry attributes\n5. Construct the final query with proper fields and sort parameters\n\nCOMMON ERRORS TO AVOID:\n- Using SQL syntax (IS NOT NULL, IS NULL, yesterday(), today(), etc.) - Use has: operator and timeRange instead\n- Using numeric functions (sum, avg, min, max, percentiles) on non-numeric fields\n- Using incorrect field names (use the otelSemantics tool to look up correct names)\n- Missing required fields in the fields array for aggregate queries\n- Invalid sort parameter not included in fields array\n- For field existence: Use has:field_name (NOT field_name IS NOT NULL)\n- For field absence: Use !has:field_name (NOT field_name IS NULL)\n- For time periods: Use timeRange parameter (NOT SQL date functions like yesterday())`;\n\n// Base fields common to all datasets\nexport const BASE_COMMON_FIELDS = {\n project: \"Project slug\",\n timestamp: \"When the event occurred\",\n environment: \"Environment (production, staging, development)\",\n release: \"Release version\",\n platform: \"Platform (javascript, python, etc.)\",\n \"user.id\": \"User ID\",\n \"user.email\": \"User email\",\n \"sdk.name\": \"SDK name\",\n \"sdk.version\": \"SDK version\",\n};\n\n// Known numeric fields for each dataset\nexport const NUMERIC_FIELDS: Record<string, Set<string>> = {\n spans: new Set([\n \"span.duration\",\n \"span.self_time\",\n \"transaction.duration\",\n \"http.status_code\",\n \"gen_ai.usage.input_tokens\",\n \"gen_ai.usage.output_tokens\",\n \"gen_ai.request.max_tokens\",\n ]),\n errors: new Set([\n // Most error fields are strings/categories\n \"stack.lineno\",\n ]),\n logs: new Set([\"severity_number\", \"sentry.observed_timestamp_nanos\"]),\n};\n\n// Dataset-specific field definitions\nexport const DATASET_FIELDS = {\n spans: {\n // Span-specific fields\n \"span.op\": \"Span operation type (e.g., http.client, db.query, cache.get)\",\n \"span.description\": \"Detailed description of the span operation\",\n \"span.duration\": \"Duration of the span in milliseconds\",\n \"span.status\": \"Span status (ok, cancelled, unknown, etc.)\",\n \"span.self_time\": \"Time spent in this span excluding child spans\",\n\n // Transaction fields\n transaction: \"Transaction name/route\",\n \"transaction.duration\": \"Total transaction duration in milliseconds\",\n \"transaction.op\": \"Transaction operation type\",\n \"transaction.status\": \"Transaction status\",\n is_transaction: \"Whether this span is a transaction (true/false)\",\n\n // Trace fields\n trace: \"Trace ID\",\n \"trace.span_id\": \"Span ID within the trace\",\n \"trace.parent_span_id\": \"Parent span ID\",\n\n // HTTP fields\n \"http.method\": \"HTTP method (GET, POST, etc.)\",\n \"http.status_code\": \"HTTP response status code\",\n \"http.url\": \"Full HTTP URL\",\n\n // Database fields\n \"db.system\": \"Database system (postgresql, mysql, etc.)\",\n \"db.operation\": \"Database operation (SELECT, INSERT, etc.)\",\n\n // OpenTelemetry attribute namespaces for semantic queries\n // Use has:namespace.* to find spans with any attribute in that namespace\n // GenAI namespace (gen_ai.*) - for AI/LLM/Agent calls\n \"gen_ai.system\": \"AI system (e.g., anthropic, openai)\",\n \"gen_ai.request.model\": \"Model name (e.g., claude-3-5-sonnet-20241022)\",\n \"gen_ai.operation.name\": \"Operation type (e.g., chat, completion)\",\n \"gen_ai.usage.input_tokens\": \"Number of input tokens (numeric)\",\n \"gen_ai.usage.output_tokens\": \"Number of output tokens (numeric)\",\n\n // MCP namespace (mcp.*) - for Model Context Protocol tool calls\n \"mcp.tool.name\": \"Tool name (e.g., search_issues, search_events)\",\n \"mcp.session.id\": \"MCP session identifier\",\n\n // Aggregate functions (SPANS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of spans\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(span.duration)\",\n \"sum(field)\": \"Sum of numeric field, e.g. sum(span.self_time)\",\n \"min(field)\": \"Minimum of numeric field, e.g. min(span.duration)\",\n \"max(field)\": \"Maximum of numeric field, e.g. max(span.duration)\",\n \"p50(field)\": \"50th percentile (median), e.g. p50(span.duration)\",\n \"p75(field)\": \"75th percentile, e.g. p75(span.duration)\",\n \"p90(field)\": \"90th percentile, e.g. p90(span.duration)\",\n \"p95(field)\": \"95th percentile, e.g. p95(span.duration)\",\n \"p99(field)\": \"99th percentile, e.g. p99(span.duration)\",\n \"p100(field)\": \"100th percentile (max), e.g. p100(span.duration)\",\n \"epm()\": \"Events per minute rate\",\n \"failure_rate()\": \"Percentage of failed spans\",\n },\n errors: {\n // Error-specific fields\n message: \"Error message\",\n level: \"Error level (error, warning, info, debug)\",\n \"error.type\": \"Error type/exception class\",\n \"error.value\": \"Error value/description\",\n \"error.handled\": \"Whether the error was handled (true/false)\",\n culprit: \"Code location that caused the error\",\n title: \"Error title/grouping\",\n\n // Stack trace fields\n \"stack.filename\": \"File where error occurred\",\n \"stack.function\": \"Function where error occurred\",\n \"stack.module\": \"Module where error occurred\",\n \"stack.abs_path\": \"Absolute path to file\",\n\n // Additional context fields\n \"os.name\": \"Operating system name\",\n \"browser.name\": \"Browser name\",\n \"device.family\": \"Device family\",\n\n // Aggregate functions (ERRORS dataset only)\n \"count()\": \"Count of error events\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"count_if(field,equals,value)\":\n \"Conditional count, e.g. count_if(error.handled,equals,false)\",\n \"last_seen()\": \"Most recent timestamp of the group\",\n \"eps()\": \"Events per second rate\",\n \"epm()\": \"Events per minute rate\",\n },\n logs: {\n // Log-specific fields\n message: \"Log message\",\n severity: \"Log severity level\",\n severity_number: \"Numeric severity level\",\n \"sentry.item_id\": \"Sentry item ID\",\n \"sentry.observed_timestamp_nanos\": \"Observed timestamp in nanoseconds\",\n\n // Trace context\n trace: \"Trace ID\",\n\n // Aggregate functions (LOGS dataset only - require numeric fields except count/count_unique)\n \"count()\": \"Count of log entries\",\n \"count_unique(field)\": \"Count of unique values, e.g. count_unique(user.id)\",\n \"avg(field)\": \"Average of numeric field, e.g. avg(severity_number)\",\n \"sum(field)\": \"Sum of numeric field\",\n \"min(field)\": \"Minimum of numeric field\",\n \"max(field)\": \"Maximum of numeric field\",\n \"p50(field)\": \"50th percentile (median)\",\n \"p75(field)\": \"75th percentile\",\n \"p90(field)\": \"90th percentile\",\n \"p95(field)\": \"95th percentile\",\n \"p99(field)\": \"99th percentile\",\n \"p100(field)\": \"100th percentile (max)\",\n \"epm()\": \"Events per minute rate\",\n },\n};\n\n// Dataset-specific rules and examples\nexport const DATASET_CONFIGS = {\n errors: {\n rules: `- For errors, focus on: message, level, error.type, error.handled\n- Use level field for severity (error, warning, info, debug)\n- Use error.handled:false for unhandled exceptions/crashes\n- For filename searches: Use stack.filename for suffix-based search (e.g., stack.filename:\"**/index.js\" or stack.filename:\"**/components/Button.tsx\")\n- When searching for errors in specific files, prefer including the parent folder to avoid ambiguity (e.g., stack.filename:\"**/components/index.js\" instead of just stack.filename:\"**/index.js\")`,\n examples: `- \"null pointer exceptions\" → \n {\n \"query\": \"error.type:\\\\\"NullPointerException\\\\\" OR message:\\\\\"*null pointer*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"unhandled errors in production\" → \n {\n \"query\": \"error.handled:false AND environment:production\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"error.handled\", \"environment\"],\n \"sort\": \"-timestamp\"\n }\n- \"database connection errors\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\" AND message:\\\\\"*connection*\\\\\" AND level:error\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me user emails for authentication failures\" → \n {\n \"query\": \"message:\\\\\"*auth*\\\\\" AND (message:\\\\\"*failed*\\\\\" OR message:\\\\\"*denied*\\\\\")\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"errors in Button.tsx file\" → \n {\n \"query\": \"stack.filename:\\\\\"**/Button.tsx\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\", \"stack.filename\"],\n \"sort\": \"-timestamp\"\n }\n- \"count errors by type in production\" → \n {\n \"query\": \"environment:production\",\n \"fields\": [\"error.type\", \"count()\", \"last_seen()\"],\n \"sort\": \"-count()\"\n }\n- \"most common errors last 24h\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"title\", \"error.type\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"unhandled errors rate by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"count_if(error.handled,equals,false)\", \"epm()\"],\n \"sort\": \"-count()\"\n }\n- \"errors in the last hour\" → \n {\n \"query\": \"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"1h\"}\n }\n- \"database errors between June 19-20\" → \n {\n \"query\": \"message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"issue\", \"title\", \"project\", \"timestamp\", \"level\", \"message\", \"error.type\", \"culprit\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"start\": \"2025-06-19T00:00:00\", \"end\": \"2025-06-20T23:59:59\"}\n }\n- \"unique users affected by errors\" → \n {\n \"query\": \"level:error\",\n \"fields\": [\"error.type\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count_unique(user.id)\"\n }\n- \"what is the most common error\" → \n {\n \"query\": \"\",\n \"fields\": [\"title\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"errors by browser\" → \n {\n \"query\": \"has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"which user agents have the most errors\" → \n {\n \"query\": \"level:error AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"count_unique(user.id)\"],\n \"sort\": \"-count()\"\n }`,\n },\n logs: {\n rules: `- For logs, focus on: message, severity, severity_number\n- Use severity field for log levels (fatal, error, warning, info, debug, trace)\n- severity_number is numeric (21=fatal, 17=error, 13=warning, 9=info, 5=debug, 1=trace)\n- IMPORTANT: For time-based filtering in logs, do NOT use timestamp filters in the query\n- Instead, time filtering for logs is handled by the statsPeriod parameter (not part of the query string)\n- Keep your query focused on message content, severity levels, and other attributes only\n- When user asks for \"error logs\", interpret this as logs with severity:error`,\n examples: `- \"warning logs about memory\" → \n {\n \"query\": \"severity:warning AND message:\\\\\"*memory*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"error logs from database\" → \n {\n \"query\": \"severity:error AND message:\\\\\"*database*\\\\\"\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n \"sort\": \"-timestamp\"\n }\n- \"show me error logs with user context\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\", \"user.id\", \"user.email\"],\n \"sort\": \"-timestamp\"\n }\n- \"what is the most common log\" → \n {\n \"query\": \"\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common error logs\" → \n {\n \"query\": \"severity:error\",\n \"fields\": [\"message\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"count logs by severity\" → \n {\n \"query\": \"\",\n \"fields\": [\"severity\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"log volume by project\" → \n {\n \"query\": \"\",\n \"fields\": [\"project\", \"count()\", \"epm()\"],\n \"sort\": \"-count()\"\n }`,\n },\n spans: {\n rules: `- For traces/spans, focus on: span.op, span.description, span.duration, transaction\n- Use is_transaction:true for transaction spans only\n- Use span.duration for performance queries (value is in milliseconds)\n- IMPORTANT: Use has: queries for attribute-based filtering instead of span.op patterns:\n - For HTTP requests: use \"has:request.url\" instead of \"span.op:http*\"\n - For database queries: use \"has:db.statement\" or \"has:db.system\" instead of \"span.op:db*\"\n - For AI/LLM/Agent calls: use \"has:gen_ai.system\" or \"has:gen_ai.request.model\" (OpenTelemetry GenAI semantic conventions)\n - For MCP tool calls: use \"has:mcp.tool.name\" (Model Context Protocol semantic conventions)\n - This approach is more flexible and captures all relevant spans regardless of their operation type\n\nOpenTelemetry Semantic Conventions (2025 Stable):\nCore Namespaces:\n- gen_ai.*: GenAI attributes for AI/LLM/Agent calls (system, request.model, operation.name, usage.*)\n- db.*: Database attributes (system, statement, operation, name) - STABLE\n- http.*: HTTP attributes (method, status_code, url, request.*, response.*) - STABLE\n- rpc.*: RPC attributes (system, service, method, grpc.*)\n- messaging.*: Messaging attributes (system, operation, destination.*)\n- faas.*: Function as a Service attributes (name, version, runtime)\n- cloud.*: Cloud provider attributes (provider, region, zone)\n- k8s.*: Kubernetes attributes (namespace, pod, container, node)\n- host.*: Host attributes (name, type, arch, os.*)\n- service.*: Service attributes (name, version, instance.id)\n- process.*: Process attributes (pid, command, runtime.*)\n\nCustom Namespaces:\n- mcp.*: Model Context Protocol attributes for MCP tool calls (tool.name, session.id, transport)\n\nQuery Patterns:\n- Use has:namespace.* to find spans with any attribute in that namespace\n- Most common: has:gen_ai.system (agent calls), has:mcp.tool.name (MCP tools), has:db.statement (database), has:http.method (HTTP)`,\n examples: `- \"database queries\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"slow API calls over 5 seconds\" → \n {\n \"query\": \"has:request.url AND span.duration:>5000\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\", \"span.status_code\"],\n \"sort\": \"-span.duration\"\n }\n- \"show me database queries with their SQL\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"db.system\", \"db.statement\"],\n \"sort\": \"-span.duration\"\n }\n- \"average response time by endpoint\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"slowest database queries by p95\" → \n {\n \"query\": \"has:db.statement\",\n \"fields\": [\"db.statement\", \"count()\", \"p50(span.duration)\", \"p95(span.duration)\", \"max(span.duration)\"],\n \"sort\": \"-p95(span.duration)\"\n }\n- \"API calls in the last 30 minutes\" → \n {\n \"query\": \"has:request.url\",\n \"fields\": [\"id\", \"span.op\", \"span.description\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"request.url\", \"request.method\"],\n \"sort\": \"-timestamp\",\n \"timeRange\": {\"statsPeriod\": \"30m\"}\n }\n- \"most common transaction\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 tool call spans by usage\" → \n {\n \"query\": \"has:mcp.tool.name\",\n \"fields\": [\"mcp.tool.name\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"top 10 agent call spans by usage\" → \n {\n \"query\": \"has:gen_ai.system\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"slowest AI/LLM calls\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.system\", \"gen_ai.request.model\", \"span.duration\", \"transaction\", \"timestamp\", \"project\", \"trace\", \"gen_ai.operation.name\"],\n \"sort\": \"-span.duration\"\n }\n- \"agent calls by model usage\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"average agent call duration by model\" → \n {\n \"query\": \"has:gen_ai.request.model\",\n \"fields\": [\"gen_ai.request.model\", \"count()\", \"avg(span.duration)\", \"p95(span.duration)\"],\n \"sort\": \"-avg(span.duration)\"\n }\n- \"token usage by AI system\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.system\", \"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"how many tokens used today\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"average response time in milliseconds\" → \n {\n \"query\": \"is_transaction:true\",\n \"fields\": [\"transaction\", \"equation|avg(span.duration) * 1000\"],\n \"sort\": \"-equation|avg(span.duration) * 1000\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"total input tokens by model\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"gen_ai.request.model\", \"sum(gen_ai.usage.input_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\"\n }\n- \"tokens used this week\" → \n {\n \"query\": \"has:gen_ai.usage.input_tokens\",\n \"fields\": [\"sum(gen_ai.usage.input_tokens)\", \"sum(gen_ai.usage.output_tokens)\", \"count()\"],\n \"sort\": \"-sum(gen_ai.usage.input_tokens)\",\n \"timeRange\": {\"statsPeriod\": \"7d\"}\n }\n- \"which user agents have the most tool calls yesterday\" → \n {\n \"query\": \"has:mcp.tool.name AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\",\n \"timeRange\": {\"statsPeriod\": \"24h\"}\n }\n- \"top 10 browsers by API calls\" → \n {\n \"query\": \"has:http.method AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\"],\n \"sort\": \"-count()\"\n }\n- \"most common clients making database queries\" → \n {\n \"query\": \"has:db.statement AND has:user_agent.original\",\n \"fields\": [\"user_agent.original\", \"count()\", \"avg(span.duration)\"],\n \"sort\": \"-count()\"\n }`,\n },\n};\n\n// Define recommended fields for each dataset\nexport const RECOMMENDED_FIELDS = {\n errors: {\n basic: [\n \"issue\",\n \"title\",\n \"project\",\n \"timestamp\",\n \"level\",\n \"message\",\n \"error.type\",\n \"culprit\",\n ],\n description:\n \"Basic error information including issue ID, title, timestamp, severity, and location\",\n },\n logs: {\n basic: [\"timestamp\", \"project\", \"message\", \"severity\", \"trace\"],\n description: \"Essential log entry information\",\n },\n spans: {\n basic: [\n \"id\",\n \"span.op\",\n \"span.description\",\n \"span.duration\",\n \"transaction\",\n \"timestamp\",\n \"project\",\n \"trace\",\n ],\n description:\n \"Core span/trace information including span ID, operation, duration, and trace context\",\n },\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-
|
|
1
|
+
{"version":3,"file":"constants-CgLLujFn.cjs","names":["SENTRY_FRAMEWORKS: Record<string, string[]>"],"sources":["../src/constants.ts"],"sourcesContent":["/**\n * Constants for Sentry MCP server.\n *\n * Defines platform and framework combinations available in Sentry documentation.\n */\n\n/**\n * MCP Server identification\n */\nexport const MCP_SERVER_NAME = \"Sentry MCP\" as const;\n\n/**\n * Allowed region domains for sentry.io\n * Only these specific domains are permitted when using Sentry's cloud service\n * This is used to prevent SSRF attacks by restricting regionUrl to known domains\n */\nexport const SENTRY_ALLOWED_REGION_DOMAINS = new Set([\n \"sentry.io\",\n \"us.sentry.io\",\n \"de.sentry.io\",\n]);\n\n/**\n * Common Sentry platforms that have documentation available\n */\nexport const SENTRY_PLATFORMS_BASE = [\n \"javascript\",\n \"python\",\n \"java\",\n \"dotnet\",\n \"go\",\n \"php\",\n \"ruby\",\n \"android\",\n \"apple\",\n \"unity\",\n \"unreal\",\n \"rust\",\n \"elixir\",\n \"kotlin\",\n \"native\",\n \"dart\",\n \"godot\",\n \"nintendo-switch\",\n \"playstation\",\n \"powershell\",\n \"react-native\",\n \"xbox\",\n] as const;\n\n/**\n * Platform-specific frameworks that have Sentry guides\n */\nexport const SENTRY_FRAMEWORKS: Record<string, string[]> = {\n javascript: [\n \"nextjs\",\n \"react\",\n \"gatsby\",\n \"remix\",\n \"vue\",\n \"angular\",\n \"hono\",\n \"svelte\",\n \"express\",\n \"fastify\",\n \"astro\",\n \"bun\",\n \"capacitor\",\n \"cloudflare\",\n \"connect\",\n \"cordova\",\n \"deno\",\n \"electron\",\n \"ember\",\n \"nuxt\",\n \"solid\",\n \"solidstart\",\n \"sveltekit\",\n \"tanstack-react\",\n \"wasm\",\n \"node\",\n \"koa\",\n \"nestjs\",\n \"hapi\",\n ],\n python: [\n \"django\",\n \"flask\",\n \"fastapi\",\n \"celery\",\n \"tornado\",\n \"pyramid\",\n \"aiohttp\",\n \"anthropic\",\n \"airflow\",\n \"aws-lambda\",\n \"boto3\",\n \"bottle\",\n \"chalice\",\n \"dramatiq\",\n \"falcon\",\n \"langchain\",\n \"litestar\",\n \"logging\",\n \"loguru\",\n \"openai\",\n \"quart\",\n \"ray\",\n \"redis\",\n \"rq\",\n \"sanic\",\n \"sqlalchemy\",\n \"starlette\",\n ],\n dart: [\"flutter\"],\n dotnet: [\n \"aspnetcore\",\n \"maui\",\n \"wpf\",\n \"winforms\",\n \"aspnet\",\n \"aws-lambda\",\n \"azure-functions\",\n \"blazor-webassembly\",\n \"entityframework\",\n \"google-cloud-functions\",\n \"extensions-logging\",\n \"log4net\",\n \"nlog\",\n \"serilog\",\n \"uwp\",\n \"xamarin\",\n ],\n java: [\n \"spring\",\n \"spring-boot\",\n \"android\",\n \"jul\",\n \"log4j2\",\n \"logback\",\n \"servlet\",\n ],\n go: [\n \"echo\",\n \"fasthttp\",\n \"fiber\",\n \"gin\",\n \"http\",\n \"iris\",\n \"logrus\",\n \"negroni\",\n \"slog\",\n \"zerolog\",\n ],\n php: [\"laravel\", \"symfony\"],\n ruby: [\"delayed_job\", \"rack\", \"rails\", \"resque\", \"sidekiq\"],\n android: [\"kotlin\"],\n apple: [\"ios\", \"macos\", \"watchos\", \"tvos\", \"visionos\"],\n kotlin: [\"multiplatform\"],\n} as const;\n\n/**\n * All valid guides for Sentry docs search filtering.\n * A guide can be either a platform (e.g., 'javascript') or a platform/framework combination (e.g., 'javascript/nextjs').\n */\nexport const SENTRY_GUIDES = [\n // Base platforms\n ...SENTRY_PLATFORMS_BASE,\n // Platform/guide combinations\n ...Object.entries(SENTRY_FRAMEWORKS).flatMap(([platform, guides]) =>\n guides.map((guide) => `${platform}/${guide}`),\n ),\n] as const;\n\nexport const DEFAULT_SCOPES = [\n \"org:read\",\n \"project:read\",\n \"team:read\",\n \"event:read\",\n] as const;\n\n// Re-export DEFAULT_SKILLS from skills.ts for convenience\n// (Skills are the new user-facing authorization system)\nexport { DEFAULT_SKILLS } from \"./skills\";\n\n// Note: All scopes are now exported from permissions.ts to avoid pulling this\n// heavy constants module into scope-only consumers.\n"],"mappings":";;;;;;;;;;AASA,MAAa,kBAAkB;;;;;;AAO/B,MAAa,gCAAgC,IAAI,IAAI;CACnD;CACA;CACA;AACD;;;;AAKD,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;AAKD,MAAaA,oBAA8C;CACzD,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,MAAM,CAAC,SAAU;CACjB,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,IAAI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,KAAK,CAAC,WAAW,SAAU;CAC3B,MAAM;EAAC;EAAe;EAAQ;EAAS;EAAU;CAAU;CAC3D,SAAS,CAAC,QAAS;CACnB,OAAO;EAAC;EAAO;EAAS;EAAW;EAAQ;CAAW;CACtD,QAAQ,CAAC,eAAgB;AAC1B;;;;;AAMD,MAAa,gBAAgB,CAE3B,GAAG,uBAEH,GAAG,OAAO,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,CAAC,UAAU,OAAO,KAC9D,OAAO,IAAI,CAAC,aAAa,SAAS,GAAG,QAAQ,CAC9C,AACF;AAED,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;AACD"}
|
|
@@ -181,4 +181,4 @@ const DEFAULT_SCOPES = [
|
|
|
181
181
|
|
|
182
182
|
//#endregion
|
|
183
183
|
export { DEFAULT_SCOPES, MCP_SERVER_NAME, SENTRY_ALLOWED_REGION_DOMAINS, SENTRY_FRAMEWORKS, SENTRY_GUIDES, SENTRY_PLATFORMS_BASE };
|
|
184
|
-
//# sourceMappingURL=constants-
|
|
184
|
+
//# sourceMappingURL=constants-D8axTonA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-
|
|
1
|
+
{"version":3,"file":"constants-D8axTonA.js","names":["SENTRY_FRAMEWORKS: Record<string, string[]>"],"sources":["../src/constants.ts"],"sourcesContent":["/**\n * Constants for Sentry MCP server.\n *\n * Defines platform and framework combinations available in Sentry documentation.\n */\n\n/**\n * MCP Server identification\n */\nexport const MCP_SERVER_NAME = \"Sentry MCP\" as const;\n\n/**\n * Allowed region domains for sentry.io\n * Only these specific domains are permitted when using Sentry's cloud service\n * This is used to prevent SSRF attacks by restricting regionUrl to known domains\n */\nexport const SENTRY_ALLOWED_REGION_DOMAINS = new Set([\n \"sentry.io\",\n \"us.sentry.io\",\n \"de.sentry.io\",\n]);\n\n/**\n * Common Sentry platforms that have documentation available\n */\nexport const SENTRY_PLATFORMS_BASE = [\n \"javascript\",\n \"python\",\n \"java\",\n \"dotnet\",\n \"go\",\n \"php\",\n \"ruby\",\n \"android\",\n \"apple\",\n \"unity\",\n \"unreal\",\n \"rust\",\n \"elixir\",\n \"kotlin\",\n \"native\",\n \"dart\",\n \"godot\",\n \"nintendo-switch\",\n \"playstation\",\n \"powershell\",\n \"react-native\",\n \"xbox\",\n] as const;\n\n/**\n * Platform-specific frameworks that have Sentry guides\n */\nexport const SENTRY_FRAMEWORKS: Record<string, string[]> = {\n javascript: [\n \"nextjs\",\n \"react\",\n \"gatsby\",\n \"remix\",\n \"vue\",\n \"angular\",\n \"hono\",\n \"svelte\",\n \"express\",\n \"fastify\",\n \"astro\",\n \"bun\",\n \"capacitor\",\n \"cloudflare\",\n \"connect\",\n \"cordova\",\n \"deno\",\n \"electron\",\n \"ember\",\n \"nuxt\",\n \"solid\",\n \"solidstart\",\n \"sveltekit\",\n \"tanstack-react\",\n \"wasm\",\n \"node\",\n \"koa\",\n \"nestjs\",\n \"hapi\",\n ],\n python: [\n \"django\",\n \"flask\",\n \"fastapi\",\n \"celery\",\n \"tornado\",\n \"pyramid\",\n \"aiohttp\",\n \"anthropic\",\n \"airflow\",\n \"aws-lambda\",\n \"boto3\",\n \"bottle\",\n \"chalice\",\n \"dramatiq\",\n \"falcon\",\n \"langchain\",\n \"litestar\",\n \"logging\",\n \"loguru\",\n \"openai\",\n \"quart\",\n \"ray\",\n \"redis\",\n \"rq\",\n \"sanic\",\n \"sqlalchemy\",\n \"starlette\",\n ],\n dart: [\"flutter\"],\n dotnet: [\n \"aspnetcore\",\n \"maui\",\n \"wpf\",\n \"winforms\",\n \"aspnet\",\n \"aws-lambda\",\n \"azure-functions\",\n \"blazor-webassembly\",\n \"entityframework\",\n \"google-cloud-functions\",\n \"extensions-logging\",\n \"log4net\",\n \"nlog\",\n \"serilog\",\n \"uwp\",\n \"xamarin\",\n ],\n java: [\n \"spring\",\n \"spring-boot\",\n \"android\",\n \"jul\",\n \"log4j2\",\n \"logback\",\n \"servlet\",\n ],\n go: [\n \"echo\",\n \"fasthttp\",\n \"fiber\",\n \"gin\",\n \"http\",\n \"iris\",\n \"logrus\",\n \"negroni\",\n \"slog\",\n \"zerolog\",\n ],\n php: [\"laravel\", \"symfony\"],\n ruby: [\"delayed_job\", \"rack\", \"rails\", \"resque\", \"sidekiq\"],\n android: [\"kotlin\"],\n apple: [\"ios\", \"macos\", \"watchos\", \"tvos\", \"visionos\"],\n kotlin: [\"multiplatform\"],\n} as const;\n\n/**\n * All valid guides for Sentry docs search filtering.\n * A guide can be either a platform (e.g., 'javascript') or a platform/framework combination (e.g., 'javascript/nextjs').\n */\nexport const SENTRY_GUIDES = [\n // Base platforms\n ...SENTRY_PLATFORMS_BASE,\n // Platform/guide combinations\n ...Object.entries(SENTRY_FRAMEWORKS).flatMap(([platform, guides]) =>\n guides.map((guide) => `${platform}/${guide}`),\n ),\n] as const;\n\nexport const DEFAULT_SCOPES = [\n \"org:read\",\n \"project:read\",\n \"team:read\",\n \"event:read\",\n] as const;\n\n// Re-export DEFAULT_SKILLS from skills.ts for convenience\n// (Skills are the new user-facing authorization system)\nexport { DEFAULT_SKILLS } from \"./skills\";\n\n// Note: All scopes are now exported from permissions.ts to avoid pulling this\n// heavy constants module into scope-only consumers.\n"],"mappings":";;;;;;;;;AASA,MAAa,kBAAkB;;;;;;AAO/B,MAAa,gCAAgC,IAAI,IAAI;CACnD;CACA;CACA;AACD;;;;AAKD,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;;AAKD,MAAaA,oBAA8C;CACzD,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,MAAM,CAAC,SAAU;CACjB,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,IAAI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACD,KAAK,CAAC,WAAW,SAAU;CAC3B,MAAM;EAAC;EAAe;EAAQ;EAAS;EAAU;CAAU;CAC3D,SAAS,CAAC,QAAS;CACnB,OAAO;EAAC;EAAO;EAAS;EAAW;EAAQ;CAAW;CACtD,QAAQ,CAAC,eAAgB;AAC1B;;;;;AAMD,MAAa,gBAAgB,CAE3B,GAAG,uBAEH,GAAG,OAAO,QAAQ,kBAAkB,CAAC,QAAQ,CAAC,CAAC,UAAU,OAAO,KAC9D,OAAO,IAAI,CAAC,aAAa,SAAS,GAAG,QAAQ,CAC9C,AACF;AAED,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;AACD"}
|
package/dist/constants.cjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_skills = require('./skills-COOuBrrA.cjs');
|
|
2
|
+
const require_constants = require('./constants-CgLLujFn.cjs');
|
|
2
3
|
|
|
3
4
|
exports.DEFAULT_SCOPES = require_constants.DEFAULT_SCOPES;
|
|
5
|
+
exports.DEFAULT_SKILLS = require_skills.DEFAULT_SKILLS;
|
|
4
6
|
exports.MCP_SERVER_NAME = require_constants.MCP_SERVER_NAME;
|
|
5
7
|
exports.SENTRY_ALLOWED_REGION_DOMAINS = require_constants.SENTRY_ALLOWED_REGION_DOMAINS;
|
|
6
8
|
exports.SENTRY_FRAMEWORKS = require_constants.SENTRY_FRAMEWORKS;
|