@sentry/mcp-server 0.13.0 → 0.14.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 +15 -2
- package/dist/{analyze-issue-with-seer-Dk0ZFwN8.js → analyze-issue-with-seer-BsNarzJN.js} +2 -2
- package/dist/{analyze-issue-with-seer-Dk0ZFwN8.js.map → analyze-issue-with-seer-BsNarzJN.js.map} +1 -1
- package/dist/{analyze-issue-with-seer-Bq3kefOr.cjs → analyze-issue-with-seer-DbAWpyTC.cjs} +2 -2
- package/dist/{analyze-issue-with-seer-Bq3kefOr.cjs.map → analyze-issue-with-seer-DbAWpyTC.cjs.map} +1 -1
- package/dist/api-client/client.cjs +1 -1
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +1 -1
- package/dist/api-client/index.cjs +1 -1
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +1 -1
- 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/{api-utils-BcB1cMXS.js → api-utils-C6QJAzFL.js} +4 -4
- package/dist/api-utils-C6QJAzFL.js.map +1 -0
- package/dist/{api-utils-BJS0CChW.cjs → api-utils-d36iteNO.cjs} +4 -4
- package/dist/api-utils-d36iteNO.cjs.map +1 -0
- package/dist/{client-qyEu8fvj.d.ts → client-BCN17Wbp.d.ts} +18 -20
- package/dist/client-BCN17Wbp.d.ts.map +1 -0
- package/dist/{client-Dae1ZwWb.d.cts → client-CILwfx6G.d.cts} +20 -22
- package/dist/client-CILwfx6G.d.cts.map +1 -0
- package/dist/{client-BbamPqV4.js → client-DOYWNvVM.js} +21 -12
- package/dist/client-DOYWNvVM.js.map +1 -0
- package/dist/{client-BNTsOycD.cjs → client-Dkw5iYu3.cjs} +21 -12
- package/dist/client-Dkw5iYu3.cjs.map +1 -0
- package/dist/{create-dsn-B3L8iWno.js → create-dsn-CDcL2DLD.js} +2 -2
- package/dist/{create-dsn-B3L8iWno.js.map → create-dsn-CDcL2DLD.js.map} +1 -1
- package/dist/{create-dsn-CVPtt_Es.cjs → create-dsn-fESUtX3R.cjs} +2 -2
- package/dist/{create-dsn-CVPtt_Es.cjs.map → create-dsn-fESUtX3R.cjs.map} +1 -1
- package/dist/{create-project-B_6a6okf.cjs → create-project-Bg5uDkc4.cjs} +2 -2
- package/dist/{create-project-B_6a6okf.cjs.map → create-project-Bg5uDkc4.cjs.map} +1 -1
- package/dist/{create-project-DdIXMvWI.js → create-project-DY5mFznV.js} +2 -2
- package/dist/{create-project-DdIXMvWI.js.map → create-project-DY5mFznV.js.map} +1 -1
- package/dist/{create-team-C1DP5Z1r.cjs → create-team-5purh64V.cjs} +2 -2
- package/dist/{create-team-C1DP5Z1r.cjs.map → create-team-5purh64V.cjs.map} +1 -1
- package/dist/{create-team-BarRdaZK.js → create-team-C2R7EUC3.js} +2 -2
- package/dist/{create-team-BarRdaZK.js.map → create-team-C2R7EUC3.js.map} +1 -1
- package/dist/{fetch-utils-B-a92ObC.d.ts → fetch-utils-Bv9WjUp0.d.ts} +1 -1
- package/dist/fetch-utils-Bv9WjUp0.d.ts.map +1 -0
- package/dist/{find-dsns-BPbblgrn.js → find-dsns-CvfcLB9Z.js} +2 -2
- package/dist/{find-dsns-BPbblgrn.js.map → find-dsns-CvfcLB9Z.js.map} +1 -1
- package/dist/{find-dsns-BDJWY6nZ.cjs → find-dsns-ZZ-thiNk.cjs} +2 -2
- package/dist/{find-dsns-BDJWY6nZ.cjs.map → find-dsns-ZZ-thiNk.cjs.map} +1 -1
- package/dist/{find-errors-B9wLxXA0.js → find-errors-CuRm4PzL.js} +2 -2
- package/dist/{find-errors-B9wLxXA0.js.map → find-errors-CuRm4PzL.js.map} +1 -1
- package/dist/{find-errors-DnFs3PaH.cjs → find-errors-Drzv7hzM.cjs} +2 -2
- package/dist/{find-errors-DnFs3PaH.cjs.map → find-errors-Drzv7hzM.cjs.map} +1 -1
- package/dist/{find-issues-CwPbwRXK.cjs → find-issues-C3uk59rn.cjs} +2 -2
- package/dist/{find-issues-CwPbwRXK.cjs.map → find-issues-C3uk59rn.cjs.map} +1 -1
- package/dist/{find-issues-BI1tI3cJ.js → find-issues-CAtNGBly.js} +2 -2
- package/dist/{find-issues-BI1tI3cJ.js.map → find-issues-CAtNGBly.js.map} +1 -1
- package/dist/{find-organizations-DqS6zoTK.cjs → find-organizations-BrdMfZRO.cjs} +2 -2
- package/dist/{find-organizations-DqS6zoTK.cjs.map → find-organizations-BrdMfZRO.cjs.map} +1 -1
- package/dist/{find-organizations-CdiouW48.js → find-organizations-ojXwWWzk.js} +2 -2
- package/dist/{find-organizations-CdiouW48.js.map → find-organizations-ojXwWWzk.js.map} +1 -1
- package/dist/{find-projects-Ba6cdX7n.cjs → find-projects-BZWhlYJh.cjs} +2 -2
- package/dist/{find-projects-Ba6cdX7n.cjs.map → find-projects-BZWhlYJh.cjs.map} +1 -1
- package/dist/{find-projects-Ccfxv47h.js → find-projects-fcLG4KpT.js} +2 -2
- package/dist/{find-projects-Ccfxv47h.js.map → find-projects-fcLG4KpT.js.map} +1 -1
- package/dist/{find-releases-CFoGytN-.js → find-releases-BUozr0Z-.js} +2 -2
- package/dist/{find-releases-CFoGytN-.js.map → find-releases-BUozr0Z-.js.map} +1 -1
- package/dist/{find-releases-CFl86XMT.cjs → find-releases-CZCVEOHZ.cjs} +2 -2
- package/dist/{find-releases-CFl86XMT.cjs.map → find-releases-CZCVEOHZ.cjs.map} +1 -1
- package/dist/{find-tags-h2o0BKWO.cjs → find-tags-Byk4d3oZ.cjs} +2 -2
- package/dist/{find-tags-h2o0BKWO.cjs.map → find-tags-Byk4d3oZ.cjs.map} +1 -1
- package/dist/{find-tags-ORtYLH5b.js → find-tags-d-wF1Se8.js} +2 -2
- package/dist/{find-tags-ORtYLH5b.js.map → find-tags-d-wF1Se8.js.map} +1 -1
- package/dist/{find-teams-hreVp1nw.js → find-teams-BZ118EIK.js} +2 -2
- package/dist/{find-teams-hreVp1nw.js.map → find-teams-BZ118EIK.js.map} +1 -1
- package/dist/{find-teams-DUcDfSOl.cjs → find-teams-CnU5x9rQ.cjs} +2 -2
- package/dist/{find-teams-DUcDfSOl.cjs.map → find-teams-CnU5x9rQ.cjs.map} +1 -1
- package/dist/{find-transactions-BkPscam3.cjs → find-transactions-DIJ80wkd.cjs} +2 -2
- package/dist/{find-transactions-BkPscam3.cjs.map → find-transactions-DIJ80wkd.cjs.map} +1 -1
- package/dist/{find-transactions-BehUqQYs.js → find-transactions-DZCj81jP.js} +2 -2
- package/dist/{find-transactions-BehUqQYs.js.map → find-transactions-DZCj81jP.js.map} +1 -1
- package/dist/{formatting-Di1X9Jn3.d.cts → formatting-CHh9Q_OW.d.cts} +4 -4
- package/dist/{formatting-Di1X9Jn3.d.cts.map → formatting-CHh9Q_OW.d.cts.map} +1 -1
- package/dist/{formatting-B-u5CbYn.d.ts → formatting-kdIeURER.d.ts} +4 -4
- package/dist/{formatting-B-u5CbYn.d.ts.map → formatting-kdIeURER.d.ts.map} +1 -1
- package/dist/{get-doc-AuAW_qr9.cjs → get-doc-DaTCenOE.cjs} +2 -2
- package/dist/{get-doc-AuAW_qr9.cjs.map → get-doc-DaTCenOE.cjs.map} +1 -1
- package/dist/{get-doc-BtxZOy7y.js → get-doc-YTiQznr1.js} +2 -2
- package/dist/{get-doc-BtxZOy7y.js.map → get-doc-YTiQznr1.js.map} +1 -1
- package/dist/{get-event-attachment-Bq5lkaKV.cjs → get-event-attachment-ChRw3jlQ.cjs} +2 -2
- package/dist/{get-event-attachment-Bq5lkaKV.cjs.map → get-event-attachment-ChRw3jlQ.cjs.map} +1 -1
- package/dist/{get-event-attachment-DwAl54zv.js → get-event-attachment-CuU-_5T6.js} +2 -2
- package/dist/{get-event-attachment-DwAl54zv.js.map → get-event-attachment-CuU-_5T6.js.map} +1 -1
- package/dist/{get-issue-details-DrpD5LlK.js → get-issue-details-CxChU4U9.js} +2 -2
- package/dist/{get-issue-details-DrpD5LlK.js.map → get-issue-details-CxChU4U9.js.map} +1 -1
- package/dist/{get-issue-details-qGwu18JX.cjs → get-issue-details-DFwZRbmU.cjs} +2 -2
- package/dist/{get-issue-details-qGwu18JX.cjs.map → get-issue-details-DFwZRbmU.cjs.map} +1 -1
- package/dist/index.cjs +48 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -37
- package/dist/index.js.map +1 -1
- package/dist/internal/fetch-utils.d.ts +1 -1
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +5 -5
- package/dist/internal/issue-helpers.d.ts +1 -1
- package/dist/internal/test-fixtures.d.cts +62 -62
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +146 -146
- package/dist/internal/test-fixtures.d.ts.map +1 -1
- package/dist/{issue-helpers-BOn4g7rx.d.ts → issue-helpers-BJffpNoO.d.ts} +1 -1
- package/dist/{issue-helpers-BOn4g7rx.d.ts.map → issue-helpers-BJffpNoO.d.ts.map} +1 -1
- package/dist/{promptDefinitions-6xelipaz.d.ts → promptDefinitions-D3GTBGLr.d.ts} +1 -1
- package/dist/promptDefinitions-D3GTBGLr.d.ts.map +1 -0
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/prompts.d.cts +1 -1
- package/dist/prompts.d.ts +2 -2
- package/dist/{schema-B5BpplNK.d.ts → schema--5m4KI84.d.ts} +252 -252
- package/dist/{schema-B5BpplNK.d.ts.map → schema--5m4KI84.d.ts.map} +1 -1
- package/dist/{schema-Dt-HKnd_.d.cts → schema-ya35hkEL.d.cts} +221 -221
- package/dist/{schema-Dt-HKnd_.d.cts.map → schema-ya35hkEL.d.cts.map} +1 -1
- package/dist/schema.d.cts.map +1 -1
- package/dist/{search-docs-CrMdRDJy.js → search-docs-BLbB_GV2.js} +3 -3
- package/dist/search-docs-BLbB_GV2.js.map +1 -0
- package/dist/{search-docs-VhefTOOH.cjs → search-docs-D5Foht_0.cjs} +3 -3
- package/dist/search-docs-D5Foht_0.cjs.map +1 -0
- package/dist/{server-CHG27fcn.cjs → server-BpEIZVaZ.cjs} +3 -3
- package/dist/{server-CHG27fcn.cjs.map → server-BpEIZVaZ.cjs.map} +1 -1
- package/dist/{server-DeuBftc5.js → server-DOy-M9Ko.js} +3 -3
- package/dist/{server-DeuBftc5.js.map → server-DOy-M9Ko.js.map} +1 -1
- package/dist/server.cjs +24 -24
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +24 -24
- package/dist/{stdio-DIuLW5EE.js → stdio-B2NDq7Ax.js} +3 -3
- package/dist/{stdio-DIuLW5EE.js.map → stdio-B2NDq7Ax.js.map} +1 -1
- package/dist/{stdio-BtVdTwx-.cjs → stdio-DMEgJ_fG.cjs} +3 -3
- package/dist/{stdio-BtVdTwx-.cjs.map → stdio-DMEgJ_fG.cjs.map} +1 -1
- package/dist/tools/analyze-issue-with-seer.cjs +3 -3
- 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/analyze-issue-with-seer.js +3 -3
- package/dist/tools/create-dsn.cjs +3 -3
- package/dist/tools/create-dsn.d.cts +2 -2
- package/dist/tools/create-dsn.d.ts +3 -3
- package/dist/tools/create-dsn.js +3 -3
- package/dist/tools/create-project.cjs +3 -3
- package/dist/tools/create-project.d.cts +2 -2
- package/dist/tools/create-project.d.ts +3 -3
- package/dist/tools/create-project.js +3 -3
- package/dist/tools/create-team.cjs +3 -3
- package/dist/tools/create-team.d.cts +2 -2
- package/dist/tools/create-team.d.ts +3 -3
- package/dist/tools/create-team.js +3 -3
- package/dist/tools/find-dsns.cjs +3 -3
- package/dist/tools/find-dsns.d.cts +2 -2
- package/dist/tools/find-dsns.d.ts +3 -3
- package/dist/tools/find-dsns.js +3 -3
- package/dist/tools/find-errors.cjs +3 -3
- package/dist/tools/find-errors.d.cts +2 -2
- package/dist/tools/find-errors.d.ts +3 -3
- package/dist/tools/find-errors.js +3 -3
- package/dist/tools/find-issues.cjs +3 -3
- package/dist/tools/find-issues.d.cts +2 -2
- package/dist/tools/find-issues.d.ts +3 -3
- package/dist/tools/find-issues.js +3 -3
- package/dist/tools/find-organizations.cjs +3 -3
- package/dist/tools/find-organizations.d.cts +2 -2
- package/dist/tools/find-organizations.d.ts +3 -3
- package/dist/tools/find-organizations.js +3 -3
- package/dist/tools/find-projects.cjs +3 -3
- package/dist/tools/find-projects.d.cts +2 -2
- package/dist/tools/find-projects.d.ts +3 -3
- package/dist/tools/find-projects.js +3 -3
- package/dist/tools/find-releases.cjs +3 -3
- package/dist/tools/find-releases.d.cts +2 -2
- package/dist/tools/find-releases.d.ts +3 -3
- package/dist/tools/find-releases.js +3 -3
- package/dist/tools/find-tags.cjs +3 -3
- package/dist/tools/find-tags.d.cts +2 -2
- package/dist/tools/find-tags.d.ts +3 -3
- package/dist/tools/find-tags.js +3 -3
- package/dist/tools/find-teams.cjs +3 -3
- package/dist/tools/find-teams.d.cts +2 -2
- package/dist/tools/find-teams.d.ts +3 -3
- package/dist/tools/find-teams.js +3 -3
- package/dist/tools/find-transactions.cjs +3 -3
- package/dist/tools/find-transactions.d.cts +2 -2
- package/dist/tools/find-transactions.d.ts +3 -3
- package/dist/tools/find-transactions.js +3 -3
- package/dist/tools/get-doc.cjs +2 -2
- package/dist/tools/get-doc.d.cts +2 -2
- package/dist/tools/get-doc.d.ts +3 -3
- package/dist/tools/get-doc.js +2 -2
- package/dist/tools/get-event-attachment.cjs +3 -3
- package/dist/tools/get-event-attachment.d.cts +2 -2
- package/dist/tools/get-event-attachment.d.ts +3 -3
- package/dist/tools/get-event-attachment.js +3 -3
- package/dist/tools/get-issue-details.cjs +3 -3
- 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 +3 -3
- package/dist/tools/index.cjs +23 -23
- package/dist/tools/index.d.cts +78 -78
- package/dist/tools/index.d.ts +79 -79
- package/dist/tools/index.js +23 -23
- package/dist/tools/search-docs.cjs +2 -2
- package/dist/tools/search-docs.d.cts +2 -2
- package/dist/tools/search-docs.d.ts +3 -3
- package/dist/tools/search-docs.js +2 -2
- package/dist/tools/types.d.cts +2 -2
- package/dist/tools/types.d.ts +3 -3
- package/dist/tools/update-issue.cjs +3 -3
- package/dist/tools/update-issue.d.cts +2 -2
- package/dist/tools/update-issue.d.ts +3 -3
- package/dist/tools/update-issue.js +3 -3
- package/dist/tools/update-project.cjs +3 -3
- package/dist/tools/update-project.d.cts +2 -2
- package/dist/tools/update-project.d.ts +3 -3
- package/dist/tools/update-project.js +3 -3
- package/dist/tools/utils/api-utils.cjs +2 -2
- package/dist/tools/utils/api-utils.d.cts +5 -5
- package/dist/tools/utils/api-utils.d.ts +7 -7
- package/dist/tools/utils/api-utils.js +2 -2
- package/dist/tools/utils/defineTool.d.cts +2 -2
- package/dist/tools/utils/defineTool.d.ts +3 -3
- package/dist/tools/utils/fetch-utils.d.ts +1 -1
- package/dist/tools/utils/formatting-utils.d.cts +3 -3
- package/dist/tools/utils/formatting-utils.d.ts +4 -4
- package/dist/tools/utils/issue-utils.d.cts +4 -4
- package/dist/tools/utils/issue-utils.d.ts +6 -6
- package/dist/tools/utils/seer-utils.d.cts +3 -3
- package/dist/tools/utils/seer-utils.d.ts +4 -4
- package/dist/tools/whoami.cjs +3 -3
- package/dist/tools/whoami.d.cts +2 -2
- package/dist/tools/whoami.d.ts +3 -3
- package/dist/tools/whoami.js +3 -3
- package/dist/{tools-BiZ7ZDKf.cjs → tools-19Ms1kck.cjs} +21 -21
- package/dist/{tools-BiZ7ZDKf.cjs.map → tools-19Ms1kck.cjs.map} +1 -1
- package/dist/tools-mThAUo_3.js +48 -0
- package/dist/{tools-DGF9GhbP.js.map → tools-mThAUo_3.js.map} +1 -1
- package/dist/transports/stdio.cjs +26 -26
- package/dist/transports/stdio.d.cts +1 -1
- package/dist/transports/stdio.d.ts +2 -2
- package/dist/transports/stdio.js +26 -26
- package/dist/{types-C3pRFQyA.d.cts → types-Bg17IGWJ.d.cts} +2 -2
- package/dist/{types-C3pRFQyA.d.cts.map → types-Bg17IGWJ.d.cts.map} +1 -1
- package/dist/{types-CYjev2Ep.d.cts → types-CUN-2OSS.d.cts} +3 -3
- package/dist/{types-CYjev2Ep.d.cts.map → types-CUN-2OSS.d.cts.map} +1 -1
- package/dist/{types-Br0saqtE.d.ts → types-CtTBwGbw.d.ts} +2 -2
- package/dist/{types-Br0saqtE.d.ts.map → types-CtTBwGbw.d.ts.map} +1 -1
- package/dist/{types-CZaMk5Yg.d.cts → types-D_mx318Q.d.cts} +2 -2
- package/dist/{types-CZaMk5Yg.d.cts.map → types-D_mx318Q.d.cts.map} +1 -1
- package/dist/{types-B2qOfefC.d.ts → types-DkJtNDXU.d.ts} +4 -4
- package/dist/{types-B2qOfefC.d.ts.map → types-DkJtNDXU.d.ts.map} +1 -1
- package/dist/{types-D5KkaSjc.d.ts → types-qB8a4WQT.d.ts} +2 -2
- package/dist/{types-D5KkaSjc.d.ts.map → types-qB8a4WQT.d.ts.map} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/{update-issue-Bz-u_Yaa.cjs → update-issue-B6eZhAPJ.cjs} +2 -2
- package/dist/{update-issue-Bz-u_Yaa.cjs.map → update-issue-B6eZhAPJ.cjs.map} +1 -1
- package/dist/{update-issue-DN80uuKU.js → update-issue-DmLElHPS.js} +2 -2
- package/dist/{update-issue-DN80uuKU.js.map → update-issue-DmLElHPS.js.map} +1 -1
- package/dist/{update-project-5j-SOHWU.js → update-project-BNPev7W8.js} +2 -2
- package/dist/{update-project-5j-SOHWU.js.map → update-project-BNPev7W8.js.map} +1 -1
- package/dist/{update-project-C7Xbmhqg.cjs → update-project-CijYCtG1.cjs} +2 -2
- package/dist/{update-project-C7Xbmhqg.cjs.map → update-project-CijYCtG1.cjs.map} +1 -1
- package/dist/url-utils-C9hykWmk.cjs +106 -0
- package/dist/url-utils-C9hykWmk.cjs.map +1 -0
- package/dist/url-utils-DvZYfzPM.js +82 -0
- package/dist/url-utils-DvZYfzPM.js.map +1 -0
- package/dist/utils/url-utils.cjs +6 -0
- package/dist/utils/url-utils.d.cts +37 -0
- package/dist/utils/url-utils.d.cts.map +1 -0
- package/dist/utils/url-utils.d.ts +37 -0
- package/dist/utils/url-utils.d.ts.map +1 -0
- package/dist/utils/url-utils.js +3 -0
- package/dist/version-C4uvMmw0.js +6 -0
- package/dist/{version-DvMKCu-i.js.map → version-C4uvMmw0.js.map} +1 -1
- package/dist/{version-Dyz6_b54.cjs → version-Ddz4xg_q.cjs} +2 -2
- package/dist/{version-Dyz6_b54.cjs.map → version-Ddz4xg_q.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/{whoami-qIbcECMA.cjs → whoami-CEgbTUqt.cjs} +2 -2
- package/dist/{whoami-qIbcECMA.cjs.map → whoami-CEgbTUqt.cjs.map} +1 -1
- package/dist/{whoami-raA70UBD.js → whoami-DesNZnaQ.js} +2 -2
- package/dist/{whoami-raA70UBD.js.map → whoami-DesNZnaQ.js.map} +1 -1
- package/package.json +3 -3
- package/dist/api-utils-BJS0CChW.cjs.map +0 -1
- package/dist/api-utils-BcB1cMXS.js.map +0 -1
- package/dist/client-BNTsOycD.cjs.map +0 -1
- package/dist/client-BbamPqV4.js.map +0 -1
- package/dist/client-Dae1ZwWb.d.cts.map +0 -1
- package/dist/client-qyEu8fvj.d.ts.map +0 -1
- package/dist/fetch-utils-B-a92ObC.d.ts.map +0 -1
- package/dist/promptDefinitions-6xelipaz.d.ts.map +0 -1
- package/dist/search-docs-CrMdRDJy.js.map +0 -1
- package/dist/search-docs-VhefTOOH.cjs.map +0 -1
- package/dist/tools-DGF9GhbP.js +0 -48
- package/dist/version-DvMKCu-i.js +0 -6
- /package/dist/{index-BrojxuhJ.d.ts → index-DVGDAddE.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-issue-
|
|
1
|
+
{"version":3,"file":"update-issue-DmLElHPS.js","names":["context: ServerContext"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='john.doe')\",\n \"```\",\n \"\",\n \"### Resolve an issue and assign it to yourself\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved', assignedTo='me')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- Use 'me' as the value for `assignedTo` to assign the issue to the authenticated user.\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // Get current issue details first\n const currentIssue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n\n // Update the issue\n const updatedIssue = await apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n });\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAiBA,2BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,QAAQ,iBAAiB,UAAU;EACnC,YAAY,gBAAgB,UAAU;CACvC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;AAGF,OAAK,OAAO,aAAa,OAAO,QAC9B,OAAM,IAAI,eACR;AAIJ,OAAK,OAAO,aAAa,OAAO,iBAC9B,OAAM,IAAI,eACR;AAKJ,OAAK,OAAO,WAAW,OAAO,WAC5B,OAAM,IAAI,eACR;EAIJ,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,iBAAiB;GACf,kBAAkB,OAAO;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,SAAO,qBAAqB,QAAQ;EAGpC,MAAM,eAAe,MAAM,WAAW,SAAS;GAC7C,kBAAkB;GAClB,SAAS;EACV,EAAC;EAGF,MAAM,eAAe,MAAM,WAAW,YAAY;GAChD,kBAAkB;GAClB,SAAS;GACT,QAAQ,OAAO;GACf,YAAY,OAAO;EACpB,EAAC;EAEF,IAAI,UAAU,UAAU,aAAa,QAAQ,gBAAgB,QAAQ;AACrE,aAAW,aAAa,aAAa,MAAM;AAC3C,aAAW,WAAW,WAAW,YAAY,SAAS,aAAa,QAAQ,CAAC;AAG5E,YAAU;AAEV,MAAI,OAAO,UAAU,aAAa,WAAW,OAAO,OAClD,YAAW,cAAc,aAAa,OAAO,OAAO,OAAO,OAAO;AAGpE,MAAI,OAAO,YAAY;GACrB,MAAM,cAAc,iBAAiB,aAAa,cAAc,KAAK;GACrE,MAAM,cACJ,OAAO,eAAe,OAAO,QAAQ,OAAO;AAC9C,cAAW,mBAAmB,YAAY,OAAO,YAAY;EAC9D;AAED,YAAU;AACV,aAAW,cAAc,aAAa,OAAO;EAC7C,MAAM,kBAAkB,iBAAiB,aAAa,cAAc,KAAK;AACzE,aAAW,mBAAmB,gBAAgB;AAE9C,YAAU;AACV,aAAW;AACX,aAAW,gFAAgF,QAAQ,cAAc,aAAa,QAAQ;AAEtI,MAAI,OAAO,WAAW,WACpB,YAAW;WACF,OAAO,WAAW,UAC3B,YAAW;AAGb,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserInputError } from "./errors-CIoxzIug.js";
|
|
2
2
|
import { defineTool } from "./defineTool-77H4nSna.js";
|
|
3
|
-
import { apiServiceFromContext } from "./api-utils-
|
|
3
|
+
import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
|
|
4
4
|
import { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from "./schema-DtsnsxMl.js";
|
|
5
5
|
import { logError } from "./logging-LnQMFw-_.js";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -117,4 +117,4 @@ var update_project_default = defineTool({
|
|
|
117
117
|
|
|
118
118
|
//#endregion
|
|
119
119
|
export { update_project_default };
|
|
120
|
-
//# sourceMappingURL=update-project-
|
|
120
|
+
//# sourceMappingURL=update-project-BNPev7W8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-BNPev7W8.js","names":["context: ServerContext","project: Project | undefined","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAgBA,6BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB;EAClB,WAAW,eAAe,UAAU;EACpC,aAAa;EACb,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,+BAA+B,CAAC,UAAU;EAC3E,MAAM,EACH,QAAQ,CACR,aAAa,CACb,MAAM,CACN,SAAS,gDAAgD,CACzD,UAAU;EACb,UAAU,cAAc,UAAU;EAClC,UAAU,cAAc,UAAU,CAAC,SACjC,2FACD;CACF;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,SAAO,qBAAqB,iBAAiB;AAC7C,SAAO,gBAAgB,OAAO,YAAY;AAG1C,MAAI,OAAO,UAAU;AACnB,UAAO,aAAa,OAAO,SAAS;AACpC,OAAI;AACF,UAAM,WAAW,iBAAiB;KAChC;KACA,aAAa,OAAO;KACpB,UAAU,OAAO;IAClB,EAAC;GACH,SAAQ,KAAK;AACZ,aAAS,IAAI;AACb,UAAM,IAAI,OACP,wBAAwB,OAAO,SAAS,cAAc,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;GAEtH;EACF;EAGD,MAAM,oBAAoB,OAAO,QAAQ,OAAO,QAAQ,OAAO;EAE/D,IAAIC;AACJ,MAAI,kBACF,KAAI;AACF,aAAU,MAAM,WAAW,cAAc;IACvC;IACA,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,MAAM,OAAO;IACb,UAAU,OAAO;GAClB,EAAC;EACH,SAAQ,KAAK;AACZ,YAAS,IAAI;AACb,SAAM,IAAI,OACP,2BAA2B,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;EAE3F;OACI;GAEL,MAAM,WAAW,MAAM,WAAW,aAAa,iBAAiB;AAChE,aAAU,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,YAAY;AAC7D,QAAK,QACH,OAAM,IAAI,gBAAgB,UAAU,OAAO,YAAY;EAE1D;EAED,IAAI,UAAU,yBAAyB,iBAAiB;AACxD,aAAW,UAAU,QAAQ,GAAG;AAChC,aAAW,YAAY,QAAQ,KAAK;AACpC,aAAW,YAAY,QAAQ,KAAK;AACpC,MAAI,QAAQ,SACV,YAAW,gBAAgB,QAAQ,SAAS;EAI9C,MAAMC,UAAoB,CAAE;AAC5B,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,SAAU,SAAQ,MAAM,eAAe,OAAO,SAAS,GAAG;AACrE,MAAI,OAAO,SACT,SAAQ,MAAM,sBAAsB,OAAO,SAAS,GAAG;AAEzD,MAAI,QAAQ,SAAS,GAAG;AACtB,cAAW;AACX,aAAU,QAAQ,IAAI,CAAC,YAAY,YAAY,SAAS,CAAC,KAAK,KAAK;AACnE,cAAW;EACZ;AAED,YAAU;AACV,aAAW,6CAA6C,QAAQ,KAAK;AACrE,MAAI,OAAO,SACT,YAAW,yCAAyC,OAAO,SAAS;AAEtE,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
2
2
|
const require_errors = require('./errors-YmiXLOyx.cjs');
|
|
3
3
|
const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
4
|
-
const require_api_utils = require('./api-utils-
|
|
4
|
+
const require_api_utils = require('./api-utils-d36iteNO.cjs');
|
|
5
5
|
const require_schema = require('./schema-BpJVmev8.cjs');
|
|
6
6
|
const require_logging = require('./logging-oIouXrcb.cjs');
|
|
7
7
|
const zod = require_chunk.__toESM(require("zod"));
|
|
@@ -123,4 +123,4 @@ Object.defineProperty(exports, 'update_project_default', {
|
|
|
123
123
|
return update_project_default;
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
-
//# sourceMappingURL=update-project-
|
|
126
|
+
//# sourceMappingURL=update-project-CijYCtG1.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-CijYCtG1.cjs","names":["ParamOrganizationSlug","ParamProjectSlug","context: ServerContext","project: Project | undefined","UserInputError","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;AAgBA,6BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkBA;EAClB,WAAW,8BAAe,UAAU;EACpC,aAAaC;EACb,MAAM,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,+BAA+B,CAAC,UAAU;EAC3E,MAAM,MACH,QAAQ,CACR,aAAa,CACb,MAAM,CACN,SAAS,gDAAgD,CACzD,UAAU;EACb,UAAU,6BAAc,UAAU;EAClC,UAAU,6BAAc,UAAU,CAAC,SACjC,2FACD;CACF;CACD,MAAM,QAAQ,QAAQC,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,4BAAO,qBAAqB,iBAAiB;AAC7C,4BAAO,gBAAgB,OAAO,YAAY;AAG1C,MAAI,OAAO,UAAU;AACnB,6BAAO,aAAa,OAAO,SAAS;AACpC,OAAI;AACF,UAAM,WAAW,iBAAiB;KAChC;KACA,aAAa,OAAO;KACpB,UAAU,OAAO;IAClB,EAAC;GACH,SAAQ,KAAK;AACZ,6BAAS,IAAI;AACb,UAAM,IAAI,OACP,wBAAwB,OAAO,SAAS,cAAc,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;GAEtH;EACF;EAGD,MAAM,oBAAoB,OAAO,QAAQ,OAAO,QAAQ,OAAO;EAE/D,IAAIC;AACJ,MAAI,kBACF,KAAI;AACF,aAAU,MAAM,WAAW,cAAc;IACvC;IACA,aAAa,OAAO;IACpB,MAAM,OAAO;IACb,MAAM,OAAO;IACb,UAAU,OAAO;GAClB,EAAC;EACH,SAAQ,KAAK;AACZ,4BAAS,IAAI;AACb,SAAM,IAAI,OACP,2BAA2B,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;EAE3F;OACI;GAEL,MAAM,WAAW,MAAM,WAAW,aAAa,iBAAiB;AAChE,aAAU,SAAS,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,YAAY;AAC7D,QAAK,QACH,OAAM,IAAIC,+BAAgB,UAAU,OAAO,YAAY;EAE1D;EAED,IAAI,UAAU,yBAAyB,iBAAiB;AACxD,aAAW,UAAU,QAAQ,GAAG;AAChC,aAAW,YAAY,QAAQ,KAAK;AACpC,aAAW,YAAY,QAAQ,KAAK;AACpC,MAAI,QAAQ,SACV,YAAW,gBAAgB,QAAQ,SAAS;EAI9C,MAAMC,UAAoB,CAAE;AAC5B,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,SAAU,SAAQ,MAAM,eAAe,OAAO,SAAS,GAAG;AACrE,MAAI,OAAO,SACT,SAAQ,MAAM,sBAAsB,OAAO,SAAS,GAAG;AAEzD,MAAI,QAAQ,SAAS,GAAG;AACtB,cAAW;AACX,aAAU,QAAQ,IAAI,CAAC,YAAY,YAAY,SAAS,CAAC,KAAK,KAAK;AACnE,cAAW;EACZ;AAED,YAAU;AACV,aAAW,6CAA6C,QAAQ,KAAK;AACrE,MAAI,OAAO,SACT,YAAW,yCAAyC,OAAO,SAAS;AAEtE,SAAO;CACR;AACF,EAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/url-utils.ts
|
|
3
|
+
/**
|
|
4
|
+
* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
|
|
5
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
6
|
+
*
|
|
7
|
+
* @param host The hostname to validate
|
|
8
|
+
* @throws {Error} If the host contains a protocol
|
|
9
|
+
*/
|
|
10
|
+
function _validateSentryHostInternal(host) {
|
|
11
|
+
if (host.startsWith("http://") || host.startsWith("https://")) throw new Error("SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
15
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
16
|
+
*
|
|
17
|
+
* @param url The HTTPS URL to validate and parse
|
|
18
|
+
* @returns The extracted hostname from the URL
|
|
19
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
20
|
+
*/
|
|
21
|
+
function _validateAndParseSentryUrlInternal(url) {
|
|
22
|
+
if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
|
|
23
|
+
try {
|
|
24
|
+
const parsedUrl = new URL(url);
|
|
25
|
+
return parsedUrl.host;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
32
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
33
|
+
*
|
|
34
|
+
* @param host The hostname to validate
|
|
35
|
+
*/
|
|
36
|
+
function validateSentryHost(host) {
|
|
37
|
+
try {
|
|
38
|
+
_validateSentryHostInternal(host);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(`Error: ${error.message}`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
46
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
47
|
+
*
|
|
48
|
+
* @param url The HTTPS URL to validate and parse
|
|
49
|
+
* @returns The extracted hostname from the URL
|
|
50
|
+
*/
|
|
51
|
+
function validateAndParseSentryUrl(url) {
|
|
52
|
+
try {
|
|
53
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.error(`Error: ${error.message}`);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
61
|
+
* Throws an error instead of exiting the process (for testing).
|
|
62
|
+
*
|
|
63
|
+
* @param host The hostname to validate
|
|
64
|
+
* @throws {Error} If the host contains a protocol
|
|
65
|
+
*/
|
|
66
|
+
function validateSentryHostThrows(host) {
|
|
67
|
+
_validateSentryHostInternal(host);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
71
|
+
* Throws an error instead of exiting the process (for testing).
|
|
72
|
+
*
|
|
73
|
+
* @param url The HTTPS URL to validate and parse
|
|
74
|
+
* @returns The extracted hostname from the URL
|
|
75
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
76
|
+
*/
|
|
77
|
+
function validateAndParseSentryUrlThrows(url) {
|
|
78
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
Object.defineProperty(exports, 'validateAndParseSentryUrl', {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () {
|
|
85
|
+
return validateAndParseSentryUrl;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, 'validateAndParseSentryUrlThrows', {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () {
|
|
91
|
+
return validateAndParseSentryUrlThrows;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, 'validateSentryHost', {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () {
|
|
97
|
+
return validateSentryHost;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, 'validateSentryHostThrows', {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () {
|
|
103
|
+
return validateSentryHostThrows;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=url-utils-C9hykWmk.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils-C9hykWmk.cjs","names":["host: string","url: string"],"sources":["../src/utils/url-utils.ts"],"sourcesContent":["/**\n * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nfunction _validateSentryHostInternal(host: string): void {\n if (host.startsWith(\"http://\") || host.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\",\n );\n }\n}\n\n/**\n * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nfunction _validateAndParseSentryUrlInternal(url: string): string {\n if (!url.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.host;\n } catch (error) {\n throw new Error(\n \"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param host The hostname to validate\n */\nexport function validateSentryHost(host: string): void {\n try {\n _validateSentryHostInternal(host);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n */\nexport function validateAndParseSentryUrl(url: string): string {\n try {\n return _validateAndParseSentryUrlInternal(url);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error instead of exiting the process (for testing).\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nexport function validateSentryHostThrows(host: string): void {\n _validateSentryHostInternal(host);\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error instead of exiting the process (for testing).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nexport function validateAndParseSentryUrlThrows(url: string): string {\n return _validateAndParseSentryUrlInternal(url);\n}\n"],"mappings":";;;;;;;;;AAOA,SAAS,4BAA4BA,MAAoB;AACvD,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;AAGL;;;;;;;;;AAUD,SAAS,mCAAmCC,KAAqB;AAC/D,MAAK,IAAI,WAAW,WAAW,CAC7B,OAAM,IAAI,MACR;AAIJ,KAAI;EACF,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,QAAM,IAAI,MACR;CAEH;AACF;;;;;;;AAQD,SAAgB,mBAAmBD,MAAoB;AACrD,KAAI;AACF,8BAA4B,KAAK;CAClC,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,0BAA0BC,KAAqB;AAC7D,KAAI;AACF,SAAO,mCAAmC,IAAI;CAC/C,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,yBAAyBD,MAAoB;AAC3D,6BAA4B,KAAK;AAClC;;;;;;;;;AAUD,SAAgB,gCAAgCC,KAAqB;AACnE,QAAO,mCAAmC,IAAI;AAC/C"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//#region src/utils/url-utils.ts
|
|
2
|
+
/**
|
|
3
|
+
* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
|
|
4
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
5
|
+
*
|
|
6
|
+
* @param host The hostname to validate
|
|
7
|
+
* @throws {Error} If the host contains a protocol
|
|
8
|
+
*/
|
|
9
|
+
function _validateSentryHostInternal(host) {
|
|
10
|
+
if (host.startsWith("http://") || host.startsWith("https://")) throw new Error("SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.");
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
14
|
+
* Throws an error if validation fails instead of exiting the process.
|
|
15
|
+
*
|
|
16
|
+
* @param url The HTTPS URL to validate and parse
|
|
17
|
+
* @returns The extracted hostname from the URL
|
|
18
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
19
|
+
*/
|
|
20
|
+
function _validateAndParseSentryUrlInternal(url) {
|
|
21
|
+
if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
|
|
22
|
+
try {
|
|
23
|
+
const parsedUrl = new URL(url);
|
|
24
|
+
return parsedUrl.host;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
31
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
32
|
+
*
|
|
33
|
+
* @param host The hostname to validate
|
|
34
|
+
*/
|
|
35
|
+
function validateSentryHost(host) {
|
|
36
|
+
try {
|
|
37
|
+
_validateSentryHostInternal(host);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(`Error: ${error.message}`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
45
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
46
|
+
*
|
|
47
|
+
* @param url The HTTPS URL to validate and parse
|
|
48
|
+
* @returns The extracted hostname from the URL
|
|
49
|
+
*/
|
|
50
|
+
function validateAndParseSentryUrl(url) {
|
|
51
|
+
try {
|
|
52
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error(`Error: ${error.message}`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
60
|
+
* Throws an error instead of exiting the process (for testing).
|
|
61
|
+
*
|
|
62
|
+
* @param host The hostname to validate
|
|
63
|
+
* @throws {Error} If the host contains a protocol
|
|
64
|
+
*/
|
|
65
|
+
function validateSentryHostThrows(host) {
|
|
66
|
+
_validateSentryHostInternal(host);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
70
|
+
* Throws an error instead of exiting the process (for testing).
|
|
71
|
+
*
|
|
72
|
+
* @param url The HTTPS URL to validate and parse
|
|
73
|
+
* @returns The extracted hostname from the URL
|
|
74
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
75
|
+
*/
|
|
76
|
+
function validateAndParseSentryUrlThrows(url) {
|
|
77
|
+
return _validateAndParseSentryUrlInternal(url);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
export { validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
82
|
+
//# sourceMappingURL=url-utils-DvZYfzPM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils-DvZYfzPM.js","names":["host: string","url: string"],"sources":["../src/utils/url-utils.ts"],"sourcesContent":["/**\n * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nfunction _validateSentryHostInternal(host: string): void {\n if (host.startsWith(\"http://\") || host.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\",\n );\n }\n}\n\n/**\n * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error if validation fails instead of exiting the process.\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nfunction _validateAndParseSentryUrlInternal(url: string): string {\n if (!url.startsWith(\"https://\")) {\n throw new Error(\n \"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n\n try {\n const parsedUrl = new URL(url);\n return parsedUrl.host;\n } catch (error) {\n throw new Error(\n \"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\",\n );\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param host The hostname to validate\n */\nexport function validateSentryHost(host: string): void {\n try {\n _validateSentryHostInternal(host);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Exits the process with error code 1 if validation fails (CLI behavior).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n */\nexport function validateAndParseSentryUrl(url: string): string {\n try {\n return _validateAndParseSentryUrlInternal(url);\n } catch (error) {\n console.error(`Error: ${(error as Error).message}`);\n process.exit(1);\n }\n}\n\n/**\n * Validates that a SENTRY_HOST value contains only hostname (no protocol).\n * Throws an error instead of exiting the process (for testing).\n *\n * @param host The hostname to validate\n * @throws {Error} If the host contains a protocol\n */\nexport function validateSentryHostThrows(host: string): void {\n _validateSentryHostInternal(host);\n}\n\n/**\n * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n * Throws an error instead of exiting the process (for testing).\n *\n * @param url The HTTPS URL to validate and parse\n * @returns The extracted hostname from the URL\n * @throws {Error} If the URL is invalid or not HTTPS\n */\nexport function validateAndParseSentryUrlThrows(url: string): string {\n return _validateAndParseSentryUrlInternal(url);\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,4BAA4BA,MAAoB;AACvD,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAC3D,OAAM,IAAI,MACR;AAGL;;;;;;;;;AAUD,SAAS,mCAAmCC,KAAqB;AAC/D,MAAK,IAAI,WAAW,WAAW,CAC7B,OAAM,IAAI,MACR;AAIJ,KAAI;EACF,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,QAAM,IAAI,MACR;CAEH;AACF;;;;;;;AAQD,SAAgB,mBAAmBD,MAAoB;AACrD,KAAI;AACF,8BAA4B,KAAK;CAClC,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,0BAA0BC,KAAqB;AAC7D,KAAI;AACF,SAAO,mCAAmC,IAAI;CAC/C,SAAQ,OAAO;AACd,UAAQ,OAAO,SAAU,MAAgB,UAAU;AACnD,UAAQ,KAAK,EAAE;CAChB;AACF;;;;;;;;AASD,SAAgB,yBAAyBD,MAAoB;AAC3D,6BAA4B,KAAK;AAClC;;;;;;;;;AAUD,SAAgB,gCAAgCC,KAAqB;AACnE,QAAO,mCAAmC,IAAI;AAC/C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_url_utils = require('../url-utils-C9hykWmk.cjs');
|
|
2
|
+
|
|
3
|
+
exports.validateAndParseSentryUrl = require_url_utils.validateAndParseSentryUrl;
|
|
4
|
+
exports.validateAndParseSentryUrlThrows = require_url_utils.validateAndParseSentryUrlThrows;
|
|
5
|
+
exports.validateSentryHost = require_url_utils.validateSentryHost;
|
|
6
|
+
exports.validateSentryHostThrows = require_url_utils.validateSentryHostThrows;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/utils/url-utils.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
4
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
5
|
+
*
|
|
6
|
+
* @param host The hostname to validate
|
|
7
|
+
*/
|
|
8
|
+
declare function validateSentryHost(host: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
11
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
12
|
+
*
|
|
13
|
+
* @param url The HTTPS URL to validate and parse
|
|
14
|
+
* @returns The extracted hostname from the URL
|
|
15
|
+
*/
|
|
16
|
+
declare function validateAndParseSentryUrl(url: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
19
|
+
* Throws an error instead of exiting the process (for testing).
|
|
20
|
+
*
|
|
21
|
+
* @param host The hostname to validate
|
|
22
|
+
* @throws {Error} If the host contains a protocol
|
|
23
|
+
*/
|
|
24
|
+
declare function validateSentryHostThrows(host: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
27
|
+
* Throws an error instead of exiting the process (for testing).
|
|
28
|
+
*
|
|
29
|
+
* @param url The HTTPS URL to validate and parse
|
|
30
|
+
* @returns The extracted hostname from the URL
|
|
31
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
32
|
+
*/
|
|
33
|
+
declare function validateAndParseSentryUrlThrows(url: string): string;
|
|
34
|
+
//# sourceMappingURL=url-utils.d.ts.map
|
|
35
|
+
//#endregion
|
|
36
|
+
export { validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
37
|
+
//# sourceMappingURL=url-utils.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils.d.cts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AA8CA;AAgBA;AAgBA;AAYA;;iBA5CgB,kBAAA;;;;;;;;iBAgBA,yBAAA;;;;;;;;iBAgBA,wBAAA;;;;;;;;;iBAYA,+BAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/utils/url-utils.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
4
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
5
|
+
*
|
|
6
|
+
* @param host The hostname to validate
|
|
7
|
+
*/
|
|
8
|
+
declare function validateSentryHost(host: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
11
|
+
* Exits the process with error code 1 if validation fails (CLI behavior).
|
|
12
|
+
*
|
|
13
|
+
* @param url The HTTPS URL to validate and parse
|
|
14
|
+
* @returns The extracted hostname from the URL
|
|
15
|
+
*/
|
|
16
|
+
declare function validateAndParseSentryUrl(url: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
19
|
+
* Throws an error instead of exiting the process (for testing).
|
|
20
|
+
*
|
|
21
|
+
* @param host The hostname to validate
|
|
22
|
+
* @throws {Error} If the host contains a protocol
|
|
23
|
+
*/
|
|
24
|
+
declare function validateSentryHostThrows(host: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
27
|
+
* Throws an error instead of exiting the process (for testing).
|
|
28
|
+
*
|
|
29
|
+
* @param url The HTTPS URL to validate and parse
|
|
30
|
+
* @returns The extracted hostname from the URL
|
|
31
|
+
* @throws {Error} If the URL is invalid or not HTTPS
|
|
32
|
+
*/
|
|
33
|
+
declare function validateAndParseSentryUrlThrows(url: string): string;
|
|
34
|
+
//# sourceMappingURL=url-utils.d.ts.map
|
|
35
|
+
//#endregion
|
|
36
|
+
export { validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateSentryHost, validateSentryHostThrows };
|
|
37
|
+
//# sourceMappingURL=url-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils.d.ts","names":[],"sources":["../../src/utils/url-utils.ts"],"sourcesContent":[],"mappings":";;AA8CA;AAgBA;AAgBA;AAYA;;iBA5CgB,kBAAA;;;;;;;;iBAgBA,yBAAA;;;;;;;;iBAgBA,wBAAA;;;;;;;;;iBAYA,+BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-C4uvMmw0.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const LIB_VERSION =\n (typeof process !== \"undefined\" && process.env?.npm_package_version) ||\n \"0.0.0\";\n"],"mappings":";AAAA,MAAa,qBACH,YAAY,2BACpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/version.ts
|
|
3
|
-
const LIB_VERSION = typeof process !== "undefined" && "0.
|
|
3
|
+
const LIB_VERSION = typeof process !== "undefined" && "0.14.0" || "0.0.0";
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
Object.defineProperty(exports, 'LIB_VERSION', {
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, 'LIB_VERSION', {
|
|
|
9
9
|
return LIB_VERSION;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
//# sourceMappingURL=version-
|
|
12
|
+
//# sourceMappingURL=version-Ddz4xg_q.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-Ddz4xg_q.cjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const LIB_VERSION =\n (typeof process !== \"undefined\" && process.env?.npm_package_version) ||\n \"0.0.0\";\n"],"mappings":";;AAAA,MAAa,qBACH,YAAY,2BACpB"}
|
package/dist/version.cjs
CHANGED
package/dist/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
2
|
-
const require_api_utils = require('./api-utils-
|
|
2
|
+
const require_api_utils = require('./api-utils-d36iteNO.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/tools/whoami.ts
|
|
5
5
|
var whoami_default = require_defineTool.defineTool({
|
|
@@ -25,4 +25,4 @@ Object.defineProperty(exports, 'whoami_default', {
|
|
|
25
25
|
return whoami_default;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
//# sourceMappingURL=whoami-
|
|
28
|
+
//# sourceMappingURL=whoami-CEgbTUqt.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami-
|
|
1
|
+
{"version":3,"file":"whoami-CEgbTUqt.cjs","names":["context: ServerContext"],"sources":["../src/tools/whoami.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\n\nexport default defineTool({\n name: \"whoami\",\n description: [\n \"Identify the authenticated user in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the user's name and email address.\",\n ].join(\"\\n\"),\n inputSchema: {},\n async handler(params, context: ServerContext) {\n // User data endpoints (like /auth/) should never use regionUrl\n // as they must always query the main API server, not region-specific servers\n const apiService = apiServiceFromContext(context);\n const user = await apiService.getAuthenticatedUser();\n return `You are authenticated as ${user.name} (${user.email}).\\n\\nYour Sentry User ID is ${user.id}.`;\n },\n});\n"],"mappings":";;;;AAKA,qBAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa,CAAE;CACf,MAAM,QAAQ,QAAQA,SAAwB;EAG5C,MAAM,aAAa,wCAAsB,QAAQ;EACjD,MAAM,OAAO,MAAM,WAAW,sBAAsB;AACpD,UAAQ,2BAA2B,KAAK,KAAK,IAAI,KAAK,MAAM,+BAA+B,KAAK,GAAG;CACpG;AACF,EAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineTool } from "./defineTool-77H4nSna.js";
|
|
2
|
-
import { apiServiceFromContext } from "./api-utils-
|
|
2
|
+
import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
|
|
3
3
|
|
|
4
4
|
//#region src/tools/whoami.ts
|
|
5
5
|
var whoami_default = defineTool({
|
|
@@ -20,4 +20,4 @@ var whoami_default = defineTool({
|
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
22
22
|
export { whoami_default };
|
|
23
|
-
//# sourceMappingURL=whoami-
|
|
23
|
+
//# sourceMappingURL=whoami-DesNZnaQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami-
|
|
1
|
+
{"version":3,"file":"whoami-DesNZnaQ.js","names":["context: ServerContext"],"sources":["../src/tools/whoami.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport type { ServerContext } from \"../types\";\n\nexport default defineTool({\n name: \"whoami\",\n description: [\n \"Identify the authenticated user in Sentry.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Get the user's name and email address.\",\n ].join(\"\\n\"),\n inputSchema: {},\n async handler(params, context: ServerContext) {\n // User data endpoints (like /auth/) should never use regionUrl\n // as they must always query the main API server, not region-specific servers\n const apiService = apiServiceFromContext(context);\n const user = await apiService.getAuthenticatedUser();\n return `You are authenticated as ${user.name} (${user.email}).\\n\\nYour Sentry User ID is ${user.id}.`;\n },\n});\n"],"mappings":";;;;AAKA,qBAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa,CAAE;CACf,MAAM,QAAQ,QAAQA,SAAwB;EAG5C,MAAM,aAAa,sBAAsB,QAAQ;EACjD,MAAM,OAAO,MAAM,WAAW,sBAAsB;AACpD,UAAQ,2BAA2B,KAAK,KAAK,IAAI,KAAK,MAAM,+BAA+B,KAAK,GAAG;CACpG;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"msw": "^2.10.2",
|
|
82
82
|
"zod-to-json-schema": "^3.24.6",
|
|
83
|
-
"@sentry/mcp-server-mocks": "0.
|
|
84
|
-
"@sentry/mcp-server-tsconfig": "0.
|
|
83
|
+
"@sentry/mcp-server-mocks": "0.14.0",
|
|
84
|
+
"@sentry/mcp-server-tsconfig": "0.14.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-utils-BJS0CChW.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","UserInputError","SentryApiService"],"sources":["../src/tools/utils/api-utils.ts"],"sourcesContent":["import { SentryApiService } from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\n\n/**\n * Create a Sentry API service from server context with optional region override\n * @param context - Server context containing host and access token\n * @param opts - Options object containing optional regionUrl override\n * @returns Configured SentryApiService instance\n * @throws {UserInputError} When regionUrl is provided but invalid\n */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.host;\n\n if (opts.regionUrl?.trim()) {\n try {\n const parsedUrl = new URL(opts.regionUrl);\n\n // Validate that the URL has a proper protocol\n if (![\"http:\", \"https:\"].includes(parsedUrl.protocol)) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`,\n );\n }\n\n // Validate that the host is not just the protocol name\n if (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`,\n );\n }\n\n host = parsedUrl.host;\n } catch (error) {\n if (error instanceof UserInputError) {\n throw error;\n }\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,CACxB,KAAI;EACF,MAAM,YAAY,IAAI,IAAI,KAAK;AAG/B,OAAK,CAAC,SAAS,QAAS,EAAC,SAAS,UAAU,SAAS,CACnD,OAAM,IAAIC,+BACP,8BAA8B,KAAK,UAAU;AAKlD,MAAI,UAAU,SAAS,WAAW,UAAU,SAAS,OACnD,OAAM,IAAIA,+BACP,8BAA8B,KAAK,UAAU;AAIlD,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,MAAI,iBAAiBA,8BACnB,OAAM;AAER,QAAM,IAAIA,+BACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAIC,gCAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-utils-BcB1cMXS.js","names":["context: ServerContext","opts: { regionUrl?: string }"],"sources":["../src/tools/utils/api-utils.ts"],"sourcesContent":["import { SentryApiService } from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\n\n/**\n * Create a Sentry API service from server context with optional region override\n * @param context - Server context containing host and access token\n * @param opts - Options object containing optional regionUrl override\n * @returns Configured SentryApiService instance\n * @throws {UserInputError} When regionUrl is provided but invalid\n */\nexport function apiServiceFromContext(\n context: ServerContext,\n opts: { regionUrl?: string } = {},\n) {\n let host = context.host;\n\n if (opts.regionUrl?.trim()) {\n try {\n const parsedUrl = new URL(opts.regionUrl);\n\n // Validate that the URL has a proper protocol\n if (![\"http:\", \"https:\"].includes(parsedUrl.protocol)) {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must include protocol (http:// or https://).`,\n );\n }\n\n // Validate that the host is not just the protocol name\n if (parsedUrl.host === \"https\" || parsedUrl.host === \"http\") {\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. The host cannot be just a protocol name.`,\n );\n }\n\n host = parsedUrl.host;\n } catch (error) {\n if (error instanceof UserInputError) {\n throw error;\n }\n throw new UserInputError(\n `Invalid regionUrl provided: ${opts.regionUrl}. Must be a valid URL.`,\n );\n }\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,CACxB,KAAI;EACF,MAAM,YAAY,IAAI,IAAI,KAAK;AAG/B,OAAK,CAAC,SAAS,QAAS,EAAC,SAAS,UAAU,SAAS,CACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAKlD,MAAI,UAAU,SAAS,WAAW,UAAU,SAAS,OACnD,OAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;AAIlD,SAAO,UAAU;CAClB,SAAQ,OAAO;AACd,MAAI,iBAAiB,eACnB,OAAM;AAER,QAAM,IAAI,gBACP,8BAA8B,KAAK,UAAU;CAEjD;AAGH,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF"}
|