@sentry/mcp-server 0.5.0 → 0.7.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/api-client/client.cjs +1 -1
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +1 -1
- package/dist/api-client/client.test.cjs +3 -3
- package/dist/api-client/client.test.js +3 -3
- package/dist/api-client/index.cjs +1 -1
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +1 -1
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/{client.d-eUhyVsN_.d.ts → client-7aaWrjcF.d.ts} +11 -2
- package/dist/client-7aaWrjcF.d.ts.map +1 -0
- package/dist/{client-GWxnTlSP.cjs → client-CLuQEpjg.cjs} +12 -5
- package/dist/client-CLuQEpjg.cjs.map +1 -0
- package/dist/{client.d-ar2BvC_o.d.cts → client-D1qv6QT3.d.cts} +12 -3
- package/dist/client-D1qv6QT3.d.cts.map +1 -0
- package/dist/{client-CpiyA8FR.js → client-D9mOWh6s.js} +12 -5
- package/dist/client-D9mOWh6s.js.map +1 -0
- package/dist/{dist-Bewd5-7a.js → dist-BKh-M1A1.js} +11 -11
- package/dist/{dist-Bewd5-7a.js.map → dist-BKh-M1A1.js.map} +1 -1
- package/dist/{dist-3oa5SxPp.cjs → dist-wiyJYfAH.cjs} +11 -11
- package/dist/{dist-3oa5SxPp.cjs.map → dist-wiyJYfAH.cjs.map} +1 -1
- package/dist/{formatting-BTSvl7n7.cjs → formatting-BmbJ5-Uh.cjs} +25 -1
- package/dist/formatting-BmbJ5-Uh.cjs.map +1 -0
- package/dist/formatting-C6Py2iOz.js +46 -0
- package/dist/formatting-C6Py2iOz.js.map +1 -0
- package/dist/index.cjs +16 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +3 -2
- package/dist/internal/formatting.d.cts +16 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +16 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +2 -2
- package/dist/internal/issue-helpers.test.cjs +2 -2
- package/dist/internal/issue-helpers.test.js +2 -2
- package/dist/{promptDefinitions.d-DyHOzL57.d.ts → promptDefinitions-C85r2wAk.d.ts} +1 -1
- package/dist/promptDefinitions-C85r2wAk.d.ts.map +1 -0
- package/dist/{promptDefinitions.d-ByaZdRYv.d.cts → promptDefinitions-CkGJr3c4.d.cts} +1 -1
- package/dist/promptDefinitions-CkGJr3c4.d.cts.map +1 -0
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/{schema.d-DwpHAZsi.d.ts → schema-BnIwkBRb.d.ts} +1 -1
- package/dist/schema-BnIwkBRb.d.ts.map +1 -0
- package/dist/{schema.d-DJThZSuo.d.cts → schema-aits0AJg.d.cts} +29 -29
- package/dist/schema-aits0AJg.d.cts.map +1 -0
- package/dist/{server-oefnmsHZ.js → server-0pTMWBNO.js} +11 -9
- package/dist/server-0pTMWBNO.js.map +1 -0
- package/dist/{server-D-JY6wPp.cjs → server-C9hKLN_c.cjs} +10 -8
- package/dist/server-C9hKLN_c.cjs.map +1 -0
- package/dist/server.cjs +5 -5
- package/dist/server.d.cts +3 -3
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +5 -5
- package/dist/{stdio-B31CD06F.js → stdio-8gK912aj.js} +2 -2
- package/dist/{stdio-B31CD06F.js.map → stdio-8gK912aj.js.map} +1 -1
- package/dist/{stdio-BsGPoQfx.cjs → stdio-BsM7bvfc.cjs} +2 -2
- package/dist/{stdio-BsGPoQfx.cjs.map → stdio-BsM7bvfc.cjs.map} +1 -1
- package/dist/test-setup.cjs +40 -74
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +40 -74
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-C0t6Y5Su.cjs → toolDefinitions-CRtHauHJ.cjs} +18 -3
- package/dist/toolDefinitions-CRtHauHJ.cjs.map +1 -0
- package/dist/{toolDefinitions-DB4pPvgy.js → toolDefinitions-CfNXEIaX.js} +18 -3
- package/dist/toolDefinitions-CfNXEIaX.js.map +1 -0
- package/dist/{toolDefinitions.d-CsT15_MF.d.cts → toolDefinitions-DPePAe0y.d.cts} +16 -1
- package/dist/toolDefinitions-DPePAe0y.d.cts.map +1 -0
- package/dist/{toolDefinitions.d-C5JUBInb.d.ts → toolDefinitions-abNbVXb5.d.ts} +16 -1
- package/dist/toolDefinitions-abNbVXb5.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +1 -1
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +1 -1
- package/dist/toolDefinitions.test.cjs +2 -2
- package/dist/toolDefinitions.test.js +2 -2
- package/dist/{tools-Ck2CHZeM.cjs → tools-2PgtFQ7q.cjs} +65 -46
- package/dist/tools-2PgtFQ7q.cjs.map +1 -0
- package/dist/{tools-_Y9eV4LR.js → tools-D5yXarBR.js} +65 -47
- package/dist/tools-D5yXarBR.js.map +1 -0
- package/dist/tools.cjs +3 -3
- package/dist/tools.d.cts +18 -3
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +18 -3
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +3 -3
- package/dist/tools.test.cjs +99 -27
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +99 -27
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +6 -6
- package/dist/transports/stdio.d.cts +3 -3
- package/dist/transports/stdio.d.ts +3 -3
- package/dist/transports/stdio.js +6 -6
- package/dist/{types.d-BfhMPrt_.d.cts → types-DFKY4nvR.d.cts} +4 -3
- package/dist/types-DFKY4nvR.d.cts.map +1 -0
- package/dist/{types.d-Z5OEf3rw.d.cts → types-Dg6ARePW.d.cts} +2 -2
- package/dist/types-Dg6ARePW.d.cts.map +1 -0
- package/dist/{types.d-B-acZthg.d.ts → types-RxedZjnY.d.ts} +2 -2
- package/dist/types-RxedZjnY.d.ts.map +1 -0
- package/dist/{types.d-BeKsSRmy.d.ts → types-X3ot7x0d.d.ts} +4 -3
- package/dist/types-X3ot7x0d.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/{version-BFCcfCIj.cjs → version-B3dZ0aPQ.cjs} +2 -2
- package/dist/{version-BFCcfCIj.cjs.map → version-B3dZ0aPQ.cjs.map} +1 -1
- package/dist/version-psBzsZ8-.js +6 -0
- package/dist/{version-B5Fav38l.js.map → version-psBzsZ8-.js.map} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-Dd6dTM3O.js → vi.ClIskdbk-BbUmO3mx.js} +9 -9
- package/dist/{vi.ClIskdbk-Dd6dTM3O.js.map → vi.ClIskdbk-BbUmO3mx.js.map} +1 -1
- package/dist/{vi.ClIskdbk-Bn6W0wTE.cjs → vi.ClIskdbk-TqmAThAO.cjs} +9 -9
- package/dist/{vi.ClIskdbk-Bn6W0wTE.cjs.map → vi.ClIskdbk-TqmAThAO.cjs.map} +1 -1
- package/package.json +8 -8
- package/dist/client-CpiyA8FR.js.map +0 -1
- package/dist/client-GWxnTlSP.cjs.map +0 -1
- package/dist/client.d-ar2BvC_o.d.cts.map +0 -1
- package/dist/client.d-eUhyVsN_.d.ts.map +0 -1
- package/dist/formatting-BTSvl7n7.cjs.map +0 -1
- package/dist/formatting-Bacfde0I.js +0 -28
- package/dist/formatting-Bacfde0I.js.map +0 -1
- package/dist/promptDefinitions.d-ByaZdRYv.d.cts.map +0 -1
- package/dist/promptDefinitions.d-DyHOzL57.d.ts.map +0 -1
- package/dist/schema.d-DJThZSuo.d.cts.map +0 -1
- package/dist/schema.d-DwpHAZsi.d.ts.map +0 -1
- package/dist/server-D-JY6wPp.cjs.map +0 -1
- package/dist/server-oefnmsHZ.js.map +0 -1
- package/dist/toolDefinitions-C0t6Y5Su.cjs.map +0 -1
- package/dist/toolDefinitions-DB4pPvgy.js.map +0 -1
- package/dist/toolDefinitions.d-C5JUBInb.d.ts.map +0 -1
- package/dist/toolDefinitions.d-CsT15_MF.d.cts.map +0 -1
- package/dist/tools-Ck2CHZeM.cjs.map +0 -1
- package/dist/tools-_Y9eV4LR.js.map +0 -1
- package/dist/types.d-B-acZthg.d.ts.map +0 -1
- package/dist/types.d-BeKsSRmy.d.ts.map +0 -1
- package/dist/types.d-BfhMPrt_.d.cts.map +0 -1
- package/dist/types.d-Z5OEf3rw.d.cts.map +0 -1
- package/dist/version-B5Fav38l.js +0 -6
- /package/dist/{index.d-Cb-lHGvn.d.cts → index-BPSCxsMC.d.cts} +0 -0
- /package/dist/{index.d-kYckfDWv.d.ts → index-h64gcVNJ.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema
|
|
2
|
-
import "../types
|
|
3
|
-
import { ApiError, SentryApiService } from "../client
|
|
1
|
+
import "../schema-aits0AJg.cjs";
|
|
2
|
+
import "../types-Dg6ARePW.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-D1qv6QT3.cjs";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema
|
|
2
|
-
import "../types
|
|
3
|
-
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client
|
|
1
|
+
import "../schema-BnIwkBRb.js";
|
|
2
|
+
import "../types-RxedZjnY.js";
|
|
3
|
+
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-7aaWrjcF.js";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
require('../schema-BnXdl41H.cjs');
|
|
3
|
-
const require_client = require('../client-
|
|
4
|
-
const require_dist = require('../dist-
|
|
5
|
-
const require_vi_ClIskdbk = require('../vi.ClIskdbk-
|
|
3
|
+
const require_client = require('../client-CLuQEpjg.cjs');
|
|
4
|
+
const require_dist = require('../dist-wiyJYfAH.cjs');
|
|
5
|
+
const require_vi_ClIskdbk = require('../vi.ClIskdbk-TqmAThAO.cjs');
|
|
6
6
|
|
|
7
7
|
//#region src/api-client/client.test.ts
|
|
8
8
|
require_dist.describe("getIssueUrl", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../schema-BzPfPMq7.js";
|
|
2
|
-
import { SentryApiService } from "../client-
|
|
3
|
-
import { describe, it } from "../dist-
|
|
4
|
-
import { globalExpect } from "../vi.ClIskdbk-
|
|
2
|
+
import { SentryApiService } from "../client-D9mOWh6s.js";
|
|
3
|
+
import { describe, it } from "../dist-BKh-M1A1.js";
|
|
4
|
+
import { globalExpect } from "../vi.ClIskdbk-BbUmO3mx.js";
|
|
5
5
|
|
|
6
6
|
//#region src/api-client/client.test.ts
|
|
7
7
|
describe("getIssueUrl", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types
|
|
3
|
-
import { ApiError, SentryApiService } from "../client
|
|
4
|
-
import "../index
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-aits0AJg.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-Dg6ARePW.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client-D1qv6QT3.cjs";
|
|
4
|
+
import "../index-BPSCxsMC.cjs";
|
|
5
5
|
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types
|
|
3
|
-
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client
|
|
4
|
-
import "../index
|
|
1
|
+
import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-BnIwkBRb.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-RxedZjnY.js";
|
|
3
|
+
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client-7aaWrjcF.js";
|
|
4
|
+
import "../index-h64gcVNJ.js";
|
|
5
5
|
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, Event, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, Issue, IssueList, IssueListSchema, IssueSchema, Organization, OrganizationList, OrganizationListSchema, OrganizationSchema, Project, ProjectList, ProjectListSchema, ProjectSchema, Release, ReleaseList, ReleaseListSchema, ReleaseSchema, SentryApiService, SpansSearchResponseSchema, Tag, TagList, TagListSchema, TagSchema, Team, TeamList, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
package/dist/api-client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-BzPfPMq7.js";
|
|
2
|
-
import { ApiError, SentryApiService } from "../client-
|
|
2
|
+
import { ApiError, SentryApiService } from "../client-D9mOWh6s.js";
|
|
3
3
|
import "../types-H-TSmRpm.js";
|
|
4
4
|
import "../api-client-9mzrj2HY.js";
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema } from "../schema-aits0AJg.cjs";
|
|
2
2
|
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema
|
|
1
|
+
import { ApiErrorSchema$1 as ApiErrorSchema, AutofixRunSchema$1 as AutofixRunSchema, AutofixRunStateSchema$1 as AutofixRunStateSchema, AutofixRunStepDefaultSchema$1 as AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema$1 as AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema$1 as AutofixRunStepSchema, AutofixRunStepSolutionSchema$1 as AutofixRunStepSolutionSchema, ClientKeyListSchema$1 as ClientKeyListSchema, ClientKeySchema$1 as ClientKeySchema, ErrorEntrySchema$1 as ErrorEntrySchema, ErrorEventSchema$1 as ErrorEventSchema, ErrorsSearchResponseSchema$1 as ErrorsSearchResponseSchema, EventSchema$1 as EventSchema, EventsResponseSchema$1 as EventsResponseSchema, ExceptionInterface$1 as ExceptionInterface, FrameInterface$1 as FrameInterface, IssueListSchema$1 as IssueListSchema, IssueSchema$1 as IssueSchema, OrganizationListSchema$1 as OrganizationListSchema, OrganizationSchema$1 as OrganizationSchema, ProjectListSchema$1 as ProjectListSchema, ProjectSchema$1 as ProjectSchema, ReleaseListSchema$1 as ReleaseListSchema, ReleaseSchema$1 as ReleaseSchema, SpansSearchResponseSchema$1 as SpansSearchResponseSchema, TagListSchema$1 as TagListSchema, TagSchema$1 as TagSchema, TeamListSchema$1 as TeamListSchema, TeamSchema$1 as TeamSchema, TransactionEventSchema$1 as TransactionEventSchema, UnknownEventSchema$1 as UnknownEventSchema } from "../schema-BnIwkBRb.js";
|
|
2
2
|
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorEventSchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema, TransactionEventSchema, UnknownEventSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types
|
|
1
|
+
import "../schema-aits0AJg.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-Dg6ARePW.cjs";
|
|
3
3
|
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types
|
|
1
|
+
import "../schema-BnIwkBRb.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types-RxedZjnY.js";
|
|
3
3
|
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types
|
|
1
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-RxedZjnY.js";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.d.ts
|
|
4
4
|
declare class ApiError extends Error {
|
|
@@ -92,6 +92,15 @@ declare class SentryApiService {
|
|
|
92
92
|
organizationSlug: string;
|
|
93
93
|
issueId: string;
|
|
94
94
|
}, opts?: RequestOptions): Promise<Issue>;
|
|
95
|
+
getEventForIssue({
|
|
96
|
+
organizationSlug,
|
|
97
|
+
issueId,
|
|
98
|
+
eventId
|
|
99
|
+
}: {
|
|
100
|
+
organizationSlug: string;
|
|
101
|
+
issueId: string;
|
|
102
|
+
eventId: string;
|
|
103
|
+
}, opts?: RequestOptions): Promise<Event>;
|
|
95
104
|
getLatestEventForIssue({
|
|
96
105
|
organizationSlug,
|
|
97
106
|
issueId
|
|
@@ -163,4 +172,4 @@ declare class SentryApiService {
|
|
|
163
172
|
}, opts?: RequestOptions): Promise<AutofixRunState>;
|
|
164
173
|
} //#endregion
|
|
165
174
|
export { ApiError as ApiError$1, SentryApiService as SentryApiService$1 };
|
|
166
|
-
//# sourceMappingURL=client
|
|
175
|
+
//# sourceMappingURL=client-7aaWrjcF.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-7aaWrjcF.d.ts","names":[],"sources":["../src/api-client/client.ts"],"sourcesContent":null,"mappings":";;;cAqCa,QAAA,SAAiB,KAAK;;EAAtB,WAAS,CAAA,OAAA,EAAA,MAAa,EAAA,MAAA,EAAA,MAAA;AAkBlC;AAMD,KAJK,cAAA,GAIQ;EAAgB,IAAA,CAAA,EAAA,MAAA;CAAA;AAOzB,cAPS,gBAAA,CAOT;EAA8B,QAkFD,WAAA;EAAc,UAAW,IAAA,EAAA,MAAA;EAAgB,UAAxB,SAAA,EAAA,MAAA;EAAO,WAS9C,CAAA;IAAA,WAAA;IAAA;EACC,CADD,EAAA;IACE,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA;IAAR,IAAA,CAAA,EAAA,MAAA;EAAO,CAAA;EAaU,OAChB,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAI,QAKC,OAAA;EAAc,WACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAI,WAAZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAO,iBAeD,CAAA,IAAA,CAAA,EA7CsB,cA6CtB,CAAA,EA7CuC,OA6CvC,CA7C+C,gBA6C/C,CAAA;EAAc,SACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EArCF,cAqCE,CAAA,EApCR,OAoCQ,CApCA,QAoCA,CAAA;EAAW,UAAnB,CAAA;IAAA,gBAAA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AAA,CAAA,EAAA,MAAA;IACA,MAAA,CAAA,EAAA,WAAA,GAAA,OAAA;EAAW,CAAA,EACX,IAAA,CAAA,EAYK,cAZL,CAAA,EAYmB,OAZnB,CAAA;IACA,KAAA,EAAA,MAAA;IACA,OAAA,EAAA,MAAA;IACA,KAAA,EAAA,MAAA;IASK,UAAA,EAAA,MAAA,GAAA,MAAA;IAAc,SAAA,EAAA,MAAA;IA6CnB,aAAA,EAAA,MAAA;EAAgB,CAAA,EAChB,CAAA;EAAW,WACX,CAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,WAAA;IAAA,KAAA;IAAA;EAuDgB,CAvDhB,EAAA;IACA,gBAAA,EAAA,MAAA;IACA,WAAA,CAAA,EAAA,MAAA;IAQK,WAAA,CAAA,EAAA,MAAA;IAAc,KAAA,CAAA,EAAA,MAAA;IA6CnB,MAAA,CAAA,EAAA,WAAA,GAAA,UAAA;EAAgB,CAAA,EAChB,IAAA,CAAA,EA9CK,cA8CL,CAAA,EA9CmB,OA8CnB,CAAA;IACA,SAAA,EAAA,MAAA;IACA,WAAA,EAAA,MAAA;IAOK,EAAA,EAAA,MAAA;IACE,OAAA,EAAA,MAAA;IAAR,KAAA,EAAA,MAAA;IAmBC,SAAA,EAAA,MAAA;IACA,kBAAA,EAAA,MAAA;IAKK,eAAA,EAAA,MAAA;EAAc,CAAA,EACZ,CAAA;EAAe,YAAvB,CAAA;IAAA,gBAAA;IAAA,OAAA;IAAA,OAAA;IAAA;GAAA,EAAA;IAAO,gBAAA,EAAA,MAAA;;;;YA3BD,iBACN,QAAQ;;;;;;;YAyBF,iBACN,QAAQ"}
|
|
@@ -117,7 +117,7 @@ var SentryApiService = class {
|
|
|
117
117
|
queryParams.set("per_page", "10");
|
|
118
118
|
queryParams.set("referrer", "sentry-mcp");
|
|
119
119
|
if (sortBy) queryParams.set("sort", sortBy);
|
|
120
|
-
queryParams.set("statsPeriod", "
|
|
120
|
+
queryParams.set("statsPeriod", "24h");
|
|
121
121
|
queryParams.set("query", sentryQuery.join(" "));
|
|
122
122
|
queryParams.append("collapse", "unhandled");
|
|
123
123
|
const apiUrl = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}` : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;
|
|
@@ -130,11 +130,18 @@ var SentryApiService = class {
|
|
|
130
130
|
const body = await response.json();
|
|
131
131
|
return require_schema.IssueSchema.parse(body);
|
|
132
132
|
}
|
|
133
|
-
async
|
|
134
|
-
const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/events
|
|
133
|
+
async getEventForIssue({ organizationSlug, issueId, eventId }, opts) {
|
|
134
|
+
const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);
|
|
135
135
|
const body = await response.json();
|
|
136
136
|
return require_schema.EventSchema.parse(body);
|
|
137
137
|
}
|
|
138
|
+
async getLatestEventForIssue({ organizationSlug, issueId }, opts) {
|
|
139
|
+
return this.getEventForIssue({
|
|
140
|
+
organizationSlug,
|
|
141
|
+
issueId,
|
|
142
|
+
eventId: "latest"
|
|
143
|
+
}, opts);
|
|
144
|
+
}
|
|
138
145
|
async searchErrors({ organizationSlug, projectSlug, filename, transaction, query, sortBy = "last_seen" }, opts) {
|
|
139
146
|
const sentryQuery = [];
|
|
140
147
|
if (filename) sentryQuery.push(`stack.filename:"*${filename.replace(/"/g, "\\\"")}"`);
|
|
@@ -146,7 +153,7 @@ var SentryApiService = class {
|
|
|
146
153
|
queryParams.set("per_page", "10");
|
|
147
154
|
queryParams.set("referrer", "sentry-mcp");
|
|
148
155
|
queryParams.set("sort", `-${sortBy === "last_seen" ? "last_seen" : "count"}`);
|
|
149
|
-
queryParams.set("statsPeriod", "
|
|
156
|
+
queryParams.set("statsPeriod", "24h");
|
|
150
157
|
queryParams.append("field", "issue");
|
|
151
158
|
queryParams.append("field", "title");
|
|
152
159
|
queryParams.append("field", "project");
|
|
@@ -215,4 +222,4 @@ Object.defineProperty(exports, 'SentryApiService', {
|
|
|
215
222
|
return SentryApiService;
|
|
216
223
|
}
|
|
217
224
|
});
|
|
218
|
-
//# sourceMappingURL=client-
|
|
225
|
+
//# sourceMappingURL=client-CLuQEpjg.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-CLuQEpjg.cjs","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import { logError } from \"../logging\";\nimport {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n console.log(`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId,\n }: {\n organizationSlug: string;\n issueId: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n return this.getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId: \"latest\",\n },\n opts,\n );\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;;AAqCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EA2iBtB,KAxjBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,MACd,OAAO,QAAQ,IAAI,aAIpB,EAAE;AACD,OAAK,cAAc;AACnB,OAAK,OAAO,QAAQ;AACpB,OAAK,YAAY,IAAI,IAAI,WAAW,UAAU,KAAK,KAAK,GAAG;CAC5D;CAED,QAAQC,MAAc;AACpB,OAAK,OAAO;AACZ,OAAK,YAAY,IAAI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0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aACJ,EACE,kBACA,SACA,SACA,cAAc,IAMf,EACDD,MACqB;EACrB,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,GACD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,gCAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBACJ,EACE,kBACA,SAID,EACDA,MAC0B;EAC1B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,qCAAsB,MAAM,KAAK;CACzC;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types
|
|
1
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types-Dg6ARePW.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.d.ts
|
|
4
4
|
declare class ApiError extends Error {
|
|
@@ -92,6 +92,15 @@ declare class SentryApiService {
|
|
|
92
92
|
organizationSlug: string;
|
|
93
93
|
issueId: string;
|
|
94
94
|
}, opts?: RequestOptions): Promise<Issue>;
|
|
95
|
+
getEventForIssue({
|
|
96
|
+
organizationSlug,
|
|
97
|
+
issueId,
|
|
98
|
+
eventId
|
|
99
|
+
}: {
|
|
100
|
+
organizationSlug: string;
|
|
101
|
+
issueId: string;
|
|
102
|
+
eventId: string;
|
|
103
|
+
}, opts?: RequestOptions): Promise<Event>;
|
|
95
104
|
getLatestEventForIssue({
|
|
96
105
|
organizationSlug,
|
|
97
106
|
issueId
|
|
@@ -135,9 +144,9 @@ declare class SentryApiService {
|
|
|
135
144
|
sortBy?: "timestamp" | "duration";
|
|
136
145
|
}, opts?: RequestOptions): Promise<{
|
|
137
146
|
timestamp: string;
|
|
147
|
+
transaction: string;
|
|
138
148
|
id: string;
|
|
139
149
|
project: string;
|
|
140
|
-
transaction: string;
|
|
141
150
|
trace: string;
|
|
142
151
|
"span.op": string;
|
|
143
152
|
"span.description": string;
|
|
@@ -163,4 +172,4 @@ declare class SentryApiService {
|
|
|
163
172
|
}, opts?: RequestOptions): Promise<AutofixRunState>;
|
|
164
173
|
} //#endregion
|
|
165
174
|
export { ApiError, SentryApiService };
|
|
166
|
-
//# sourceMappingURL=client
|
|
175
|
+
//# sourceMappingURL=client-D1qv6QT3.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-D1qv6QT3.d.cts","names":[],"sources":["../src/api-client/client.ts"],"sourcesContent":null,"mappings":";;;cAqCa,QAAA,SAAiB,KAAK;;EAAtB,WAAS,CAAA,OAAA,EAAA,MAAa,EAAA,MAAA,EAAA,MAAA;AAkBlC;AAMD,KAJK,cAAA,GAIQ;EAAgB,IAAA,CAAA,EAAA,MAAA;CAAA;AAOzB,cAPS,gBAAA,CAOT;EAA8B,QAkFD,WAAA;EAAc,UAAW,IAAA,EAAA,MAAA;EAAgB,UAAxB,SAAA,EAAA,MAAA;EAAO,WAS9C,CAAA;IAAA,WAAA;IAAA;EACC,CADD,EAAA;IACE,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA;IAAR,IAAA,CAAA,EAAA,MAAA;EAAO,CAAA;EAaU,OAChB,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAI,QAKC,OAAA;EAAc,WACZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAAI,WAAZ,CAAA,gBAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,C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;;YAyBF,iBACN,QAAQ"}
|
|
@@ -116,7 +116,7 @@ var SentryApiService = class {
|
|
|
116
116
|
queryParams.set("per_page", "10");
|
|
117
117
|
queryParams.set("referrer", "sentry-mcp");
|
|
118
118
|
if (sortBy) queryParams.set("sort", sortBy);
|
|
119
|
-
queryParams.set("statsPeriod", "
|
|
119
|
+
queryParams.set("statsPeriod", "24h");
|
|
120
120
|
queryParams.set("query", sentryQuery.join(" "));
|
|
121
121
|
queryParams.append("collapse", "unhandled");
|
|
122
122
|
const apiUrl = projectSlug ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}` : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;
|
|
@@ -129,11 +129,18 @@ var SentryApiService = class {
|
|
|
129
129
|
const body = await response.json();
|
|
130
130
|
return IssueSchema.parse(body);
|
|
131
131
|
}
|
|
132
|
-
async
|
|
133
|
-
const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/events
|
|
132
|
+
async getEventForIssue({ organizationSlug, issueId, eventId }, opts) {
|
|
133
|
+
const response = await this.request(`/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`, void 0, opts);
|
|
134
134
|
const body = await response.json();
|
|
135
135
|
return EventSchema.parse(body);
|
|
136
136
|
}
|
|
137
|
+
async getLatestEventForIssue({ organizationSlug, issueId }, opts) {
|
|
138
|
+
return this.getEventForIssue({
|
|
139
|
+
organizationSlug,
|
|
140
|
+
issueId,
|
|
141
|
+
eventId: "latest"
|
|
142
|
+
}, opts);
|
|
143
|
+
}
|
|
137
144
|
async searchErrors({ organizationSlug, projectSlug, filename, transaction, query, sortBy = "last_seen" }, opts) {
|
|
138
145
|
const sentryQuery = [];
|
|
139
146
|
if (filename) sentryQuery.push(`stack.filename:"*${filename.replace(/"/g, "\\\"")}"`);
|
|
@@ -145,7 +152,7 @@ var SentryApiService = class {
|
|
|
145
152
|
queryParams.set("per_page", "10");
|
|
146
153
|
queryParams.set("referrer", "sentry-mcp");
|
|
147
154
|
queryParams.set("sort", `-${sortBy === "last_seen" ? "last_seen" : "count"}`);
|
|
148
|
-
queryParams.set("statsPeriod", "
|
|
155
|
+
queryParams.set("statsPeriod", "24h");
|
|
149
156
|
queryParams.append("field", "issue");
|
|
150
157
|
queryParams.append("field", "title");
|
|
151
158
|
queryParams.append("field", "project");
|
|
@@ -203,4 +210,4 @@ var SentryApiService = class {
|
|
|
203
210
|
|
|
204
211
|
//#endregion
|
|
205
212
|
export { ApiError, SentryApiService };
|
|
206
|
-
//# sourceMappingURL=client-
|
|
213
|
+
//# sourceMappingURL=client-D9mOWh6s.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-D9mOWh6s.js","names":["message: string","status: number","host: string","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","opts?: RequestOptions","sentryQuery: string[]"],"sources":["../src/api-client/client.ts"],"sourcesContent":["import { logError } from \"../logging\";\nimport {\n OrganizationListSchema,\n ClientKeySchema,\n TeamListSchema,\n TeamSchema,\n ProjectListSchema,\n ProjectSchema,\n ReleaseListSchema,\n IssueListSchema,\n IssueSchema,\n EventSchema,\n ErrorsSearchResponseSchema,\n SpansSearchResponseSchema,\n TagListSchema,\n ApiErrorSchema,\n ClientKeyListSchema,\n AutofixRunSchema,\n AutofixRunStateSchema,\n} from \"./schema\";\nimport type {\n AutofixRun,\n AutofixRunState,\n ClientKey,\n ClientKeyList,\n Event,\n Issue,\n IssueList,\n OrganizationList,\n Project,\n ProjectList,\n ReleaseList,\n TagList,\n Team,\n TeamList,\n} from \"./types\";\n\nexport class ApiError extends Error {\n constructor(\n message: string,\n public status: number,\n ) {\n // HACK: improving this error message for the LLMs\n let finalMessage = message;\n if (\n message.includes(\n \"You do not have the multi project stream feature enabled\",\n ) ||\n message.includes(\"You cannot view events from multiple projects\")\n ) {\n finalMessage =\n \"You do not have access to query across multiple projects. Please select a project for your query.\";\n }\n super(finalMessage);\n }\n}\n\ntype RequestOptions = {\n host?: string;\n};\n\nexport class SentryApiService {\n private accessToken: string | null;\n protected host: string;\n protected apiPrefix: string;\n\n constructor({\n accessToken = null,\n host = process.env.SENTRY_HOST,\n }: {\n accessToken?: string | null;\n host?: string;\n }) {\n this.accessToken = accessToken;\n this.host = host || \"sentry.io\";\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n setHost(host: string) {\n this.host = host;\n this.apiPrefix = new URL(\"/api/0\", `https://${this.host}`).href;\n }\n\n private async request(\n path: string,\n options: RequestInit = {},\n { host }: { host?: string } = {},\n ): Promise<Response> {\n const url = host\n ? new URL(`/api/0${path}`, `https://${host}`).href\n : `${this.apiPrefix}${path}`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n if (this.accessToken) {\n headers.Authorization = `Bearer ${this.accessToken}`;\n }\n\n console.log(`[sentryApi] ${options.method || \"GET\"} ${url}`);\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n const errorText = await response.text();\n let parsed: unknown | undefined;\n try {\n parsed = JSON.parse(errorText);\n } catch (error) {\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n if (parsed) {\n const { data, success, error } = ApiErrorSchema.safeParse(parsed);\n\n if (success) {\n throw new ApiError(data.detail, response.status);\n }\n\n console.error(\n `[sentryApi] Failed to parse error response: ${errorText}`,\n error,\n );\n }\n\n throw new Error(\n `API request failed: ${response.status} ${response.statusText}\\n${errorText}`,\n );\n }\n\n return response;\n }\n\n getIssueUrl(organizationSlug: string, issueId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/issues/${issueId}`\n : `https://${organizationSlug}.${this.host}/issues/${issueId}`;\n }\n\n getTraceUrl(organizationSlug: string, traceId: string): string {\n return this.host !== \"sentry.io\"\n ? `https://${this.host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`\n : `https://${organizationSlug}.${this.host}/explore/traces/trace/${traceId}`;\n }\n\n async listOrganizations(opts?: RequestOptions): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\", undefined, opts);\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam(\n {\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n },\n opts?: RequestOptions,\n ): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n opts,\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(\n organizationSlug: string,\n opts?: RequestOptions,\n ): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject(\n {\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\n },\n opts?: RequestOptions,\n ): Promise<Project> {\n const response = await this.request(\n `/teams/${organizationSlug}/${teamSlug}/projects/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n platform,\n }),\n },\n opts,\n );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey(\n {\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKey> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n name,\n }),\n },\n opts,\n );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n },\n opts?: RequestOptions,\n ): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n undefined,\n opts,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases(\n {\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n },\n opts?: RequestOptions,\n ): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags(\n {\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\n },\n opts?: RequestOptions,\n ): Promise<TagList> {\n // TODO: this supports project in the query, but needs fixed\n // to accept slugs\n const searchQuery = new URLSearchParams();\n if (dataset) {\n searchQuery.set(\"dataset\", dataset);\n }\n\n const response = await this.request(\n `/organizations/${organizationSlug}/tags/${searchQuery.toString()}`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues(\n {\n organizationSlug,\n projectSlug,\n query,\n sortBy,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n query?: string;\n sortBy?: \"user\" | \"freq\" | \"date\" | \"new\";\n },\n opts?: RequestOptions,\n ): Promise<IssueList> {\n const sentryQuery: string[] = [];\n if (query) {\n sentryQuery.push(query);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/issues/?${queryParams.toString()}`\n : `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId,\n }: {\n organizationSlug: string;\n issueId: string;\n eventId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/${eventId}/`,\n undefined,\n opts,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\n }\n\n async getLatestEventForIssue(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<Event> {\n return this.getEventForIssue(\n {\n organizationSlug,\n issueId,\n eventId: \"latest\",\n },\n opts,\n );\n }\n\n // TODO: Sentry is not yet exposing a reasonable API to fetch trace data\n // async getTrace({\n // organizationSlug,\n // traceId,\n // }: {\n // organizationSlug: string;\n // traceId: string;\n // }): Promise<z.infer<typeof SentryIssueSchema>> {\n // const response = await this.request(\n // `/organizations/${organizationSlug}/issues/${traceId}/`,\n // );\n\n // const body = await response.json();\n // return SentryIssueSchema.parse(body);\n // }\n\n async searchErrors(\n {\n organizationSlug,\n projectSlug,\n filename,\n transaction,\n query,\n sortBy = \"last_seen\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n filename?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"last_seen\" | \"count\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [];\n if (filename) {\n sentryQuery.push(`stack.filename:\"*${filename.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"errors\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"last_seen\" ? \"last_seen\" : \"count\"}`,\n );\n queryParams.set(\"statsPeriod\", \"24h\");\n queryParams.append(\"field\", \"issue\");\n queryParams.append(\"field\", \"title\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"last_seen()\");\n queryParams.append(\"field\", \"count()\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n // TODO(dcramer): If you're using an older version of Sentry this API had a breaking change\n // meaning this endpoint will error.\n return ErrorsSearchResponseSchema.parse(body).data;\n }\n\n async searchSpans(\n {\n organizationSlug,\n projectSlug,\n transaction,\n query,\n sortBy = \"timestamp\",\n }: {\n organizationSlug: string;\n projectSlug?: string;\n transaction?: string;\n query?: string;\n sortBy?: \"timestamp\" | \"duration\";\n },\n opts?: RequestOptions,\n ) {\n const sentryQuery: string[] = [\"is_transaction:true\"];\n if (transaction) {\n sentryQuery.push(`transaction:\"${transaction.replace(/\"/g, '\\\\\"')}\"`);\n }\n if (query) {\n sentryQuery.push(query);\n }\n if (projectSlug) {\n sentryQuery.push(`project:${projectSlug}`);\n }\n\n const queryParams = new URLSearchParams();\n queryParams.set(\"dataset\", \"spans\");\n queryParams.set(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n queryParams.set(\n \"sort\",\n `-${sortBy === \"timestamp\" ? \"timestamp\" : \"span.duration\"}`,\n );\n queryParams.set(\"allowAggregateConditions\", \"0\");\n queryParams.set(\"useRpc\", \"1\");\n queryParams.append(\"field\", \"id\");\n queryParams.append(\"field\", \"trace\");\n queryParams.append(\"field\", \"span.op\");\n queryParams.append(\"field\", \"span.description\");\n queryParams.append(\"field\", \"span.duration\");\n queryParams.append(\"field\", \"transaction\");\n queryParams.append(\"field\", \"project\");\n queryParams.append(\"field\", \"timestamp\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n // if (projectSlug) queryParams.set(\"project\", projectSlug);\n\n const apiUrl = `/organizations/${organizationSlug}/events/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl, undefined, opts);\n\n const body = await response.json();\n return SpansSearchResponseSchema.parse(body).data;\n }\n\n // POST https://us.sentry.io/api/0/issues/5485083130/autofix/\n async startAutofix(\n {\n organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRun> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n {\n method: \"POST\",\n body: JSON.stringify({\n event_id: eventId,\n instruction,\n }),\n },\n opts,\n );\n const body = await response.json();\n return AutofixRunSchema.parse(body);\n }\n\n // GET https://us.sentry.io/api/0/issues/5485083130/autofix/\n async getAutofixState(\n {\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n },\n opts?: RequestOptions,\n ): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n undefined,\n opts,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":";;;AAqCA,IAAa,WAAb,cAA8B,MAAM;CAClC,YACEA,SACOC,QACP;EAEA,IAAI,eAAe;AACnB,MACE,QAAQ,SACN,2DACD,IACD,QAAQ,SAAS,gDAAgD,CAEjE,gBACE;AAEJ,QAAM,aAAa;EA2iBtB,KAxjBU;CAcR;AACF;AAMD,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;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AAY;AACxC,cAAY,IAAI,SAAS,YAAY,KAAK,IAAI,CAAC;EAG/C,MAAM,UAAU,iBAAiB,iBAAiB,WAAW,YAAY,UAAU,CAAC;EAEpF,MAAM,WAAW,MAAM,KAAK,QAAQ,gBAAmB,KAAK;EAE5D,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,0BAA0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aACJ,EACE,kBACA,SACA,SACA,cAAc,IAMf,EACDD,MACqB;EACrB,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,GACD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,iBAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBACJ,EACE,kBACA,SAID,EACDA,MAC0B;EAC1B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,oBAErD,KACD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,sBAAsB,MAAM,KAAK;CACzC;AACF"}
|
|
@@ -86,7 +86,7 @@ var r = process.env.FORCE_TTY !== void 0 || isatty(1);
|
|
|
86
86
|
var u = p(r);
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region ../../node_modules/.pnpm/@vitest+pretty-format@3.1.
|
|
89
|
+
//#region ../../node_modules/.pnpm/@vitest+pretty-format@3.1.3/node_modules/@vitest/pretty-format/dist/index.js
|
|
90
90
|
function _mergeNamespaces(n, m) {
|
|
91
91
|
m.forEach(function(e) {
|
|
92
92
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
@@ -1679,7 +1679,7 @@ function inspect$2(value, opts = {}) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
|
|
1681
1681
|
//#endregion
|
|
1682
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
1682
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
1683
1683
|
const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = plugins;
|
|
1684
1684
|
const PLUGINS$1 = [
|
|
1685
1685
|
ReactTestComponent$1,
|
|
@@ -1801,7 +1801,7 @@ function getDefaultExportFromCjs(x) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
|
|
1803
1803
|
//#endregion
|
|
1804
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
1804
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/helpers.js
|
|
1805
1805
|
/**
|
|
1806
1806
|
* Get original stacktrace without source map support the most performant way.
|
|
1807
1807
|
* - Create only 1 stack frame.
|
|
@@ -1922,7 +1922,7 @@ function isNegativeNaN(val) {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
|
|
1924
1924
|
//#endregion
|
|
1925
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
1925
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/index.js
|
|
1926
1926
|
var jsTokens_1;
|
|
1927
1927
|
var hasRequiredJsTokens;
|
|
1928
1928
|
function requireJsTokens() {
|
|
@@ -2373,7 +2373,7 @@ function getSafeTimers() {
|
|
|
2373
2373
|
}
|
|
2374
2374
|
|
|
2375
2375
|
//#endregion
|
|
2376
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
2376
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/diff.js
|
|
2377
2377
|
/**
|
|
2378
2378
|
* Diff Match and Patch
|
|
2379
2379
|
* Copyright 2018 The diff-match-patch Authors.
|
|
@@ -3722,7 +3722,7 @@ function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff$1) {
|
|
|
3722
3722
|
}
|
|
3723
3723
|
|
|
3724
3724
|
//#endregion
|
|
3725
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
3725
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/error.js
|
|
3726
3726
|
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
3727
3727
|
const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
3728
3728
|
function isImmutable(v) {
|
|
@@ -6833,7 +6833,7 @@ references to blow the stack.
|
|
|
6833
6833
|
*/
|
|
6834
6834
|
|
|
6835
6835
|
//#endregion
|
|
6836
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.
|
|
6836
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.1.3/node_modules/@vitest/utils/dist/source-map.js
|
|
6837
6837
|
const comma = ",".charCodeAt(0);
|
|
6838
6838
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6839
6839
|
const intToChar = new Uint8Array(64);
|
|
@@ -7001,7 +7001,7 @@ function parseSingleV8Stack(raw) {
|
|
|
7001
7001
|
}
|
|
7002
7002
|
|
|
7003
7003
|
//#endregion
|
|
7004
|
-
//#region ../../node_modules/.pnpm/@vitest+runner@3.1.
|
|
7004
|
+
//#region ../../node_modules/.pnpm/@vitest+runner@3.1.3/node_modules/@vitest/runner/dist/chunk-tasks.js
|
|
7005
7005
|
function createChainable(keys, fn) {
|
|
7006
7006
|
function create(context) {
|
|
7007
7007
|
const chain$1 = function(...args) {
|
|
@@ -7042,7 +7042,7 @@ function getTestName(task, separator = " > ") {
|
|
|
7042
7042
|
}
|
|
7043
7043
|
|
|
7044
7044
|
//#endregion
|
|
7045
|
-
//#region ../../node_modules/.pnpm/@vitest+runner@3.1.
|
|
7045
|
+
//#region ../../node_modules/.pnpm/@vitest+runner@3.1.3/node_modules/@vitest/runner/dist/index.js
|
|
7046
7046
|
var PendingError = class extends Error {
|
|
7047
7047
|
code = "VITEST_PENDING";
|
|
7048
7048
|
taskId;
|
|
@@ -7181,7 +7181,7 @@ function resolveDeps(fixtures, depSet = new Set(), pendingFixtures = []) {
|
|
|
7181
7181
|
}
|
|
7182
7182
|
function getUsedProps(fn) {
|
|
7183
7183
|
let fnString = fn.toString();
|
|
7184
|
-
if (/__async\(this, (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) fnString = fnString.split(
|
|
7184
|
+
if (/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) fnString = fnString.split(/__async\((?:this|null),/)[1];
|
|
7185
7185
|
const match = fnString.match(/[^(]*\(([^)]*)/);
|
|
7186
7186
|
if (!match) return [];
|
|
7187
7187
|
const args = splitByComma(match[1]);
|
|
@@ -7896,4 +7896,4 @@ const sendTasksUpdateThrottled = throttle(sendTasksUpdate, 100);
|
|
|
7896
7896
|
|
|
7897
7897
|
//#endregion
|
|
7898
7898
|
export { Assertion, assert$1 as assert, assertTypes, createSimpleStackTrace, describe, diff, expect, format$1 as format, getCurrentTest, getNames, getSafeTimers, getTestName, getType$1 as getType, isObject, it, parseSingleStack, plugins, printDiffOrStringify, processError, stringify, test, u, use, utils_exports };
|
|
7899
|
-
//# sourceMappingURL=dist-
|
|
7899
|
+
//# sourceMappingURL=dist-BKh-M1A1.js.map
|