@sentry/mcp-server 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-vFXI2vu1.js → agent-0WAnUgat.js} +7 -7
- package/dist/agent-0WAnUgat.js.map +1 -0
- package/dist/{agent-CuX9zpZq.d.ts → agent-BeTXxskw.d.ts} +12 -11
- package/dist/agent-BeTXxskw.d.ts.map +1 -0
- package/dist/{agent-_VPpnFmn.d.cts → agent-Bm5Hsfal.d.cts} +2 -2
- package/dist/{agent-_VPpnFmn.d.cts.map → agent-Bm5Hsfal.d.cts.map} +1 -1
- package/dist/{agent-CvjnNjVl.js → agent-C1Ros3Xx.js} +2 -2
- package/dist/{agent-CvjnNjVl.js.map → agent-C1Ros3Xx.js.map} +1 -1
- package/dist/{agent-BIhLK0w6.d.ts → agent-CJ6SVqAB.d.ts} +2 -2
- package/dist/{agent-BIhLK0w6.d.ts.map → agent-CJ6SVqAB.d.ts.map} +1 -1
- package/dist/{agent-DOraNng-.cjs → agent-Cm9hEq5d.cjs} +23 -13
- package/dist/agent-Cm9hEq5d.cjs.map +1 -0
- package/dist/{agent-CaZRIfIM.d.ts → agent-Cu85yHYm.d.ts} +25 -24
- package/dist/agent-Cu85yHYm.d.ts.map +1 -0
- package/dist/{agent-Bgg6nor6.cjs → agent-CyyRLYbF.cjs} +15 -9
- package/dist/agent-CyyRLYbF.cjs.map +1 -0
- package/dist/{agent-WO6BpLta.d.cts → agent-DYfi9MFV.d.cts} +29 -28
- package/dist/agent-DYfi9MFV.d.cts.map +1 -0
- package/dist/{agent-CzjC0wP8.js → agent-Dkgkv7Iz.js} +14 -10
- package/dist/agent-Dkgkv7Iz.js.map +1 -0
- package/dist/{agent-pad5p0Xr.cjs → agent-DtCRTWPZ.cjs} +3 -3
- package/dist/{agent-pad5p0Xr.cjs.map → agent-DtCRTWPZ.cjs.map} +1 -1
- package/dist/{agent-BePwIb80.d.cts → agent-TEZG63ug.d.cts} +12 -11
- package/dist/agent-TEZG63ug.d.cts.map +1 -0
- package/dist/{analyze-issue-with-seer-DHxMOCaf.cjs → analyze-issue-with-seer-B90r4g5J.cjs} +4 -4
- package/dist/{analyze-issue-with-seer-DHxMOCaf.cjs.map → analyze-issue-with-seer-B90r4g5J.cjs.map} +1 -1
- package/dist/{analyze-issue-with-seer-iXBAIlQL.js → analyze-issue-with-seer-Ji3KDm0O.js} +2 -2
- package/dist/{analyze-issue-with-seer-iXBAIlQL.js.map → analyze-issue-with-seer-Ji3KDm0O.js.map} +1 -1
- package/dist/{api-Cozv5F92.js → api-CBHyxA3Q.js} +2 -2
- package/dist/{api-Cozv5F92.js.map → api-CBHyxA3Q.js.map} +1 -1
- package/dist/{api-BkWv0o1h.cjs → api-CHgBJOv9.cjs} +2 -2
- package/dist/{api-BkWv0o1h.cjs.map → api-CHgBJOv9.cjs.map} +1 -1
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/index.cjs +4 -4
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +3 -3
- package/dist/api-client/index.js +2 -2
- package/dist/api-client/schema.cjs +1 -1
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/{callEmbeddedAgent-B24rpPzZ.d.cts → callEmbeddedAgent-BIfQ-_5T.d.ts} +4 -4
- package/dist/callEmbeddedAgent-BIfQ-_5T.d.ts.map +1 -0
- package/dist/{callEmbeddedAgent-xTPNMk8s.cjs → callEmbeddedAgent-BPS472yg.cjs} +9 -4
- package/dist/callEmbeddedAgent-BPS472yg.cjs.map +1 -0
- package/dist/{callEmbeddedAgent-Dk48A2gz.d.ts → callEmbeddedAgent-CFHLQjFx.d.cts} +4 -4
- package/dist/callEmbeddedAgent-CFHLQjFx.d.cts.map +1 -0
- package/dist/{callEmbeddedAgent-B51_9ycP.js → callEmbeddedAgent-DavTx3Qo.js} +8 -3
- package/dist/callEmbeddedAgent-DavTx3Qo.js.map +1 -0
- package/dist/{chunk-DWy1uDak.cjs → chunk-CUT6urMc.cjs} +0 -9
- package/dist/cli/parse.cjs +1 -1
- package/dist/{client-DeGFkGAD.d.cts → client-0n2-4zOO.d.cts} +7 -7
- package/dist/{client-DeGFkGAD.d.cts.map → client-0n2-4zOO.d.cts.map} +1 -1
- package/dist/{client-BSlwJcxe.js → client-B7hvqupZ.js} +2 -2
- package/dist/{client-BSlwJcxe.js.map → client-B7hvqupZ.js.map} +1 -1
- package/dist/{client-D1Oq6Udl.d.ts → client-ByOC8aCf.d.ts} +9 -9
- package/dist/{client-D1Oq6Udl.d.ts.map → client-ByOC8aCf.d.ts.map} +1 -1
- package/dist/{client-DlJ_23xq.cjs → client-cC79LUJ5.cjs} +4 -4
- package/dist/{client-DlJ_23xq.cjs.map → client-cC79LUJ5.cjs.map} +1 -1
- package/dist/{create-dsn-erDvHRvv.cjs → create-dsn-9yIHr10B.cjs} +4 -4
- package/dist/{create-dsn-erDvHRvv.cjs.map → create-dsn-9yIHr10B.cjs.map} +1 -1
- package/dist/{create-dsn-CzaN7V1p.js → create-dsn-p2Ep6zDn.js} +2 -2
- package/dist/{create-dsn-CzaN7V1p.js.map → create-dsn-p2Ep6zDn.js.map} +1 -1
- package/dist/{create-project-B9dyzzyz.cjs → create-project-BQQx1iLm.cjs} +5 -5
- package/dist/{create-project-B9dyzzyz.cjs.map → create-project-BQQx1iLm.cjs.map} +1 -1
- package/dist/{create-project-BvmA3Xm7.js → create-project-CN0UneBm.js} +2 -2
- package/dist/{create-project-BvmA3Xm7.js.map → create-project-CN0UneBm.js.map} +1 -1
- package/dist/{create-team-Bb0ajRQO.js → create-team-CzFrsVdw.js} +2 -2
- package/dist/{create-team-Bb0ajRQO.js.map → create-team-CzFrsVdw.js.map} +1 -1
- package/dist/{create-team-CWC7s6TS.cjs → create-team-DFSriKVL.cjs} +4 -4
- package/dist/{create-team-CWC7s6TS.cjs.map → create-team-DFSriKVL.cjs.map} +1 -1
- package/dist/{dataset-fields-Bo9Nbtdn.cjs → dataset-fields-Bp_g-sD6.cjs} +3 -3
- package/dist/{dataset-fields-Bo9Nbtdn.cjs.map → dataset-fields-Bp_g-sD6.cjs.map} +1 -1
- package/dist/{error-handling-19djRJdh.cjs → error-handling-FGjcJT8U.cjs} +2 -2
- package/dist/{error-handling-19djRJdh.cjs.map → error-handling-FGjcJT8U.cjs.map} +1 -1
- package/dist/{find-dsns-Bqafhzp5.js → find-dsns-BzfYjE06.js} +2 -2
- package/dist/{find-dsns-Bqafhzp5.js.map → find-dsns-BzfYjE06.js.map} +1 -1
- package/dist/{find-dsns-MMdOXURp.cjs → find-dsns-DhHHtvpj.cjs} +4 -4
- package/dist/{find-dsns-MMdOXURp.cjs.map → find-dsns-DhHHtvpj.cjs.map} +1 -1
- package/dist/{find-organizations-D80maEbK.cjs → find-organizations-7ooGnnmP.cjs} +3 -3
- package/dist/{find-organizations-D80maEbK.cjs.map → find-organizations-7ooGnnmP.cjs.map} +1 -1
- package/dist/{find-organizations-DV7Za1d0.js → find-organizations-BJFAElbh.js} +2 -2
- package/dist/{find-organizations-DV7Za1d0.js.map → find-organizations-BJFAElbh.js.map} +1 -1
- package/dist/{find-projects-KrMwC18K.cjs → find-projects-BpEGRZya.cjs} +4 -4
- package/dist/{find-projects-KrMwC18K.cjs.map → find-projects-BpEGRZya.cjs.map} +1 -1
- package/dist/{find-projects-Dcqw9Vyi.js → find-projects-E5CMFbwU.js} +2 -2
- package/dist/{find-projects-Dcqw9Vyi.js.map → find-projects-E5CMFbwU.js.map} +1 -1
- package/dist/{find-releases-CHDuNU2z.js → find-releases-DWWonhlV.js} +2 -2
- package/dist/{find-releases-CHDuNU2z.js.map → find-releases-DWWonhlV.js.map} +1 -1
- package/dist/{find-releases-BPS53QTy.cjs → find-releases-Du5euXKS.cjs} +4 -4
- package/dist/{find-releases-BPS53QTy.cjs.map → find-releases-Du5euXKS.cjs.map} +1 -1
- package/dist/{find-teams-DPdnW18Q.js → find-teams-BM4yWKe_.js} +2 -2
- package/dist/{find-teams-DPdnW18Q.js.map → find-teams-BM4yWKe_.js.map} +1 -1
- package/dist/{find-teams-DFl7ESVe.cjs → find-teams-Bp6-Iu62.cjs} +4 -4
- package/dist/{find-teams-DFl7ESVe.cjs.map → find-teams-Bp6-Iu62.cjs.map} +1 -1
- package/dist/{formatters-Bb4El3CZ.cjs → formatters-B6H5qTFe.cjs} +2 -2
- package/dist/{formatters-Bb4El3CZ.cjs.map → formatters-B6H5qTFe.cjs.map} +1 -1
- package/dist/{formatters-Bta1mFce.cjs → formatters-ObdzRwld.cjs} +3 -3
- package/dist/{formatters-Bta1mFce.cjs.map → formatters-ObdzRwld.cjs.map} +1 -1
- package/dist/{formatting-BWMTp6lM.d.cts → formatting-Bw0FWiCH.d.cts} +4 -4
- package/dist/{formatting-BWMTp6lM.d.cts.map → formatting-Bw0FWiCH.d.cts.map} +1 -1
- package/dist/{formatting-CSkVn9rJ.d.ts → formatting-ClM7RU4L.d.ts} +4 -4
- package/dist/{formatting-CSkVn9rJ.d.ts.map → formatting-ClM7RU4L.d.ts.map} +1 -1
- package/dist/{get-doc-CGOI0C0A.js → get-doc-CWhlUoJe.js} +2 -2
- package/dist/{get-doc-CGOI0C0A.js.map → get-doc-CWhlUoJe.js.map} +1 -1
- package/dist/{get-doc-BWKx48zK.cjs → get-doc-DsOaSMIe.cjs} +3 -3
- package/dist/{get-doc-BWKx48zK.cjs.map → get-doc-DsOaSMIe.cjs.map} +1 -1
- package/dist/{get-event-attachment-CMPD67lQ.cjs → get-event-attachment-CTF-k6op.cjs} +4 -4
- package/dist/{get-event-attachment-CMPD67lQ.cjs.map → get-event-attachment-CTF-k6op.cjs.map} +1 -1
- package/dist/{get-event-attachment-C5nefGca.js → get-event-attachment-DDvsu6IQ.js} +2 -2
- package/dist/{get-event-attachment-C5nefGca.js.map → get-event-attachment-DDvsu6IQ.js.map} +1 -1
- package/dist/{get-issue-details-y1io-npG.js → get-issue-details-Bsax2jTY.js} +2 -2
- package/dist/{get-issue-details-y1io-npG.js.map → get-issue-details-Bsax2jTY.js.map} +1 -1
- package/dist/{get-issue-details-BxJ_lQN8.cjs → get-issue-details-CIZSksmd.cjs} +5 -5
- package/dist/{get-issue-details-BxJ_lQN8.cjs.map → get-issue-details-CIZSksmd.cjs.map} +1 -1
- package/dist/{get-trace-details-C9gJYPip.cjs → get-trace-details-Bc9GgkSs.cjs} +4 -4
- package/dist/{get-trace-details-C9gJYPip.cjs.map → get-trace-details-Bc9GgkSs.cjs.map} +1 -1
- package/dist/{get-trace-details-BOBNimN0.js → get-trace-details-Bkilw5oH.js} +2 -2
- package/dist/{get-trace-details-BOBNimN0.js.map → get-trace-details-Bkilw5oH.js.map} +1 -1
- package/dist/{handler-CU9ZxaP9.d.ts → handler-CASDrJ7z.d.ts} +3 -3
- package/dist/{handler-CU9ZxaP9.d.ts.map → handler-CASDrJ7z.d.ts.map} +1 -1
- package/dist/{handler-7ABtxyRG.d.cts → handler-CZEMKP9p.d.cts} +3 -3
- package/dist/{handler-7ABtxyRG.d.cts.map → handler-CZEMKP9p.d.cts.map} +1 -1
- package/dist/{handler-L0cEG-0-.cjs → handler-ChOaafS-.cjs} +8 -8
- package/dist/handler-ChOaafS-.cjs.map +1 -0
- package/dist/{handler-FxM1t6Wf.d.cts → handler-CmTBmIt9.d.cts} +3 -3
- package/dist/{handler-FxM1t6Wf.d.cts.map → handler-CmTBmIt9.d.cts.map} +1 -1
- package/dist/{handler-BDPbWDvJ.d.ts → handler-Cs5DcdpF.d.ts} +3 -3
- package/dist/{handler-BDPbWDvJ.d.ts.map → handler-Cs5DcdpF.d.ts.map} +1 -1
- package/dist/{handler-CK_gY4IH.cjs → handler-DQbc5eAJ.cjs} +9 -9
- package/dist/handler-DQbc5eAJ.cjs.map +1 -0
- package/dist/{handler-Dv8J_Uro.js → handler-bf2qu8DQ.js} +5 -5
- package/dist/handler-bf2qu8DQ.js.map +1 -0
- package/dist/{handler-DdgXX0YP.js → handler-y6EMhG0y.js} +5 -5
- package/dist/handler-y6EMhG0y.js.map +1 -0
- package/dist/index.cjs +44 -44
- package/dist/index.js +29 -29
- package/dist/internal/agents/callEmbeddedAgent.cjs +4 -3
- package/dist/internal/agents/callEmbeddedAgent.d.cts +1 -1
- package/dist/internal/agents/callEmbeddedAgent.d.ts +1 -1
- package/dist/internal/agents/callEmbeddedAgent.js +4 -3
- package/dist/internal/agents/openai-provider.cjs +2 -2
- package/dist/internal/agents/openai-provider.js +2 -2
- package/dist/internal/agents/tools/dataset-fields.cjs +6 -6
- package/dist/internal/agents/tools/dataset-fields.d.cts +7 -7
- package/dist/internal/agents/tools/dataset-fields.d.ts +7 -7
- package/dist/internal/agents/tools/dataset-fields.d.ts.map +1 -1
- package/dist/internal/agents/tools/dataset-fields.js +2 -2
- package/dist/internal/agents/tools/otel-semantics.cjs +6 -6
- package/dist/internal/agents/tools/otel-semantics.d.cts +7 -7
- package/dist/internal/agents/tools/otel-semantics.d.ts +7 -7
- package/dist/internal/agents/tools/otel-semantics.d.ts.map +1 -1
- package/dist/internal/agents/tools/otel-semantics.js +2 -2
- package/dist/internal/agents/tools/utils.cjs +5 -5
- package/dist/internal/agents/tools/utils.d.cts +1 -1
- package/dist/internal/agents/tools/utils.d.ts +1 -1
- package/dist/internal/agents/tools/utils.js +2 -2
- package/dist/internal/agents/tools/whoami.cjs +6 -6
- package/dist/internal/agents/tools/whoami.d.cts +7 -7
- package/dist/internal/agents/tools/whoami.d.ts +7 -7
- package/dist/internal/agents/tools/whoami.d.ts.map +1 -1
- package/dist/internal/agents/tools/whoami.js +2 -2
- package/dist/internal/error-handling.cjs +5 -5
- package/dist/internal/error-handling.d.cts +3 -3
- package/dist/internal/error-handling.d.ts +3 -3
- package/dist/internal/error-handling.js +2 -2
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +4 -4
- package/dist/internal/test-fixtures.d.cts +2 -2
- package/dist/internal/test-fixtures.d.ts +2 -2
- package/dist/internal/tool-helpers/api.cjs +5 -5
- package/dist/internal/tool-helpers/api.d.cts +3 -3
- package/dist/internal/tool-helpers/api.d.ts +3 -3
- package/dist/internal/tool-helpers/api.js +3 -3
- package/dist/internal/tool-helpers/enhance-error.cjs +4 -4
- package/dist/internal/tool-helpers/enhance-error.d.cts +3 -3
- package/dist/internal/tool-helpers/enhance-error.d.ts +3 -3
- package/dist/internal/tool-helpers/enhance-error.js +2 -2
- package/dist/internal/tool-helpers/formatting.d.cts +3 -3
- package/dist/internal/tool-helpers/formatting.d.ts +3 -3
- package/dist/internal/tool-helpers/issue.d.cts +4 -4
- package/dist/internal/tool-helpers/issue.d.ts +4 -4
- package/dist/internal/tool-helpers/seer.d.cts +3 -3
- package/dist/internal/tool-helpers/seer.d.ts +3 -3
- package/dist/{logging-DrbQ8weU.cjs → logging-C-ST7-Ow.cjs} +2 -2
- package/dist/{logging-DrbQ8weU.cjs.map → logging-C-ST7-Ow.cjs.map} +1 -1
- package/dist/{openai-provider-CdGMI-ue.cjs → openai-provider-B7uvGxoI.cjs} +3 -3
- package/dist/{openai-provider-CdGMI-ue.cjs.map → openai-provider-B7uvGxoI.cjs.map} +1 -1
- package/dist/{openai-provider-BpAFXVih.js → openai-provider-DphaqrmX.js} +2 -2
- package/dist/{openai-provider-BpAFXVih.js.map → openai-provider-DphaqrmX.js.map} +1 -1
- package/dist/{otel-semantics-CgF1PqFd.cjs → otel-semantics-n8_5Ib9C.cjs} +3 -3
- package/dist/{otel-semantics-CgF1PqFd.cjs.map → otel-semantics-n8_5Ib9C.cjs.map} +1 -1
- package/dist/{parse-vgBG5mXu.cjs → parse-Br-BwKdT.cjs} +2 -2
- package/dist/{parse-vgBG5mXu.cjs.map → parse-Br-BwKdT.cjs.map} +1 -1
- package/dist/{schema-DUU4CA0j.cjs → schema-BGVOjcD7.cjs} +3 -3
- package/dist/{schema-DUU4CA0j.cjs.map → schema-BGVOjcD7.cjs.map} +1 -1
- package/dist/{schema-Y6BzAUmc.d.cts → schema-Cp8XI7-D.d.ts} +347 -347
- package/dist/schema-Cp8XI7-D.d.ts.map +1 -0
- package/dist/{schema-xBO557xH.d.ts → schema-D5oT-Zi7.d.cts} +285 -285
- package/dist/{schema-Y6BzAUmc.d.cts.map → schema-D5oT-Zi7.d.cts.map} +1 -1
- package/dist/{schema-CGiILhan.cjs → schema-DE4JpUSi.cjs} +2 -2
- package/dist/{schema-CGiILhan.cjs.map → schema-DE4JpUSi.cjs.map} +1 -1
- package/dist/schema.cjs +2 -2
- package/dist/{search-docs-Da7cAz8X.cjs → search-docs-DdOFZY3t.cjs} +3 -3
- package/dist/{search-docs-Da7cAz8X.cjs.map → search-docs-DdOFZY3t.cjs.map} +1 -1
- package/dist/{server-KMgWcsoE.cjs → server-BQBA0VNe.cjs} +25 -25
- package/dist/{server-KMgWcsoE.cjs.map → server-BQBA0VNe.cjs.map} +1 -1
- package/dist/{server-BaovxxmS.js → server-BVqPcPfx.js} +21 -21
- package/dist/{server-BaovxxmS.js.map → server-BVqPcPfx.js.map} +1 -1
- package/dist/server.cjs +40 -40
- package/dist/server.js +27 -27
- package/dist/{slug-validation-ByuBdbX_.cjs → slug-validation-D5VJqMwH.cjs} +2 -2
- package/dist/{slug-validation-ByuBdbX_.cjs.map → slug-validation-D5VJqMwH.cjs.map} +1 -1
- package/dist/{stdio-pNGJyuki.cjs → stdio-DPvrKLnJ.cjs} +3 -3
- package/dist/{stdio-pNGJyuki.cjs.map → stdio-DPvrKLnJ.cjs.map} +1 -1
- package/dist/{stdio-DHijjrp9.js → stdio-YKMCj_QV.js} +2 -2
- package/dist/{stdio-DHijjrp9.js.map → stdio-YKMCj_QV.js.map} +1 -1
- package/dist/telem/index.cjs +1 -1
- package/dist/telem/logging.cjs +1 -1
- package/dist/test-setup.cjs +3 -51873
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1 -51899
- package/dist/test-setup.js.map +1 -1
- package/dist/tools/analyze-issue-with-seer.cjs +8 -8
- package/dist/tools/analyze-issue-with-seer.js +4 -4
- package/dist/tools/create-dsn.cjs +8 -8
- package/dist/tools/create-dsn.js +4 -4
- package/dist/tools/create-project.cjs +8 -8
- package/dist/tools/create-project.js +4 -4
- package/dist/tools/create-team.cjs +8 -8
- package/dist/tools/create-team.js +4 -4
- package/dist/tools/find-dsns.cjs +8 -8
- package/dist/tools/find-dsns.d.cts +4 -4
- package/dist/tools/find-dsns.d.ts +4 -4
- package/dist/tools/find-dsns.js +4 -4
- package/dist/tools/find-organizations.cjs +8 -8
- package/dist/tools/find-organizations.d.cts +2 -2
- package/dist/tools/find-organizations.d.ts +2 -2
- package/dist/tools/find-organizations.js +4 -4
- package/dist/tools/find-projects.cjs +8 -8
- package/dist/tools/find-projects.d.cts +4 -4
- package/dist/tools/find-projects.d.ts +4 -4
- package/dist/tools/find-projects.js +4 -4
- package/dist/tools/find-releases.cjs +8 -8
- package/dist/tools/find-releases.js +4 -4
- package/dist/tools/find-teams.cjs +8 -8
- package/dist/tools/find-teams.d.cts +4 -4
- package/dist/tools/find-teams.d.ts +4 -4
- package/dist/tools/find-teams.js +4 -4
- package/dist/tools/get-doc.cjs +5 -5
- package/dist/tools/get-doc.js +3 -3
- package/dist/tools/get-event-attachment.cjs +8 -8
- package/dist/tools/get-event-attachment.d.cts +6 -6
- package/dist/tools/get-event-attachment.d.ts +6 -6
- package/dist/tools/get-event-attachment.js +4 -4
- package/dist/tools/get-issue-details.cjs +8 -8
- package/dist/tools/get-issue-details.js +4 -4
- package/dist/tools/get-trace-details.cjs +8 -8
- package/dist/tools/get-trace-details.d.cts +4 -4
- package/dist/tools/get-trace-details.d.ts +4 -4
- package/dist/tools/get-trace-details.js +4 -4
- package/dist/tools/index.cjs +40 -40
- package/dist/tools/index.d.cts +76 -76
- package/dist/tools/index.d.ts +76 -76
- package/dist/tools/index.js +27 -27
- package/dist/tools/search-docs.cjs +7 -7
- package/dist/tools/search-docs.js +2 -2
- package/dist/tools/search-events/agent.cjs +13 -12
- package/dist/tools/search-events/agent.d.cts +5 -5
- package/dist/tools/search-events/agent.d.ts +5 -5
- package/dist/tools/search-events/agent.js +6 -6
- package/dist/tools/search-events/formatters.cjs +7 -7
- package/dist/tools/search-events/formatters.d.cts +5 -5
- package/dist/tools/search-events/formatters.d.ts +5 -5
- package/dist/tools/search-events/formatters.js +2 -2
- package/dist/tools/search-events/handler.cjs +16 -16
- package/dist/tools/search-events/handler.d.cts +1 -1
- package/dist/tools/search-events/handler.d.ts +1 -1
- package/dist/tools/search-events/handler.js +7 -7
- package/dist/tools/search-events/index.cjs +16 -16
- package/dist/tools/search-events/index.d.cts +5 -5
- package/dist/tools/search-events/index.d.ts +5 -5
- package/dist/tools/search-events/index.js +7 -7
- package/dist/tools/search-events/utils.cjs +6 -6
- package/dist/tools/search-events/utils.d.cts +5 -5
- package/dist/tools/search-events/utils.d.ts +5 -5
- package/dist/tools/search-events/utils.js +2 -2
- package/dist/tools/search-issues/agent.cjs +12 -11
- package/dist/tools/search-issues/agent.d.cts +5 -5
- package/dist/tools/search-issues/agent.d.ts +5 -5
- package/dist/tools/search-issues/agent.js +6 -6
- package/dist/tools/search-issues/formatters.cjs +1 -1
- package/dist/tools/search-issues/formatters.d.cts +3 -3
- package/dist/tools/search-issues/formatters.d.ts +3 -3
- package/dist/tools/search-issues/handler.cjs +15 -15
- package/dist/tools/search-issues/handler.d.cts +1 -1
- package/dist/tools/search-issues/handler.d.ts +1 -1
- package/dist/tools/search-issues/handler.js +7 -7
- package/dist/tools/search-issues/index.cjs +15 -15
- package/dist/tools/search-issues/index.d.cts +5 -5
- package/dist/tools/search-issues/index.d.ts +5 -5
- package/dist/tools/search-issues/index.js +7 -7
- package/dist/tools/update-issue.cjs +8 -8
- package/dist/tools/update-issue.d.cts +7 -7
- package/dist/tools/update-issue.d.ts +7 -7
- package/dist/tools/update-issue.js +4 -4
- package/dist/tools/update-project.cjs +8 -8
- package/dist/tools/update-project.js +4 -4
- package/dist/tools/use-sentry/agent.cjs +4 -4
- package/dist/tools/use-sentry/agent.d.cts +2 -2
- package/dist/tools/use-sentry/agent.d.ts +2 -2
- package/dist/tools/use-sentry/agent.js +4 -4
- package/dist/tools/use-sentry/handler.cjs +40 -40
- package/dist/tools/use-sentry/handler.js +27 -27
- package/dist/tools/use-sentry/index.cjs +40 -40
- package/dist/tools/use-sentry/index.d.cts +2 -2
- package/dist/tools/use-sentry/index.d.ts +2 -2
- package/dist/tools/use-sentry/index.js +27 -27
- package/dist/tools/use-sentry/tool-wrapper.cjs +6 -6
- package/dist/tools/use-sentry/tool-wrapper.d.cts +6 -6
- package/dist/tools/use-sentry/tool-wrapper.d.ts +6 -6
- package/dist/tools/use-sentry/tool-wrapper.d.ts.map +1 -1
- package/dist/tools/use-sentry/tool-wrapper.js +2 -2
- package/dist/tools/whoami.cjs +6 -6
- package/dist/tools/whoami.js +4 -4
- package/dist/transports/stdio.cjs +2 -2
- package/dist/transports/stdio.js +2 -2
- package/dist/{types-CLI02LNZ.d.cts → types-CZI-5yyV.d.cts} +2 -2
- package/dist/{types-CLI02LNZ.d.cts.map → types-CZI-5yyV.d.cts.map} +1 -1
- package/dist/{types-DA9C6AdF.d.ts → types-WcBA7ZSQ.d.ts} +2 -2
- package/dist/{types-DA9C6AdF.d.ts.map → types-WcBA7ZSQ.d.ts.map} +1 -1
- package/dist/{update-issue-B9Y1Qftw.js → update-issue-B35n8MDT.js} +2 -2
- package/dist/{update-issue-B9Y1Qftw.js.map → update-issue-B35n8MDT.js.map} +1 -1
- package/dist/{update-issue-ADk9Bl3r.cjs → update-issue-DOVD2zXD.cjs} +4 -4
- package/dist/{update-issue-ADk9Bl3r.cjs.map → update-issue-DOVD2zXD.cjs.map} +1 -1
- package/dist/{update-project-CoVoAlvN.js → update-project-D361nWlU.js} +2 -2
- package/dist/{update-project-CoVoAlvN.js.map → update-project-D361nWlU.js.map} +1 -1
- package/dist/{update-project-CanU1PTp.cjs → update-project-DG3bwhNA.cjs} +5 -5
- package/dist/{update-project-CanU1PTp.cjs.map → update-project-DG3bwhNA.cjs.map} +1 -1
- package/dist/utils/slug-validation.cjs +1 -1
- package/dist/{utils-DfYLsLqN.d.cts → utils-Bzaer0D1.d.ts} +4 -4
- package/dist/utils-Bzaer0D1.d.ts.map +1 -0
- package/dist/{utils-Cv3R2iOS.d.cts → utils-C5oiuqkh.d.cts} +6 -6
- package/dist/{utils-Cv3R2iOS.d.cts.map → utils-C5oiuqkh.d.cts.map} +1 -1
- package/dist/{utils-_4aPBcrG.d.ts → utils-CAWsA9Cl.d.cts} +4 -4
- package/dist/{utils-DfYLsLqN.d.cts.map → utils-CAWsA9Cl.d.cts.map} +1 -1
- package/dist/{utils-Cr15-6aW.cjs → utils-CIt6Amml.cjs} +3 -3
- package/dist/{utils-Cr15-6aW.cjs.map → utils-CIt6Amml.cjs.map} +1 -1
- package/dist/{utils-Cj4NLgWf.d.ts → utils-CrKFhSC3.d.ts} +6 -6
- package/dist/{utils-Cj4NLgWf.d.ts.map → utils-CrKFhSC3.d.ts.map} +1 -1
- package/dist/{utils-B4iBngk1.cjs → utils-DJIwl8YR.cjs} +3 -3
- package/dist/{utils-B4iBngk1.cjs.map → utils-DJIwl8YR.cjs.map} +1 -1
- package/dist/{version-HXEfly4U.js → version-CCICHYna.js} +2 -2
- package/dist/{version-HXEfly4U.js.map → version-CCICHYna.js.map} +1 -1
- package/dist/{version-DZBMB6XD.cjs → version-CPcX-30c.cjs} +2 -2
- package/dist/{version-DZBMB6XD.cjs.map → version-CPcX-30c.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/{whoami-DcSsmS02.cjs → whoami-9JymZ3NV.cjs} +3 -3
- package/dist/{whoami-DcSsmS02.cjs.map → whoami-9JymZ3NV.cjs.map} +1 -1
- package/dist/{whoami-CZ02abcM.cjs → whoami-CRF9Ws25.cjs} +2 -2
- package/dist/{whoami-CZ02abcM.cjs.map → whoami-CRF9Ws25.cjs.map} +1 -1
- package/dist/{whoami-Cbo082cU.js → whoami-DCZN-m7R.js} +2 -2
- package/dist/{whoami-Cbo082cU.js.map → whoami-DCZN-m7R.js.map} +1 -1
- package/package.json +5 -4
- package/dist/agent-BePwIb80.d.cts.map +0 -1
- package/dist/agent-Bgg6nor6.cjs.map +0 -1
- package/dist/agent-CaZRIfIM.d.ts.map +0 -1
- package/dist/agent-CuX9zpZq.d.ts.map +0 -1
- package/dist/agent-CzjC0wP8.js.map +0 -1
- package/dist/agent-DOraNng-.cjs.map +0 -1
- package/dist/agent-WO6BpLta.d.cts.map +0 -1
- package/dist/agent-vFXI2vu1.js.map +0 -1
- package/dist/callEmbeddedAgent-B24rpPzZ.d.cts.map +0 -1
- package/dist/callEmbeddedAgent-B51_9ycP.js.map +0 -1
- package/dist/callEmbeddedAgent-Dk48A2gz.d.ts.map +0 -1
- package/dist/callEmbeddedAgent-xTPNMk8s.cjs.map +0 -1
- package/dist/handler-CK_gY4IH.cjs.map +0 -1
- package/dist/handler-DdgXX0YP.js.map +0 -1
- package/dist/handler-Dv8J_Uro.js.map +0 -1
- package/dist/handler-L0cEG-0-.cjs.map +0 -1
- package/dist/schema-xBO557xH.d.ts.map +0 -1
- package/dist/utils-_4aPBcrG.d.ts.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SentryApiService } from "./client-
|
|
1
|
+
import { SentryApiService } from "./client-0n2-4zOO.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/tools/search-issues/agent.d.ts
|
|
5
|
-
declare const
|
|
6
|
-
query: z.
|
|
7
|
-
sort: z.
|
|
5
|
+
declare const searchIssuesAgentOutputSchema: z.ZodObject<{
|
|
6
|
+
query: z.ZodString;
|
|
7
|
+
sort: z.ZodNullable<z.ZodEnum<["date", "freq", "new", "user"]>>;
|
|
8
8
|
explanation: z.ZodString;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
sort: "date" | "user" | "freq" | "new" | null;
|
|
11
|
+
query: string;
|
|
10
12
|
explanation: string;
|
|
11
|
-
query?: string | null | undefined;
|
|
12
|
-
sort?: "date" | "user" | "freq" | "new" | null | undefined;
|
|
13
13
|
}, {
|
|
14
|
+
sort: "date" | "user" | "freq" | "new" | null;
|
|
15
|
+
query: string;
|
|
14
16
|
explanation: string;
|
|
15
|
-
query?: string | null | undefined;
|
|
16
|
-
sort?: "date" | "user" | "freq" | "new" | null | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
interface SearchIssuesAgentOptions {
|
|
19
19
|
query: string;
|
|
@@ -26,9 +26,10 @@ interface SearchIssuesAgentOptions {
|
|
|
26
26
|
* This returns both the translated query result AND the tool calls made by the agent
|
|
27
27
|
*/
|
|
28
28
|
declare function searchIssuesAgent(options: SearchIssuesAgentOptions): Promise<{
|
|
29
|
-
result: z.
|
|
29
|
+
result: z.output<typeof searchIssuesAgentOutputSchema>;
|
|
30
30
|
toolCalls: any[];
|
|
31
31
|
}>;
|
|
32
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
32
33
|
//#endregion
|
|
33
|
-
export { SearchIssuesAgentOptions, searchIssuesAgent };
|
|
34
|
-
//# sourceMappingURL=agent-
|
|
34
|
+
export { SearchIssuesAgentOptions, searchIssuesAgent, searchIssuesAgentOutputSchema };
|
|
35
|
+
//# sourceMappingURL=agent-TEZG63ug.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-TEZG63ug.d.cts","names":[],"sources":["../src/tools/search-issues/agent.ts"],"sourcesContent":[],"mappings":";;;;cAWa,+BAA6B,CAAA,CAAA;SASxC,CAAA,CAAA;EATW,IAAA,eAAA,UAAA,CAAA,CAAA,MASX,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,CAAA,CAAA,CAAA;EAAA,WAAA,aAAA;CAAA,EAAA,OAAA,cAAA,EAAA;;;;;MATwC,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,KAAA,GAAA,IAAA;EAAA,KAAA,EAAA,MAAA;EAWzB,WAAA,EAAA,MAAA;AAWjB,CAAA,CAAA;AAAuC,UAXtB,wBAAA,CAWsB;EAAA,KAC5B,EAAA,MAAA;EAAwB,gBAET,EAAA,MAAA;EAA6B,UAA3C,EAXE,gBAWF;EAAM,SADf,CAAA,EAAA,MAAA;AAAO;;;;;iBAFY,iBAAA,UACX,2BACR;UACO,CAAA,CAAE,cAAc"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const require_define = require('./define-CLp6EtpZ.cjs');
|
|
3
3
|
const require_errors = require('./errors-DWysOIMw.cjs');
|
|
4
|
-
const require_api = require('./api-
|
|
5
|
-
const require_schema = require('./schema-
|
|
4
|
+
const require_api = require('./api-CHgBJOv9.cjs');
|
|
5
|
+
const require_schema = require('./schema-BGVOjcD7.cjs');
|
|
6
6
|
const require_issue_helpers = require('./issue-helpers-D-hBnXTk.cjs');
|
|
7
7
|
const require_seer = require('./seer-sA1asAZs.cjs');
|
|
8
8
|
const require_fetch_utils = require('./fetch-utils-DRgOJp3e.cjs');
|
|
@@ -203,4 +203,4 @@ Object.defineProperty(exports, 'analyze_issue_with_seer_default', {
|
|
|
203
203
|
return analyze_issue_with_seer_default;
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
|
-
//# sourceMappingURL=analyze-issue-with-seer-
|
|
206
|
+
//# sourceMappingURL=analyze-issue-with-seer-B90r4g5J.cjs.map
|
package/dist/{analyze-issue-with-seer-DHxMOCaf.cjs.map → analyze-issue-with-seer-B90r4g5J.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-DHxMOCaf.cjs","names":["context: ServerContext","SEER_MAX_RETRIES","SEER_INITIAL_RETRY_DELAY","ApiServerError","ApiError","SEER_TIMEOUT","SEER_POLLING_INTERVAL"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\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 let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;;;AAyBA,sCAAe,0BAAW;CACxB,MAAM;CACN,gBAAgB,CAAC,MAAO;CACxB,gBAAgB,CAAE;CAClB,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;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,qCAAsB,UAAU;EAClD,WAAW,8BAAe,UAAU;EACpC,SAAS,iCAAkB,UAAU;EACrC,UAAU,6BAAc,UAAU;EAClC,aAAa,MACV,QAAQ,CACR,SAAS,kDAAkD,CAC3D,UAAU;CACd;CACD,aAAa;EACX,cAAc;EACd,iBAAiB;EACjB,eAAe;CAChB;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,kCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,uCAAiB;GACf,kBAAkB,OAAO;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,4BAAO,qBAAqB,QAAQ;EAEpC,IAAI,UAAU,4BAA4B,cAAc;EAGxD,IAAI,eAAe,MAAM,qCACvB,MACE,WAAW,gBAAgB;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IAAK;AAE/E,aAAW;AACX,aAAW;AACX,YAAU,OAAO,YACZ,oCAAoC,OAAO,SAAS,OACpD,4CAA4C,QAAQ,cAAc,cAAc;AACrF,aAAW;AAEX,SAAO;CACR;AACF,EAAC"}
|
|
1
|
+
{"version":3,"file":"analyze-issue-with-seer-B90r4g5J.cjs","names":["context: ServerContext","SEER_MAX_RETRIES","SEER_INITIAL_RETRY_DELAY","ApiServerError","ApiError","SEER_TIMEOUT","SEER_POLLING_INTERVAL"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\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 let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;;;AAyBA,sCAAe,0BAAW;CACxB,MAAM;CACN,gBAAgB,CAAC,MAAO;CACxB,gBAAgB,CAAE;CAClB,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;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,qCAAsB,UAAU;EAClD,WAAW,8BAAe,UAAU;EACpC,SAAS,iCAAkB,UAAU;EACrC,UAAU,6BAAc,UAAU;EAClC,aAAa,MACV,QAAQ,CACR,SAAS,kDAAkD,CAC3D,UAAU;CACd;CACD,aAAa;EACX,cAAc;EACd,iBAAiB;EACjB,eAAe;CAChB;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,kCAAsB,SAAS,EAChD,WAA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AO;IACR;AAGD,eAAW,6CAA6C,kBAAkB;GAC3E;EACF;AAGD,MAAI,aAAa,SAAS;AACxB,cAAW,sBAAsB,kCAAqB,aAAa,QAAQ,OAAO,CAAC;AACnF,QAAK,MAAM,QAAQ,aAAa,QAAQ,OAAO;AAC7C,cAAU,qCAAwB,KAAK;AACvC,cAAU;GACX;EACF;AAGD,aAAW;AACX,aAAW,gDAAgDC,4BAAe,IAAK;AAE/E,aAAW;AACX,aAAW;AACX,YAAU,OAAO,YACZ,oCAAoC,OAAO,SAAS,OACpD,4CAA4C,QAAQ,cAAc,cAAc;AACrF,aAAW;AAEX,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineTool } from "./define-vA6uuVue.js";
|
|
2
2
|
import { ApiError, ApiServerError } from "./errors-DUEMWOr1.js";
|
|
3
|
-
import { apiServiceFromContext } from "./api-
|
|
3
|
+
import { apiServiceFromContext } from "./api-CBHyxA3Q.js";
|
|
4
4
|
import { ParamIssueShortId, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from "./schema-ChlpIaqA.js";
|
|
5
5
|
import { parseIssueParams } from "./issue-helpers-DtCbXiRZ.js";
|
|
6
6
|
import { SEER_INITIAL_RETRY_DELAY, SEER_MAX_RETRIES, SEER_POLLING_INTERVAL, SEER_TIMEOUT, getHumanInterventionGuidance, getOutputForAutofixStep, getStatusDisplayName, isTerminalStatus } from "./seer-CSFgx4AP.js";
|
|
@@ -197,4 +197,4 @@ var analyze_issue_with_seer_default = defineTool({
|
|
|
197
197
|
|
|
198
198
|
//#endregion
|
|
199
199
|
export { analyze_issue_with_seer_default };
|
|
200
|
-
//# sourceMappingURL=analyze-issue-with-seer-
|
|
200
|
+
//# sourceMappingURL=analyze-issue-with-seer-Ji3KDm0O.js.map
|
package/dist/{analyze-issue-with-seer-iXBAIlQL.js.map → analyze-issue-with-seer-Ji3KDm0O.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-iXBAIlQL.js","names":["context: ServerContext"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\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 let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;;AAyBA,sCAAe,WAAW;CACxB,MAAM;CACN,gBAAgB,CAAC,MAAO;CACxB,gBAAgB,CAAE;CAClB,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;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,aAAa,EACV,QAAQ,CACR,SAAS,kDAAkD,CAC3D,UAAU;CACd;CACD,aAAa;EACX,cAAc;EACd,iBAAiB;EACjB,eAAe;CAChB;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,iBAAiB;GACf,kBAAkB,OAAO;GACzB,SAAS,OAAO;GAChB,UAAU,OAAO;EAClB,EAAC;AAEJ,SAAO,qBAAqB,QAAQ;EAEpC,IAAI,UAAU,4BAA4B,cAAc;EAGxD,IAAI,eAAe,MAAM,iBACvB,MACE,WAAW,gB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aAAW;AACX,aAAW;AACX,YAAU,OAAO,YACZ,oCAAoC,OAAO,SAAS,OACpD,4CAA4C,QAAQ,cAAc,cAAc;AACrF,aAAW;AAEX,SAAO;CACR;AACF,EAAC"}
|
|
1
|
+
{"version":3,"file":"analyze-issue-with-seer-Ji3KDm0O.js","names":["context: ServerContext"],"sources":["../src/tools/analyze-issue-with-seer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"../internal/tool-helpers/define\";\nimport { apiServiceFromContext } from \"../internal/tool-helpers/api\";\nimport { parseIssueParams } from \"../internal/tool-helpers/issue\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n SEER_MAX_RETRIES,\n SEER_INITIAL_RETRY_DELAY,\n} from \"../internal/tool-helpers/seer\";\nimport { retryWithBackoff } from \"../internal/fetch-utils\";\nimport type { ServerContext } from \"../types\";\nimport { ApiError, ApiServerError } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n requiredSkills: [\"seer\"], // Only available in seer skill\n requiredScopes: [], // No Sentry API scopes required - authorization via 'seer' skill\n description: [\n \"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.\",\n \"\",\n \"Use this tool when you need:\",\n \"- Detailed AI-powered root cause analysis\",\n \"- Specific code fixes and implementation guidance\",\n \"- Step-by-step troubleshooting for complex issues\",\n \"- Understanding why an error is happening in production\",\n \"\",\n \"What this tool provides:\",\n \"- Root cause analysis with code-level explanations\",\n \"- Specific file locations and line numbers where errors occur\",\n \"- Concrete code fixes you can apply\",\n \"- Step-by-step implementation guidance\",\n \"\",\n \"This tool automatically:\",\n \"1. Checks if analysis already exists (instant results)\",\n \"2. Starts new AI analysis if needed (~2-5 minutes)\",\n \"3. Returns complete fix recommendations\",\n \"\",\n \"<examples>\",\n '### User: \"What\\'s causing this error? https://my-org.sentry.io/issues/PROJECT-1Z43\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(issueUrl='https://my-org.sentry.io/issues/PROJECT-1Z43')\",\n \"```\",\n \"\",\n '### User: \"Can you help me understand why this is failing in production?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ERROR-456')\",\n \"```\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- Use this tool when you need deeper analysis beyond basic issue details\",\n \"- If the user provides an issueUrl, extract it and use that parameter alone\",\n \"- The analysis includes actual code snippets and fixes, not just error descriptions\",\n \"- Results are cached - subsequent calls return instantly\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n instruction: z\n .string()\n .describe(\"Optional custom instruction for the AI analysis\")\n .optional(),\n },\n annotations: {\n readOnlyHint: false,\n destructiveHint: false,\n openWorldHint: true,\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\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 let output = `# Seer Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n\n // Step 2: Start analysis if none exists\n if (!autofixState.autofix) {\n output += `Starting new analysis...\\n\\n`;\n const startResult = await apiService.startAutofix({\n organizationSlug: orgSlug,\n issueId: parsedIssueId,\n instruction: params.instruction,\n });\n output += `Analysis started with Run ID: ${startResult.run_id}\\n\\n`;\n\n // Give it a moment to initialize\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n // Refresh state with retry logic\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n } else {\n output += `Found existing analysis (Run ID: ${autofixState.autofix.run_id})\\n\\n`;\n\n // Check if existing analysis is already complete\n const existingStatus = autofixState.autofix.status;\n if (isTerminalStatus(existingStatus)) {\n // Return results immediately, no polling needed\n output += `## Analysis ${getStatusDisplayName(existingStatus)}\\n\\n`;\n\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (existingStatus !== \"COMPLETED\") {\n output += `\\n**Status**: ${existingStatus}\\n`;\n output += getHumanInterventionGuidance(existingStatus);\n output += \"\\n\";\n }\n\n return output;\n }\n }\n\n // Step 3: Poll until complete or timeout (only for non-terminal states)\n const startTime = Date.now();\n let lastStatus = \"\";\n let consecutiveErrors = 0;\n\n while (Date.now() - startTime < SEER_TIMEOUT) {\n if (!autofixState.autofix) {\n output += `Error: Analysis state lost. Please try again by running:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n const status = autofixState.autofix.status;\n\n // Check if completed (terminal state)\n if (isTerminalStatus(status)) {\n output += `## Analysis ${getStatusDisplayName(status)}\\n\\n`;\n\n // Add all step outputs\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n\n if (status !== \"COMPLETED\") {\n output += `\\n**Status**: ${status}\\n`;\n output += getHumanInterventionGuidance(status);\n }\n\n return output;\n }\n\n // Update status if changed\n if (status !== lastStatus) {\n const activeStep = autofixState.autofix.steps.find(\n (step) =>\n step.status === \"PROCESSING\" || step.status === \"IN_PROGRESS\",\n );\n if (activeStep) {\n output += `Processing: ${activeStep.title}...\\n`;\n }\n lastStatus = status;\n }\n\n // Wait before next poll\n await new Promise((resolve) =>\n setTimeout(resolve, SEER_POLLING_INTERVAL),\n );\n\n // Refresh state with error handling\n try {\n autofixState = await retryWithBackoff(\n () =>\n apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n }),\n {\n maxRetries: SEER_MAX_RETRIES,\n initialDelay: SEER_INITIAL_RETRY_DELAY,\n shouldRetry: (error) => {\n // Retry on server errors (5xx) or non-API errors (network issues)\n return (\n error instanceof ApiServerError || !(error instanceof ApiError)\n );\n },\n },\n );\n consecutiveErrors = 0; // Reset error counter on success\n } catch (error) {\n consecutiveErrors++;\n\n // If we've had too many consecutive errors, give up\n if (consecutiveErrors >= 3) {\n output += `\\n## Error During Analysis\\n\\n`;\n output += `Unable to retrieve analysis status after multiple attempts.\\n`;\n output += `Error: ${error instanceof Error ? error.message : String(error)}\\n\\n`;\n output += `You can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n return output;\n }\n\n // Log the error but continue polling\n output += `Temporary error retrieving status (attempt ${consecutiveErrors}/3), retrying...\\n`;\n }\n }\n\n // Show current progress\n if (autofixState.autofix) {\n output += `**Current Status**: ${getStatusDisplayName(autofixState.autofix.status)}\\n\\n`;\n for (const step of autofixState.autofix.steps) {\n output += getOutputForAutofixStep(step);\n output += \"\\n\";\n }\n }\n\n // Timeout reached\n output += `\\n## Analysis Timed Out\\n\\n`;\n output += `The analysis is taking longer than expected (>${SEER_TIMEOUT / 1000}s).\\n\\n`;\n\n output += `\\nYou can check the status later by running the same command again:\\n`;\n output += `\\`\\`\\`\\n`;\n output += params.issueUrl\n ? `analyze_issue_with_seer(issueUrl=\"${params.issueUrl}\")`\n : `analyze_issue_with_seer(organizationSlug=\"${orgSlug}\", issueId=\"${parsedIssueId}\")`;\n output += `\\n\\`\\`\\`\\n`;\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;;AAyBA,sCAAe,WAAW;CACxB,MAAM;CACN,gBAAgB,CAAC,MAAO;CACxB,gBAAgB,CAAE;CAClB,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;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,aAAa,EACV,QAAQ,CACR,SAAS,kDAAkD,CAC3D,UAAU;CACd;CACD,aAAa;EACX,cAAc;EACd,iBAAiB;EACjB,eAAe;CAChB;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,EAAE,kBAAkB,SAAS,SAAS,eAAe,GACzD,iBAAiB;GACf,kBAAkB,OAAO;GACzB,SAA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C;AACnF,QAAK,MAAM,QAAQ,aAAa,QAAQ,OAAO;AAC7C,cAAU,wBAAwB,KAAK;AACvC,cAAU;GACX;EACF;AAGD,aAAW;AACX,aAAW,gDAAgD,eAAe,IAAK;AAE/E,aAAW;AACX,aAAW;AACX,YAAU,OAAO,YACZ,oCAAoC,OAAO,SAAS,OACpD,4CAA4C,QAAQ,cAAc,cAAc;AACrF,aAAW;AAEX,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UserInputError } from "./errors-BXmNwD2K.js";
|
|
2
2
|
import { ApiClientError, ApiNotFoundError } from "./errors-DUEMWOr1.js";
|
|
3
|
-
import { SentryApiService } from "./client-
|
|
3
|
+
import { SentryApiService } from "./client-B7hvqupZ.js";
|
|
4
4
|
import { validateRegionUrl } from "./validate-region-url-Bdokgz65.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/tool-helpers/api.ts
|
|
@@ -60,4 +60,4 @@ async function withApiErrorHandling(fn, params) {
|
|
|
60
60
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { apiServiceFromContext, handleApiError, withApiErrorHandling };
|
|
63
|
-
//# sourceMappingURL=api-
|
|
63
|
+
//# sourceMappingURL=api-CBHyxA3Q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-
|
|
1
|
+
{"version":3,"file":"api-CBHyxA3Q.js","names":["context: ServerContext","opts: { regionUrl?: string }","error: unknown","params?: Record<string, unknown>","paramsList: string[]","fn: () => Promise<T>"],"sources":["../src/internal/tool-helpers/api.ts"],"sourcesContent":["import {\n SentryApiService,\n ApiClientError,\n ApiNotFoundError,\n} from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\nimport { validateRegionUrl } from \"./validate-region-url\";\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 (always uses HTTPS)\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.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n // Validate the regionUrl against the base host to prevent SSRF\n // Use default host if context.sentryHost is not set\n const baseHost = context.sentryHost || \"sentry.io\";\n host = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\n/**\n * Maps API errors to user-friendly errors based on context\n * @param error - The error to handle\n * @param params - The parameters that were used in the API call\n * @returns Never - always throws an error\n * @throws {UserInputError} For 4xx errors that are likely user input issues\n * @throws {Error} For other errors\n */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n // Use the new error hierarchy - all 4xx errors extend ApiClientError\n if (error instanceof ApiClientError) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // Special handling for 404s with parameter context\n if (error instanceof ApiNotFoundError && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n\n // All other errors bubble up (including ApiServerError for 5xx)\n throw error;\n}\n\n/**\n * Wraps an async API call with automatic error handling\n * @param fn - The async function to execute\n * @param params - The parameters that were used in the API call\n * @returns The result of the function\n * @throws {UserInputError} For user input errors\n * @throws {Error} For other errors\n */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,EAAE;EAG1B,MAAM,WAAW,QAAQ,cAAc;AACvC,SAAO,kBAAkB,KAAK,UAAU,MAAM,EAAE,SAAS;CAC1D;AAED,QAAO,IAAI,iBAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AAEP,KAAI,iBAAiB,gBAAgB;EACnC,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,MAAI,iBAAiB,oBAAoB,QAAQ;GAC/C,MAAMC,aAAuB,CAAE;AAC/B,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,OAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;EAErJ;AAED,QAAM,IAAI,eAAe,SAAS,EAAE,OAAO,MAAO;CACnD;AAGD,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAF,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require('./errors-umQzF_vW.cjs');
|
|
2
2
|
const require_errors$1 = require('./errors-DWysOIMw.cjs');
|
|
3
|
-
const require_client = require('./client-
|
|
3
|
+
const require_client = require('./client-cC79LUJ5.cjs');
|
|
4
4
|
const require_validate_region_url = require('./validate-region-url-BvT-IgKg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/internal/tool-helpers/api.ts
|
|
@@ -77,4 +77,4 @@ Object.defineProperty(exports, 'withApiErrorHandling', {
|
|
|
77
77
|
return withApiErrorHandling;
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
//# sourceMappingURL=api-
|
|
80
|
+
//# sourceMappingURL=api-CHgBJOv9.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-
|
|
1
|
+
{"version":3,"file":"api-CHgBJOv9.cjs","names":["context: ServerContext","opts: { regionUrl?: string }","SentryApiService","error: unknown","params?: Record<string, unknown>","ApiClientError","ApiNotFoundError","paramsList: string[]","UserInputError","fn: () => Promise<T>"],"sources":["../src/internal/tool-helpers/api.ts"],"sourcesContent":["import {\n SentryApiService,\n ApiClientError,\n ApiNotFoundError,\n} from \"../../api-client/index\";\nimport { UserInputError } from \"../../errors\";\nimport type { ServerContext } from \"../../types\";\nimport { validateRegionUrl } from \"./validate-region-url\";\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 (always uses HTTPS)\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.sentryHost;\n\n if (opts.regionUrl?.trim()) {\n // Validate the regionUrl against the base host to prevent SSRF\n // Use default host if context.sentryHost is not set\n const baseHost = context.sentryHost || \"sentry.io\";\n host = validateRegionUrl(opts.regionUrl.trim(), baseHost);\n }\n\n return new SentryApiService({\n host,\n accessToken: context.accessToken,\n });\n}\n\n/**\n * Maps API errors to user-friendly errors based on context\n * @param error - The error to handle\n * @param params - The parameters that were used in the API call\n * @returns Never - always throws an error\n * @throws {UserInputError} For 4xx errors that are likely user input issues\n * @throws {Error} For other errors\n */\nexport function handleApiError(\n error: unknown,\n params?: Record<string, unknown>,\n): never {\n // Use the new error hierarchy - all 4xx errors extend ApiClientError\n if (error instanceof ApiClientError) {\n let message = `API error (${error.status}): ${error.message}`;\n\n // Special handling for 404s with parameter context\n if (error instanceof ApiNotFoundError && params) {\n const paramsList: string[] = [];\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null && value !== \"\") {\n paramsList.push(`${key}: '${value}'`);\n }\n }\n\n if (paramsList.length > 0) {\n message = `Resource not found (404): ${error.message}\\nPlease verify these parameters are correct:\\n${paramsList.map((p) => ` - ${p}`).join(\"\\n\")}`;\n }\n }\n\n throw new UserInputError(message, { cause: error });\n }\n\n // All other errors bubble up (including ApiServerError for 5xx)\n throw error;\n}\n\n/**\n * Wraps an async API call with automatic error handling\n * @param fn - The async function to execute\n * @param params - The parameters that were used in the API call\n * @returns The result of the function\n * @throws {UserInputError} For user input errors\n * @throws {Error} For other errors\n */\nexport async function withApiErrorHandling<T>(\n fn: () => Promise<T>,\n params?: Record<string, unknown>,\n): Promise<T> {\n try {\n return await fn();\n } catch (error) {\n handleApiError(error, params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAgB,sBACdA,SACAC,OAA+B,CAAE,GACjC;CACA,IAAI,OAAO,QAAQ;AAEnB,KAAI,KAAK,WAAW,MAAM,EAAE;EAG1B,MAAM,WAAW,QAAQ,cAAc;AACvC,SAAO,8CAAkB,KAAK,UAAU,MAAM,EAAE,SAAS;CAC1D;AAED,QAAO,IAAIC,gCAAiB;EAC1B;EACA,aAAa,QAAQ;CACtB;AACF;;;;;;;;;AAUD,SAAgB,eACdC,OACAC,QACO;AAEP,KAAI,iBAAiBC,iCAAgB;EACnC,IAAI,WAAW,aAAa,MAAM,OAAO,KAAK,MAAM;AAGpD,MAAI,iBAAiBC,qCAAoB,QAAQ;GAC/C,MAAMC,aAAuB,CAAE;AAC/B,QAAK,MAAM,CAAC,KAAK,MAAM,IAAI,OAAO,QAAQ,OAAO,CAC/C,KAAI,oBAAuB,UAAU,QAAQ,UAAU,GACrD,YAAW,QAAQ,IAAI,KAAK,MAAM,GAAG;AAIzC,OAAI,WAAW,SAAS,EACtB,YAAW,4BAA4B,MAAM,QAAQ,iDAAiD,WAAW,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,KAAK,KAAK;EAErJ;AAED,QAAM,IAAIC,8BAAe,SAAS,EAAE,OAAO,MAAO;CACnD;AAGD,OAAM;AACP;;;;;;;;;AAUD,eAAsB,qBACpBC,IACAL,QACY;AACZ,KAAI;AACF,SAAO,MAAM,IAAI;CAClB,SAAQ,OAAO;AACd,iBAAe,OAAO,OAAO;CAC9B;AACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
require('../errors-umQzF_vW.cjs');
|
|
2
2
|
require('../url-utils-CbcNJVYS.cjs');
|
|
3
|
-
require('../logging-
|
|
4
|
-
require('../schema-
|
|
3
|
+
require('../logging-C-ST7-Ow.cjs');
|
|
4
|
+
require('../schema-DE4JpUSi.cjs');
|
|
5
5
|
require('../errors-DWysOIMw.cjs');
|
|
6
|
-
require('../version-
|
|
7
|
-
const require_client = require('../client-
|
|
6
|
+
require('../version-CPcX-30c.cjs');
|
|
7
|
+
const require_client = require('../client-cC79LUJ5.cjs');
|
|
8
8
|
|
|
9
9
|
exports.SentryApiService = require_client.SentryApiService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import "../schema-D5oT-Zi7.cjs";
|
|
2
|
+
import "../types-CZI-5yyV.cjs";
|
|
3
|
+
import { SentryApiService } from "../client-0n2-4zOO.cjs";
|
|
4
4
|
export { SentryApiService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import "../types-
|
|
3
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import "../schema-Cp8XI7-D.js";
|
|
2
|
+
import "../types-WcBA7ZSQ.js";
|
|
3
|
+
import { SentryApiService } from "../client-ByOC8aCf.js";
|
|
4
4
|
export { SentryApiService };
|
|
@@ -3,7 +3,7 @@ import "../url-utils-CfKwo6s5.js";
|
|
|
3
3
|
import "../logging-ChQnSEmD.js";
|
|
4
4
|
import "../schema-DkZXVCQJ.js";
|
|
5
5
|
import "../errors-DUEMWOr1.js";
|
|
6
|
-
import "../version-
|
|
7
|
-
import { SentryApiService } from "../client-
|
|
6
|
+
import "../version-CCICHYna.js";
|
|
7
|
+
import { SentryApiService } from "../client-B7hvqupZ.js";
|
|
8
8
|
|
|
9
9
|
export { SentryApiService };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require('../errors-umQzF_vW.cjs');
|
|
2
2
|
require('../url-utils-CbcNJVYS.cjs');
|
|
3
|
-
require('../logging-
|
|
4
|
-
const require_schema = require('../schema-
|
|
3
|
+
require('../logging-C-ST7-Ow.cjs');
|
|
4
|
+
const require_schema = require('../schema-DE4JpUSi.cjs');
|
|
5
5
|
const require_errors$1 = require('../errors-DWysOIMw.cjs');
|
|
6
|
-
require('../version-
|
|
7
|
-
const require_client = require('../client-
|
|
6
|
+
require('../version-CPcX-30c.cjs');
|
|
7
|
+
const require_client = require('../client-cC79LUJ5.cjs');
|
|
8
8
|
require('../types-n3wuZu5X.cjs');
|
|
9
9
|
require('../api-client-BGgaBFuD.cjs');
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-
|
|
2
|
-
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-
|
|
3
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-D5oT-Zi7.cjs";
|
|
2
|
+
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-CZI-5yyV.cjs";
|
|
3
|
+
import { SentryApiService } from "../client-0n2-4zOO.cjs";
|
|
4
4
|
import { ApiAuthenticationError, ApiClientError, ApiError, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, createApiError } from "../errors-DMiENfq7.cjs";
|
|
5
5
|
import "../index-CmCelmEL.cjs";
|
|
6
6
|
export { ApiAuthenticationError, ApiClientError, ApiError, ApiErrorSchema, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, AssignedTo, AssignedToSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, DefaultEvent, DefaultEventSchema, ErrorEntrySchema, ErrorEvent, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventAttachment, EventAttachmentList, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, MessageEntrySchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, RawEvent, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, Trace, TraceIssue, TraceIssueSchema, TraceMeta, TraceMetaSchema, TraceSchema, TraceSpan, TraceSpanSchema, TransactionEvent, TransactionEventSchema, UnknownEvent, UnknownEventSchema, User, UserRegionsSchema, UserSchema, createApiError };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-
|
|
2
|
-
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-
|
|
3
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-Cp8XI7-D.js";
|
|
2
|
+
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-WcBA7ZSQ.js";
|
|
3
|
+
import { SentryApiService } from "../client-ByOC8aCf.js";
|
|
4
4
|
import { ApiAuthenticationError, ApiClientError, ApiError, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, createApiError } from "../errors-CyAWBU2S.js";
|
|
5
5
|
import "../index-NfFbnYt3.js";
|
|
6
6
|
export { ApiAuthenticationError, ApiClientError, ApiError, ApiErrorSchema, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, AssignedTo, AssignedToSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, DefaultEvent, DefaultEventSchema, ErrorEntrySchema, ErrorEvent, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventAttachment, EventAttachmentList, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, MessageEntrySchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, RawEvent, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, Trace, TraceIssue, TraceIssueSchema, TraceMeta, TraceMetaSchema, TraceSchema, TraceSpan, TraceSpanSchema, TransactionEvent, TransactionEventSchema, UnknownEvent, UnknownEventSchema, User, UserRegionsSchema, UserSchema, createApiError };
|
package/dist/api-client/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import "../url-utils-CfKwo6s5.js";
|
|
|
3
3
|
import "../logging-ChQnSEmD.js";
|
|
4
4
|
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-DkZXVCQJ.js";
|
|
5
5
|
import { ApiAuthenticationError, ApiClientError, ApiError, ApiNotFoundError, ApiPermissionError, ApiRateLimitError, ApiServerError, ApiValidationError, createApiError } from "../errors-DUEMWOr1.js";
|
|
6
|
-
import "../version-
|
|
7
|
-
import { SentryApiService } from "../client-
|
|
6
|
+
import "../version-CCICHYna.js";
|
|
7
|
+
import { SentryApiService } from "../client-B7hvqupZ.js";
|
|
8
8
|
import "../types-D670-rDz.js";
|
|
9
9
|
import "../api-client-CSLxiNP9.js";
|
|
10
10
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-
|
|
1
|
+
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-D5oT-Zi7.cjs";
|
|
2
2
|
export { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-
|
|
1
|
+
import { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema } from "../schema-Cp8XI7-D.js";
|
|
2
2
|
export { ApiErrorSchema, AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, BreadcrumbSchema, BreadcrumbsEntrySchema, ClientKeyListSchema, ClientKeySchema, DefaultEventSchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, MessageEntrySchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, RequestEntrySchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, ThreadEntrySchema, ThreadsEntrySchema, TraceIssueSchema, TraceMetaSchema, TraceSchema, TraceSpanSchema, TransactionEventSchema, UnknownEventSchema, UserRegionsSchema, UserSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-
|
|
1
|
+
import "../schema-D5oT-Zi7.cjs";
|
|
2
|
+
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-CZI-5yyV.cjs";
|
|
3
3
|
export { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-
|
|
1
|
+
import "../schema-Cp8XI7-D.js";
|
|
2
|
+
import { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User } from "../types-WcBA7ZSQ.js";
|
|
3
3
|
export { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, DefaultEvent, ErrorEvent, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, RawEvent, Release, ReleaseList, Tag, TagList, Team, TeamList, Trace, TraceIssue, TraceMeta, TraceSpan, TransactionEvent, UnknownEvent, User };
|
|
@@ -18,7 +18,7 @@ interface EmbeddedAgentResult<T> {
|
|
|
18
18
|
* - Errors are re-thrown for the calling agent to handle
|
|
19
19
|
* - Each agent can implement its own error handling strategy
|
|
20
20
|
*/
|
|
21
|
-
declare function callEmbeddedAgent<
|
|
21
|
+
declare function callEmbeddedAgent<TOutput, TSchema extends z.ZodType<TOutput, z.ZodTypeDef, unknown>>({
|
|
22
22
|
system,
|
|
23
23
|
prompt,
|
|
24
24
|
tools,
|
|
@@ -27,8 +27,8 @@ declare function callEmbeddedAgent<T>({
|
|
|
27
27
|
system: string;
|
|
28
28
|
prompt: string;
|
|
29
29
|
tools: Record<string, Tool>;
|
|
30
|
-
schema:
|
|
31
|
-
}): Promise<EmbeddedAgentResult<
|
|
30
|
+
schema: TSchema;
|
|
31
|
+
}): Promise<EmbeddedAgentResult<TOutput>>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { ToolCall, callEmbeddedAgent };
|
|
34
|
-
//# sourceMappingURL=callEmbeddedAgent-
|
|
34
|
+
//# sourceMappingURL=callEmbeddedAgent-BIfQ-_5T.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callEmbeddedAgent-BIfQ-_5T.d.ts","names":[],"sources":["../src/internal/agents/callEmbeddedAgent.ts"],"sourcesContent":[],"mappings":";;;;KAKY,QAAA;;EAAA,IAAA,EAAA,OAAQ;AAGlB,CAAA;UAEQ,mBAAmB,CAAA,CAAA,CAAA,CAAA;EAAA,MACnB,EAAA,CAAA;EAAC,SACE,EAAA,QAAA,EAAA;AAAQ;AAWrB;;;;;;;;AAOE,iBAPoB,iBAOpB,CAAA,OAAA,EAAA,gBALgB,CAAA,CAAE,OAKlB,CAL0B,OAK1B,EALmC,CAAA,CAAE,UAKrC,EAAA,OAAA,CAAA,CAAA,CAAA;EAAA,MAAA;EAAA,MAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAAM,MAIgB,EAAA,MAAA;EAAI,MAAnB,EAAA,MAAA;EAAM,KACL,EADD,MACC,CAAA,MAAA,EADc,IACd,CAAA;EAAO,MACe,EADtB,OACsB;CAAO,CAAA,EAAnC,OAAQ,CAAA,mBAAA,CAAoB,OAApB,CAAA,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
2
|
-
const
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_errors = require('./errors-umQzF_vW.cjs');
|
|
3
|
+
const require_openai_provider = require('./openai-provider-B7uvGxoI.cjs');
|
|
3
4
|
const ai = require_chunk.__toESM(require("ai"));
|
|
4
5
|
|
|
5
6
|
//#region src/internal/agents/callEmbeddedAgent.ts
|
|
@@ -29,8 +30,12 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
|
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
if (!result.experimental_output) throw new Error("Failed to generate output");
|
|
33
|
+
const rawOutput = result.experimental_output;
|
|
34
|
+
if (typeof rawOutput === "object" && rawOutput !== null && "error" in rawOutput && typeof rawOutput.error === "string") throw new require_errors.UserInputError(rawOutput.error);
|
|
35
|
+
const parsedResult = schema.safeParse(rawOutput);
|
|
36
|
+
if (!parsedResult.success) throw new require_errors.UserInputError(`Invalid agent response: ${parsedResult.error.message}`);
|
|
32
37
|
return {
|
|
33
|
-
result:
|
|
38
|
+
result: parsedResult.data,
|
|
34
39
|
toolCalls: capturedToolCalls
|
|
35
40
|
};
|
|
36
41
|
}
|
|
@@ -42,4 +47,4 @@ Object.defineProperty(exports, 'callEmbeddedAgent', {
|
|
|
42
47
|
return callEmbeddedAgent;
|
|
43
48
|
}
|
|
44
49
|
});
|
|
45
|
-
//# sourceMappingURL=callEmbeddedAgent-
|
|
50
|
+
//# sourceMappingURL=callEmbeddedAgent-BPS472yg.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callEmbeddedAgent-BPS472yg.cjs","names":["capturedToolCalls: ToolCall[]","UserInputError"],"sources":["../src/internal/agents/callEmbeddedAgent.ts"],"sourcesContent":["import { generateText, Output, type Tool } from \"ai\";\nimport { getOpenAIModel } from \"./openai-provider\";\nimport { UserInputError } from \"../../errors\";\nimport type { z } from \"zod\";\n\nexport type ToolCall = {\n toolName: string;\n args: unknown;\n};\n\ninterface EmbeddedAgentResult<T> {\n result: T;\n toolCalls: ToolCall[];\n}\n\n/**\n * Call an embedded agent with tool call capture\n * This is the standard way to call embedded AI agents within MCP tools\n *\n * Error handling:\n * - Errors are re-thrown for the calling agent to handle\n * - Each agent can implement its own error handling strategy\n */\nexport async function callEmbeddedAgent<\n TOutput,\n TSchema extends z.ZodType<TOutput, z.ZodTypeDef, unknown>,\n>({\n system,\n prompt,\n tools,\n schema,\n}: {\n system: string;\n prompt: string;\n tools: Record<string, Tool>;\n schema: TSchema;\n}): Promise<EmbeddedAgentResult<TOutput>> {\n const capturedToolCalls: ToolCall[] = [];\n\n const result = await generateText({\n model: getOpenAIModel(), // Uses configured default model (gpt-5)\n system,\n prompt,\n tools,\n maxSteps: 5,\n temperature: 1, // GPT-5 only supports temperature of 1\n experimental_output: Output.object({ schema }),\n onStepFinish: (event) => {\n if (event.toolCalls && event.toolCalls.length > 0) {\n for (const toolCall of event.toolCalls) {\n capturedToolCalls.push({\n toolName: toolCall.toolName,\n args: toolCall.args,\n });\n }\n }\n },\n });\n\n if (!result.experimental_output) {\n throw new Error(\"Failed to generate output\");\n }\n\n const rawOutput = result.experimental_output;\n\n if (\n typeof rawOutput === \"object\" &&\n rawOutput !== null &&\n \"error\" in rawOutput &&\n typeof (rawOutput as { error?: unknown }).error === \"string\"\n ) {\n throw new UserInputError((rawOutput as { error: string }).error);\n }\n\n const parsedResult = schema.safeParse(rawOutput);\n\n if (!parsedResult.success) {\n throw new UserInputError(\n `Invalid agent response: ${parsedResult.error.message}`,\n );\n }\n\n return {\n result: parsedResult.data,\n toolCalls: capturedToolCalls,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAuBA,eAAsB,kBAGpB,EACA,QACA,QACA,OACA,QAMD,EAAyC;CACxC,MAAMA,oBAAgC,CAAE;CAExC,MAAM,SAAS,MAAM,qBAAa;EAChC,OAAO,wCAAgB;EACvB;EACA;EACA;EACA,UAAU;EACV,aAAa;EACb,qBAAqB,UAAO,OAAO,EAAE,OAAQ,EAAC;EAC9C,cAAc,CAAC,UAAU;AACvB,OAAI,MAAM,aAAa,MAAM,UAAU,SAAS,EAC9C,MAAK,MAAM,YAAY,MAAM,UAC3B,mBAAkB,KAAK;IACrB,UAAU,SAAS;IACnB,MAAM,SAAS;GAChB,EAAC;EAGP;CACF,EAAC;AAEF,MAAK,OAAO,oBACV,OAAM,IAAI,MAAM;CAGlB,MAAM,YAAY,OAAO;AAEzB,YACS,cAAc,YACrB,cAAc,QACd,WAAW,oBACH,UAAkC,UAAU,SAEpD,OAAM,IAAIC,8BAAgB,UAAgC;CAG5D,MAAM,eAAe,OAAO,UAAU,UAAU;AAEhD,MAAK,aAAa,QAChB,OAAM,IAAIA,+BACP,0BAA0B,aAAa,MAAM;AAIlD,QAAO;EACL,QAAQ,aAAa;EACrB,WAAW;CACZ;AACF"}
|
|
@@ -18,7 +18,7 @@ interface EmbeddedAgentResult<T> {
|
|
|
18
18
|
* - Errors are re-thrown for the calling agent to handle
|
|
19
19
|
* - Each agent can implement its own error handling strategy
|
|
20
20
|
*/
|
|
21
|
-
declare function callEmbeddedAgent<
|
|
21
|
+
declare function callEmbeddedAgent<TOutput, TSchema extends z.ZodType<TOutput, z.ZodTypeDef, unknown>>({
|
|
22
22
|
system,
|
|
23
23
|
prompt,
|
|
24
24
|
tools,
|
|
@@ -27,8 +27,8 @@ declare function callEmbeddedAgent<T>({
|
|
|
27
27
|
system: string;
|
|
28
28
|
prompt: string;
|
|
29
29
|
tools: Record<string, Tool>;
|
|
30
|
-
schema:
|
|
31
|
-
}): Promise<EmbeddedAgentResult<
|
|
30
|
+
schema: TSchema;
|
|
31
|
+
}): Promise<EmbeddedAgentResult<TOutput>>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { ToolCall, callEmbeddedAgent };
|
|
34
|
-
//# sourceMappingURL=callEmbeddedAgent-
|
|
34
|
+
//# sourceMappingURL=callEmbeddedAgent-CFHLQjFx.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callEmbeddedAgent-CFHLQjFx.d.cts","names":[],"sources":["../src/internal/agents/callEmbeddedAgent.ts"],"sourcesContent":[],"mappings":";;;;KAKY,QAAA;;EAAA,IAAA,EAAA,OAAQ;AAGlB,CAAA;UAEQ,mBAAmB,CAAA,CAAA,CAAA,CAAA;EAAA,MACnB,EAAA,CAAA;EAAC,SACE,EAAA,QAAA,EAAA;AAAQ;AAWrB;;;;;;;;AAOE,iBAPoB,iBAOpB,CAAA,OAAA,EAAA,gBALgB,CAAA,CAAE,OAKlB,CAL0B,OAK1B,EALmC,CAAA,CAAE,UAKrC,EAAA,OAAA,CAAA,CAAA,CAAA;EAAA,MAAA;EAAA,MAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAAM,MAIgB,EAAA,MAAA;EAAI,MAAnB,EAAA,MAAA;EAAM,KACL,EADD,MACC,CAAA,MAAA,EADc,IACd,CAAA;EAAO,MACe,EADtB,OACsB;CAAO,CAAA,EAAnC,OAAQ,CAAA,mBAAA,CAAoB,OAApB,CAAA,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserInputError } from "./errors-BXmNwD2K.js";
|
|
2
|
+
import { getOpenAIModel } from "./openai-provider-DphaqrmX.js";
|
|
2
3
|
import { Output, generateText } from "ai";
|
|
3
4
|
|
|
4
5
|
//#region src/internal/agents/callEmbeddedAgent.ts
|
|
@@ -28,12 +29,16 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
|
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
if (!result.experimental_output) throw new Error("Failed to generate output");
|
|
32
|
+
const rawOutput = result.experimental_output;
|
|
33
|
+
if (typeof rawOutput === "object" && rawOutput !== null && "error" in rawOutput && typeof rawOutput.error === "string") throw new UserInputError(rawOutput.error);
|
|
34
|
+
const parsedResult = schema.safeParse(rawOutput);
|
|
35
|
+
if (!parsedResult.success) throw new UserInputError(`Invalid agent response: ${parsedResult.error.message}`);
|
|
31
36
|
return {
|
|
32
|
-
result:
|
|
37
|
+
result: parsedResult.data,
|
|
33
38
|
toolCalls: capturedToolCalls
|
|
34
39
|
};
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
//#endregion
|
|
38
43
|
export { callEmbeddedAgent };
|
|
39
|
-
//# sourceMappingURL=callEmbeddedAgent-
|
|
44
|
+
//# sourceMappingURL=callEmbeddedAgent-DavTx3Qo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callEmbeddedAgent-DavTx3Qo.js","names":["capturedToolCalls: ToolCall[]"],"sources":["../src/internal/agents/callEmbeddedAgent.ts"],"sourcesContent":["import { generateText, Output, type Tool } from \"ai\";\nimport { getOpenAIModel } from \"./openai-provider\";\nimport { UserInputError } from \"../../errors\";\nimport type { z } from \"zod\";\n\nexport type ToolCall = {\n toolName: string;\n args: unknown;\n};\n\ninterface EmbeddedAgentResult<T> {\n result: T;\n toolCalls: ToolCall[];\n}\n\n/**\n * Call an embedded agent with tool call capture\n * This is the standard way to call embedded AI agents within MCP tools\n *\n * Error handling:\n * - Errors are re-thrown for the calling agent to handle\n * - Each agent can implement its own error handling strategy\n */\nexport async function callEmbeddedAgent<\n TOutput,\n TSchema extends z.ZodType<TOutput, z.ZodTypeDef, unknown>,\n>({\n system,\n prompt,\n tools,\n schema,\n}: {\n system: string;\n prompt: string;\n tools: Record<string, Tool>;\n schema: TSchema;\n}): Promise<EmbeddedAgentResult<TOutput>> {\n const capturedToolCalls: ToolCall[] = [];\n\n const result = await generateText({\n model: getOpenAIModel(), // Uses configured default model (gpt-5)\n system,\n prompt,\n tools,\n maxSteps: 5,\n temperature: 1, // GPT-5 only supports temperature of 1\n experimental_output: Output.object({ schema }),\n onStepFinish: (event) => {\n if (event.toolCalls && event.toolCalls.length > 0) {\n for (const toolCall of event.toolCalls) {\n capturedToolCalls.push({\n toolName: toolCall.toolName,\n args: toolCall.args,\n });\n }\n }\n },\n });\n\n if (!result.experimental_output) {\n throw new Error(\"Failed to generate output\");\n }\n\n const rawOutput = result.experimental_output;\n\n if (\n typeof rawOutput === \"object\" &&\n rawOutput !== null &&\n \"error\" in rawOutput &&\n typeof (rawOutput as { error?: unknown }).error === \"string\"\n ) {\n throw new UserInputError((rawOutput as { error: string }).error);\n }\n\n const parsedResult = schema.safeParse(rawOutput);\n\n if (!parsedResult.success) {\n throw new UserInputError(\n `Invalid agent response: ${parsedResult.error.message}`,\n );\n }\n\n return {\n result: parsedResult.data,\n toolCalls: capturedToolCalls,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAuBA,eAAsB,kBAGpB,EACA,QACA,QACA,OACA,QAMD,EAAyC;CACxC,MAAMA,oBAAgC,CAAE;CAExC,MAAM,SAAS,MAAM,aAAa;EAChC,OAAO,gBAAgB;EACvB;EACA;EACA;EACA,UAAU;EACV,aAAa;EACb,qBAAqB,OAAO,OAAO,EAAE,OAAQ,EAAC;EAC9C,cAAc,CAAC,UAAU;AACvB,OAAI,MAAM,aAAa,MAAM,UAAU,SAAS,EAC9C,MAAK,MAAM,YAAY,MAAM,UAC3B,mBAAkB,KAAK;IACrB,UAAU,SAAS;IACnB,MAAM,SAAS;GAChB,EAAC;EAGP;CACF,EAAC;AAEF,MAAK,OAAO,oBACV,OAAM,IAAI,MAAM;CAGlB,MAAM,YAAY,OAAO;AAEzB,YACS,cAAc,YACrB,cAAc,QACd,WAAW,oBACH,UAAkC,UAAU,SAEpD,OAAM,IAAI,eAAgB,UAAgC;CAG5D,MAAM,eAAe,OAAO,UAAU,UAAU;AAEhD,MAAK,aAAa,QAChB,OAAM,IAAI,gBACP,0BAA0B,aAAa,MAAM;AAIlD,QAAO;EACL,QAAQ,aAAa;EACrB,WAAW;CACZ;AACF"}
|