@sentry/mcp-server 0.3.1 → 0.4.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 +2 -2
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +2 -2
- package/dist/api-client/client.test.js +2 -2
- package/dist/api-client/index.cjs +2 -2
- package/dist/api-client/index.d.cts +3 -3
- package/dist/api-client/index.d.ts +3 -3
- package/dist/api-client/index.js +2 -2
- package/dist/api-client/schema.cjs +1 -1
- package/dist/api-client/schema.d.cts +1 -1
- package/dist/api-client/schema.d.ts +1 -1
- package/dist/api-client/schema.js +1 -1
- package/dist/api-client/types.d.cts +2 -2
- package/dist/api-client/types.d.ts +2 -2
- package/dist/{client-g5hAsyeE.js → client-BKLE5Lkt.js} +5 -3
- package/dist/client-BKLE5Lkt.js.map +1 -0
- package/dist/{client-CRNnZ1r9.cjs → client-C_XfRSu3.cjs} +5 -3
- package/dist/client-C_XfRSu3.cjs.map +1 -0
- package/dist/{client.d-CQuzKzqF.d.cts → client.d-BizHDVuq.d.cts} +3 -3
- package/dist/client.d-BizHDVuq.d.cts.map +1 -0
- package/dist/{client.d-BAXIPpq-.d.ts → client.d-CrWOcVIU.d.ts} +2 -2
- package/dist/{client.d-CQuzKzqF.d.cts.map → client.d-CrWOcVIU.d.ts.map} +1 -1
- package/dist/index.cjs +11 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.d.cts +3 -3
- package/dist/internal/formatting.d.ts +3 -3
- package/dist/{schema-C5yrrdxi.cjs → schema-Bc6_gUDA.cjs} +2 -2
- package/dist/{schema-C5yrrdxi.cjs.map → schema-Bc6_gUDA.cjs.map} +1 -1
- package/dist/{schema-RGcdX0Wv.js → schema-D1B8p0Ib.js} +2 -2
- package/dist/{schema-RGcdX0Wv.js.map → schema-D1B8p0Ib.js.map} +1 -1
- package/dist/{schema.d-BJRk-qn4.d.ts → schema.d-DQ5YUr0Y.d.ts} +911 -115
- package/dist/{schema.d-BJRk-qn4.d.ts.map → schema.d-DQ5YUr0Y.d.ts.map} +1 -1
- package/dist/{schema.d-CBFo8C58.d.cts → schema.d-cvHc3M20.d.cts} +1099 -303
- package/dist/schema.d-cvHc3M20.d.cts.map +1 -0
- package/dist/{server-Dot7NeYs.js → server-DHbbEoa2.js} +3 -3
- package/dist/{server-Dot7NeYs.js.map → server-DHbbEoa2.js.map} +1 -1
- package/dist/{server-8IhYk2mv.cjs → server-DQ_dBWQy.cjs} +3 -3
- package/dist/{server-8IhYk2mv.cjs.map → server-DQ_dBWQy.cjs.map} +1 -1
- package/dist/server.cjs +4 -4
- package/dist/server.js +4 -4
- package/dist/stdio-BHg5CaoN.js +19 -0
- package/dist/stdio-BHg5CaoN.js.map +1 -0
- package/dist/{stdio-Co3Ot0bh.cjs → stdio-CRqulLZQ.cjs} +10 -7
- package/dist/stdio-CRqulLZQ.cjs.map +1 -0
- package/dist/{tools-OdomWt8t.cjs → tools-B22b8Jjm.cjs} +6 -2
- package/dist/{tools-OdomWt8t.cjs.map → tools-B22b8Jjm.cjs.map} +1 -1
- package/dist/{tools-BKGdG_hf.js → tools-CXgh-6Vh.js} +6 -2
- package/dist/{tools-BKGdG_hf.js.map → tools-CXgh-6Vh.js.map} +1 -1
- package/dist/tools.cjs +3 -3
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +3 -3
- package/dist/tools.test.cjs +3 -3
- package/dist/tools.test.js +3 -3
- package/dist/transports/stdio.cjs +5 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +5 -5
- package/dist/{types.d-BEMABWun.d.ts → types.d-DsrCjT7G.d.ts} +2 -2
- package/dist/{types.d-BEMABWun.d.ts.map → types.d-DsrCjT7G.d.ts.map} +1 -1
- package/dist/{types.d-BBSfGmvU.d.cts → types.d-r20cCyVI.d.cts} +2 -2
- package/dist/{types.d-BBSfGmvU.d.cts.map → types.d-r20cCyVI.d.cts.map} +1 -1
- package/dist/{version-w2qDmruK.cjs → version-D93Bj2gg.cjs} +2 -2
- package/dist/version-D93Bj2gg.cjs.map +1 -0
- package/dist/version-DkmlRpxa.js +6 -0
- package/dist/version-DkmlRpxa.js.map +1 -0
- package/dist/version.cjs +1 -1
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/client-CRNnZ1r9.cjs.map +0 -1
- package/dist/client-g5hAsyeE.js.map +0 -1
- package/dist/client.d-BAXIPpq-.d.ts.map +0 -1
- package/dist/schema.d-CBFo8C58.d.cts.map +0 -1
- package/dist/stdio-CXQ72BLj.js +0 -16
- package/dist/stdio-CXQ72BLj.js.map +0 -1
- package/dist/stdio-Co3Ot0bh.cjs.map +0 -1
- package/dist/version-BjQFPcxi.js +0 -6
- package/dist/version-BjQFPcxi.js.map +0 -1
- package/dist/version-w2qDmruK.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require('../schema-
|
|
2
|
-
const require_client = require('../client-
|
|
1
|
+
require('../schema-Bc6_gUDA.cjs');
|
|
2
|
+
const require_client = require('../client-C_XfRSu3.cjs');
|
|
3
3
|
|
|
4
4
|
exports.ApiError = require_client.ApiError
|
|
5
5
|
exports.SentryApiService = require_client.SentryApiService
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema.d-
|
|
2
|
-
import "../types.d-
|
|
3
|
-
import { ApiError, SentryApiService } from "../client.d-
|
|
1
|
+
import "../schema.d-cvHc3M20.cjs";
|
|
2
|
+
import "../types.d-r20cCyVI.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client.d-BizHDVuq.cjs";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../schema.d-
|
|
2
|
-
import "../types.d-
|
|
3
|
-
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client.d-
|
|
1
|
+
import "../schema.d-DQ5YUr0Y.js";
|
|
2
|
+
import "../types.d-DsrCjT7G.js";
|
|
3
|
+
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client.d-CrWOcVIU.js";
|
|
4
4
|
export { ApiError, SentryApiService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
require('../schema-
|
|
3
|
-
const require_client = require('../client-
|
|
2
|
+
require('../schema-Bc6_gUDA.cjs');
|
|
3
|
+
const require_client = require('../client-C_XfRSu3.cjs');
|
|
4
4
|
const require_dist = require('../dist-3oa5SxPp.cjs');
|
|
5
5
|
const require_vi_ClIskdbk = require('../vi.ClIskdbk-Bn6W0wTE.cjs');
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../schema-
|
|
2
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import "../schema-D1B8p0Ib.js";
|
|
2
|
+
import { SentryApiService } from "../client-BKLE5Lkt.js";
|
|
3
3
|
import { describe, it } from "../dist-Bewd5-7a.js";
|
|
4
4
|
import { globalExpect } from "../vi.ClIskdbk-Dd6dTM3O.js";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_schema = require('../schema-
|
|
2
|
-
const require_client = require('../client-
|
|
1
|
+
const require_schema = require('../schema-Bc6_gUDA.cjs');
|
|
2
|
+
const require_client = require('../client-C_XfRSu3.cjs');
|
|
3
3
|
require('../types-o3zWarRp.cjs');
|
|
4
4
|
require('../api-client-CEBuz3Zu.cjs');
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema.d-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-
|
|
3
|
-
import { ApiError, SentryApiService } from "../client.d-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema.d-cvHc3M20.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-r20cCyVI.cjs";
|
|
3
|
+
import { ApiError, SentryApiService } from "../client.d-BizHDVuq.cjs";
|
|
4
4
|
import "../index.d-Cb-lHGvn.cjs";
|
|
5
5
|
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, 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 };
|
|
@@ -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, 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 } from "../schema.d-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-
|
|
3
|
-
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client.d-
|
|
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, 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 } from "../schema.d-DQ5YUr0Y.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-DsrCjT7G.js";
|
|
3
|
+
import { ApiError$1 as ApiError, SentryApiService$1 as SentryApiService } from "../client.d-CrWOcVIU.js";
|
|
4
4
|
import "../index.d-kYckfDWv.js";
|
|
5
5
|
export { ApiError, ApiErrorSchema, AutofixRun, AutofixRunSchema, AutofixRunState, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKey, ClientKeyList, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, 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 };
|
package/dist/api-client/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema-
|
|
2
|
-
import { ApiError, SentryApiService } from "../client-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema-D1B8p0Ib.js";
|
|
2
|
+
import { ApiError, SentryApiService } from "../client-BKLE5Lkt.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, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema.d-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema.d-cvHc3M20.cjs";
|
|
2
2
|
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema };
|
|
@@ -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, 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 } from "../schema.d-
|
|
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, 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 } from "../schema.d-DQ5YUr0Y.js";
|
|
2
2
|
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema } from "../schema-D1B8p0Ib.js";
|
|
2
2
|
|
|
3
3
|
export { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, AutofixRunStepDefaultSchema, AutofixRunStepRootCauseAnalysisSchema, AutofixRunStepSchema, AutofixRunStepSolutionSchema, ClientKeyListSchema, ClientKeySchema, ErrorEntrySchema, ErrorsSearchResponseSchema, EventSchema, EventsResponseSchema, ExceptionInterface, FrameInterface, IssueListSchema, IssueSchema, OrganizationListSchema, OrganizationSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, ReleaseSchema, SpansSearchResponseSchema, TagListSchema, TagSchema, TeamListSchema, TeamSchema };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../schema.d-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-
|
|
1
|
+
import "../schema.d-cvHc3M20.cjs";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-r20cCyVI.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.d-
|
|
2
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-
|
|
1
|
+
import "../schema.d-DQ5YUr0Y.js";
|
|
2
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList } from "../types.d-DsrCjT7G.js";
|
|
3
3
|
export { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, Organization, OrganizationList, Project, ProjectList, Release, ReleaseList, Tag, TagList, Team, TeamList };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema } from "./schema-
|
|
1
|
+
import { ApiErrorSchema, AutofixRunSchema, AutofixRunStateSchema, ClientKeyListSchema, ClientKeySchema, ErrorsSearchResponseSchema, EventSchema, IssueListSchema, IssueSchema, OrganizationListSchema, ProjectListSchema, ProjectSchema, ReleaseListSchema, SpansSearchResponseSchema, TagListSchema, TeamListSchema, TeamSchema } from "./schema-D1B8p0Ib.js";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.ts
|
|
4
4
|
var ApiError = class extends Error {
|
|
5
5
|
constructor(message, status) {
|
|
6
|
-
|
|
6
|
+
let finalMessage = message;
|
|
7
|
+
if (message.includes("You do not have the multi project stream feature enabled") || message.includes("You cannot view events from multiple projects")) finalMessage = "You do not have access to query across multiple projects. Please select a project for your query.";
|
|
8
|
+
super(finalMessage);
|
|
7
9
|
this.status = status;
|
|
8
10
|
}
|
|
9
11
|
};
|
|
@@ -198,4 +200,4 @@ var SentryApiService = class {
|
|
|
198
200
|
|
|
199
201
|
//#endregion
|
|
200
202
|
export { ApiError, SentryApiService };
|
|
201
|
-
//# sourceMappingURL=client-
|
|
203
|
+
//# sourceMappingURL=client-BKLE5Lkt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-BKLE5Lkt.js","names":["message: string","status: number","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","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\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 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(): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\");\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(organizationSlug: string): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam({\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n }): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(organizationSlug: string): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject({\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\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 );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey({\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\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 );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys({\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n }): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases({\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n }): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags({\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\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 );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues({\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 }): Promise<IssueList> {\n const sentryQuery: string[] = [];\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(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue({\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getLatestEventForIssue({\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/latest/`,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\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 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 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\", \"1w\");\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);\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 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 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);\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 organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\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 );\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 organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\n );\n const body = await response.json();\n return AutofixRunStateSchema.parse(body);\n }\n}\n"],"mappings":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WAAW,MAAM,KAAK,QAAQ,OAAO;EAE3C,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,0BAA0B,MAAM,KAAK,CAAC;CAC9C;CAGD,MAAM,aAAa,EACjB,kBACA,SACA,SACA,cAAc,IAMf,EAAuB;EACtB,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,YACrD;GACE,QAAQ;GACR,MAAM,KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,EACF;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,iBAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBAAgB,EACpB,kBACA,SAID,EAA4B;EAC3B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,WACtD;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,sBAAsB,MAAM,KAAK;CACzC;AACF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const require_schema = require('./schema-
|
|
2
|
+
const require_schema = require('./schema-Bc6_gUDA.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/api-client/client.ts
|
|
5
5
|
var ApiError = class extends Error {
|
|
6
6
|
constructor(message, status) {
|
|
7
|
-
|
|
7
|
+
let finalMessage = message;
|
|
8
|
+
if (message.includes("You do not have the multi project stream feature enabled") || message.includes("You cannot view events from multiple projects")) finalMessage = "You do not have access to query across multiple projects. Please select a project for your query.";
|
|
9
|
+
super(finalMessage);
|
|
8
10
|
this.status = status;
|
|
9
11
|
}
|
|
10
12
|
};
|
|
@@ -210,4 +212,4 @@ Object.defineProperty(exports, 'SentryApiService', {
|
|
|
210
212
|
return SentryApiService;
|
|
211
213
|
}
|
|
212
214
|
});
|
|
213
|
-
//# sourceMappingURL=client-
|
|
215
|
+
//# sourceMappingURL=client-C_XfRSu3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-C_XfRSu3.cjs","names":["message: string","status: number","path: string","options: RequestInit","headers: Record<string, string>","parsed: unknown | undefined","organizationSlug: string","issueId: string","traceId: string","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\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 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(): Promise<OrganizationList> {\n const response = await this.request(\"/organizations/\");\n\n const body = await response.json();\n return OrganizationListSchema.parse(body);\n }\n\n async listTeams(organizationSlug: string): Promise<TeamList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n );\n\n const body = await response.json();\n return TeamListSchema.parse(body);\n }\n\n async createTeam({\n organizationSlug,\n name,\n }: {\n organizationSlug: string;\n name: string;\n }): Promise<Team> {\n const response = await this.request(\n `/organizations/${organizationSlug}/teams/`,\n {\n method: \"POST\",\n body: JSON.stringify({ name }),\n },\n );\n\n return TeamSchema.parse(await response.json());\n }\n\n async listProjects(organizationSlug: string): Promise<ProjectList> {\n const response = await this.request(\n `/organizations/${organizationSlug}/projects/`,\n );\n\n const body = await response.json();\n return ProjectListSchema.parse(body);\n }\n\n async createProject({\n organizationSlug,\n teamSlug,\n name,\n platform,\n }: {\n organizationSlug: string;\n teamSlug: string;\n name: string;\n platform?: string;\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 );\n return ProjectSchema.parse(await response.json());\n }\n\n async createClientKey({\n organizationSlug,\n projectSlug,\n name,\n }: {\n organizationSlug: string;\n projectSlug: string;\n name?: string;\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 );\n return ClientKeySchema.parse(await response.json());\n }\n\n async listClientKeys({\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug: string;\n }): Promise<ClientKeyList> {\n const response = await this.request(\n `/projects/${organizationSlug}/${projectSlug}/keys/`,\n );\n return ClientKeyListSchema.parse(await response.json());\n }\n\n async listReleases({\n organizationSlug,\n projectSlug,\n }: {\n organizationSlug: string;\n projectSlug?: string;\n }): Promise<ReleaseList> {\n const response = await this.request(\n projectSlug\n ? `/projects/${organizationSlug}/${projectSlug}/releases/`\n : `/organizations/${organizationSlug}/releases/`,\n );\n\n const body = await response.json();\n return ReleaseListSchema.parse(body);\n }\n\n async listTags({\n organizationSlug,\n dataset,\n }: {\n organizationSlug: string;\n dataset?: \"errors\" | \"search_issues\";\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 );\n\n const body = await response.json();\n return TagListSchema.parse(body);\n }\n\n async listIssues({\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 }): Promise<IssueList> {\n const sentryQuery: string[] = [];\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(\"per_page\", \"10\");\n queryParams.set(\"referrer\", \"sentry-mcp\");\n if (sortBy) queryParams.set(\"sort\", sortBy);\n queryParams.set(\"statsPeriod\", \"1w\");\n queryParams.set(\"query\", sentryQuery.join(\" \"));\n\n queryParams.append(\"collapse\", \"unhandled\");\n\n const apiUrl = `/organizations/${organizationSlug}/issues/?${queryParams.toString()}`;\n\n const response = await this.request(apiUrl);\n\n const body = await response.json();\n return IssueListSchema.parse(body);\n }\n\n async getIssue({\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<Issue> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/`,\n );\n\n const body = await response.json();\n return IssueSchema.parse(body);\n }\n\n async getLatestEventForIssue({\n organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<Event> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/events/latest/`,\n );\n\n const body = await response.json();\n return EventSchema.parse(body);\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 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 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\", \"1w\");\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);\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 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 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);\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 organizationSlug,\n issueId,\n eventId,\n instruction = \"\",\n }: {\n organizationSlug: string;\n issueId: string;\n eventId?: string;\n instruction?: string;\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 );\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 organizationSlug,\n issueId,\n }: {\n organizationSlug: string;\n issueId: string;\n }): Promise<AutofixRunState> {\n const response = await this.request(\n `/organizations/${organizationSlug}/issues/${issueId}/autofix/`,\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;EA4ctB,KAzdU;CAcR;AACF;AAED,IAAa,mBAAb,MAA8B;CAC5B,AAAQ;CACR,AAAU;CACV,AAAU;CAEV,YAAY,EACV,cAAc,M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KAAK,UAAU;IACnB,UAAU;IACV;GACD,EAAC;EACH,EACF;EACD,MAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SAAO,gCAAiB,MAAM,KAAK;CACpC;CAGD,MAAM,gBAAgB,EACpB,kBACA,SAID,EAA4B;EAC3B,MAAM,WAAW,MAAM,KAAK,SACzB,iBAAiB,iBAAiB,UAAU,QAAQ,WACtD;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.d-
|
|
1
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types.d-r20cCyVI.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.d.ts
|
|
4
4
|
declare class ApiError extends Error {
|
|
@@ -131,13 +131,13 @@ declare class SentryApiService {
|
|
|
131
131
|
sortBy?: "timestamp" | "duration";
|
|
132
132
|
}): Promise<{
|
|
133
133
|
timestamp: string;
|
|
134
|
-
transaction: string;
|
|
135
134
|
id: string;
|
|
136
135
|
project: string;
|
|
137
136
|
trace: string;
|
|
138
137
|
"span.op": string;
|
|
139
138
|
"span.description": string;
|
|
140
139
|
"span.duration": number;
|
|
140
|
+
transaction: string;
|
|
141
141
|
}[]>;
|
|
142
142
|
startAutofix({
|
|
143
143
|
organizationSlug,
|
|
@@ -161,4 +161,4 @@ declare class SentryApiService {
|
|
|
161
161
|
|
|
162
162
|
//# sourceMappingURL=client.d.ts.map
|
|
163
163
|
export { ApiError, SentryApiService };
|
|
164
|
-
//# sourceMappingURL=client.d-
|
|
164
|
+
//# sourceMappingURL=client.d-BizHDVuq.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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MAAA;IACA,OAAA,EAAA,MAAA;EAAW,CAAA,CAAA,EA7BT,OA8BF,CA9BU,KA8BV,CAAA;EAAK,YACL,CAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,QAAA;IAAA,WAAA;IAAA,KAAA;IAAA;EAuDoB,CAvDpB,EAAA;IAQD,gBAAA,EAAA,MAAA;IA2CC,WAAA,CAAA,EAAA,MAAA;IACA,QAAA,CAAA,EAAA,MAAA;IACA,WAAA,CAAA,EAAA,MAAA;IACA,KAAA,CAAA,EAAA,MAAA;IACA,MAAA,CAAA,EAAA,WAAA,GAAA,OAAA;EAAoB,CAAA,CAAA,EA/CrB,OAsDA,CAAA;IA2CC,KAAA,EAAA,MAAA;IACA,OAAA,EAAA,MAAA;IACA,KAAA,EAAA,MAAA;IACA,UAAA,EAAA,MAAA,GAAA,MAAA;IAMU,SAAA,EAAA,MAAA;IAAR,aAAA,EAAA,MAAA;EAAO,CAAA,EAiBT,CAAA;EAAgB,WAChB,CAAA;IAAA,gBAAA;IAAA,WAAA;IAAA,WAAA;IAAA,KAAA;IAAA;GAAA,EAAA;IAIU,gBAAA,EAAA,MAAA;IAAR,WAAA,CAAA,EAAA,MAAA;IAAO,WAAA,CAAA,EAAA,MAAA;;;MA1EV;;;;;;;;;;;;;;;;;;;;MAoDG,QAAQ;;;;;;;MAsBR,QAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types.d-
|
|
1
|
+
import { AutofixRun, AutofixRunState, ClientKey, ClientKeyList, Event, Issue, IssueList, OrganizationList, Project, ProjectList, ReleaseList, TagList, Team, TeamList } from "./types.d-DsrCjT7G.js";
|
|
2
2
|
|
|
3
3
|
//#region src/api-client/client.d.ts
|
|
4
4
|
declare class ApiError extends Error {
|
|
@@ -161,4 +161,4 @@ declare class SentryApiService {
|
|
|
161
161
|
|
|
162
162
|
//# sourceMappingURL=client.d.ts.map
|
|
163
163
|
export { ApiError as ApiError$1, SentryApiService as SentryApiService$1 };
|
|
164
|
-
//# sourceMappingURL=client.d-
|
|
164
|
+
//# sourceMappingURL=client.d-CrWOcVIU.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d-
|
|
1
|
+
{"version":3,"file":"client.d-CrWOcVIU.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;AAoBnC;AAA6B,cAAhB,gBAAA,CAAgB;EAAA,QAMzB,WAAA;EAAkB,UAClB,IAAA,EAAA,MAAA;EAA8B,UA6EG,SAAA,EAAA,MAAA;EAAgB,WAAxB,CAAA;IAAA,WAAA;IAAA;EAOuB,CAPvB,EAAA;IAOwB,WAAA,CAAA,EAAA,MAAA,GAAA,IAAA;IAAR,IAAA,CAAA,EAAA,MAAA;EAAO,CAAA;EAUhC,QAChB,OAAA;EAAI,WAIM,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,iBAY2C,CAAA,CAAA,EAlC3B,OAkC2B,CAlCnB,gBAkCmB,CAAA;EAAW,SAAnB,CAAA,gBAAA,EAAA,MAAA,CAAA,EA3BH,OA2BG,CA3BK,QA2BL,CAAA;EAAO,UAUnD,CAAA;IAAA,gBAAA;IAAA;EAEI,CAFJ,EAAA;IACA,gBAAA,EAAA,MAAA;IACA,IAAA,EAAA,MAAA;EAAI,CAAA,CAAA,EAxBF,OAyBF,CAzBU,IAyBV,CAAA;EAAQ,YAME,CAAA,gBAAA,EAAA,MAAA,CAAA,EAnBkC,OAmBlC,CAnB0C,WAmB1C,CAAA;E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client-
|
|
4
|
+
require('./schema-Bc6_gUDA.cjs');
|
|
5
|
+
require('./client-C_XfRSu3.cjs');
|
|
6
6
|
require('./types-o3zWarRp.cjs');
|
|
7
7
|
require('./api-client-CEBuz3Zu.cjs');
|
|
8
8
|
require('./formatting-BTSvl7n7.cjs');
|
|
9
9
|
require('./issue-helpers-C0kEdXOE.cjs');
|
|
10
10
|
require('./logging-BEMgC5SA.cjs');
|
|
11
|
-
require('./tools-
|
|
11
|
+
require('./tools-B22b8Jjm.cjs');
|
|
12
12
|
require('./schema-BvloqMHW.cjs');
|
|
13
13
|
require('./toolDefinitions-BJ0cyDce.cjs');
|
|
14
14
|
require('./resources-BAE7VVZZ.cjs');
|
|
15
15
|
require('./promptDefinitions-CVB4IyVf.cjs');
|
|
16
16
|
require('./prompts--QCiXmR2.cjs');
|
|
17
|
-
require('./server-
|
|
18
|
-
const require_stdio = require('./stdio-
|
|
19
|
-
const require_version = require('./version-
|
|
17
|
+
require('./server-DQ_dBWQy.cjs');
|
|
18
|
+
const require_stdio = require('./stdio-CRqulLZQ.cjs');
|
|
19
|
+
const require_version = require('./version-D93Bj2gg.cjs');
|
|
20
20
|
const __modelcontextprotocol_sdk_server_mcp_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/mcp.js"));
|
|
21
21
|
const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
|
|
22
22
|
const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
@@ -50,21 +50,25 @@ if (!accessToken) {
|
|
|
50
50
|
}
|
|
51
51
|
__sentry_node.init({
|
|
52
52
|
dsn: sentryDsn,
|
|
53
|
-
sendDefaultPii: true
|
|
53
|
+
sendDefaultPii: true,
|
|
54
|
+
environment: "stdio"
|
|
54
55
|
});
|
|
55
56
|
const server = new __modelcontextprotocol_sdk_server_mcp_js.McpServer({
|
|
56
57
|
name: "Sentry MCP",
|
|
57
58
|
version: require_version.LIB_VERSION
|
|
58
59
|
});
|
|
59
60
|
const instrumentedServer = (0, __sentry_core.wrapMcpServerWithSentry)(server);
|
|
61
|
+
const SENTRY_TIMEOUT = 5e3;
|
|
60
62
|
require_stdio.startStdio(instrumentedServer, {
|
|
61
63
|
accessToken,
|
|
62
64
|
organizationSlug: null,
|
|
63
65
|
host
|
|
64
66
|
}).catch((err) => {
|
|
65
67
|
console.error("Server error:", err);
|
|
68
|
+
__sentry_node.flush(SENTRY_TIMEOUT);
|
|
66
69
|
process.exit(1);
|
|
67
70
|
});
|
|
71
|
+
__sentry_node.flush(SENTRY_TIMEOUT);
|
|
68
72
|
|
|
69
73
|
//#endregion
|
|
70
74
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined","LIB_VERSION","McpServer"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAGC,4BAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,2CAAwB,OAAO;AAE1D,MAAM,iBAAiB;AAIvB,yBAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,eAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,cAAO,MAAM,eAAe"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./schema-
|
|
3
|
-
import "./client-
|
|
2
|
+
import "./schema-D1B8p0Ib.js";
|
|
3
|
+
import "./client-BKLE5Lkt.js";
|
|
4
4
|
import "./types-H-TSmRpm.js";
|
|
5
5
|
import "./api-client-9mzrj2HY.js";
|
|
6
6
|
import "./formatting-Bacfde0I.js";
|
|
7
7
|
import "./issue-helpers-DFde36Zu.js";
|
|
8
8
|
import "./logging-Cxm8lQvg.js";
|
|
9
|
-
import "./tools-
|
|
9
|
+
import "./tools-CXgh-6Vh.js";
|
|
10
10
|
import "./schema-k04PdSCK.js";
|
|
11
11
|
import "./toolDefinitions-L20Lv3AW.js";
|
|
12
12
|
import "./resources-OM3EAnnj.js";
|
|
13
13
|
import "./promptDefinitions-CaRMCDPI.js";
|
|
14
14
|
import "./prompts-Tz-qECa0.js";
|
|
15
|
-
import "./server-
|
|
16
|
-
import { startStdio } from "./stdio-
|
|
17
|
-
import { LIB_VERSION } from "./version-
|
|
15
|
+
import "./server-DHbbEoa2.js";
|
|
16
|
+
import { startStdio } from "./stdio-BHg5CaoN.js";
|
|
17
|
+
import { LIB_VERSION } from "./version-DkmlRpxa.js";
|
|
18
18
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19
19
|
import { wrapMcpServerWithSentry } from "@sentry/core";
|
|
20
20
|
import * as Sentry from "@sentry/node";
|
|
@@ -48,21 +48,25 @@ if (!accessToken) {
|
|
|
48
48
|
}
|
|
49
49
|
Sentry.init({
|
|
50
50
|
dsn: sentryDsn,
|
|
51
|
-
sendDefaultPii: true
|
|
51
|
+
sendDefaultPii: true,
|
|
52
|
+
environment: "stdio"
|
|
52
53
|
});
|
|
53
54
|
const server = new McpServer({
|
|
54
55
|
name: "Sentry MCP",
|
|
55
56
|
version: LIB_VERSION
|
|
56
57
|
});
|
|
57
58
|
const instrumentedServer = wrapMcpServerWithSentry(server);
|
|
59
|
+
const SENTRY_TIMEOUT = 5e3;
|
|
58
60
|
startStdio(instrumentedServer, {
|
|
59
61
|
accessToken,
|
|
60
62
|
organizationSlug: null,
|
|
61
63
|
host
|
|
62
64
|
}).catch((err) => {
|
|
63
65
|
console.error("Server error:", err);
|
|
66
|
+
Sentry.flush(SENTRY_TIMEOUT);
|
|
64
67
|
process.exit(1);
|
|
65
68
|
});
|
|
69
|
+
Sentry.flush(SENTRY_TIMEOUT);
|
|
66
70
|
|
|
67
71
|
//#endregion
|
|
68
72
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["accessToken: string | undefined","host: string | undefined","sentryDsn: string | undefined"],"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport { wrapMcpServerWithSentry } from \"@sentry/core\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\nlet accessToken: string | undefined = process.env.SENTRY_AUTH_TOKEN;\nlet host: string | undefined = process.env.SENTRY_HOST;\nlet sentryDsn: string | undefined =\n process.env.SENTRY_DSN || process.env.DEFAULT_SENTRY_DSN;\n\nconst packageName = \"@sentry/mcp-server\";\n\nfunction getUsage() {\n return `Usage: ${packageName} --access-token=<token> [--host=<host>] [--sentry-dsn=<dsn>]`;\n}\n\nfor (const arg of process.argv.slice(2)) {\n if (arg === \"--version\" || arg === \"-v\") {\n console.log(`${packageName} ${LIB_VERSION}`);\n process.exit(0);\n }\n if (arg.startsWith(\"--access-token=\")) {\n accessToken = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--host=\")) {\n host = arg.split(\"=\")[1];\n } else if (arg.startsWith(\"--sentry-dsn=\")) {\n sentryDsn = arg.split(\"=\")[1];\n } else {\n console.error(\"Error: Invalid argument:\", arg);\n console.error(getUsage());\n process.exit(1);\n }\n}\n\nif (!accessToken) {\n console.error(\n \"Error: No access token was provided. Pass one with `--access-token` or via `SENTRY_AUTH_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n environment:\n process.env.SENTRY_ENVIRONMENT ??\n (process.env.NODE_ENV !== \"production\" ? \"development\" : \"production\"),\n});\n\nconst server = new McpServer({\n name: \"Sentry MCP\",\n version: LIB_VERSION,\n});\n\nconst instrumentedServer = wrapMcpServerWithSentry(server);\n\nconst SENTRY_TIMEOUT = 5000; // 5 seconds\n\n// XXX: we could do what we're doing in routes/auth.ts and pass the context\n// identically, but we don't really need userId and userName yet\nstartStdio(instrumentedServer, {\n accessToken,\n organizationSlug: null,\n host,\n}).catch((err) => {\n console.error(\"Server error:\", err);\n // ensure we've flushed all events\n Sentry.flush(SENTRY_TIMEOUT);\n process.exit(1);\n});\n\n// ensure we've flushed all events\nSentry.flush(SENTRY_TIMEOUT);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,IAAIA,cAAkC,QAAQ,IAAI;AAClD,IAAIC,OAA2B,QAAQ,IAAI;AAC3C,IAAIC,YACF,QAAQ,IAAI;AAEd,MAAM,cAAc;AAEpB,SAAS,WAAW;AAClB,SAAQ,SAAS,YAAY;AAC9B;AAED,KAAK,MAAM,OAAO,QAAQ,KAAK,MAAM,EAAE,EAAE;AACvC,KAAI,QAAQ,eAAe,QAAQ,MAAM;AACvC,UAAQ,KAAK,EAAE,YAAY,GAAG,YAAY,EAAE;AAC5C,UAAQ,KAAK,EAAE;CAChB;AACD,KAAI,IAAI,WAAW,kBAAkB,CACnC,eAAc,IAAI,MAAM,IAAI,CAAC;UACpB,IAAI,WAAW,UAAU,CAClC,QAAO,IAAI,MAAM,IAAI,CAAC;UACb,IAAI,WAAW,gBAAgB,CACxC,aAAY,IAAI,MAAM,IAAI,CAAC;MACtB;AACL,UAAQ,MAAM,4BAA4B,IAAI;AAC9C,UAAQ,MAAM,UAAU,CAAC;AACzB,UAAQ,KAAK,EAAE;CAChB;AACF;AAED,KAAK,aAAa;AAChB,SAAQ,MACN,kGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,wBAAwB,OAAO;AAE1D,MAAM,iBAAiB;AAIvB,WAAW,oBAAoB;CAC7B;CACA,kBAAkB;CAClB;AACD,EAAC,CAAC,MAAM,CAAC,QAAQ;AAChB,SAAQ,MAAM,iBAAiB,IAAI;AAEnC,QAAO,MAAM,eAAe;AAC5B,SAAQ,KAAK,EAAE;AAChB,EAAC;AAGF,OAAO,MAAM,eAAe"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FrameInterface } from "../schema.d-
|
|
2
|
-
import { Event } from "../types.d-
|
|
3
|
-
import "../client.d-
|
|
1
|
+
import { FrameInterface } from "../schema.d-cvHc3M20.cjs";
|
|
2
|
+
import { Event } from "../types.d-r20cCyVI.cjs";
|
|
3
|
+
import "../client.d-BizHDVuq.cjs";
|
|
4
4
|
import "../index.d-Cb-lHGvn.cjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FrameInterface$1 as FrameInterface } from "../schema.d-
|
|
2
|
-
import { Event } from "../types.d-
|
|
3
|
-
import "../client.d-
|
|
1
|
+
import { FrameInterface$1 as FrameInterface } from "../schema.d-DQ5YUr0Y.js";
|
|
2
|
+
import { Event } from "../types.d-DsrCjT7G.js";
|
|
3
|
+
import "../client.d-CrWOcVIU.js";
|
|
4
4
|
import "../index.d-kYckfDWv.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
@@ -215,7 +215,7 @@ const AutofixRunStateSchema = zod.z.object({ autofix: zod.z.object({
|
|
|
215
215
|
updated_at: zod.z.string(),
|
|
216
216
|
status: AutofixStatusSchema,
|
|
217
217
|
steps: zod.z.array(AutofixRunStepSchema)
|
|
218
|
-
}).passthrough() });
|
|
218
|
+
}).passthrough().nullable() });
|
|
219
219
|
|
|
220
220
|
//#endregion
|
|
221
221
|
Object.defineProperty(exports, 'ApiErrorSchema', {
|
|
@@ -386,4 +386,4 @@ Object.defineProperty(exports, 'TeamSchema', {
|
|
|
386
386
|
return TeamSchema;
|
|
387
387
|
}
|
|
388
388
|
});
|
|
389
|
-
//# sourceMappingURL=schema-
|
|
389
|
+
//# sourceMappingURL=schema-Bc6_gUDA.cjs.map
|