@sentry/mcp-server 0.14.0 → 0.15.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/{analyze-issue-with-seer-DbAWpyTC.cjs → analyze-issue-with-seer-BkVrrh28.cjs} +9 -16
- package/dist/analyze-issue-with-seer-BkVrrh28.cjs.map +1 -0
- package/dist/{analyze-issue-with-seer-BsNarzJN.js → analyze-issue-with-seer-CoqsTklL.js} +9 -16
- package/dist/analyze-issue-with-seer-CoqsTklL.js.map +1 -0
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +3 -3
- 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/{client-CILwfx6G.d.cts → client-CQ9Xe1aN.d.cts} +7 -7
- package/dist/{client-CILwfx6G.d.cts.map → client-CQ9Xe1aN.d.cts.map} +1 -1
- package/dist/{client-BCN17Wbp.d.ts → client-VCJp6Kcu.d.ts} +6 -6
- package/dist/{client-BCN17Wbp.d.ts.map → client-VCJp6Kcu.d.ts.map} +1 -1
- package/dist/{create-dsn-CDcL2DLD.js → create-dsn-D530I7Lr.js} +1 -1
- package/dist/{create-dsn-CDcL2DLD.js.map → create-dsn-D530I7Lr.js.map} +1 -1
- package/dist/{create-dsn-fESUtX3R.cjs → create-dsn-Dz8nyTFw.cjs} +1 -1
- package/dist/{create-dsn-fESUtX3R.cjs.map → create-dsn-Dz8nyTFw.cjs.map} +1 -1
- package/dist/{create-project-Bg5uDkc4.cjs → create-project-BxzRiryg.cjs} +2 -2
- package/dist/{create-project-Bg5uDkc4.cjs.map → create-project-BxzRiryg.cjs.map} +1 -1
- package/dist/{create-project-DY5mFznV.js → create-project-K1od5Rhx.js} +2 -2
- package/dist/{create-project-DY5mFznV.js.map → create-project-K1od5Rhx.js.map} +1 -1
- package/dist/{create-team-5purh64V.cjs → create-team-CJhrccc1.cjs} +1 -1
- package/dist/{create-team-5purh64V.cjs.map → create-team-CJhrccc1.cjs.map} +1 -1
- package/dist/{create-team-C2R7EUC3.js → create-team-zHz00C6Q.js} +1 -1
- package/dist/{create-team-C2R7EUC3.js.map → create-team-zHz00C6Q.js.map} +1 -1
- package/dist/{find-dsns-CvfcLB9Z.js → find-dsns-BoEP0N7B.js} +1 -1
- package/dist/{find-dsns-CvfcLB9Z.js.map → find-dsns-BoEP0N7B.js.map} +1 -1
- package/dist/{find-dsns-ZZ-thiNk.cjs → find-dsns-CK59RaUJ.cjs} +1 -1
- package/dist/{find-dsns-ZZ-thiNk.cjs.map → find-dsns-CK59RaUJ.cjs.map} +1 -1
- package/dist/{find-errors-CuRm4PzL.js → find-errors-C3oUMeRi.js} +1 -1
- package/dist/{find-errors-CuRm4PzL.js.map → find-errors-C3oUMeRi.js.map} +1 -1
- package/dist/{find-errors-Drzv7hzM.cjs → find-errors-CB9NpSxG.cjs} +1 -1
- package/dist/{find-errors-Drzv7hzM.cjs.map → find-errors-CB9NpSxG.cjs.map} +1 -1
- package/dist/{find-transactions-DZCj81jP.js → find-transactions-BiBgg-AE.js} +1 -1
- package/dist/{find-transactions-DZCj81jP.js.map → find-transactions-BiBgg-AE.js.map} +1 -1
- package/dist/{find-transactions-DIJ80wkd.cjs → find-transactions-DuZyqjhF.cjs} +1 -1
- package/dist/{find-transactions-DIJ80wkd.cjs.map → find-transactions-DuZyqjhF.cjs.map} +1 -1
- package/dist/{formatting-pUm38KOj.js → formatting-Bvyded57.js} +34 -2
- package/dist/formatting-Bvyded57.js.map +1 -0
- package/dist/{formatting-kdIeURER.d.ts → formatting-CcTK2X8V.d.cts} +7 -5
- package/dist/formatting-CcTK2X8V.d.cts.map +1 -0
- package/dist/{formatting-BlMiQa9i.cjs → formatting-D0Aki7rK.cjs} +33 -2
- package/dist/formatting-D0Aki7rK.cjs.map +1 -0
- package/dist/{formatting-utils-C3sej5ER.js → formatting-utils-DgOyTl-m.js} +1 -1
- package/dist/{formatting-utils-C3sej5ER.js.map → formatting-utils-DgOyTl-m.js.map} +1 -1
- package/dist/{formatting-utils-DDz14xeB.cjs → formatting-utils-m9R5bsRU.cjs} +1 -1
- package/dist/{formatting-utils-DDz14xeB.cjs.map → formatting-utils-m9R5bsRU.cjs.map} +1 -1
- package/dist/{formatting-CHh9Q_OW.d.cts → formatting-vtXxusbn.d.ts} +7 -5
- package/dist/formatting-vtXxusbn.d.ts.map +1 -0
- package/dist/{get-event-attachment-ChRw3jlQ.cjs → get-event-attachment-C-ig2-3F.cjs} +1 -1
- package/dist/{get-event-attachment-ChRw3jlQ.cjs.map → get-event-attachment-C-ig2-3F.cjs.map} +1 -1
- package/dist/{get-event-attachment-CuU-_5T6.js → get-event-attachment-DVCPpUMj.js} +1 -1
- package/dist/{get-event-attachment-CuU-_5T6.js.map → get-event-attachment-DVCPpUMj.js.map} +1 -1
- package/dist/{get-issue-details-CxChU4U9.js → get-issue-details-Dcmzxknx.js} +23 -10
- package/dist/get-issue-details-Dcmzxknx.js.map +1 -0
- package/dist/{get-issue-details-DFwZRbmU.cjs → get-issue-details-lBrYR9yx.cjs} +23 -10
- package/dist/get-issue-details-lBrYR9yx.cjs.map +1 -0
- package/dist/index.cjs +21 -21
- package/dist/index.js +21 -21
- package/dist/internal/formatting.cjs +2 -1
- package/dist/internal/formatting.d.cts +4 -4
- package/dist/internal/formatting.d.ts +4 -4
- package/dist/internal/formatting.js +2 -1
- package/dist/internal/test-fixtures.d.cts +44 -44
- package/dist/internal/test-fixtures.d.cts.map +1 -1
- package/dist/internal/test-fixtures.d.ts +170 -170
- package/dist/internal/test-fixtures.d.ts.map +1 -1
- package/dist/{logging-oIouXrcb.cjs → logging-CX2buXiG.cjs} +1 -1
- package/dist/{logging-oIouXrcb.cjs.map → logging-CX2buXiG.cjs.map} +1 -1
- package/dist/{logging-LnQMFw-_.js → logging-DzxYBMrn.js} +1 -1
- package/dist/{logging-LnQMFw-_.js.map → logging-DzxYBMrn.js.map} +1 -1
- package/dist/logging.cjs +1 -1
- package/dist/logging.js +1 -1
- package/dist/{schema--5m4KI84.d.ts → schema-3NeMWRAm.d.cts} +452 -452
- package/dist/{schema-ya35hkEL.d.cts.map → schema-3NeMWRAm.d.cts.map} +1 -1
- package/dist/{schema-ya35hkEL.d.cts → schema-B3CzDGJk.d.ts} +401 -401
- package/dist/{schema--5m4KI84.d.ts.map → schema-B3CzDGJk.d.ts.map} +1 -1
- package/dist/schema.d.cts.map +1 -1
- package/dist/{seer-utils-CzYEEZb2.cjs → seer-utils-CDm5J8ur.cjs} +2 -2
- package/dist/{seer-utils-CzYEEZb2.cjs.map → seer-utils-CDm5J8ur.cjs.map} +1 -1
- package/dist/{seer-utils-Ckr8nYlz.js → seer-utils-Cj9DXrow.js} +2 -2
- package/dist/{seer-utils-Ckr8nYlz.js.map → seer-utils-Cj9DXrow.js.map} +1 -1
- package/dist/{server-DOy-M9Ko.js → server-BSRxzYFd.js} +3 -3
- package/dist/{server-DOy-M9Ko.js.map → server-BSRxzYFd.js.map} +1 -1
- package/dist/{server-BpEIZVaZ.cjs → server-Dgkqz8bA.cjs} +3 -3
- package/dist/{server-BpEIZVaZ.cjs.map → server-Dgkqz8bA.cjs.map} +1 -1
- package/dist/server.cjs +18 -18
- package/dist/server.js +18 -18
- package/dist/{stdio-DMEgJ_fG.cjs → stdio-BQAm0Liz.cjs} +3 -3
- package/dist/{stdio-DMEgJ_fG.cjs.map → stdio-BQAm0Liz.cjs.map} +1 -1
- package/dist/{stdio-B2NDq7Ax.js → stdio-BcihaDjO.js} +3 -3
- package/dist/{stdio-B2NDq7Ax.js.map → stdio-BcihaDjO.js.map} +1 -1
- package/dist/test-setup.cjs +1 -16
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1 -16
- package/dist/test-setup.js.map +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/tools/analyze-issue-with-seer.cjs +4 -4
- package/dist/tools/analyze-issue-with-seer.js +4 -4
- package/dist/tools/create-dsn.cjs +1 -1
- package/dist/tools/create-dsn.js +1 -1
- package/dist/tools/create-project.cjs +2 -2
- package/dist/tools/create-project.js +2 -2
- package/dist/tools/create-team.cjs +1 -1
- package/dist/tools/create-team.js +1 -1
- package/dist/tools/find-dsns.cjs +1 -1
- package/dist/tools/find-dsns.js +1 -1
- package/dist/tools/find-errors.cjs +1 -1
- package/dist/tools/find-errors.js +1 -1
- package/dist/tools/find-transactions.cjs +1 -1
- package/dist/tools/find-transactions.js +1 -1
- package/dist/tools/get-event-attachment.cjs +1 -1
- package/dist/tools/get-event-attachment.js +1 -1
- package/dist/tools/get-issue-details.cjs +4 -3
- package/dist/tools/get-issue-details.js +4 -3
- package/dist/tools/index.cjs +17 -17
- package/dist/tools/index.d.cts +76 -76
- package/dist/tools/index.d.ts +76 -76
- package/dist/tools/index.js +17 -17
- package/dist/tools/update-issue.cjs +5 -4
- package/dist/tools/update-issue.js +5 -4
- package/dist/tools/update-project.cjs +2 -2
- package/dist/tools/update-project.js +2 -2
- package/dist/tools/utils/api-utils.d.cts +3 -3
- package/dist/tools/utils/api-utils.d.ts +3 -3
- package/dist/tools/utils/formatting-utils.cjs +1 -1
- package/dist/tools/utils/formatting-utils.d.cts +3 -3
- package/dist/tools/utils/formatting-utils.d.ts +3 -3
- package/dist/tools/utils/formatting-utils.js +1 -1
- package/dist/tools/utils/issue-utils.cjs +3 -2
- package/dist/tools/utils/issue-utils.d.cts +4 -4
- package/dist/tools/utils/issue-utils.d.ts +4 -4
- package/dist/tools/utils/issue-utils.js +3 -2
- package/dist/tools/utils/seer-utils.cjs +1 -1
- package/dist/tools/utils/seer-utils.d.cts +3 -3
- package/dist/tools/utils/seer-utils.d.ts +3 -3
- package/dist/tools/utils/seer-utils.js +1 -1
- package/dist/{tools-19Ms1kck.cjs → tools-CHnZvVEN.cjs} +12 -12
- package/dist/{tools-19Ms1kck.cjs.map → tools-CHnZvVEN.cjs.map} +1 -1
- package/dist/{tools-mThAUo_3.js → tools-CdXGgq1W.js} +12 -12
- package/dist/{tools-mThAUo_3.js.map → tools-CdXGgq1W.js.map} +1 -1
- package/dist/transports/stdio.cjs +20 -20
- package/dist/transports/stdio.js +20 -20
- package/dist/{types-Bg17IGWJ.d.cts → types-BoMP-Ro6.d.cts} +2 -2
- package/dist/{types-Bg17IGWJ.d.cts.map → types-BoMP-Ro6.d.cts.map} +1 -1
- package/dist/{types-CtTBwGbw.d.ts → types-DpV1JAZj.d.ts} +2 -2
- package/dist/{types-CtTBwGbw.d.ts.map → types-DpV1JAZj.d.ts.map} +1 -1
- package/dist/{update-issue-DmLElHPS.js → update-issue-DRTQvy6p.js} +2 -2
- package/dist/{update-issue-DmLElHPS.js.map → update-issue-DRTQvy6p.js.map} +1 -1
- package/dist/{update-issue-B6eZhAPJ.cjs → update-issue-DpkxxiNk.cjs} +2 -2
- package/dist/{update-issue-B6eZhAPJ.cjs.map → update-issue-DpkxxiNk.cjs.map} +1 -1
- package/dist/{update-project-CijYCtG1.cjs → update-project-DLDDbcGY.cjs} +2 -2
- package/dist/{update-project-CijYCtG1.cjs.map → update-project-DLDDbcGY.cjs.map} +1 -1
- package/dist/{update-project-BNPev7W8.js → update-project-YLxt2ry2.js} +2 -2
- package/dist/{update-project-BNPev7W8.js.map → update-project-YLxt2ry2.js.map} +1 -1
- package/dist/version-CcTnFB56.js +6 -0
- package/dist/{version-C4uvMmw0.js.map → version-CcTnFB56.js.map} +1 -1
- package/dist/{version-Ddz4xg_q.cjs → version-rDjaSkPw.cjs} +2 -2
- package/dist/{version-Ddz4xg_q.cjs.map → version-rDjaSkPw.cjs.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/analyze-issue-with-seer-BsNarzJN.js.map +0 -1
- package/dist/analyze-issue-with-seer-DbAWpyTC.cjs.map +0 -1
- package/dist/formatting-BlMiQa9i.cjs.map +0 -1
- package/dist/formatting-CHh9Q_OW.d.cts.map +0 -1
- package/dist/formatting-kdIeURER.d.ts.map +0 -1
- package/dist/formatting-pUm38KOj.js.map +0 -1
- package/dist/get-issue-details-CxChU4U9.js.map +0 -1
- package/dist/get-issue-details-DFwZRbmU.cjs.map +0 -1
- package/dist/version-C4uvMmw0.js +0 -6
- /package/dist/{issue-utils-BVAB6I-Z.js → issue-utils-BbCfbiY8.js} +0 -0
- /package/dist/{issue-utils-pdbo-5LW.cjs → issue-utils-DMKiif6C.cjs} +0 -0
package/dist/transports/stdio.js
CHANGED
|
@@ -15,32 +15,32 @@ import "../find-issues-CAtNGBly.js";
|
|
|
15
15
|
import "../find-releases-BUozr0Z-.js";
|
|
16
16
|
import "../find-tags-d-wF1Se8.js";
|
|
17
17
|
import "../issue-helpers-CqqYnwYE.js";
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../get-
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../find-
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
32
|
-
import "../
|
|
33
|
-
import "../analyze-issue-with-seer-
|
|
18
|
+
import "../seer-utils-Cj9DXrow.js";
|
|
19
|
+
import "../formatting-Bvyded57.js";
|
|
20
|
+
import "../issue-utils-BbCfbiY8.js";
|
|
21
|
+
import "../get-issue-details-Dcmzxknx.js";
|
|
22
|
+
import "../get-event-attachment-DVCPpUMj.js";
|
|
23
|
+
import "../formatting-utils-DgOyTl-m.js";
|
|
24
|
+
import "../update-issue-DRTQvy6p.js";
|
|
25
|
+
import "../find-errors-C3oUMeRi.js";
|
|
26
|
+
import "../find-transactions-BiBgg-AE.js";
|
|
27
|
+
import "../create-team-zHz00C6Q.js";
|
|
28
|
+
import "../logging-DzxYBMrn.js";
|
|
29
|
+
import "../create-project-K1od5Rhx.js";
|
|
30
|
+
import "../update-project-YLxt2ry2.js";
|
|
31
|
+
import "../create-dsn-D530I7Lr.js";
|
|
32
|
+
import "../find-dsns-BoEP0N7B.js";
|
|
33
|
+
import "../analyze-issue-with-seer-CoqsTklL.js";
|
|
34
34
|
import "../fetch-utils-BMKjO-cc.js";
|
|
35
35
|
import "../fetch-utils-DlPjrSk2.js";
|
|
36
36
|
import "../search-docs-BLbB_GV2.js";
|
|
37
37
|
import "../get-doc-YTiQznr1.js";
|
|
38
|
-
import "../tools-
|
|
38
|
+
import "../tools-CdXGgq1W.js";
|
|
39
39
|
import "../resources-BHF8a1ZB.js";
|
|
40
40
|
import "../promptDefinitions-CSKE8T0a.js";
|
|
41
41
|
import "../prompts-C8Y9w5c4.js";
|
|
42
|
-
import "../server-
|
|
43
|
-
import "../version-
|
|
44
|
-
import { startStdio } from "../stdio-
|
|
42
|
+
import "../server-BSRxzYFd.js";
|
|
43
|
+
import "../version-CcTnFB56.js";
|
|
44
|
+
import { startStdio } from "../stdio-BcihaDjO.js";
|
|
45
45
|
|
|
46
46
|
export { startStdio };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, UserSchema } from "./schema-
|
|
1
|
+
import { AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, UserSchema } from "./schema-3NeMWRAm.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/api-client/types.d.ts
|
|
@@ -28,4 +28,4 @@ type ClientKeyList = z.infer<typeof ClientKeyListSchema>;
|
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User };
|
|
31
|
-
//# sourceMappingURL=types-
|
|
31
|
+
//# sourceMappingURL=types-BoMP-Ro6.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-BoMP-Ro6.d.cts","names":[],"sources":["../src/api-client/types.ts"],"sourcesContent":[],"mappings":";;;;;AAwEoB,KAPR,IAAA,GAAO,CAAA,CAAE,KAOC,CAAA,OAPY,UAOZ,CAAA;AAAK,KANf,YAAA,GAAe,CAAA,CAAE,KAMF,CAAA,OANe,kBAMf,CAAA;AACf,KANA,IAAA,GAAO,CAAA,CAAE,KAMM,CAAA,OANO,UAMP,CAAA;AAAA,KALf,OAAA,GAAU,CAAA,CAAE,KAKG,CAAA,OALU,aAKV,CAAA;AAAkB,KAJjC,SAAA,GAAY,CAAA,CAAE,KAImB,CAAA,OAJN,eAIM,CAAA;AAAf,KAHlB,OAAA,GAAU,CAAA,CAAE,KAGQ,CAAA,OAHK,aAGL,CAAA;AAAK,KAFzB,KAAA,GAAQ,CAAA,CAAE,KAEe,CAAA,OAFF,WAEE,CAAA;AACzB,KAFA,KAAA,GAAQ,CAAA,CAAE,KAEP,CAAA,OAFoB,WAEpB,CAAA;AAAA,KADH,eAAA,GAAkB,CAAA,CAAE,KACjB,CAAA,OAD8B,qBAC9B,CAAA;AAAkB,KAArB,GAAA,GAAM,CAAA,CAAE,KAAa,CAAA,OAAA,SAAA,CAAA;AAAf,KACN,UAAA,GAAa,CAAA,CAAE,KADP,CAAA,OACoB,gBADpB,CAAA;AAAK,KAEb,eAAA,GAAkB,CAAA,CAAE,KAFP,CAAA,OAEoB,qBAFpB,CAAA;AACb,KAEA,UAAA,GAAa,CAAA,CAAE,KAFL,CAAA,OAEkB,gBAFlB,CAAA;AAAA,KAIV,gBAAA,GAAmB,CAAA,CAAE,KAJX,CAAA,OAIwB,sBAJxB,CAAA;AAAkB,KAK5B,QAAA,GAAW,CAAA,CAAE,KALe,CAAA,OAKF,cALE,CAAA;AAAf,KAMb,WAAA,GAAc,CAAA,CAAE,KAND,CAAA,OAMc,iBANd,CAAA;AAAK,KAOpB,WAAA,GAAc,CAAA,CAAE,KAPI,CAAA,OAOS,iBAPT,CAAA;AACpB,KAOA,SAAA,GAAY,CAAA,CAAE,KAPC,CAAA,OAOY,eAPZ,CAAA;AAAA,KAQf,mBAAA,GAAsB,CAAA,CAAE,KART,CAAA,OAQsB,yBARtB,CAAA;AAAkB,KASjC,OAAA,GAAU,CAAA,CAAE,KATqB,CAAA,OASR,aATQ,CAAA;AAAf,KAUlB,aAAA,GAAgB,CAAA,CAAE,KAVE,CAAA,OAUW,mBAVX,CAAA;AAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, UserSchema } from "./schema
|
|
1
|
+
import { AssignedToSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, EventAttachmentListSchema, EventAttachmentSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, UserSchema } from "./schema-B3CzDGJk.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/api-client/types.d.ts
|
|
@@ -28,4 +28,4 @@ type ClientKeyList = z.infer<typeof ClientKeyListSchema>;
|
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { AssignedTo, AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, EventAttachment, EventAttachmentList, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList, User };
|
|
31
|
-
//# sourceMappingURL=types-
|
|
31
|
+
//# sourceMappingURL=types-DpV1JAZj.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-DpV1JAZj.d.ts","names":[],"sources":["../src/api-client/types.ts"],"sourcesContent":[],"mappings":";;;;;AAwEoB,KAPR,IAAA,GAAO,CAAA,CAAE,KAOC,CAAA,OAPY,UAOZ,CAAA;AAAK,KANf,YAAA,GAAe,CAAA,CAAE,KAMF,CAAA,OANe,kBAMf,CAAA;AACf,KANA,IAAA,GAAO,CAAA,CAAE,KAMM,CAAA,OANO,UAMP,CAAA;AAAA,KALf,OAAA,GAAU,CAAA,CAAE,KAKG,CAAA,OALU,aAKV,CAAA;AAAkB,KAJjC,SAAA,GAAY,CAAA,CAAE,KAImB,CAAA,OAJN,eAIM,CAAA;AAAf,KAHlB,OAAA,GAAU,CAAA,CAAE,KAGQ,CAAA,OAHK,aAGL,CAAA;AAAK,KAFzB,KAAA,GAAQ,CAAA,CAAE,KAEe,CAAA,OAFF,WAEE,CAAA;AACzB,KAFA,KAAA,GAAQ,CAAA,CAAE,KAEP,CAAA,OAFoB,WAEpB,CAAA;AAAA,KADH,eAAA,GAAkB,CAAA,CAAE,KACjB,CAAA,OAD8B,qBAC9B,CAAA;AAAkB,KAArB,GAAA,GAAM,CAAA,CAAE,KAAa,CAAA,OAAA,SAAA,CAAA;AAAf,KACN,UAAA,GAAa,CAAA,CAAE,KADP,CAAA,OACoB,gBADpB,CAAA;AAAK,KAEb,eAAA,GAAkB,CAAA,CAAE,KAFP,CAAA,OAEoB,qBAFpB,CAAA;AACb,KAEA,UAAA,GAAa,CAAA,CAAE,KAFL,CAAA,OAEkB,gBAFlB,CAAA;AAAA,KAIV,gBAAA,GAAmB,CAAA,CAAE,KAJX,CAAA,OAIwB,sBAJxB,CAAA;AAAkB,KAK5B,QAAA,GAAW,CAAA,CAAE,KALe,CAAA,OAKF,cALE,CAAA;AAAf,KAMb,WAAA,GAAc,CAAA,CAAE,KAND,CAAA,OAMc,iBANd,CAAA;AAAK,KAOpB,WAAA,GAAc,CAAA,CAAE,KAPI,CAAA,OAOS,iBAPT,CAAA;AACpB,KAOA,SAAA,GAAY,CAAA,CAAE,KAPC,CAAA,OAOY,eAPZ,CAAA;AAAA,KAQf,mBAAA,GAAsB,CAAA,CAAE,KART,CAAA,OAQsB,yBARtB,CAAA;AAAkB,KASjC,OAAA,GAAU,CAAA,CAAE,KATqB,CAAA,OASR,aATQ,CAAA;AAAf,KAUlB,aAAA,GAAgB,CAAA,CAAE,KAVE,CAAA,OAUW,mBAVX,CAAA;AAAK"}
|
|
@@ -3,7 +3,7 @@ import { defineTool } from "./defineTool-77H4nSna.js";
|
|
|
3
3
|
import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
|
|
4
4
|
import { ParamAssignedTo, ParamIssueShortId, ParamIssueStatus, ParamIssueUrl, ParamOrganizationSlug, ParamRegionUrl } from "./schema-DtsnsxMl.js";
|
|
5
5
|
import { parseIssueParams } from "./issue-helpers-CqqYnwYE.js";
|
|
6
|
-
import { formatAssignedTo } from "./formatting-utils-
|
|
6
|
+
import { formatAssignedTo } from "./formatting-utils-DgOyTl-m.js";
|
|
7
7
|
import { setTag } from "@sentry/core";
|
|
8
8
|
|
|
9
9
|
//#region src/tools/update-issue.ts
|
|
@@ -106,4 +106,4 @@ var update_issue_default = defineTool({
|
|
|
106
106
|
|
|
107
107
|
//#endregion
|
|
108
108
|
export { update_issue_default };
|
|
109
|
-
//# sourceMappingURL=update-issue-
|
|
109
|
+
//# sourceMappingURL=update-issue-DRTQvy6p.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-issue-
|
|
1
|
+
{"version":3,"file":"update-issue-DRTQvy6p.js","names":["context: ServerContext"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='john.doe')\",\n \"```\",\n \"\",\n \"### Resolve an issue and assign it to yourself\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved', assignedTo='me')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- Use 'me' as the value for `assignedTo` to assign the issue to the authenticated user.\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // Get current issue details first\n const currentIssue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n\n // Update the issue\n const updatedIssue = await apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n });\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAiBA,2BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB,sBAAsB,UAAU;EAClD,WAAW,eAAe,UAAU;EACpC,SAAS,kBAAkB,UAAU;EACrC,UAAU,cAAc,UAAU;EAClC,QAAQ,iBAAiB,UAAU;EACnC,YAAY,gBAAgB,UAAU;CACvC;CACD,MAAM,QAAQ,QAAQA,SAAwB;EAC5C,MAAM,aAAa,sBAAsB,SAAS,EA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
@@ -4,7 +4,7 @@ const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
|
4
4
|
const require_api_utils = require('./api-utils-d36iteNO.cjs');
|
|
5
5
|
const require_schema = require('./schema-BpJVmev8.cjs');
|
|
6
6
|
const require_issue_helpers = require('./issue-helpers-DyAIO0w6.cjs');
|
|
7
|
-
const require_formatting_utils = require('./formatting-utils-
|
|
7
|
+
const require_formatting_utils = require('./formatting-utils-m9R5bsRU.cjs');
|
|
8
8
|
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
9
9
|
|
|
10
10
|
//#region src/tools/update-issue.ts
|
|
@@ -112,4 +112,4 @@ Object.defineProperty(exports, 'update_issue_default', {
|
|
|
112
112
|
return update_issue_default;
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
//# sourceMappingURL=update-issue-
|
|
115
|
+
//# sourceMappingURL=update-issue-DpkxxiNk.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-issue-
|
|
1
|
+
{"version":3,"file":"update-issue-DpkxxiNk.cjs","names":["context: ServerContext","UserInputError"],"sources":["../src/tools/update-issue.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport { formatAssignedTo } from \"./utils/formatting-utils\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n ParamIssueStatus,\n ParamAssignedTo,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_issue\",\n description: [\n \"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Resolve an issue that has been fixed\",\n \"- Assign an issue to a team member or team for investigation\",\n \"- Mark an issue as ignored to reduce noise\",\n \"- Reopen a resolved issue by setting status to 'unresolved'\",\n \"\",\n \"<examples>\",\n \"### Resolve an issue\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved')\",\n \"```\",\n \"\",\n \"### Assign an issue to a user\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', assignedTo='john.doe')\",\n \"```\",\n \"\",\n \"### Resolve an issue and assign it to yourself\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='resolved', assignedTo='me')\",\n \"```\",\n \"\",\n \"### Mark an issue as ignored\",\n \"\",\n \"```\",\n \"update_issue(organizationSlug='my-organization', issueId='PROJECT-123', status='ignored')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user provides the `issueUrl`, you can ignore the other required parameters and extract them from the URL.\",\n \"- At least one of `status` or `assignedTo` must be provided to update the issue.\",\n \"- Use 'me' as the value for `assignedTo` to assign the issue to the authenticated user.\",\n \"- Valid status values are: 'resolved', 'resolvedInNextRelease', 'unresolved', 'ignored'.\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug.optional(),\n regionUrl: ParamRegionUrl.optional(),\n issueId: ParamIssueShortId.optional(),\n issueUrl: ParamIssueUrl.optional(),\n status: ParamIssueStatus.optional(),\n assignedTo: ParamAssignedTo.optional(),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n\n // Validate that we have the minimum required parameters\n if (!params.issueUrl && !params.issueId) {\n throw new UserInputError(\n \"Either `issueId` or `issueUrl` must be provided\",\n );\n }\n\n if (!params.issueUrl && !params.organizationSlug) {\n throw new UserInputError(\n \"`organizationSlug` is required when providing `issueId`\",\n );\n }\n\n // Validate that at least one update parameter is provided\n if (!params.status && !params.assignedTo) {\n throw new UserInputError(\n \"At least one of `status` or `assignedTo` must be provided to update the issue\",\n );\n }\n\n const { organizationSlug: orgSlug, issueId: parsedIssueId } =\n parseIssueParams({\n organizationSlug: params.organizationSlug,\n issueId: params.issueId,\n issueUrl: params.issueUrl,\n });\n\n setTag(\"organization.slug\", orgSlug);\n\n // Get current issue details first\n const currentIssue = await apiService.getIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n });\n\n // Update the issue\n const updatedIssue = await apiService.updateIssue({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\n status: params.status,\n assignedTo: params.assignedTo,\n });\n\n let output = `# Issue ${updatedIssue.shortId} Updated in **${orgSlug}**\\n\\n`;\n output += `**Issue**: ${updatedIssue.title}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(orgSlug, updatedIssue.shortId)}\\n\\n`;\n\n // Show what changed\n output += \"## Changes Made\\n\\n\";\n\n if (params.status && currentIssue.status !== params.status) {\n output += `**Status**: ${currentIssue.status} → **${params.status}**\\n`;\n }\n\n if (params.assignedTo) {\n const oldAssignee = formatAssignedTo(currentIssue.assignedTo ?? null);\n const newAssignee =\n params.assignedTo === \"me\" ? \"You\" : params.assignedTo;\n output += `**Assigned To**: ${oldAssignee} → **${newAssignee}**\\n`;\n }\n\n output += \"\\n## Current Status\\n\\n\";\n output += `**Status**: ${updatedIssue.status}\\n`;\n const currentAssignee = formatAssignedTo(updatedIssue.assignedTo ?? null);\n output += `**Assigned To**: ${currentAssignee}\\n`;\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The issue has been successfully updated in Sentry\\n`;\n output += `- You can view the issue details using: \\`get_issue_details(organizationSlug=\"${orgSlug}\", issueId=\"${updatedIssue.shortId}\")\\`\\n`;\n\n if (params.status === \"resolved\") {\n output += `- The issue is now marked as resolved and will no longer generate alerts\\n`;\n } else if (params.status === \"ignored\") {\n output += `- The issue is now ignored and will not generate alerts until it escalates\\n`;\n }\n\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;AAiBA,2BAAe,8BAAW;CACxB,MAAM;CACN,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a,OAAO,OAAO,OAAO,OAAO;AAGpE,MAAI,OAAO,YAAY;GACrB,MAAM,cAAc,0CAAiB,aAAa,cAAc,KAAK;GACrE,MAAM,cACJ,OAAO,eAAe,OAAO,QAAQ,OAAO;AAC9C,cAAW,mBAAmB,YAAY,OAAO,YAAY;EAC9D;AAED,YAAU;AACV,aAAW,cAAc,aAAa,OAAO;EAC7C,MAAM,kBAAkB,0CAAiB,aAAa,cAAc,KAAK;AACzE,aAAW,mBAAmB,gBAAgB;AAE9C,YAAU;AACV,aAAW;AACX,aAAW,gFAAgF,QAAQ,cAAc,aAAa,QAAQ;AAEtI,MAAI,OAAO,WAAW,WACpB,YAAW;WACF,OAAO,WAAW,UAC3B,YAAW;AAGb,SAAO;CACR;AACF,EAAC"}
|
|
@@ -3,7 +3,7 @@ const require_errors = require('./errors-YmiXLOyx.cjs');
|
|
|
3
3
|
const require_defineTool = require('./defineTool-lWNTzWl_.cjs');
|
|
4
4
|
const require_api_utils = require('./api-utils-d36iteNO.cjs');
|
|
5
5
|
const require_schema = require('./schema-BpJVmev8.cjs');
|
|
6
|
-
const require_logging = require('./logging-
|
|
6
|
+
const require_logging = require('./logging-CX2buXiG.cjs');
|
|
7
7
|
const zod = require_chunk.__toESM(require("zod"));
|
|
8
8
|
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
9
9
|
|
|
@@ -123,4 +123,4 @@ Object.defineProperty(exports, 'update_project_default', {
|
|
|
123
123
|
return update_project_default;
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
-
//# sourceMappingURL=update-project-
|
|
126
|
+
//# sourceMappingURL=update-project-DLDDbcGY.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-DLDDbcGY.cjs","names":["ParamOrganizationSlug","ParamProjectSlug","context: ServerContext","project: Project | undefined","UserInputError","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;;AAgBA,6BAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkBA;EAClB,WAAW,8BAAe,UAAU;EACpC,aAAaC;EACb,MAAM,MAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,+BAA+B,CAAC,UAAU;EAC3E,MAAM,MACH,QAAQ,CACR,aAAa,CACb,MAAM,CACN,SAAS,gDAAgD,CACzD,UAAU;EACb,UAAU,6BAAc,UAAU;EAClC,UAAU,6BAAc,UAAU,CAAC,SACjC,2FACD;CACF;CACD,MAAM,QAAQ,QAAQC,SAAwB;EAC5C,MAAM,aAAa,wCAAsB,SAAS,EAChD,WAAW,OAAO,UACnB,EAAC;EACF,MAAM,mBAAmB,OAAO;AAEhC,4BAAO,qBAAqB,iBAAiB;AAC7C,4BAAO,gBAAgB,OAAO,YAAY;AAG1C,MAAI,OAAO,UAAU;AACnB,6BAAO,aAAa,OAAO,SAAS;AACpC,OAAI;AACF,UAAM,WAAW,iBAAiB;KAChC;KACA,aAAa,OAAO;KACpB,UAAU,OAAO;IAClB,EAAC;GACH,SAAQ,KAAK;AACZ,6BAAS,IAAI;AACb,UAAM,IAAI,OACP,wBAAwB,OAAO,SAAS,cAAc,OAAO,YAAY,IAAI,eAAe,QAAQ,IAAI,UAAU;GAEtH;EACF;EAG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InputError } from "./errors-CIoxzIug.js";
|
|
|
2
2
|
import { defineTool } from "./defineTool-77H4nSna.js";
|
|
3
3
|
import { apiServiceFromContext } from "./api-utils-C6QJAzFL.js";
|
|
4
4
|
import { ParamOrganizationSlug, ParamPlatform, ParamProjectSlug, ParamRegionUrl, ParamTeamSlug } from "./schema-DtsnsxMl.js";
|
|
5
|
-
import { logError } from "./logging-
|
|
5
|
+
import { logError } from "./logging-DzxYBMrn.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { setTag } from "@sentry/core";
|
|
8
8
|
|
|
@@ -117,4 +117,4 @@ var update_project_default = defineTool({
|
|
|
117
117
|
|
|
118
118
|
//#endregion
|
|
119
119
|
export { update_project_default };
|
|
120
|
-
//# sourceMappingURL=update-project-
|
|
120
|
+
//# sourceMappingURL=update-project-YLxt2ry2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-project-
|
|
1
|
+
{"version":3,"file":"update-project-YLxt2ry2.js","names":["context: ServerContext","project: Project | undefined","updates: string[]"],"sources":["../src/tools/update-project.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { setTag } from \"@sentry/core\";\nimport { defineTool } from \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { logError } from \"../logging\";\nimport { UserInputError } from \"../errors\";\nimport type { ServerContext } from \"../types\";\nimport type { Project } from \"../api-client/index\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamProjectSlug,\n ParamPlatform,\n ParamTeamSlug,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"update_project\",\n description: [\n \"Update project settings in Sentry, such as name, slug, platform, and team assignment.\",\n \"\",\n \"Be careful when using this tool!\",\n \"\",\n \"Use this tool when you need to:\",\n \"- Update a project's name or slug to fix onboarding mistakes\",\n \"- Change the platform assigned to a project\",\n \"- Update team assignment for a project\",\n \"\",\n \"<examples>\",\n \"### Update a project's name and slug\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='old-project', name='New Project Name', slug='new-project-slug')\",\n \"```\",\n \"\",\n \"### Assign a project to a different team\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', teamSlug='backend-team')\",\n \"```\",\n \"\",\n \"### Update platform\",\n \"\",\n \"```\",\n \"update_project(organizationSlug='my-organization', projectSlug='my-project', platform='python')\",\n \"```\",\n \"\",\n \"</examples>\",\n \"\",\n \"<hints>\",\n \"- If the user passes a parameter in the form of name/otherName, it's likely in the format of <organizationSlug>/<projectSlug>.\",\n \"- Team assignment is handled separately from other project settings\",\n \"- If any parameter is ambiguous, you should clarify with the user what they meant.\",\n \"- When updating the slug, the project will be accessible at the new slug after the update\",\n \"</hints>\",\n ].join(\"\\n\"),\n inputSchema: {\n organizationSlug: ParamOrganizationSlug,\n regionUrl: ParamRegionUrl.optional(),\n projectSlug: ParamProjectSlug,\n name: z.string().trim().describe(\"The new name for the project\").optional(),\n slug: z\n .string()\n .toLowerCase()\n .trim()\n .describe(\"The new slug for the project (must be unique)\")\n .optional(),\n platform: ParamPlatform.optional(),\n teamSlug: ParamTeamSlug.optional().describe(\n \"The team to assign this project to. Note: this will replace the current team assignment.\",\n ),\n },\n async handler(params, context: ServerContext) {\n const apiService = apiServiceFromContext(context, {\n regionUrl: params.regionUrl,\n });\n const organizationSlug = params.organizationSlug;\n\n setTag(\"organization.slug\", organizationSlug);\n setTag(\"project.slug\", params.projectSlug);\n\n // Handle team assignment separately if provided\n if (params.teamSlug) {\n setTag(\"team.slug\", params.teamSlug);\n try {\n await apiService.addTeamToProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n teamSlug: params.teamSlug,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to assign team ${params.teamSlug} to project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n }\n\n // Update project settings if any are provided\n const hasProjectUpdates = params.name || params.slug || params.platform;\n\n let project: Project | undefined;\n if (hasProjectUpdates) {\n try {\n project = await apiService.updateProject({\n organizationSlug,\n projectSlug: params.projectSlug,\n name: params.name,\n slug: params.slug,\n platform: params.platform,\n });\n } catch (err) {\n logError(err);\n throw new Error(\n `Failed to update project ${params.projectSlug}: ${err instanceof Error ? err.message : \"Unknown error\"}`,\n );\n }\n } else {\n // If only team assignment, fetch current project data for display\n const projects = await apiService.listProjects(organizationSlug);\n project = projects.find((p) => p.slug === params.projectSlug);\n if (!project) {\n throw new UserInputError(`Project ${params.projectSlug} not found`);\n }\n }\n\n let output = `# Updated Project in **${organizationSlug}**\\n\\n`;\n output += `**ID**: ${project.id}\\n`;\n output += `**Slug**: ${project.slug}\\n`;\n output += `**Name**: ${project.name}\\n`;\n if (project.platform) {\n output += `**Platform**: ${project.platform}\\n`;\n }\n\n // Display what was updated\n const updates: string[] = [];\n if (params.name) updates.push(`name to \"${params.name}\"`);\n if (params.slug) updates.push(`slug to \"${params.slug}\"`);\n if (params.platform) updates.push(`platform to \"${params.platform}\"`);\n if (params.teamSlug)\n updates.push(`team assignment to \"${params.teamSlug}\"`);\n\n if (updates.length > 0) {\n output += `\\n## Updates Applied\\n`;\n output += updates.map((update) => `- Updated ${update}`).join(\"\\n\");\n output += `\\n`;\n }\n\n output += \"\\n# Using this information\\n\\n\";\n output += `- The project is now accessible at slug: \\`${project.slug}\\`\\n`;\n if (params.teamSlug) {\n output += `- The project is now assigned to the \\`${params.teamSlug}\\` team\\n`;\n }\n return output;\n },\n});\n"],"mappings":";;;;;;;;;AAgBA,6BAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD,EAAC,KAAK,KAAK;CACZ,aAAa;EACX,kBAAkB;EAClB,WAAW,eAAe,UAAU;EACpC,aAAa;EACb,M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AQ,GAAG;AAChC,aAAW,YAAY,QAAQ,KAAK;AACpC,aAAW,YAAY,QAAQ,KAAK;AACpC,MAAI,QAAQ,SACV,YAAW,gBAAgB,QAAQ,SAAS;EAI9C,MAAMC,UAAoB,CAAE;AAC5B,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,KAAM,SAAQ,MAAM,WAAW,OAAO,KAAK,GAAG;AACzD,MAAI,OAAO,SAAU,SAAQ,MAAM,eAAe,OAAO,SAAS,GAAG;AACrE,MAAI,OAAO,SACT,SAAQ,MAAM,sBAAsB,OAAO,SAAS,GAAG;AAEzD,MAAI,QAAQ,SAAS,GAAG;AACtB,cAAW;AACX,aAAU,QAAQ,IAAI,CAAC,YAAY,YAAY,SAAS,CAAC,KAAK,KAAK;AACnE,cAAW;EACZ;AAED,YAAU;AACV,aAAW,6CAA6C,QAAQ,KAAK;AACrE,MAAI,OAAO,SACT,YAAW,yCAAyC,OAAO,SAAS;AAEtE,SAAO;CACR;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-CcTnFB56.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const LIB_VERSION =\n (typeof process !== \"undefined\" && process.env?.npm_package_version) ||\n \"0.0.0\";\n"],"mappings":";AAAA,MAAa,qBACH,YAAY,2BACpB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/version.ts
|
|
3
|
-
const LIB_VERSION = typeof process !== "undefined" && "0.
|
|
3
|
+
const LIB_VERSION = typeof process !== "undefined" && "0.15.0" || "0.0.0";
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
Object.defineProperty(exports, 'LIB_VERSION', {
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, 'LIB_VERSION', {
|
|
|
9
9
|
return LIB_VERSION;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
//# sourceMappingURL=version-
|
|
12
|
+
//# sourceMappingURL=version-rDjaSkPw.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-rDjaSkPw.cjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const LIB_VERSION =\n (typeof process !== \"undefined\" && process.env?.npm_package_version) ||\n \"0.0.0\";\n"],"mappings":";;AAAA,MAAa,qBACH,YAAY,2BACpB"}
|
package/dist/version.cjs
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"msw": "^2.10.2",
|
|
82
82
|
"zod-to-json-schema": "^3.24.6",
|
|
83
|
-
"@sentry/mcp-server-mocks": "0.
|
|
84
|
-
"@sentry/mcp-server-tsconfig": "0.
|
|
83
|
+
"@sentry/mcp-server-mocks": "0.15.0",
|
|
84
|
+
"@sentry/mcp-server-tsconfig": "0.15.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-BsNarzJN.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 \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n isHumanInterventionStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n} from \"./utils/seer-utils\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n description: [\n \"**ALWAYS use this tool when a user asks how to fix a Sentry issue.** Seer AI analyzes production errors to identify root causes and provide specific code fixes.\",\n \"\",\n \"Use this tool IMMEDIATELY when:\",\n '- User asks \"how do I fix this error?\" or \"what\\'s causing this issue?\"',\n \"- User shares a Sentry issue URL and wants help resolving it\",\n \"- User needs to understand why an error is happening in production\",\n \"- User wants specific code changes to fix their issue\",\n \"- User asks about the root cause of any Sentry error\",\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: \"How do I fix ISSUE-123?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\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 \"- ALWAYS prefer this over get_issue_details when users want fixes, not just error 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 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 AI Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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\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\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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":";;;;;;;;;AAsBA,sCAAe,WAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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,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,+BAA+B,cAAc;EAG3D,IAAI,eAAe,MAAM,WAAW,gBAAgB;GAClD,kBAAkB;GAClB,SAAS;EACV,EAAC;AAGF,OAAK,aAAa,SAAS;AACzB,cAAW;GACX,MAAM,cAAc,MAAM,WAAW,aAAa;IAChD,kBAAkB;IAClB,SAAS;IACT,aAAa,OAAO;GACrB,EAAC;AACF,cAAW,gCAAgC,YAAY,OAAO;AAG9D,SAAM,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,IAAK;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M,WAAW,gBAAgB;IAC9C,kBAAkB;IAClB,SAAS;GACV,EAAC;EACH;AAGD,MAAI,aAAa,SAAS;AACxB,cAAW,sBAAsB,qBAAqB,aAAa,QAAQ,OAAO,CAAC;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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-issue-with-seer-DbAWpyTC.cjs","names":["context: ServerContext","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 \"./utils/defineTool\";\nimport { apiServiceFromContext } from \"./utils/api-utils\";\nimport { parseIssueParams } from \"./utils/issue-utils\";\nimport {\n getStatusDisplayName,\n isTerminalStatus,\n isHumanInterventionStatus,\n getHumanInterventionGuidance,\n getOutputForAutofixStep,\n SEER_POLLING_INTERVAL,\n SEER_TIMEOUT,\n} from \"./utils/seer-utils\";\nimport type { ServerContext } from \"../types\";\nimport {\n ParamOrganizationSlug,\n ParamRegionUrl,\n ParamIssueShortId,\n ParamIssueUrl,\n} from \"../schema\";\n\nexport default defineTool({\n name: \"analyze_issue_with_seer\",\n description: [\n \"**ALWAYS use this tool when a user asks how to fix a Sentry issue.** Seer AI analyzes production errors to identify root causes and provide specific code fixes.\",\n \"\",\n \"Use this tool IMMEDIATELY when:\",\n '- User asks \"how do I fix this error?\" or \"what\\'s causing this issue?\"',\n \"- User shares a Sentry issue URL and wants help resolving it\",\n \"- User needs to understand why an error is happening in production\",\n \"- User wants specific code changes to fix their issue\",\n \"- User asks about the root cause of any Sentry error\",\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: \"How do I fix ISSUE-123?\"',\n \"\",\n \"```\",\n \"analyze_issue_with_seer(organizationSlug='my-organization', issueId='ISSUE-123')\",\n \"```\",\n \"\",\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 \"- ALWAYS prefer this over get_issue_details when users want fixes, not just error 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 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 AI Analysis for Issue ${parsedIssueId}\\n\\n`;\n\n // Step 1: Check if analysis already exists\n let autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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\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\n autofixState = await apiService.getAutofixState({\n organizationSlug: orgSlug,\n issueId: parsedIssueId!,\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":";;;;;;;;;;AAsBA,sCAAe,8BAAW;CACxB,MAAM;CACN,aAAa;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting-BlMiQa9i.cjs","names":["LANGUAGE_EXTENSIONS: Record<string, string>","LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]>","frame: z.infer<typeof FrameInterface>","platform?: string | null","frameIndex?: number","event: Event","parts: string[]","data: z.infer<typeof ErrorEntrySchema>","platform: string | null","index: number","totalExceptions: number","data: z.infer<typeof RequestEntrySchema>","data: z.infer<typeof MessageEntrySchema>","data: z.infer<typeof ThreadsEntrySchema>","lines: string[]","value: unknown","vars: Record<string, unknown>","frames: z.infer<typeof FrameInterface>[]","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n MessageEntrySchema,\n ThreadsEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\n// Language detection mappings\nconst LANGUAGE_EXTENSIONS: Record<string, string> = {\n \".java\": \"java\",\n \".py\": \"python\",\n \".js\": \"javascript\",\n \".jsx\": \"javascript\",\n \".ts\": \"javascript\",\n \".tsx\": \"javascript\",\n \".rb\": \"ruby\",\n \".php\": \"php\",\n};\n\nconst LANGUAGE_MODULE_PATTERNS: Array<[RegExp, string]> = [\n [/^(java\\.|com\\.|org\\.)/, \"java\"],\n];\n\n/**\n * Detects the programming language of a stack frame based on the file extension.\n * Falls back to the platform parameter if no filename is available or extension is unrecognized.\n *\n * @param frame - The stack frame containing file and location information\n * @param platform - Optional platform hint to use as fallback\n * @returns The detected language or platform fallback or \"unknown\"\n */\nfunction detectLanguage(\n frame: z.infer<typeof FrameInterface>,\n platform?: string | null,\n): string {\n // Check filename extensions\n if (frame.filename) {\n const ext = frame.filename.toLowerCase().match(/\\.[^.]+$/)?.[0];\n if (ext && LANGUAGE_EXTENSIONS[ext]) {\n return LANGUAGE_EXTENSIONS[ext];\n }\n }\n\n // Check module patterns\n if (frame.module) {\n for (const [pattern, language] of LANGUAGE_MODULE_PATTERNS) {\n if (pattern.test(frame.module)) {\n return language;\n }\n }\n }\n\n // Fallback to platform or unknown\n return platform || \"unknown\";\n}\n\n/**\n * Formats a stack frame into a language-specific string representation.\n * Different languages have different conventions for displaying stack traces.\n *\n * @param frame - The stack frame to format\n * @param frameIndex - Optional frame index for languages that display frame numbers\n * @param platform - Optional platform hint for language detection fallback\n * @returns Formatted stack frame string\n */\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n frameIndex?: number,\n platform?: string | null,\n) {\n const language = detectLanguage(frame, platform);\n\n switch (language) {\n case \"java\": {\n // at com.example.ClassName.methodName(FileName.java:123)\n const className = frame.module || \"UnknownClass\";\n const method = frame.function || \"<unknown>\";\n const source = frame.filename || \"Unknown Source\";\n const location = frame.lineNo ? `:${frame.lineNo}` : \"\";\n return `at ${className}.${method}(${source}${location})`;\n }\n\n case \"python\": {\n // File \"/path/to/file.py\", line 42, in function_name\n const file =\n frame.filename || frame.absPath || frame.module || \"<unknown>\";\n const func = frame.function || \"<module>\";\n const line = frame.lineNo ? `, line ${frame.lineNo}` : \"\";\n return ` File \"${file}\"${line}, in ${func}`;\n }\n\n case \"javascript\": {\n // Original compact format: filename:line:col (function)\n // This preserves backward compatibility\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n\n case \"ruby\": {\n // from /path/to/file.rb:42:in `method_name'\n const file = frame.filename || frame.module || \"<unknown>\";\n const func = frame.function ? ` \\`${frame.function}\\`` : \"\";\n const line = frame.lineNo ? `:${frame.lineNo}:in` : \"\";\n return ` from ${file}${line}${func}`;\n }\n\n case \"php\": {\n // #0 /path/to/file.php(42): functionName()\n const file = frame.filename || \"<unknown>\";\n const line = frame.lineNo ? `(${frame.lineNo})` : \"\";\n const func = frame.function || \"<unknown>\";\n const prefix = frameIndex !== undefined ? `#${frameIndex} ` : \"\";\n return `${prefix}${file}${line}: ${func}()`;\n }\n\n default: {\n // Generic format for unknown languages\n const func = frame.function || \"<unknown>\";\n const location = frame.filename || frame.module || \"<unknown>\";\n const line = frame.lineNo ? `:${frame.lineNo}` : \"\";\n const col = frame.colNo != null ? `:${frame.colNo}` : \"\";\n return ` at ${func} (${location}${line}${col})`;\n }\n }\n}\n\n/**\n * Formats a Sentry event into a structured markdown output.\n * Includes error messages, stack traces, request info, and contextual data.\n *\n * @param event - The Sentry event to format\n * @returns Formatted markdown string\n */\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n\n // Look for the primary error information\n const messageEntry = event.entries.find((e) => e.type === \"message\");\n const exceptionEntry = event.entries.find((e) => e.type === \"exception\");\n const threadsEntry = event.entries.find((e) => e.type === \"threads\");\n const requestEntry = event.entries.find((e) => e.type === \"request\");\n\n // Error message (if present)\n if (messageEntry) {\n output += formatMessageInterfaceOutput(\n event,\n messageEntry.data as z.infer<typeof MessageEntrySchema>,\n );\n }\n\n // Stack trace (from exception or threads)\n if (exceptionEntry) {\n output += formatExceptionInterfaceOutput(\n event,\n exceptionEntry.data as z.infer<typeof ErrorEntrySchema>,\n );\n } else if (threadsEntry) {\n output += formatThreadsInterfaceOutput(\n event,\n threadsEntry.data as z.infer<typeof ThreadsEntrySchema>,\n );\n }\n\n // Request info (if HTTP error)\n if (requestEntry) {\n output += formatRequestInterfaceOutput(\n event,\n requestEntry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n\n output += formatContexts(event.contexts);\n return output;\n}\n\n/**\n * Extracts the context line matching the frame's line number for inline display.\n * This is used in the full stacktrace view to show the actual line of code\n * that caused the error inline with the stack frame.\n *\n * @param frame - The stack frame containing context lines\n * @returns The line of code at the frame's line number, or empty string if not available\n */\nfunction renderInlineContext(frame: z.infer<typeof FrameInterface>): string {\n if (!frame.context?.length || !frame.lineNo) {\n return \"\";\n }\n\n const contextLine = frame.context.find(([lineNo]) => lineNo === frame.lineNo);\n return contextLine ? `\\n${contextLine[1]}` : \"\";\n}\n\n/**\n * Renders an enhanced view of a stack frame with context lines and variables.\n * Used for the \"Most Relevant Frame\" section to provide detailed information\n * about the most relevant application frame where the error occurred.\n *\n * @param frame - The stack frame to render with enhanced information\n * @param event - The Sentry event containing platform information for language detection\n * @returns Formatted string with frame header, context lines, and variables table\n */\nfunction renderEnhancedFrame(\n frame: z.infer<typeof FrameInterface>,\n event: Event,\n): string {\n const parts: string[] = [];\n\n parts.push(\"**Most Relevant Frame:**\");\n parts.push(\"─────────────────────\");\n parts.push(formatFrameHeader(frame, undefined, event.platform));\n\n // Add context lines if available\n if (frame.context?.length) {\n const contextLines = renderContextLines(frame);\n if (contextLines) {\n parts.push(\"\");\n parts.push(contextLines);\n }\n }\n\n // Add variables table if available\n if (frame.vars && Object.keys(frame.vars).length > 0) {\n parts.push(\"\");\n parts.push(renderVariablesTable(frame.vars));\n }\n\n return parts.join(\"\\n\");\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n const parts: string[] = [];\n\n // Handle both single exception (value) and chained exceptions (values)\n const exceptions = data.values || (data.value ? [data.value] : []);\n\n if (exceptions.length === 0) {\n return \"\";\n }\n\n // For chained exceptions, they are typically ordered from innermost to outermost\n // We'll render them in reverse order (outermost first) to match how they occurred\n const isChained = exceptions.length > 1;\n\n // Create a copy before reversing to avoid mutating the original array\n [...exceptions].reverse().forEach((exception, index) => {\n if (!exception) return;\n\n // Add language-specific chain indicator for multiple exceptions\n if (isChained && index > 0) {\n parts.push(\"\");\n parts.push(\n getExceptionChainMessage(event.platform, index, exceptions.length),\n );\n parts.push(\"\");\n }\n\n // Use the actual exception type and value as the heading\n const exceptionTitle = `${exception.type}${exception.value ? `: ${exception.value}` : \"\"}`;\n\n parts.push(index === 0 ? \"### Error\" : `### ${exceptionTitle}`);\n parts.push(\"\");\n\n // Add the error details in a code block for the first exception\n // to maintain backward compatibility\n if (index === 0) {\n parts.push(\"```\");\n parts.push(exceptionTitle);\n parts.push(\"```\");\n parts.push(\"\");\n }\n\n if (!exception.stacktrace || !exception.stacktrace.frames) {\n parts.push(\"**Stacktrace:**\");\n parts.push(\"```\");\n parts.push(\"No stacktrace available\");\n parts.push(\"```\");\n return;\n }\n\n const frames = exception.stacktrace.frames;\n\n // Only show enhanced frame for the first (outermost) exception to avoid overwhelming output\n if (index === 0) {\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n });\n\n parts.push(\"\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Get the appropriate exception chain message based on the platform\n */\nfunction getExceptionChainMessage(\n platform: string | null,\n index: number,\n totalExceptions: number,\n): string {\n // Default message for unknown platforms\n const defaultMessage =\n \"**During handling of the above exception, another exception occurred:**\";\n\n if (!platform) {\n return defaultMessage;\n }\n\n switch (platform.toLowerCase()) {\n case \"python\":\n // Python has two distinct messages, but without additional metadata\n // we default to the implicit chaining message\n return \"**During handling of the above exception, another exception occurred:**\";\n\n case \"java\":\n return \"**Caused by:**\";\n\n case \"csharp\":\n case \"dotnet\":\n return \"**---> Inner Exception:**\";\n\n case \"ruby\":\n return \"**Caused by:**\";\n\n case \"go\":\n return \"**Wrapped error:**\";\n\n case \"rust\":\n return `**Caused by (${index}):**`;\n\n default:\n return defaultMessage;\n }\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatMessageInterfaceOutput(\n event: Event,\n data: z.infer<typeof MessageEntrySchema>,\n) {\n if (!data.formatted && !data.message) {\n return \"\";\n }\n const message = data.formatted || data.message || \"\";\n return `### Error\\n\\n${\"```\"}\\n${message}\\n${\"```\"}\\n\\n`;\n}\n\nfunction formatThreadsInterfaceOutput(\n event: Event,\n data: z.infer<typeof ThreadsEntrySchema>,\n) {\n if (!data.values || data.values.length === 0) {\n return \"\";\n }\n\n // Find the crashed thread only\n const crashedThread = data.values.find((t) => t.crashed);\n\n if (!crashedThread?.stacktrace?.frames) {\n return \"\";\n }\n\n const parts: string[] = [];\n\n // Include thread name if available\n if (crashedThread.name) {\n parts.push(`**Thread** (${crashedThread.name})`);\n parts.push(\"\");\n }\n\n const frames = crashedThread.stacktrace.frames;\n\n // Find and format the first in-app frame with enhanced view\n const firstInAppFrame = findFirstInAppFrame(frames);\n if (\n firstInAppFrame &&\n (firstInAppFrame.context?.length || firstInAppFrame.vars)\n ) {\n parts.push(renderEnhancedFrame(firstInAppFrame, event));\n parts.push(\"\");\n parts.push(\"**Full Stacktrace:**\");\n parts.push(\"────────────────\");\n } else {\n parts.push(\"**Stacktrace:**\");\n }\n\n parts.push(\"```\");\n parts.push(\n frames\n .map((frame) => {\n const header = formatFrameHeader(frame, undefined, event.platform);\n const context = renderInlineContext(frame);\n return `${header}${context}`;\n })\n .join(\"\\n\"),\n );\n parts.push(\"```\");\n parts.push(\"\");\n\n return parts.join(\"\\n\");\n}\n\n/**\n * Renders surrounding source code context for a stack frame.\n * Shows a window of code lines around the error line with visual indicators.\n *\n * @param frame - The stack frame containing context lines\n * @param contextSize - Number of lines to show before and after the error line (default: 3)\n * @returns Formatted context lines with line numbers and arrow indicator for the error line\n */\nfunction renderContextLines(\n frame: z.infer<typeof FrameInterface>,\n contextSize = 3,\n): string {\n if (!frame.context || frame.context.length === 0 || !frame.lineNo) {\n return \"\";\n }\n\n const lines: string[] = [];\n const errorLine = frame.lineNo;\n const maxLineNoWidth = Math.max(\n ...frame.context.map(([lineNo]) => lineNo.toString().length),\n );\n\n for (const [lineNo, code] of frame.context) {\n const isErrorLine = lineNo === errorLine;\n const lineNoStr = lineNo.toString().padStart(maxLineNoWidth, \" \");\n\n if (Math.abs(lineNo - errorLine) <= contextSize) {\n if (isErrorLine) {\n lines.push(` → ${lineNoStr} │ ${code}`);\n } else {\n lines.push(` ${lineNoStr} │ ${code}`);\n }\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Formats a variable value for display in the variables table.\n * Handles different types appropriately and safely, converting complex objects\n * to readable representations and handling edge cases like circular references.\n *\n * @param value - The variable value to format (can be any type)\n * @param maxLength - Maximum length for stringified objects/arrays (default: 80)\n * @returns Human-readable string representation of the value\n */\nfunction formatVariableValue(value: unknown, maxLength = 80): string {\n try {\n if (typeof value === \"string\") {\n return `\"${value}\"`;\n }\n if (value === null) {\n return \"null\";\n }\n if (value === undefined) {\n return \"undefined\";\n }\n if (typeof value === \"object\") {\n const stringified = JSON.stringify(value);\n if (stringified.length > maxLength) {\n // Leave room for \", ...]\" or \", ...}\"\n const truncateAt = maxLength - 6;\n let truncated = stringified.substring(0, truncateAt);\n\n // Find the last complete element by looking for the last comma\n const lastComma = truncated.lastIndexOf(\",\");\n if (lastComma > 0) {\n truncated = truncated.substring(0, lastComma);\n }\n\n // Add the appropriate ending\n if (Array.isArray(value)) {\n return `${truncated}, ...]`;\n }\n return `${truncated}, ...}`;\n }\n return stringified;\n }\n return String(value);\n } catch {\n // Handle circular references or other stringify errors\n return `<${typeof value}>`;\n }\n}\n\n/**\n * Renders a table of local variables in a tree-like format.\n * Uses box-drawing characters to create a visual hierarchy of variables\n * and their values at the point where the error occurred.\n *\n * @param vars - Object containing variable names as keys and their values\n * @returns Formatted variables table with tree-style prefix characters\n */\nfunction renderVariablesTable(vars: Record<string, unknown>): string {\n const entries = Object.entries(vars);\n if (entries.length === 0) {\n return \"\";\n }\n\n const lines: string[] = [\"Local Variables:\"];\n const lastIndex = entries.length - 1;\n\n entries.forEach(([key, value], index) => {\n const prefix = index === lastIndex ? \"└─\" : \"├─\";\n const valueStr = formatVariableValue(value);\n lines.push(`${prefix} ${key}: ${valueStr}`);\n });\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Finds the first application frame (in_app) in a stack trace.\n * Searches from the bottom of the stack (oldest frame) to find the first\n * frame that belongs to the user's application code rather than libraries.\n *\n * @param frames - Array of stack frames, typically in reverse chronological order\n * @returns The first in-app frame found, or undefined if none exist\n */\nfunction findFirstInAppFrame(\n frames: z.infer<typeof FrameInterface>[],\n): z.infer<typeof FrameInterface> | undefined {\n // Frames are usually in reverse order (most recent first)\n // We want the first in-app frame from the bottom\n for (let i = frames.length - 1; i >= 0; i--) {\n if (frames[i].inApp === true) {\n return frames[i];\n }\n }\n return undefined;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts || Object.keys(contexts).length === 0) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\n/**\n * Formats a Sentry issue with its latest event into comprehensive markdown output.\n * Includes issue metadata, event details, and usage instructions.\n *\n * @param params - Object containing organization slug, issue, event, and API service\n * @returns Formatted markdown string with complete issue information\n */\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":";;AAqBA,MAAMA,sBAA8C;CAClD,SAAS;CACT,OAAO;CACP,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;AACT;AAED,MAAMC,2BAAoD,CACxD,CAAC,yBAAyB,MAAO,CAClC;;;;;;;;;AAUD,SAAS,eACPC,OACAC,UACQ;AAER,KAAI,MAAM,UAAU;EAClB,MAAM,MAAM,MAAM,SAAS,aAAa,CAAC,MAAM,WAAW,GAAG;AAC7D,MAAI,OAAO,oBAAoB,KAC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M,QAAQ;AAC5F,WACE;AACF,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting-CHh9Q_OW.d.cts","names":[],"sources":["../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;AA+EgB;AAoEhB;AAkdA;;;;;;;AAQS,iBA/hBO,iBAAA,CA+hBP,KAAA,EA9hBA,CAAA,CAAE,KA8hBF,CAAA,OA9hBe,cA8hBf,CAAA,EAAA,UAAA,CAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAAA,IAAA,CAAA,EAAA,MAAA;;AACqB;;;;;;iBA3dd,iBAAA,QAAyB;;;;;;;;iBAkdzB,iBAAA;;;;;;;SAOP;SACA;cACK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatting-kdIeURER.d.ts","names":[],"sources":["../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;AA+EgB;AAoEhB;AAkdA;;;;;;;AAQS,iBA/hBO,iBAAA,CA+hBP,KAAA,EA9hBA,CAAA,CAAE,KA8hBF,CAAA,OA9hBe,cA8hBf,CAAA,EAAA,UAAA,CAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,MAAA,GAAA,IAAA,CAAA,EAAA,MAAA;;AACqB;;;;;;iBA3dd,iBAAA,QAAyB;;;;;;;;iBAkdzB,iBAAA;;;;;;;SAOP;SACA;cACK"}
|