@sentry/mcp-server 0.19.0 → 0.20.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/dist/{agent-ADO0sPxf.d.cts → agent-4SliQ-uj.d.cts} +2 -2
- package/dist/{agent-ADO0sPxf.d.cts.map → agent-4SliQ-uj.d.cts.map} +1 -1
- package/dist/{agent-CbJ6lvV3.cjs → agent-BMCJjVaJ.cjs} +2 -2
- package/dist/{agent-CbJ6lvV3.cjs.map → agent-BMCJjVaJ.cjs.map} +1 -1
- package/dist/agent-BbMg6UEA.d.cts +32 -0
- package/dist/agent-BbMg6UEA.d.cts.map +1 -0
- package/dist/{agent-DXya3Bcy.js → agent-CRc61dcC.js} +2 -2
- package/dist/{agent-DXya3Bcy.js.map → agent-CRc61dcC.js.map} +1 -1
- package/dist/{agent-BA98dlM7.d.cts → agent-D-dMHrZ1.d.cts} +2 -2
- package/dist/{agent-BA98dlM7.d.cts.map → agent-D-dMHrZ1.d.cts.map} +1 -1
- package/dist/agent-DT4ic52w.cjs +35 -0
- package/dist/agent-DT4ic52w.cjs.map +1 -0
- package/dist/{agent-DhHtOQmP.d.ts → agent-D_WfZ67H.d.ts} +2 -2
- package/dist/{agent-DhHtOQmP.d.ts.map → agent-D_WfZ67H.d.ts.map} +1 -1
- package/dist/agent-Dnr67ykA.d.ts +32 -0
- package/dist/agent-Dnr67ykA.d.ts.map +1 -0
- package/dist/{agent-D9DV11tZ.d.ts → agent-DoYdEiCJ.d.ts} +4 -4
- package/dist/{agent-D9DV11tZ.d.ts.map → agent-DoYdEiCJ.d.ts.map} +1 -1
- package/dist/{agent-D7MuFRwE.cjs → agent-DzfX6_dM.cjs} +2 -2
- package/dist/{agent-D7MuFRwE.cjs.map → agent-DzfX6_dM.cjs.map} +1 -1
- package/dist/{agent-BL7Xae0U.js → agent-FoPk5psd.js} +2 -2
- package/dist/{agent-BL7Xae0U.js.map → agent-FoPk5psd.js.map} +1 -1
- package/dist/agent-tLRcGXXr.js +29 -0
- package/dist/agent-tLRcGXXr.js.map +1 -0
- package/dist/agent-tools-1J_Oub8P.cjs +20 -0
- package/dist/agent-tools-1J_Oub8P.cjs.map +1 -0
- package/dist/agent-tools-DodmjvZn.js +15 -0
- package/dist/agent-tools-DodmjvZn.js.map +1 -0
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/errors.d.ts +1 -1
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +5 -5
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/{callEmbeddedAgent-B_BMEB_u.js → callEmbeddedAgent-BSnzLPfW.js} +4 -3
- package/dist/callEmbeddedAgent-BSnzLPfW.js.map +1 -0
- package/dist/callEmbeddedAgent-D83njSgs.d.cts +34 -0
- package/dist/callEmbeddedAgent-D83njSgs.d.cts.map +1 -0
- package/dist/{callEmbeddedAgent-BaGxBAdM.cjs → callEmbeddedAgent-KKTSTD7W.cjs} +4 -3
- package/dist/callEmbeddedAgent-KKTSTD7W.cjs.map +1 -0
- package/dist/callEmbeddedAgent-RskCqVav.d.ts +34 -0
- package/dist/callEmbeddedAgent-RskCqVav.d.ts.map +1 -0
- package/dist/cli/parse.cjs +1 -1
- package/dist/cli/parse.d.cts +1 -1
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/parse.d.ts +2 -2
- package/dist/cli/parse.d.ts.map +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +2 -2
- package/dist/cli/resolve.d.cts +1 -1
- package/dist/cli/resolve.d.ts +2 -2
- package/dist/cli/resolve.js +2 -2
- package/dist/cli/types.d.cts +1 -1
- package/dist/cli/types.d.ts +2 -2
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.d.ts +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/{client-C_fNdaX8.d.cts → client-DeGFkGAD.d.cts} +2 -2
- package/dist/{client-C_fNdaX8.d.cts.map → client-DeGFkGAD.d.cts.map} +1 -1
- package/dist/{client-VVhTv_ej.d.ts → client-njqQAP-R.d.ts} +2 -2
- package/dist/{client-VVhTv_ej.d.ts.map → client-njqQAP-R.d.ts.map} +1 -1
- package/dist/config-CTRUv0J3.js +25 -0
- package/dist/config-CTRUv0J3.js.map +1 -0
- package/dist/config-ClFI6orZ.cjs +37 -0
- package/dist/config-ClFI6orZ.cjs.map +1 -0
- package/dist/{constraint-helpers-Bey-Pii6.js → constraint-helpers-0jgp7p3K.js} +1 -1
- package/dist/{constraint-helpers-Bey-Pii6.js.map → constraint-helpers-0jgp7p3K.js.map} +1 -1
- package/dist/{constraint-helpers-BqcuWXad.cjs → constraint-helpers-BJPdGLZ3.cjs} +1 -1
- package/dist/{constraint-helpers-BqcuWXad.cjs.map → constraint-helpers-BJPdGLZ3.cjs.map} +1 -1
- package/dist/{error-handling-R4SJQ7n0.js → error-handling-D_4c-JgK.js} +1 -1
- package/dist/{error-handling-R4SJQ7n0.js.map → error-handling-D_4c-JgK.js.map} +1 -1
- package/dist/{error-handling-CxV2m_Dr.cjs → error-handling-ZVmZRXZb.cjs} +1 -1
- package/dist/{error-handling-CxV2m_Dr.cjs.map → error-handling-ZVmZRXZb.cjs.map} +1 -1
- package/dist/{errors-JbBt1G2l.d.ts → errors-CyAWBU2S.d.ts} +1 -1
- package/dist/{errors-JbBt1G2l.d.ts.map → errors-CyAWBU2S.d.ts.map} +1 -1
- package/dist/{errors-Bvit2_Qs.d.ts → errors-D9WEvbBw.d.ts} +1 -1
- package/dist/{errors-Bvit2_Qs.d.ts.map → errors-D9WEvbBw.d.ts.map} +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/{formatting-ar_6QZRE.d.ts → formatting-D5u7lYGU.d.ts} +4 -4
- package/dist/{formatting-ar_6QZRE.d.ts.map → formatting-D5u7lYGU.d.ts.map} +1 -1
- package/dist/{formatting-FJne_W9i.d.cts → formatting-iJThzXT4.d.cts} +4 -4
- package/dist/{formatting-FJne_W9i.d.cts.map → formatting-iJThzXT4.d.cts.map} +1 -1
- package/dist/{get-issue-details-Bvw1Xi8I.js → get-issue-details-CucQ2nf7.js} +11 -5
- package/dist/get-issue-details-CucQ2nf7.js.map +1 -0
- package/dist/{get-issue-details-DTQ-jXyu.cjs → get-issue-details-lQmdKAfJ.cjs} +11 -5
- package/dist/get-issue-details-lQmdKAfJ.cjs.map +1 -0
- package/dist/{handler-uWae09YN.d.ts → handler-ABnXxpHJ.d.ts} +2 -2
- package/dist/{handler-uWae09YN.d.ts.map → handler-ABnXxpHJ.d.ts.map} +1 -1
- package/dist/{handler-nILS77E9.js → handler-B3-dKrMX.js} +2 -2
- package/dist/{handler-nILS77E9.js.map → handler-B3-dKrMX.js.map} +1 -1
- package/dist/{handler-BcRR_2MX.d.cts → handler-BT1XWqc_.d.cts} +2 -2
- package/dist/{handler-BcRR_2MX.d.cts.map → handler-BT1XWqc_.d.cts.map} +1 -1
- package/dist/{handler-LaesAQaD.d.cts → handler-CGUL1Gvj.d.cts} +2 -2
- package/dist/{handler-LaesAQaD.d.cts.map → handler-CGUL1Gvj.d.cts.map} +1 -1
- package/dist/{handler-CdSvAOl6.d.ts → handler-CT6BNjub.d.ts} +2 -2
- package/dist/{handler-CdSvAOl6.d.ts.map → handler-CT6BNjub.d.ts.map} +1 -1
- package/dist/handler-D8I4qhcy.d.ts +11 -0
- package/dist/handler-D8I4qhcy.d.ts.map +1 -0
- package/dist/handler-DxsxiLrw.d.cts +11 -0
- package/dist/handler-DxsxiLrw.d.cts.map +1 -0
- package/dist/{handler-B7-KeBak.cjs → handler-Fsqncg_W.cjs} +2 -2
- package/dist/{handler-B7-KeBak.cjs.map → handler-Fsqncg_W.cjs.map} +1 -1
- package/dist/{handler-B08ITQl8.js → handler-JBRPTNfu.js} +2 -2
- package/dist/{handler-B08ITQl8.js.map → handler-JBRPTNfu.js.map} +1 -1
- package/dist/{handler-DIiYPQGL.cjs → handler-TWOoomKr.cjs} +2 -2
- package/dist/{handler-DIiYPQGL.cjs.map → handler-TWOoomKr.cjs.map} +1 -1
- package/dist/index.cjs +30 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -20
- package/dist/index.js.map +1 -1
- package/dist/internal/agents/callEmbeddedAgent.cjs +2 -2
- package/dist/internal/agents/callEmbeddedAgent.d.cts +2 -33
- package/dist/internal/agents/callEmbeddedAgent.d.ts +2 -33
- package/dist/internal/agents/callEmbeddedAgent.js +2 -2
- package/dist/internal/agents/openai-provider.cjs +1 -1
- package/dist/internal/agents/openai-provider.d.cts +8 -2
- package/dist/internal/agents/openai-provider.d.cts.map +1 -1
- package/dist/internal/agents/openai-provider.d.ts +8 -2
- package/dist/internal/agents/openai-provider.d.ts.map +1 -1
- package/dist/internal/agents/openai-provider.js +1 -1
- package/dist/internal/agents/tools/dataset-fields.d.cts +7 -7
- package/dist/internal/agents/tools/dataset-fields.d.ts +9 -9
- package/dist/internal/agents/tools/otel-semantics.d.cts +7 -7
- package/dist/internal/agents/tools/otel-semantics.d.ts +9 -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/whoami.d.cts +7 -7
- package/dist/internal/agents/tools/whoami.d.ts +9 -9
- package/dist/internal/constraint-helpers.cjs +1 -1
- package/dist/internal/constraint-helpers.d.cts +1 -1
- package/dist/internal/constraint-helpers.d.ts +2 -2
- package/dist/internal/constraint-helpers.js +1 -1
- package/dist/internal/error-handling.cjs +1 -1
- package/dist/internal/error-handling.d.cts +3 -3
- package/dist/internal/error-handling.d.ts +6 -6
- package/dist/internal/error-handling.js +1 -1
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +6 -6
- package/dist/internal/issue-helpers.d.cts +1 -1
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/test-fixtures.d.cts +2 -2
- package/dist/internal/test-fixtures.d.ts +2 -2
- package/dist/internal/tool-helpers/api.d.cts +4 -4
- package/dist/internal/tool-helpers/api.d.ts +7 -7
- package/dist/internal/tool-helpers/define.d.cts +2 -2
- package/dist/internal/tool-helpers/define.d.ts +3 -3
- package/dist/internal/tool-helpers/enhance-error.d.cts +3 -3
- package/dist/internal/tool-helpers/enhance-error.d.ts +5 -5
- package/dist/internal/tool-helpers/formatting.d.cts +3 -3
- package/dist/internal/tool-helpers/formatting.d.ts +5 -5
- package/dist/internal/tool-helpers/issue.d.cts +5 -5
- package/dist/internal/tool-helpers/issue.d.ts +7 -7
- package/dist/internal/tool-helpers/seer.d.cts +3 -3
- package/dist/internal/tool-helpers/seer.d.ts +5 -5
- package/dist/{issue-helpers-bECziPOG.d.ts → issue-helpers-BUtEHFKi.d.ts} +1 -1
- package/dist/{issue-helpers-bECziPOG.d.ts.map → issue-helpers-BUtEHFKi.d.ts.map} +1 -1
- package/dist/{issue-helpers-CD46ia7_.d.cts → issue-helpers-Cyxq87SP.d.cts} +1 -1
- package/dist/{issue-helpers-CD46ia7_.d.cts.map → issue-helpers-Cyxq87SP.d.cts.map} +1 -1
- package/dist/{logging-CDYnh7ho.d.cts → logging-99Uppado.d.cts} +1 -1
- package/dist/{logging-CDYnh7ho.d.cts.map → logging-99Uppado.d.cts.map} +1 -1
- package/dist/{logging-PY270KtN.d.ts → logging-BWajuCoz.d.ts} +1 -1
- package/dist/{logging-PY270KtN.d.ts.map → logging-BWajuCoz.d.ts.map} +1 -1
- package/dist/{openai-provider-BELCfis6.js → openai-provider-CqpHDwSr.js} +11 -8
- package/dist/openai-provider-CqpHDwSr.js.map +1 -0
- package/dist/{openai-provider-CRxXeC9G.cjs → openai-provider-DhSY7kTj.cjs} +11 -8
- package/dist/openai-provider-DhSY7kTj.cjs.map +1 -0
- package/dist/{parse-shlhKlaL.cjs → parse-BOPxttSm.cjs} +4 -1
- package/dist/parse-BOPxttSm.cjs.map +1 -0
- package/dist/{parse-8lpnm_2Z.js → parse-Da0oa8W8.js} +4 -1
- package/dist/parse-Da0oa8W8.js.map +1 -0
- package/dist/{permissions-40d2hxK-.d.ts → permissions-BBgPgD70.d.ts} +1 -1
- package/dist/{permissions-40d2hxK-.d.ts.map → permissions-BBgPgD70.d.ts.map} +1 -1
- package/dist/{permissions-D5kR-bZw.cjs → permissions-CpuEzSxz.cjs} +1 -1
- package/dist/{permissions-D5kR-bZw.cjs.map → permissions-CpuEzSxz.cjs.map} +1 -1
- package/dist/{permissions-C_xHmYV4.js → permissions-xBjHy6Qx.js} +1 -1
- package/dist/{permissions-C_xHmYV4.js.map → permissions-xBjHy6Qx.js.map} +1 -1
- package/dist/permissions.cjs +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.js +1 -1
- package/dist/{resolve-CZduTbDq.js → resolve-C95FW12c.js} +2 -2
- package/dist/{resolve-CZduTbDq.js.map → resolve-C95FW12c.js.map} +1 -1
- package/dist/{resolve-CBipUzux.cjs → resolve-D6Cfnjdj.cjs} +2 -2
- package/dist/{resolve-CBipUzux.cjs.map → resolve-D6Cfnjdj.cjs.map} +1 -1
- package/dist/{schema-0uEmsoCr.d.ts → schema-BogGdbdV.d.ts} +9 -9
- package/dist/{schema-0uEmsoCr.d.ts.map → schema-BogGdbdV.d.ts.map} +1 -1
- package/dist/{schema-xhCkX5uD.d.cts → schema-Y6BzAUmc.d.cts} +289 -289
- package/dist/{schema-xhCkX5uD.d.cts.map → schema-Y6BzAUmc.d.cts.map} +1 -1
- package/dist/{sentry-DZNWcvcy.d.ts → sentry-Bgt0wrtI.d.ts} +1 -1
- package/dist/sentry-Bgt0wrtI.d.ts.map +1 -0
- package/dist/{sentry-De4G2HDR.d.cts → sentry-DAPJGZoR.d.cts} +1 -1
- package/dist/sentry-DAPJGZoR.d.cts.map +1 -0
- package/dist/server-CDG3HfVV.js +264 -0
- package/dist/server-CDG3HfVV.js.map +1 -0
- package/dist/server-J1RALwYS.cjs +282 -0
- package/dist/server-J1RALwYS.cjs.map +1 -0
- package/dist/server.cjs +14 -14
- package/dist/server.d.cts +10 -8
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +11 -9
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -14
- package/dist/{stdio-Uv0oXx1a.js → stdio-BfZ7eu3Q.js} +14 -16
- package/dist/stdio-BfZ7eu3Q.js.map +1 -0
- package/dist/{stdio-D_myxOG-.cjs → stdio-CV8Yynj8.cjs} +14 -16
- package/dist/stdio-CV8Yynj8.cjs.map +1 -0
- package/dist/telem/index.d.cts +2 -2
- package/dist/telem/index.d.ts +2 -2
- package/dist/telem/logging.d.cts +1 -1
- package/dist/telem/logging.d.ts +1 -1
- package/dist/telem/sentry.d.cts +1 -1
- package/dist/telem/sentry.d.ts +1 -1
- package/dist/test-setup.cjs +1 -1
- package/dist/test-setup.d.cts +1 -1
- package/dist/test-setup.d.ts +2 -2
- package/dist/test-setup.js +1 -1
- package/dist/test-utils/context.d.cts +1 -1
- package/dist/test-utils/context.d.ts +2 -2
- package/dist/toolDefinitions.cjs +23 -1
- package/dist/toolDefinitions.cjs.map +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +23 -1
- package/dist/toolDefinitions.js.map +1 -1
- package/dist/tools/agent-tools.cjs +65 -0
- package/dist/tools/agent-tools.d.cts +25 -0
- package/dist/tools/agent-tools.d.cts.map +1 -0
- package/dist/tools/agent-tools.d.ts +25 -0
- package/dist/tools/agent-tools.d.ts.map +1 -0
- package/dist/tools/agent-tools.js +65 -0
- package/dist/tools/analyze-issue-with-seer.d.cts +2 -2
- package/dist/tools/analyze-issue-with-seer.d.ts +3 -3
- package/dist/tools/create-dsn.d.cts +2 -2
- package/dist/tools/create-dsn.d.ts +3 -3
- package/dist/tools/create-project.d.cts +2 -2
- package/dist/tools/create-project.d.ts +3 -3
- package/dist/tools/create-team.d.cts +2 -2
- package/dist/tools/create-team.d.ts +3 -3
- package/dist/tools/find-dsns.d.cts +6 -6
- package/dist/tools/find-dsns.d.ts +7 -7
- package/dist/tools/find-organizations.d.cts +4 -4
- package/dist/tools/find-organizations.d.ts +5 -5
- package/dist/tools/find-projects.d.cts +6 -6
- package/dist/tools/find-projects.d.ts +7 -7
- package/dist/tools/find-releases.d.cts +2 -2
- package/dist/tools/find-releases.d.ts +3 -3
- package/dist/tools/find-teams.d.cts +6 -6
- package/dist/tools/find-teams.d.ts +7 -7
- package/dist/tools/get-doc.d.cts +2 -2
- package/dist/tools/get-doc.d.ts +3 -3
- package/dist/tools/get-event-attachment.d.cts +8 -8
- package/dist/tools/get-event-attachment.d.ts +9 -9
- package/dist/tools/get-issue-details.cjs +1 -1
- package/dist/tools/get-issue-details.d.cts +2 -2
- package/dist/tools/get-issue-details.d.ts +3 -3
- package/dist/tools/get-issue-details.js +1 -1
- package/dist/tools/get-trace-details.d.cts +6 -6
- package/dist/tools/get-trace-details.d.ts +7 -7
- package/dist/tools/index.cjs +15 -9
- package/dist/tools/index.d.cts +80 -76
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +81 -77
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +14 -8
- package/dist/tools/search-docs.d.cts +2 -2
- package/dist/tools/search-docs.d.ts +3 -3
- package/dist/tools/search-events/agent.cjs +3 -3
- package/dist/tools/search-events/agent.d.cts +4 -4
- package/dist/tools/search-events/agent.d.ts +6 -6
- package/dist/tools/search-events/agent.js +3 -3
- package/dist/tools/search-events/formatters.d.cts +5 -5
- package/dist/tools/search-events/formatters.d.ts +7 -7
- package/dist/tools/search-events/handler.cjs +4 -4
- package/dist/tools/search-events/handler.d.cts +3 -3
- package/dist/tools/search-events/handler.d.ts +4 -4
- package/dist/tools/search-events/handler.js +4 -4
- package/dist/tools/search-events/index.cjs +4 -4
- package/dist/tools/search-events/index.d.cts +7 -7
- package/dist/tools/search-events/index.d.ts +10 -10
- package/dist/tools/search-events/index.js +4 -4
- package/dist/tools/search-events/utils.d.cts +5 -5
- package/dist/tools/search-events/utils.d.ts +7 -7
- package/dist/tools/search-issues/agent.cjs +3 -3
- package/dist/tools/search-issues/agent.d.cts +4 -4
- package/dist/tools/search-issues/agent.d.ts +6 -6
- package/dist/tools/search-issues/agent.js +3 -3
- package/dist/tools/search-issues/formatters.d.cts +3 -3
- package/dist/tools/search-issues/formatters.d.ts +5 -5
- package/dist/tools/search-issues/handler.cjs +4 -4
- package/dist/tools/search-issues/handler.d.cts +3 -3
- package/dist/tools/search-issues/handler.d.ts +4 -4
- package/dist/tools/search-issues/handler.js +4 -4
- package/dist/tools/search-issues/index.cjs +4 -4
- package/dist/tools/search-issues/index.d.cts +7 -7
- package/dist/tools/search-issues/index.d.ts +10 -10
- package/dist/tools/search-issues/index.js +4 -4
- package/dist/tools/types.d.cts +2 -2
- package/dist/tools/types.d.ts +3 -3
- package/dist/tools/update-issue.d.cts +9 -9
- package/dist/tools/update-issue.d.ts +10 -10
- package/dist/tools/update-project.d.cts +2 -2
- package/dist/tools/update-project.d.ts +3 -3
- package/dist/tools/use-sentry/agent.cjs +7 -0
- package/dist/tools/use-sentry/agent.d.cts +3 -0
- package/dist/tools/use-sentry/agent.d.ts +3 -0
- package/dist/tools/use-sentry/agent.js +7 -0
- package/dist/tools/use-sentry/config.cjs +4 -0
- package/dist/tools/use-sentry/config.d.cts +21 -0
- package/dist/tools/use-sentry/config.d.cts.map +1 -0
- package/dist/tools/use-sentry/config.d.ts +21 -0
- package/dist/tools/use-sentry/config.d.ts.map +1 -0
- package/dist/tools/use-sentry/config.js +3 -0
- package/dist/tools/use-sentry/handler.cjs +64 -0
- package/dist/tools/use-sentry/handler.d.cts +5 -0
- package/dist/tools/use-sentry/handler.d.ts +5 -0
- package/dist/tools/use-sentry/handler.js +64 -0
- package/dist/tools/use-sentry/index.cjs +66 -0
- package/dist/tools/use-sentry/index.d.cts +7 -0
- package/dist/tools/use-sentry/index.d.ts +7 -0
- package/dist/tools/use-sentry/index.js +64 -0
- package/dist/tools/use-sentry/tool-wrapper.cjs +62 -0
- package/dist/tools/use-sentry/tool-wrapper.cjs.map +1 -0
- package/dist/tools/use-sentry/tool-wrapper.d.cts +118 -0
- package/dist/tools/use-sentry/tool-wrapper.d.cts.map +1 -0
- package/dist/tools/use-sentry/tool-wrapper.d.ts +118 -0
- package/dist/tools/use-sentry/tool-wrapper.d.ts.map +1 -0
- package/dist/tools/use-sentry/tool-wrapper.js +61 -0
- package/dist/tools/use-sentry/tool-wrapper.js.map +1 -0
- package/dist/tools/whoami.d.cts +2 -2
- package/dist/tools/whoami.d.ts +3 -3
- package/dist/transports/stdio.cjs +2 -3
- package/dist/transports/stdio.d.cts +11 -10
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +12 -11
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +2 -3
- package/dist/{types-BU11bcu2.d.ts → types-B3T3_E4s.d.ts} +4 -2
- package/dist/types-B3T3_E4s.d.ts.map +1 -0
- package/dist/{types-DkmHqy15.d.cts → types-BeQSPXek.d.cts} +2 -2
- package/dist/{types-DkmHqy15.d.cts.map → types-BeQSPXek.d.cts.map} +1 -1
- package/dist/{types-CZUp4Xzk.d.ts → types-Bu5blaB3.d.ts} +3 -3
- package/dist/{types-CZUp4Xzk.d.ts.map → types-Bu5blaB3.d.ts.map} +1 -1
- package/dist/{types-CtnbvcEw.d.cts → types-CLI02LNZ.d.cts} +2 -2
- package/dist/{types-CtnbvcEw.d.cts.map → types-CLI02LNZ.d.cts.map} +1 -1
- package/dist/{types-Z4mR2AFK.d.cts → types-DNr8xzOR.d.cts} +1 -1
- package/dist/{types-Z4mR2AFK.d.cts.map → types-DNr8xzOR.d.cts.map} +1 -1
- package/dist/{types-NVsIso1A.d.ts → types-DjbiyvLT.d.ts} +2 -2
- package/dist/{types-NVsIso1A.d.ts.map → types-DjbiyvLT.d.ts.map} +1 -1
- package/dist/{types-4O1B8U0e.d.ts → types-DoT0an28.d.ts} +2 -2
- package/dist/{types-4O1B8U0e.d.ts.map → types-DoT0an28.d.ts.map} +1 -1
- package/dist/{types-B9_8hSal.d.cts → types-jjNLngoj.d.cts} +3 -1
- package/dist/types-jjNLngoj.d.cts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/{usage-CP6e39yF.cjs → usage-BV4cegeX.cjs} +2 -1
- package/dist/usage-BV4cegeX.cjs.map +1 -0
- package/dist/{usage-CihInDyq.js → usage-DLck8shg.js} +2 -1
- package/dist/usage-DLck8shg.js.map +1 -0
- package/dist/{utils-DKQuo7b2.d.ts → utils-BV58GdRy.d.ts} +4 -4
- package/dist/{utils-DKQuo7b2.d.ts.map → utils-BV58GdRy.d.ts.map} +1 -1
- package/dist/{utils-DKgPcA6i.d.cts → utils-DlTCMJUW.d.cts} +6 -6
- package/dist/{utils-DKgPcA6i.d.cts.map → utils-DlTCMJUW.d.cts.map} +1 -1
- package/dist/{utils-DpeFMEgH.d.ts → utils-gp7BwMLy.d.ts} +6 -6
- package/dist/{utils-DpeFMEgH.d.ts.map → utils-gp7BwMLy.d.ts.map} +1 -1
- package/dist/{utils-HNrRwq-a.d.cts → utils-yxWhi9hG.d.cts} +4 -4
- package/dist/{utils-HNrRwq-a.d.cts.map → utils-yxWhi9hG.d.cts.map} +1 -1
- package/dist/version-BaA5pxTW.js +6 -0
- package/dist/{version-6dHij-Gk.js.map → version-BaA5pxTW.js.map} +1 -1
- package/dist/{version-Cq6vA9Kc.cjs → version-CdN5Kpjv.cjs} +2 -2
- package/dist/{version-Cq6vA9Kc.cjs.map → version-CdN5Kpjv.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -8
- package/dist/callEmbeddedAgent-B_BMEB_u.js.map +0 -1
- package/dist/callEmbeddedAgent-BaGxBAdM.cjs.map +0 -1
- package/dist/context-storage-B8onP4Pw.cjs +0 -69
- package/dist/context-storage-B8onP4Pw.cjs.map +0 -1
- package/dist/context-storage-BRwdNVKx.js +0 -51
- package/dist/context-storage-BRwdNVKx.js.map +0 -1
- package/dist/get-issue-details-Bvw1Xi8I.js.map +0 -1
- package/dist/get-issue-details-DTQ-jXyu.cjs.map +0 -1
- package/dist/internal/agents/callEmbeddedAgent.d.cts.map +0 -1
- package/dist/internal/agents/callEmbeddedAgent.d.ts.map +0 -1
- package/dist/internal/context-storage.cjs +0 -5
- package/dist/internal/context-storage.d.cts +0 -48
- package/dist/internal/context-storage.d.cts.map +0 -1
- package/dist/internal/context-storage.d.ts +0 -48
- package/dist/internal/context-storage.d.ts.map +0 -1
- package/dist/internal/context-storage.js +0 -3
- package/dist/openai-provider-BELCfis6.js.map +0 -1
- package/dist/openai-provider-CRxXeC9G.cjs.map +0 -1
- package/dist/parse-8lpnm_2Z.js.map +0 -1
- package/dist/parse-shlhKlaL.cjs.map +0 -1
- package/dist/sentry-DZNWcvcy.d.ts.map +0 -1
- package/dist/sentry-De4G2HDR.d.cts.map +0 -1
- package/dist/server-B0jJJdAd.js +0 -157
- package/dist/server-B0jJJdAd.js.map +0 -1
- package/dist/server-Bk2YVj60.cjs +0 -163
- package/dist/server-Bk2YVj60.cjs.map +0 -1
- package/dist/stdio-D_myxOG-.cjs.map +0 -1
- package/dist/stdio-Uv0oXx1a.js.map +0 -1
- package/dist/tools-DcCN34Xz.cjs +0 -51
- package/dist/tools-DcCN34Xz.cjs.map +0 -1
- package/dist/tools-Du5wLts3.js +0 -46
- package/dist/tools-Du5wLts3.js.map +0 -1
- package/dist/types-B9_8hSal.d.cts.map +0 -1
- package/dist/types-BU11bcu2.d.ts.map +0 -1
- package/dist/usage-CP6e39yF.cjs.map +0 -1
- package/dist/usage-CihInDyq.js.map +0 -1
- package/dist/version-6dHij-Gk.js +0 -6
- /package/dist/{index-DZJ9s9rm.d.ts → index-NfFbnYt3.d.ts} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "../../constants-BPM_OWt0.js";
|
|
2
|
+
import "../../errors-D_R568zP.js";
|
|
3
|
+
import "../../define-2Lj8Lm1t.js";
|
|
4
|
+
import "../../url-utils-d9bPTnOl.js";
|
|
5
|
+
import "../../logging-DqqDTe02.js";
|
|
6
|
+
import "../../schema-CuB-30t5.js";
|
|
7
|
+
import "../../errors-CQZ-QlOB.js";
|
|
8
|
+
import "../../client-CWgvrDHH.js";
|
|
9
|
+
import "../../types-Bx1EKe0v.js";
|
|
10
|
+
import "../../api-client-BR5WolLe.js";
|
|
11
|
+
import "../../validate-region-url-CaR6XWB_.js";
|
|
12
|
+
import "../../api-CkLTFexT.js";
|
|
13
|
+
import "../../whoami-Bh_uOPqO.js";
|
|
14
|
+
import "../../slug-validation-58wajHeL.js";
|
|
15
|
+
import "../../schema-rwexXWFL.js";
|
|
16
|
+
import "../../find-organizations-DxH9SS3w.js";
|
|
17
|
+
import "../../find-teams-D5770X0I.js";
|
|
18
|
+
import "../../find-projects-DOMBBYAP.js";
|
|
19
|
+
import "../../find-releases-CfZRMBvh.js";
|
|
20
|
+
import "../../issue-helpers-8Bubch8E.js";
|
|
21
|
+
import "../../seer-CderEQ-X.js";
|
|
22
|
+
import "../../formatting-DytLf-hH.js";
|
|
23
|
+
import "../../issue-BLm6gohl.js";
|
|
24
|
+
import "../../enhance-error-D3QfZOhm.js";
|
|
25
|
+
import "../../get-issue-details-CucQ2nf7.js";
|
|
26
|
+
import "../../get-trace-details-BL5_jvgs.js";
|
|
27
|
+
import "../../get-event-attachment-B_BzSfcE.js";
|
|
28
|
+
import "../../formatting-CAQbf0su.js";
|
|
29
|
+
import "../../update-issue-CoAkoO66.js";
|
|
30
|
+
import "../../openai-provider-CqpHDwSr.js";
|
|
31
|
+
import "../../callEmbeddedAgent-BSnzLPfW.js";
|
|
32
|
+
import "../../utils-iC0Uutcf.js";
|
|
33
|
+
import "../../otel-semantics-CArUzarp.js";
|
|
34
|
+
import "../../whoami-D8-XCgVJ.js";
|
|
35
|
+
import "../../utils-CwvZS30K.js";
|
|
36
|
+
import "../../config-DlhHLHjD.js";
|
|
37
|
+
import "../../agent-FoPk5psd.js";
|
|
38
|
+
import "../../formatters-B9XiCNZ_.js";
|
|
39
|
+
import "../../handler-B3-dKrMX.js";
|
|
40
|
+
import "../../search-events-Bo5bAsOv.js";
|
|
41
|
+
import "../../create-team-BQIns3VD.js";
|
|
42
|
+
import "../../create-project-C0pm6zUK.js";
|
|
43
|
+
import "../../update-project-CuZlyBPN.js";
|
|
44
|
+
import "../../create-dsn-Bx2s8Bik.js";
|
|
45
|
+
import "../../find-dsns-BPN8wnUr.js";
|
|
46
|
+
import "../../fetch-utils-BetJhSli.js";
|
|
47
|
+
import "../../analyze-issue-with-seer-DvuKEcbu.js";
|
|
48
|
+
import "../../search-docs-B9qNTw49.js";
|
|
49
|
+
import "../../get-doc-D9Xq7et9.js";
|
|
50
|
+
import "../../dataset-fields-C1o_cZrM.js";
|
|
51
|
+
import "../../config-BMC-126h.js";
|
|
52
|
+
import "../../agent-CRc61dcC.js";
|
|
53
|
+
import "../../formatters-MEWHZ83Y.js";
|
|
54
|
+
import "../../handler-JBRPTNfu.js";
|
|
55
|
+
import "../../search-issues-DVHuKDdB.js";
|
|
56
|
+
import "../../config-CTRUv0J3.js";
|
|
57
|
+
import { useSentryAgent } from "../../agent-tLRcGXXr.js";
|
|
58
|
+
import { handler_default } from "../../server-CDG3HfVV.js";
|
|
59
|
+
import "../../error-handling-D_4c-JgK.js";
|
|
60
|
+
import "../../version-BaA5pxTW.js";
|
|
61
|
+
import "../../permissions-xBjHy6Qx.js";
|
|
62
|
+
import "../../constraint-helpers-0jgp7p3K.js";
|
|
63
|
+
|
|
64
|
+
export { handler_default as default, useSentryAgent };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const require_chunk = require('../../chunk-DWy1uDak.cjs');
|
|
2
|
+
require('../../errors-BtJEw2Z-.cjs');
|
|
3
|
+
require('../../url-utils-Bn5EoScr.cjs');
|
|
4
|
+
require('../../logging-CkAJKyq2.cjs');
|
|
5
|
+
require('../../schema-DoWJbcHt.cjs');
|
|
6
|
+
require('../../errors-Bmqdg5Q6.cjs');
|
|
7
|
+
require('../../client-C2TwbSm-.cjs');
|
|
8
|
+
require('../../types-D10T4PdD.cjs');
|
|
9
|
+
require('../../api-client-BsHWi0-I.cjs');
|
|
10
|
+
const require_utils = require('../../utils-DUJcA3eH.cjs');
|
|
11
|
+
const zod = require_chunk.__toESM(require("zod"));
|
|
12
|
+
|
|
13
|
+
//#region src/tools/use-sentry/tool-wrapper.ts
|
|
14
|
+
/**
|
|
15
|
+
* Helper to inject constrained parameters into tool calls.
|
|
16
|
+
* This applies session-level constraints (org, project, region) to tool parameters.
|
|
17
|
+
*/
|
|
18
|
+
function injectConstrainedParams(params, constraints) {
|
|
19
|
+
const result = { ...params };
|
|
20
|
+
if (constraints.organizationSlug && !result.organizationSlug) result.organizationSlug = constraints.organizationSlug;
|
|
21
|
+
if (constraints.projectSlug) {
|
|
22
|
+
if (!result.projectSlug) result.projectSlug = constraints.projectSlug;
|
|
23
|
+
if (!result.projectSlugOrId) result.projectSlugOrId = constraints.projectSlug;
|
|
24
|
+
}
|
|
25
|
+
if (constraints.regionUrl && !result.regionUrl) result.regionUrl = constraints.regionUrl;
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Wraps any MCP tool to work with the embedded agent pattern.
|
|
30
|
+
*
|
|
31
|
+
* This function:
|
|
32
|
+
* 1. Takes a tool definition with its handler
|
|
33
|
+
* 2. Creates an agentTool-wrapped version
|
|
34
|
+
* 3. Pre-binds ServerContext so the agent doesn't need it
|
|
35
|
+
* 4. Applies session constraints automatically
|
|
36
|
+
* 5. Handles errors via agentTool's error handling
|
|
37
|
+
*
|
|
38
|
+
* @param tool - The MCP tool to wrap (from defineTool)
|
|
39
|
+
* @param options - Context and configuration for the tool
|
|
40
|
+
* @returns An agentTool-wrapped version ready for use by the embedded agent
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const whoami = wrapToolForAgent(whoamiTool, { context });
|
|
45
|
+
* const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
function wrapToolForAgent(tool, options) {
|
|
49
|
+
return require_utils.agentTool({
|
|
50
|
+
description: tool.description,
|
|
51
|
+
parameters: zod.z.object(tool.inputSchema),
|
|
52
|
+
execute: async (params) => {
|
|
53
|
+
const fullParams = injectConstrainedParams(params, options.context.constraints);
|
|
54
|
+
const result = await tool.handler(fullParams, options.context);
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
exports.wrapToolForAgent = wrapToolForAgent;
|
|
62
|
+
//# sourceMappingURL=tool-wrapper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-wrapper.cjs","names":["params: Record<string, any>","constraints: ServerContext[\"constraints\"]","tool: ToolConfig<TSchema>","options: WrapToolOptions","params: unknown"],"sources":["../../../src/tools/use-sentry/tool-wrapper.ts"],"sourcesContent":["/**\n * Generic tool wrapper for the use_sentry embedded agent.\n *\n * Provides a single function that can wrap ANY MCP tool handler\n * to work with the embedded agent pattern.\n */\n\nimport { z } from \"zod\";\nimport { agentTool } from \"../../internal/agents/tools/utils\";\nimport type { ServerContext } from \"../../types\";\nimport type { ToolConfig } from \"../types\";\n\n/**\n * Options for wrapping a tool\n */\nexport interface WrapToolOptions {\n context: ServerContext;\n}\n\n/**\n * Helper to inject constrained parameters into tool calls.\n * This applies session-level constraints (org, project, region) to tool parameters.\n */\nfunction injectConstrainedParams(\n params: Record<string, any>,\n constraints: ServerContext[\"constraints\"],\n): Record<string, any> {\n const result = { ...params };\n\n // Apply organization constraint if set\n if (constraints.organizationSlug && !result.organizationSlug) {\n result.organizationSlug = constraints.organizationSlug;\n }\n\n // Apply project constraint (handle both projectSlug and projectSlugOrId)\n if (constraints.projectSlug) {\n if (!result.projectSlug) {\n result.projectSlug = constraints.projectSlug;\n }\n if (!result.projectSlugOrId) {\n result.projectSlugOrId = constraints.projectSlug;\n }\n }\n\n // Apply region constraint if set\n if (constraints.regionUrl && !result.regionUrl) {\n result.regionUrl = constraints.regionUrl;\n }\n\n return result;\n}\n\n/**\n * Wraps any MCP tool to work with the embedded agent pattern.\n *\n * This function:\n * 1. Takes a tool definition with its handler\n * 2. Creates an agentTool-wrapped version\n * 3. Pre-binds ServerContext so the agent doesn't need it\n * 4. Applies session constraints automatically\n * 5. Handles errors via agentTool's error handling\n *\n * @param tool - The MCP tool to wrap (from defineTool)\n * @param options - Context and configuration for the tool\n * @returns An agentTool-wrapped version ready for use by the embedded agent\n *\n * @example\n * ```typescript\n * const whoami = wrapToolForAgent(whoamiTool, { context });\n * const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });\n * ```\n */\nexport function wrapToolForAgent<TSchema extends Record<string, z.ZodType>>(\n tool: ToolConfig<TSchema>,\n options: WrapToolOptions,\n) {\n return agentTool({\n description: tool.description,\n parameters: z.object(tool.inputSchema),\n execute: async (params: unknown) => {\n // Type safety: params is validated by agentTool's Zod schema before reaching here\n const fullParams = injectConstrainedParams(\n params as Record<string, unknown>,\n options.context.constraints,\n );\n\n // Call the actual tool handler with full context\n // Type assertion is safe: fullParams matches the tool's input schema (enforced by Zod)\n const result = await tool.handler(fullParams as never, options.context);\n\n // Return the result - agentTool handles error wrapping\n return result;\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAS,wBACPA,QACAC,aACqB;CACrB,MAAM,SAAS,EAAE,GAAG,OAAQ;AAG5B,KAAI,YAAY,qBAAqB,OAAO,iBAC1C,QAAO,mBAAmB,YAAY;AAIxC,KAAI,YAAY,aAAa;AAC3B,OAAK,OAAO,YACV,QAAO,cAAc,YAAY;AAEnC,OAAK,OAAO,gBACV,QAAO,kBAAkB,YAAY;CAExC;AAGD,KAAI,YAAY,cAAc,OAAO,UACnC,QAAO,YAAY,YAAY;AAGjC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;AAsBD,SAAgB,iBACdC,MACAC,SACA;AACA,QAAO,wBAAU;EACf,aAAa,KAAK;EAClB,YAAY,MAAE,OAAO,KAAK,YAAY;EACtC,SAAS,OAAOC,WAAoB;GAElC,MAAM,aAAa,wBACjB,QACA,QAAQ,QAAQ,YACjB;GAID,MAAM,SAAS,MAAM,KAAK,QAAQ,YAAqB,QAAQ,QAAQ;AAGvE,UAAO;EACR;CACF,EAAC;AACH"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import "../../permissions-B1meXGie.cjs";
|
|
2
|
+
import { AgentToolResponse } from "../../utils-yxWhi9hG.cjs";
|
|
3
|
+
import { ServerContext } from "../../types-DNr8xzOR.cjs";
|
|
4
|
+
import { ToolConfig } from "../../types-BeQSPXek.cjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import * as ai269 from "ai";
|
|
7
|
+
|
|
8
|
+
//#region src/tools/use-sentry/tool-wrapper.d.ts
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Options for wrapping a tool
|
|
12
|
+
*/
|
|
13
|
+
interface WrapToolOptions {
|
|
14
|
+
context: ServerContext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Wraps any MCP tool to work with the embedded agent pattern.
|
|
18
|
+
*
|
|
19
|
+
* This function:
|
|
20
|
+
* 1. Takes a tool definition with its handler
|
|
21
|
+
* 2. Creates an agentTool-wrapped version
|
|
22
|
+
* 3. Pre-binds ServerContext so the agent doesn't need it
|
|
23
|
+
* 4. Applies session constraints automatically
|
|
24
|
+
* 5. Handles errors via agentTool's error handling
|
|
25
|
+
*
|
|
26
|
+
* @param tool - The MCP tool to wrap (from defineTool)
|
|
27
|
+
* @param options - Context and configuration for the tool
|
|
28
|
+
* @returns An agentTool-wrapped version ready for use by the embedded agent
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const whoami = wrapToolForAgent(whoamiTool, { context });
|
|
33
|
+
* const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare function wrapToolForAgent<TSchema extends Record<string, z.ZodType>>(tool: ToolConfig<TSchema>, options: WrapToolOptions): ai269.Tool<z.ZodType<z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never, z.ZodTypeDef, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never>, AgentToolResponse<string | ({
|
|
37
|
+
[x: string]: unknown;
|
|
38
|
+
type: "text";
|
|
39
|
+
text: string;
|
|
40
|
+
_meta?: {
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | {
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
type: "image";
|
|
46
|
+
data: string;
|
|
47
|
+
mimeType: string;
|
|
48
|
+
_meta?: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
} | undefined;
|
|
51
|
+
} | {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
type: "resource";
|
|
54
|
+
resource: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
uri: string;
|
|
57
|
+
text: string;
|
|
58
|
+
_meta?: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
} | undefined;
|
|
61
|
+
mimeType?: string | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
uri: string;
|
|
65
|
+
blob: string;
|
|
66
|
+
_meta?: {
|
|
67
|
+
[x: string]: unknown;
|
|
68
|
+
} | undefined;
|
|
69
|
+
mimeType?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
_meta?: {
|
|
72
|
+
[x: string]: unknown;
|
|
73
|
+
} | undefined;
|
|
74
|
+
})[]>> & {
|
|
75
|
+
execute: (args: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T_2 ? { [k in keyof T_2]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never, options: ai269.ToolExecutionOptions) => PromiseLike<AgentToolResponse<string | ({
|
|
76
|
+
[x: string]: unknown;
|
|
77
|
+
type: "text";
|
|
78
|
+
text: string;
|
|
79
|
+
_meta?: {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
} | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
type: "image";
|
|
85
|
+
data: string;
|
|
86
|
+
mimeType: string;
|
|
87
|
+
_meta?: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
} | undefined;
|
|
90
|
+
} | {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
type: "resource";
|
|
93
|
+
resource: {
|
|
94
|
+
[x: string]: unknown;
|
|
95
|
+
uri: string;
|
|
96
|
+
text: string;
|
|
97
|
+
_meta?: {
|
|
98
|
+
[x: string]: unknown;
|
|
99
|
+
} | undefined;
|
|
100
|
+
mimeType?: string | undefined;
|
|
101
|
+
} | {
|
|
102
|
+
[x: string]: unknown;
|
|
103
|
+
uri: string;
|
|
104
|
+
blob: string;
|
|
105
|
+
_meta?: {
|
|
106
|
+
[x: string]: unknown;
|
|
107
|
+
} | undefined;
|
|
108
|
+
mimeType?: string | undefined;
|
|
109
|
+
};
|
|
110
|
+
_meta?: {
|
|
111
|
+
[x: string]: unknown;
|
|
112
|
+
} | undefined;
|
|
113
|
+
})[]>>;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=tool-wrapper.d.ts.map
|
|
116
|
+
//#endregion
|
|
117
|
+
export { WrapToolOptions, wrapToolForAgent };
|
|
118
|
+
//# sourceMappingURL=tool-wrapper.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-wrapper.d.cts","names":[],"sources":["../../../src/tools/use-sentry/tool-wrapper.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAwEA;;;AAAiD,UAzDhC,eAAA,CAyDgC;EAAM,OACpC,EAzDR,aAyDQ;;;;;;;;;;;;;;;;;;;;;;AACO,iBAFV,gBAEU,CAAA,gBAFuB,MAEvB,CAAA,MAAA,EAFsC,CAAA,CAAE,OAExC,CAAA,CAAA,CAAA,IAAA,EADlB,UACkB,CADP,OACO,CAAA,EAAA,OAAA,EAAf,eAAe,CAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,SAAA,KAAA,EAAA,GAAA,QAAA,MAAA,CAAA,GAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,KAAA,EAAA,CAAA,CAAA,UAAA,EAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,SAAA,KAAA,IAAA,GAAA,QAAA,MAAA,GAAA,GAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,KAAA,CAAA,EAAA,iBAAA,CAAA,MAAA,GAAA,CAAA;EAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAAA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import "../../permissions-BBgPgD70.js";
|
|
2
|
+
import { AgentToolResponse } from "../../utils-BV58GdRy.js";
|
|
3
|
+
import { ServerContext } from "../../types-DjbiyvLT.js";
|
|
4
|
+
import { ToolConfig } from "../../types-Bu5blaB3.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import * as ai266 from "ai";
|
|
7
|
+
|
|
8
|
+
//#region src/tools/use-sentry/tool-wrapper.d.ts
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Options for wrapping a tool
|
|
12
|
+
*/
|
|
13
|
+
interface WrapToolOptions {
|
|
14
|
+
context: ServerContext;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Wraps any MCP tool to work with the embedded agent pattern.
|
|
18
|
+
*
|
|
19
|
+
* This function:
|
|
20
|
+
* 1. Takes a tool definition with its handler
|
|
21
|
+
* 2. Creates an agentTool-wrapped version
|
|
22
|
+
* 3. Pre-binds ServerContext so the agent doesn't need it
|
|
23
|
+
* 4. Applies session constraints automatically
|
|
24
|
+
* 5. Handles errors via agentTool's error handling
|
|
25
|
+
*
|
|
26
|
+
* @param tool - The MCP tool to wrap (from defineTool)
|
|
27
|
+
* @param options - Context and configuration for the tool
|
|
28
|
+
* @returns An agentTool-wrapped version ready for use by the embedded agent
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const whoami = wrapToolForAgent(whoamiTool, { context });
|
|
33
|
+
* const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare function wrapToolForAgent<TSchema extends Record<string, z.ZodType>>(tool: ToolConfig<TSchema>, options: WrapToolOptions): ai266.Tool<z.ZodType<z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never, z.ZodTypeDef, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never>, AgentToolResponse<string | ({
|
|
37
|
+
[x: string]: unknown;
|
|
38
|
+
type: "text";
|
|
39
|
+
text: string;
|
|
40
|
+
_meta?: {
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | {
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
type: "image";
|
|
46
|
+
data: string;
|
|
47
|
+
mimeType: string;
|
|
48
|
+
_meta?: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
} | undefined;
|
|
51
|
+
} | {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
type: "resource";
|
|
54
|
+
resource: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
uri: string;
|
|
57
|
+
text: string;
|
|
58
|
+
_meta?: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
} | undefined;
|
|
61
|
+
mimeType?: string | undefined;
|
|
62
|
+
} | {
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
uri: string;
|
|
65
|
+
blob: string;
|
|
66
|
+
_meta?: {
|
|
67
|
+
[x: string]: unknown;
|
|
68
|
+
} | undefined;
|
|
69
|
+
mimeType?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
_meta?: {
|
|
72
|
+
[x: string]: unknown;
|
|
73
|
+
} | undefined;
|
|
74
|
+
})[]>> & {
|
|
75
|
+
execute: (args: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any> extends infer T_2 ? { [k in keyof T_2]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<TSchema>, any>[k] } : never, options: ai266.ToolExecutionOptions) => PromiseLike<AgentToolResponse<string | ({
|
|
76
|
+
[x: string]: unknown;
|
|
77
|
+
type: "text";
|
|
78
|
+
text: string;
|
|
79
|
+
_meta?: {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
} | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
type: "image";
|
|
85
|
+
data: string;
|
|
86
|
+
mimeType: string;
|
|
87
|
+
_meta?: {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
} | undefined;
|
|
90
|
+
} | {
|
|
91
|
+
[x: string]: unknown;
|
|
92
|
+
type: "resource";
|
|
93
|
+
resource: {
|
|
94
|
+
[x: string]: unknown;
|
|
95
|
+
uri: string;
|
|
96
|
+
text: string;
|
|
97
|
+
_meta?: {
|
|
98
|
+
[x: string]: unknown;
|
|
99
|
+
} | undefined;
|
|
100
|
+
mimeType?: string | undefined;
|
|
101
|
+
} | {
|
|
102
|
+
[x: string]: unknown;
|
|
103
|
+
uri: string;
|
|
104
|
+
blob: string;
|
|
105
|
+
_meta?: {
|
|
106
|
+
[x: string]: unknown;
|
|
107
|
+
} | undefined;
|
|
108
|
+
mimeType?: string | undefined;
|
|
109
|
+
};
|
|
110
|
+
_meta?: {
|
|
111
|
+
[x: string]: unknown;
|
|
112
|
+
} | undefined;
|
|
113
|
+
})[]>>;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=tool-wrapper.d.ts.map
|
|
116
|
+
//#endregion
|
|
117
|
+
export { WrapToolOptions, wrapToolForAgent };
|
|
118
|
+
//# sourceMappingURL=tool-wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-wrapper.d.ts","names":[],"sources":["../../../src/tools/use-sentry/tool-wrapper.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAwEA;;;AAAiD,UAzDhC,eAAA,CAyDgC;EAAM,OACpC,EAzDR,aAyDQ;;;;;;;;;;;;;;;;;;;;;;AACO,iBAFV,gBAEU,CAAA,gBAFuB,MAEvB,CAAA,MAAA,EAFsC,CAAA,CAAE,OAExC,CAAA,CAAA,CAAA,IAAA,EADlB,UACkB,CADP,OACO,CAAA,EAAA,OAAA,EAAf,eAAe,CAAA,EAAA,KAAA,CAAA,IAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,SAAA,KAAA,EAAA,GAAA,QAAA,MAAA,CAAA,GAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,KAAA,EAAA,CAAA,CAAA,UAAA,EAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,SAAA,KAAA,IAAA,GAAA,QAAA,MAAA,GAAA,GAAA,CAAA,CAAA,UAAA,CAAA,gBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,KAAA,CAAA,EAAA,iBAAA,CAAA,MAAA,GAAA,CAAA;EAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "../../errors-D_R568zP.js";
|
|
2
|
+
import "../../url-utils-d9bPTnOl.js";
|
|
3
|
+
import "../../logging-DqqDTe02.js";
|
|
4
|
+
import "../../schema-CuB-30t5.js";
|
|
5
|
+
import "../../errors-CQZ-QlOB.js";
|
|
6
|
+
import "../../client-CWgvrDHH.js";
|
|
7
|
+
import "../../types-Bx1EKe0v.js";
|
|
8
|
+
import "../../api-client-BR5WolLe.js";
|
|
9
|
+
import { agentTool } from "../../utils-iC0Uutcf.js";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
|
|
12
|
+
//#region src/tools/use-sentry/tool-wrapper.ts
|
|
13
|
+
/**
|
|
14
|
+
* Helper to inject constrained parameters into tool calls.
|
|
15
|
+
* This applies session-level constraints (org, project, region) to tool parameters.
|
|
16
|
+
*/
|
|
17
|
+
function injectConstrainedParams(params, constraints) {
|
|
18
|
+
const result = { ...params };
|
|
19
|
+
if (constraints.organizationSlug && !result.organizationSlug) result.organizationSlug = constraints.organizationSlug;
|
|
20
|
+
if (constraints.projectSlug) {
|
|
21
|
+
if (!result.projectSlug) result.projectSlug = constraints.projectSlug;
|
|
22
|
+
if (!result.projectSlugOrId) result.projectSlugOrId = constraints.projectSlug;
|
|
23
|
+
}
|
|
24
|
+
if (constraints.regionUrl && !result.regionUrl) result.regionUrl = constraints.regionUrl;
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wraps any MCP tool to work with the embedded agent pattern.
|
|
29
|
+
*
|
|
30
|
+
* This function:
|
|
31
|
+
* 1. Takes a tool definition with its handler
|
|
32
|
+
* 2. Creates an agentTool-wrapped version
|
|
33
|
+
* 3. Pre-binds ServerContext so the agent doesn't need it
|
|
34
|
+
* 4. Applies session constraints automatically
|
|
35
|
+
* 5. Handles errors via agentTool's error handling
|
|
36
|
+
*
|
|
37
|
+
* @param tool - The MCP tool to wrap (from defineTool)
|
|
38
|
+
* @param options - Context and configuration for the tool
|
|
39
|
+
* @returns An agentTool-wrapped version ready for use by the embedded agent
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const whoami = wrapToolForAgent(whoamiTool, { context });
|
|
44
|
+
* const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
function wrapToolForAgent(tool, options) {
|
|
48
|
+
return agentTool({
|
|
49
|
+
description: tool.description,
|
|
50
|
+
parameters: z.object(tool.inputSchema),
|
|
51
|
+
execute: async (params) => {
|
|
52
|
+
const fullParams = injectConstrainedParams(params, options.context.constraints);
|
|
53
|
+
const result = await tool.handler(fullParams, options.context);
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { wrapToolForAgent };
|
|
61
|
+
//# sourceMappingURL=tool-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-wrapper.js","names":["params: Record<string, any>","constraints: ServerContext[\"constraints\"]","tool: ToolConfig<TSchema>","options: WrapToolOptions","params: unknown"],"sources":["../../../src/tools/use-sentry/tool-wrapper.ts"],"sourcesContent":["/**\n * Generic tool wrapper for the use_sentry embedded agent.\n *\n * Provides a single function that can wrap ANY MCP tool handler\n * to work with the embedded agent pattern.\n */\n\nimport { z } from \"zod\";\nimport { agentTool } from \"../../internal/agents/tools/utils\";\nimport type { ServerContext } from \"../../types\";\nimport type { ToolConfig } from \"../types\";\n\n/**\n * Options for wrapping a tool\n */\nexport interface WrapToolOptions {\n context: ServerContext;\n}\n\n/**\n * Helper to inject constrained parameters into tool calls.\n * This applies session-level constraints (org, project, region) to tool parameters.\n */\nfunction injectConstrainedParams(\n params: Record<string, any>,\n constraints: ServerContext[\"constraints\"],\n): Record<string, any> {\n const result = { ...params };\n\n // Apply organization constraint if set\n if (constraints.organizationSlug && !result.organizationSlug) {\n result.organizationSlug = constraints.organizationSlug;\n }\n\n // Apply project constraint (handle both projectSlug and projectSlugOrId)\n if (constraints.projectSlug) {\n if (!result.projectSlug) {\n result.projectSlug = constraints.projectSlug;\n }\n if (!result.projectSlugOrId) {\n result.projectSlugOrId = constraints.projectSlug;\n }\n }\n\n // Apply region constraint if set\n if (constraints.regionUrl && !result.regionUrl) {\n result.regionUrl = constraints.regionUrl;\n }\n\n return result;\n}\n\n/**\n * Wraps any MCP tool to work with the embedded agent pattern.\n *\n * This function:\n * 1. Takes a tool definition with its handler\n * 2. Creates an agentTool-wrapped version\n * 3. Pre-binds ServerContext so the agent doesn't need it\n * 4. Applies session constraints automatically\n * 5. Handles errors via agentTool's error handling\n *\n * @param tool - The MCP tool to wrap (from defineTool)\n * @param options - Context and configuration for the tool\n * @returns An agentTool-wrapped version ready for use by the embedded agent\n *\n * @example\n * ```typescript\n * const whoami = wrapToolForAgent(whoamiTool, { context });\n * const findOrgs = wrapToolForAgent(findOrganizationsTool, { context });\n * ```\n */\nexport function wrapToolForAgent<TSchema extends Record<string, z.ZodType>>(\n tool: ToolConfig<TSchema>,\n options: WrapToolOptions,\n) {\n return agentTool({\n description: tool.description,\n parameters: z.object(tool.inputSchema),\n execute: async (params: unknown) => {\n // Type safety: params is validated by agentTool's Zod schema before reaching here\n const fullParams = injectConstrainedParams(\n params as Record<string, unknown>,\n options.context.constraints,\n );\n\n // Call the actual tool handler with full context\n // Type assertion is safe: fullParams matches the tool's input schema (enforced by Zod)\n const result = await tool.handler(fullParams as never, options.context);\n\n // Return the result - agentTool handles error wrapping\n return result;\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,SAAS,wBACPA,QACAC,aACqB;CACrB,MAAM,SAAS,EAAE,GAAG,OAAQ;AAG5B,KAAI,YAAY,qBAAqB,OAAO,iBAC1C,QAAO,mBAAmB,YAAY;AAIxC,KAAI,YAAY,aAAa;AAC3B,OAAK,OAAO,YACV,QAAO,cAAc,YAAY;AAEnC,OAAK,OAAO,gBACV,QAAO,kBAAkB,YAAY;CAExC;AAGD,KAAI,YAAY,cAAc,OAAO,UACnC,QAAO,YAAY,YAAY;AAGjC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;AAsBD,SAAgB,iBACdC,MACAC,SACA;AACA,QAAO,UAAU;EACf,aAAa,KAAK;EAClB,YAAY,EAAE,OAAO,KAAK,YAAY;EACtC,SAAS,OAAOC,WAAoB;GAElC,MAAM,aAAa,wBACjB,QACA,QAAQ,QAAQ,YACjB;GAID,MAAM,SAAS,MAAM,KAAK,QAAQ,YAAqB,QAAQ,QAAQ;AAGvE,UAAO;EACR;CACF,EAAC;AACH"}
|
package/dist/tools/whoami.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../permissions-B1meXGie.cjs";
|
|
2
|
-
import "../types-
|
|
3
|
-
import { ToolConfig } from "../types-
|
|
2
|
+
import "../types-DNr8xzOR.cjs";
|
|
3
|
+
import { ToolConfig } from "../types-BeQSPXek.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/tools/whoami.d.ts
|
|
6
6
|
declare const _default: ToolConfig<{}>;
|
package/dist/tools/whoami.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../permissions-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { ToolConfig } from "../types-
|
|
1
|
+
import "../permissions-BBgPgD70.js";
|
|
2
|
+
import "../types-DjbiyvLT.js";
|
|
3
|
+
import { ToolConfig } from "../types-Bu5blaB3.js";
|
|
4
4
|
|
|
5
5
|
//#region src/tools/whoami.d.ts
|
|
6
6
|
declare const _default: ToolConfig<{}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
require('../version-
|
|
2
|
-
require('../
|
|
3
|
-
const require_stdio = require('../stdio-D_myxOG-.cjs');
|
|
1
|
+
require('../version-CdN5Kpjv.cjs');
|
|
2
|
+
const require_stdio = require('../stdio-CV8Yynj8.cjs');
|
|
4
3
|
|
|
5
4
|
exports.startStdio = require_stdio.startStdio;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../permissions-B1meXGie.cjs";
|
|
2
|
-
import { ServerContext } from "../types-
|
|
2
|
+
import { ServerContext } from "../types-DNr8xzOR.cjs";
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
|
|
5
5
|
//#region src/transports/stdio.d.ts
|
|
@@ -7,27 +7,28 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Starts the MCP server with stdio transport and telemetry.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* wrapped in Sentry tracing for observability.
|
|
10
|
+
* Connects the server using stdio transport for process-based communication.
|
|
11
|
+
* Context is already captured in tool handler closures during buildServer().
|
|
12
|
+
* All operations are wrapped in Sentry tracing for observability.
|
|
13
13
|
*
|
|
14
|
-
* @param server - Configured and instrumented MCP server instance
|
|
15
|
-
* @param context - Server context with authentication and configuration
|
|
14
|
+
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
15
|
+
* @param context - Server context with authentication and configuration (for telemetry attributes)
|
|
16
16
|
*
|
|
17
17
|
* @example CLI Integration
|
|
18
18
|
* ```typescript
|
|
19
19
|
* import { buildServer } from "./server.js";
|
|
20
20
|
* import { startStdio } from "./transports/stdio.js";
|
|
21
21
|
*
|
|
22
|
-
* const
|
|
23
|
-
*
|
|
24
|
-
* await startStdio(server, {
|
|
22
|
+
* const context = {
|
|
25
23
|
* accessToken: userToken,
|
|
26
24
|
* sentryHost: "sentry.io",
|
|
27
25
|
* userId: "user-123",
|
|
28
26
|
* clientId: "cursor-ide",
|
|
29
27
|
* constraints: {}
|
|
30
|
-
* }
|
|
28
|
+
* };
|
|
29
|
+
*
|
|
30
|
+
* const server = buildServer({ context }); // Context captured in closures
|
|
31
|
+
* await startStdio(server, context);
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
34
|
declare function startStdio(server: McpServer, context: ServerContext): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.cts","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqDA;;;;;AAA0E
|
|
1
|
+
{"version":3,"file":"stdio.d.cts","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqDA;;;;;AAA0E;;;;;;;;;;;;;;;;;;;iBAApD,UAAA,SAAmB,oBAAoB,gBAAa"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../permissions-
|
|
2
|
-
import { ServerContext } from "../types-
|
|
1
|
+
import "../permissions-BBgPgD70.js";
|
|
2
|
+
import { ServerContext } from "../types-DjbiyvLT.js";
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
|
|
5
5
|
//#region src/transports/stdio.d.ts
|
|
@@ -7,27 +7,28 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Starts the MCP server with stdio transport and telemetry.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* wrapped in Sentry tracing for observability.
|
|
10
|
+
* Connects the server using stdio transport for process-based communication.
|
|
11
|
+
* Context is already captured in tool handler closures during buildServer().
|
|
12
|
+
* All operations are wrapped in Sentry tracing for observability.
|
|
13
13
|
*
|
|
14
|
-
* @param server - Configured and instrumented MCP server instance
|
|
15
|
-
* @param context - Server context with authentication and configuration
|
|
14
|
+
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
15
|
+
* @param context - Server context with authentication and configuration (for telemetry attributes)
|
|
16
16
|
*
|
|
17
17
|
* @example CLI Integration
|
|
18
18
|
* ```typescript
|
|
19
19
|
* import { buildServer } from "./server.js";
|
|
20
20
|
* import { startStdio } from "./transports/stdio.js";
|
|
21
21
|
*
|
|
22
|
-
* const
|
|
23
|
-
*
|
|
24
|
-
* await startStdio(server, {
|
|
22
|
+
* const context = {
|
|
25
23
|
* accessToken: userToken,
|
|
26
24
|
* sentryHost: "sentry.io",
|
|
27
25
|
* userId: "user-123",
|
|
28
26
|
* clientId: "cursor-ide",
|
|
29
27
|
* constraints: {}
|
|
30
|
-
* }
|
|
28
|
+
* };
|
|
29
|
+
*
|
|
30
|
+
* const server = buildServer({ context }); // Context captured in closures
|
|
31
|
+
* await startStdio(server, context);
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
34
|
declare function startStdio(server: McpServer, context: ServerContext): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqDA;;;;;AAA0E
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","names":[],"sources":["../../src/transports/stdio.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAqDA;;;;;AAA0E;;;;;;;;;;;;;;;;;;;iBAApD,UAAA,SAAmB,oBAAoB,gBAAa"}
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Scope } from "./permissions-
|
|
1
|
+
import { Scope } from "./permissions-BBgPgD70.js";
|
|
2
2
|
|
|
3
3
|
//#region src/cli/types.d.ts
|
|
4
4
|
type CliArgs = {
|
|
@@ -11,6 +11,7 @@ type CliArgs = {
|
|
|
11
11
|
scopes?: string;
|
|
12
12
|
addScopes?: string;
|
|
13
13
|
allScopes?: boolean;
|
|
14
|
+
agent?: boolean;
|
|
14
15
|
organizationSlug?: string;
|
|
15
16
|
projectSlug?: string;
|
|
16
17
|
help?: boolean;
|
|
@@ -36,6 +37,7 @@ type MergedArgs = {
|
|
|
36
37
|
scopes?: string;
|
|
37
38
|
addScopes?: string;
|
|
38
39
|
allScopes?: boolean;
|
|
40
|
+
agent?: boolean;
|
|
39
41
|
organizationSlug?: string;
|
|
40
42
|
projectSlug?: string;
|
|
41
43
|
help?: boolean;
|
|
@@ -55,4 +57,4 @@ type ResolvedConfig = {
|
|
|
55
57
|
//# sourceMappingURL=types.d.ts.map
|
|
56
58
|
//#endregion
|
|
57
59
|
export { CliArgs, EnvArgs, MergedArgs, ResolvedConfig };
|
|
58
|
-
//# sourceMappingURL=types-
|
|
60
|
+
//# sourceMappingURL=types-B3T3_E4s.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-B3T3_E4s.d.ts","names":[],"sources":["../src/cli/types.ts"],"sourcesContent":[],"mappings":";;;KAEY,OAAA;;EAAA,IAAA,CAAA,EAAA,MAAO;EAkBP,GAAA,CAAA,EAAA,MAAO;EAUP,MAAA,CAAA,EAAA,MAAU;EAkBV,SAAA,CAAA,EAAA,MAAc;EAAA,aAAA,CAAA,EAAA,MAAA;EAAA,MAMN,CAAA,EAAA,MAAA;EAAK,SAAT,CAAA,EAAA,MAAA;EAAG,SAAA,CAAA,EAAA,OAAA;;;;;;;;KAlCP,OAAA;;;;;;;;;KAUA,UAAA;;;;;;;;;;;;;;;;;KAkBA,cAAA;;;;;;gBAMI,IAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scope } from "./permissions-B1meXGie.cjs";
|
|
2
|
-
import { ServerContext } from "./types-
|
|
2
|
+
import { ServerContext } from "./types-DNr8xzOR.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { EmbeddedResource, ImageContent, TextContent } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
|
|
@@ -33,4 +33,4 @@ interface SearchResponse {
|
|
|
33
33
|
//# sourceMappingURL=types.d.ts.map
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SearchResponse, ToolConfig };
|
|
36
|
-
//# sourceMappingURL=types-
|
|
36
|
+
//# sourceMappingURL=types-BeQSPXek.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-BeQSPXek.d.cts","names":[],"sources":["../src/tools/types.ts"],"sourcesContent":[],"mappings":";;;;;;UASiB,2BACC,eAAe,CAAA,CAAE,WAAW,eAAe,CAAA,CAAE;;EAD9C,WAAA,EAAU,MAAA;EAAA,WAAA,EAKZ,OALY;EAAA,cACQ,EAKjB,KALiB,EAAA;EAAO,WAAxB,EAAA;IAA2C,YAAE,CAAA,EAAA,OAAA;IAAjB,eAAA,CAAA,EAAA,OAAA;IAI/B,cAAA,CAAA,EAAA,OAAA;IACG,aAAA,CAAA,EAAA,OAAA;EAAK,CAAA;EAQgB,OAAjB,EAAA,CAAA,MAAA,EAAV,CAAA,CAAE,KAAQ,CAAF,CAAA,CAAE,SAAA,CAAU,OAAV,CAAA,CAAA,EAAA,OAAA,EACT,aADS,EAAA,GAEf,OAFe,CAAA,MAAA,GAAA,CAEG,WAFH,GAEiB,YAFjB,GAEgC,gBAFhC,CAAA,EAAA,CAAA;;;;;AAEgC,UAMrC,cAAA,CANqC;EAAgB,KAA/D,EAAA,MAAA;EAAO,OAAA,EAQH,KARG,CAAA;IAMG,EAAA,EAAA,MAAA"}
|