@sentry/mcp-server 0.10.0 → 0.12.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 +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +41 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +36 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/client-4jq_wVgn.d.ts +522 -0
- package/dist/client-4jq_wVgn.d.ts.map +1 -0
- package/dist/client-B7vZ6JMk.cjs +572 -0
- package/dist/client-B7vZ6JMk.cjs.map +1 -0
- package/dist/client-CAoHZbyK.js +561 -0
- package/dist/client-CAoHZbyK.js.map +1 -0
- package/dist/client-DkY0ifZf.d.cts +522 -0
- package/dist/client-DkY0ifZf.d.cts.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-ggD6YRYR.js → formatting-BaARL2gT.js} +1 -1
- package/dist/formatting-BaARL2gT.js.map +1 -0
- package/dist/{formatting-B0SJqiqX.cjs → formatting-C2kN0ok6.cjs} +1 -2
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +5 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +5 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +10 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +10 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +21 -25
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +5 -8
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-BMVLc3mR.js} +16 -2
- package/dist/issue-helpers-BMVLc3mR.js.map +1 -0
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-D712fGT2.cjs} +16 -3
- package/dist/issue-helpers-D712fGT2.cjs.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/logging-ByvSjT6V.cjs.map +1 -0
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/logging-CXLD0FFB.js.map +1 -0
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +31 -3
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +31 -3
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-pHRpPOpJ.cjs → promptDefinitions-BTLIBcGt.cjs} +10 -4
- package/dist/promptDefinitions-BTLIBcGt.cjs.map +1 -0
- package/dist/{promptDefinitions-tpKruPny.d.ts → promptDefinitions-CF2VWdQ6.d.cts} +12 -4
- package/dist/promptDefinitions-CF2VWdQ6.d.cts.map +1 -0
- package/dist/{promptDefinitions-BR7PxWcH.d.cts → promptDefinitions-D5FSQckL.d.ts} +11 -3
- package/dist/promptDefinitions-D5FSQckL.d.ts.map +1 -0
- package/dist/{promptDefinitions-DBNOeSg-.js → promptDefinitions-D8yow1m0.js} +9 -2
- package/dist/promptDefinitions-D8yow1m0.js.map +1 -0
- package/dist/promptDefinitions.cjs +3 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-nfFU-zY-.cjs → prompts-CDbQrutV.cjs} +3 -3
- package/dist/prompts-CDbQrutV.cjs.map +1 -0
- package/dist/{prompts-DgWOD2rU.js → prompts-Dt3A8Qfl.js} +4 -2
- package/dist/prompts-Dt3A8Qfl.js.map +1 -0
- package/dist/prompts.cjs +3 -2
- package/dist/prompts.d.cts +4 -5
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +4 -5
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -1
- package/dist/{resources-OM3EAnnj.js → resources-Bol20Xuo.js} +13 -1
- package/dist/resources-Bol20Xuo.js.map +1 -0
- package/dist/{resources-BAE7VVZZ.cjs → resources-DNyoutxH.cjs} +13 -2
- package/dist/resources-DNyoutxH.cjs.map +1 -0
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +9 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +9 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/{schema-B7A-FyIi.d.ts → schema-BJv7kREf.d.cts} +215 -68
- package/dist/schema-BJv7kREf.d.cts.map +1 -0
- package/dist/{schema-jk88gqOu.cjs → schema-BTfISwFu.cjs} +30 -4
- package/dist/schema-BTfISwFu.cjs.map +1 -0
- package/dist/{schema-PvgLrC1b.d.cts → schema-BnxGHL_i.d.ts} +215 -68
- package/dist/schema-BnxGHL_i.d.ts.map +1 -0
- package/dist/{schema-3VLYcf4D.cjs → schema-BsvGMALe.cjs} +59 -8
- package/dist/schema-BsvGMALe.cjs.map +1 -0
- package/dist/{schema-Dltbjui7.js → schema-C_hp0BR7.js} +41 -7
- package/dist/schema-C_hp0BR7.js.map +1 -0
- package/dist/schema-Dv6aLZgz.js +32 -0
- package/dist/schema-Dv6aLZgz.js.map +1 -0
- package/dist/schema.cjs +13 -11
- package/dist/schema.d.cts +14 -5
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +14 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-yb4PkNyo.js → server-C7cHq_pc.js} +82 -27
- package/dist/server-C7cHq_pc.js.map +1 -0
- package/dist/{server-VwFSUPQn.cjs → server-DeutbO8v.cjs} +83 -29
- package/dist/server-DeutbO8v.cjs.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +24 -6
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +24 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/stdio-B73CCTly.cjs +47 -0
- package/dist/stdio-B73CCTly.cjs.map +1 -0
- package/dist/stdio-ZQLC-i5Q.js +41 -0
- package/dist/stdio-ZQLC-i5Q.js.map +1 -0
- package/dist/test-setup.cjs +653 -438
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +653 -438
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-B94CNDbt.d.cts → toolDefinitions-BOMF-zIC.d.ts} +148 -18
- package/dist/toolDefinitions-BOMF-zIC.d.ts.map +1 -0
- package/dist/{toolDefinitions-DIhvw3vk.cjs → toolDefinitions-CUegGcWU.cjs} +128 -7
- package/dist/toolDefinitions-CUegGcWU.cjs.map +1 -0
- package/dist/{toolDefinitions-Bb_1ejkl.js → toolDefinitions-DFAxp3nr.js} +127 -5
- package/dist/toolDefinitions-DFAxp3nr.js.map +1 -0
- package/dist/{toolDefinitions-q_1-70fG.d.ts → toolDefinitions-Ipvr4Acw.d.cts} +149 -19
- package/dist/toolDefinitions-Ipvr4Acw.d.cts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-CMFpMPpD.js → tools-DpiQwSTY.js} +156 -13
- package/dist/tools-DpiQwSTY.js.map +1 -0
- package/dist/{tools-BdkmyaZo.cjs → tools-DyOqlsCW.cjs} +157 -15
- package/dist/tools-DyOqlsCW.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +121 -8
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +121 -8
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +330 -35
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +311 -15
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +27 -6
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +27 -6
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-jftb-CP9.d.ts → types-D5TPcOfv.d.ts} +4 -4
- package/dist/types-D5TPcOfv.d.ts.map +1 -0
- package/dist/{types-OeoNXRm-.d.cts → types-DRF2IoP_.d.cts} +4 -4
- package/dist/types-DRF2IoP_.d.cts.map +1 -0
- package/dist/{types-B03G337q.d.cts → types-Daq2fm0E.d.ts} +7 -5
- package/dist/types-Daq2fm0E.d.ts.map +1 -0
- package/dist/{types-CN4NEway.d.ts → types-NIQW7KyF.d.cts} +7 -5
- package/dist/types-NIQW7KyF.d.cts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/{version-CDnh7DyW.cjs → version-BNmubeQI.cjs} +2 -3
- package/dist/{version-CDnh7DyW.cjs.map → version-BNmubeQI.cjs.map} +1 -1
- package/dist/version-CRto5Sn_.js +6 -0
- package/dist/{version-TjO7fHpC.js.map → version-CRto5Sn_.js.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-B4Ux5Zdg.cjs +0 -227
- package/dist/client-B4Ux5Zdg.cjs.map +0 -1
- package/dist/client-Bz_PNC8o.js +0 -215
- package/dist/client-Bz_PNC8o.js.map +0 -1
- package/dist/client-J6VSRmQS.d.ts +0 -177
- package/dist/client-J6VSRmQS.d.ts.map +0 -1
- package/dist/client-tE6FD__9.d.cts +0 -177
- package/dist/client-tE6FD__9.d.cts.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/formatting-B0SJqiqX.cjs.map +0 -1
- package/dist/formatting-ggD6YRYR.js.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/logging-BEMgC5SA.cjs.map +0 -1
- package/dist/logging-Cxm8lQvg.js.map +0 -1
- package/dist/promptDefinitions-BR7PxWcH.d.cts.map +0 -1
- package/dist/promptDefinitions-DBNOeSg-.js.map +0 -1
- package/dist/promptDefinitions-pHRpPOpJ.cjs.map +0 -1
- package/dist/promptDefinitions-tpKruPny.d.ts.map +0 -1
- package/dist/prompts-DgWOD2rU.js.map +0 -1
- package/dist/prompts-nfFU-zY-.cjs.map +0 -1
- package/dist/resources-BAE7VVZZ.cjs.map +0 -1
- package/dist/resources-OM3EAnnj.js.map +0 -1
- package/dist/schema-3VLYcf4D.cjs.map +0 -1
- package/dist/schema-B7A-FyIi.d.ts.map +0 -1
- package/dist/schema-BKa41TQ4.js +0 -17
- package/dist/schema-BKa41TQ4.js.map +0 -1
- package/dist/schema-Dltbjui7.js.map +0 -1
- package/dist/schema-PvgLrC1b.d.cts.map +0 -1
- package/dist/schema-jk88gqOu.cjs.map +0 -1
- package/dist/server-VwFSUPQn.cjs.map +0 -1
- package/dist/server-yb4PkNyo.js.map +0 -1
- package/dist/stdio-65sYKLOk.cjs +0 -26
- package/dist/stdio-65sYKLOk.cjs.map +0 -1
- package/dist/stdio-DkU2-spy.js +0 -19
- package/dist/stdio-DkU2-spy.js.map +0 -1
- package/dist/toolDefinitions-B94CNDbt.d.cts.map +0 -1
- package/dist/toolDefinitions-Bb_1ejkl.js.map +0 -1
- package/dist/toolDefinitions-DIhvw3vk.cjs.map +0 -1
- package/dist/toolDefinitions-q_1-70fG.d.ts.map +0 -1
- package/dist/tools-BdkmyaZo.cjs.map +0 -1
- package/dist/tools-CMFpMPpD.js.map +0 -1
- package/dist/types-B03G337q.d.cts.map +0 -1
- package/dist/types-CN4NEway.d.ts.map +0 -1
- package/dist/types-OeoNXRm-.d.cts.map +0 -1
- package/dist/types-jftb-CP9.d.ts.map +0 -1
- package/dist/version-TjO7fHpC.js +0 -6
- package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
- package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
- /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
- /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
- /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/errors.ts
|
|
3
|
+
/**
|
|
4
|
+
* Error thrown when user input validation fails.
|
|
5
|
+
* These errors should be returned to the user directly without logging to Sentry.
|
|
6
|
+
*/
|
|
7
|
+
var UserInputError = class extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "UserInputError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
Object.defineProperty(exports, 'UserInputError', {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return UserInputError;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=errors-B9fwS-aP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-B9fwS-aP.cjs","names":["message: string"],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * Error thrown when user input validation fails.\n * These errors should be returned to the user directly without logging to Sentry.\n */\nexport class UserInputError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UserInputError\";\n }\n}\n"],"mappings":";;;;;;AAIA,IAAa,iBAAb,cAAoC,MAAM;CACxC,YAAYA,SAAiB;AAC3B,QAAM,QAAQ;AACd,OAAK,OAAO;CACb;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/errors.ts
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when user input validation fails.
|
|
4
|
+
* These errors should be returned to the user directly without logging to Sentry.
|
|
5
|
+
*/
|
|
6
|
+
var UserInputError = class extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "UserInputError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { UserInputError };
|
|
15
|
+
//# sourceMappingURL=errors-BJSrT6Ou.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-BJSrT6Ou.js","names":["message: string"],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * Error thrown when user input validation fails.\n * These errors should be returned to the user directly without logging to Sentry.\n */\nexport class UserInputError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UserInputError\";\n }\n}\n"],"mappings":";;;;;AAIA,IAAa,iBAAb,cAAoC,MAAM;CACxC,YAAYA,SAAiB;AAC3B,QAAM,QAAQ;AACd,OAAK,OAAO;CACb;AACF"}
|
package/dist/errors.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/errors.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when user input validation fails.
|
|
4
|
+
* These errors should be returned to the user directly without logging to Sentry.
|
|
5
|
+
*/
|
|
6
|
+
declare class UserInputError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
10
|
+
//#endregion
|
|
11
|
+
export { UserInputError };
|
|
12
|
+
//# sourceMappingURL=errors.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";;AAIA;;;cAAa,cAAA,SAAuB,KAAK"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/errors.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when user input validation fails.
|
|
4
|
+
* These errors should be returned to the user directly without logging to Sentry.
|
|
5
|
+
*/
|
|
6
|
+
declare class UserInputError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
10
|
+
//#endregion
|
|
11
|
+
export { UserInputError };
|
|
12
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";;AAIA;;;cAAa,cAAA,SAAuB,KAAK"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_dist = require('./dist-BlIWGSIM.cjs');
|
|
2
|
+
const require_vi_bdSIJ99Y = require('./vi.bdSIJ99Y-Dft_B_Ta.cjs');
|
|
3
|
+
const require_errors = require('./errors-B9fwS-aP.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/errors.test.ts
|
|
6
|
+
require_dist.describe("UserInputError", () => {
|
|
7
|
+
require_dist.it("should create a UserInputError with the correct message and name", () => {
|
|
8
|
+
const message = "Invalid input provided";
|
|
9
|
+
const error = new require_errors.UserInputError(message);
|
|
10
|
+
require_vi_bdSIJ99Y.globalExpect(error.message).toBe(message);
|
|
11
|
+
require_vi_bdSIJ99Y.globalExpect(error.name).toBe("UserInputError");
|
|
12
|
+
require_vi_bdSIJ99Y.globalExpect(error instanceof Error).toBe(true);
|
|
13
|
+
require_vi_bdSIJ99Y.globalExpect(error instanceof require_errors.UserInputError).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
require_dist.it("should be distinguishable from regular Error", () => {
|
|
16
|
+
const userInputError = new require_errors.UserInputError("User input error");
|
|
17
|
+
const regularError = new Error("Regular error");
|
|
18
|
+
require_vi_bdSIJ99Y.globalExpect(userInputError instanceof require_errors.UserInputError).toBe(true);
|
|
19
|
+
require_vi_bdSIJ99Y.globalExpect(regularError instanceof require_errors.UserInputError).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=errors.test.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.cjs","names":["UserInputError"],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,sBAAS,kBAAkB,MAAM;AAC/B,iBAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAIA,8BAAe;AAEjC,mCAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,mCAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,mCAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,mCAAO,iBAAiBA,8BAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,iBAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAIA,8BAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,mCAAO,0BAA0BA,8BAAe,CAAC,KAAK,KAAK;AAC3D,mCAAO,wBAAwBA,8BAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { describe, it } from "./dist-DDpQABxe.js";
|
|
2
|
+
import { globalExpect } from "./vi.bdSIJ99Y-BfJr7I2s.js";
|
|
3
|
+
import { UserInputError } from "./errors-BJSrT6Ou.js";
|
|
4
|
+
|
|
5
|
+
//#region src/errors.test.ts
|
|
6
|
+
describe("UserInputError", () => {
|
|
7
|
+
it("should create a UserInputError with the correct message and name", () => {
|
|
8
|
+
const message = "Invalid input provided";
|
|
9
|
+
const error = new UserInputError(message);
|
|
10
|
+
globalExpect(error.message).toBe(message);
|
|
11
|
+
globalExpect(error.name).toBe("UserInputError");
|
|
12
|
+
globalExpect(error instanceof Error).toBe(true);
|
|
13
|
+
globalExpect(error instanceof UserInputError).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
it("should be distinguishable from regular Error", () => {
|
|
16
|
+
const userInputError = new UserInputError("User input error");
|
|
17
|
+
const regularError = new Error("Regular error");
|
|
18
|
+
globalExpect(userInputError instanceof UserInputError).toBe(true);
|
|
19
|
+
globalExpect(regularError instanceof UserInputError).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=errors.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.test.js","names":[],"sources":["../src/errors.test.ts"],"sourcesContent":["import { describe, expect, it } from \"vitest\";\nimport { UserInputError } from \"./errors\";\n\ndescribe(\"UserInputError\", () => {\n it(\"should create a UserInputError with the correct message and name\", () => {\n const message = \"Invalid input provided\";\n const error = new UserInputError(message);\n\n expect(error.message).toBe(message);\n expect(error.name).toBe(\"UserInputError\");\n expect(error instanceof Error).toBe(true);\n expect(error instanceof UserInputError).toBe(true);\n });\n\n it(\"should be distinguishable from regular Error\", () => {\n const userInputError = new UserInputError(\"User input error\");\n const regularError = new Error(\"Regular error\");\n\n expect(userInputError instanceof UserInputError).toBe(true);\n expect(regularError instanceof UserInputError).toBe(false);\n });\n});\n"],"mappings":";;;;;AAGA,SAAS,kBAAkB,MAAM;AAC/B,IAAG,oEAAoE,MAAM;EAC3E,MAAM,UAAU;EAChB,MAAM,QAAQ,IAAI,eAAe;AAEjC,eAAO,MAAM,QAAQ,CAAC,KAAK,QAAQ;AACnC,eAAO,MAAM,KAAK,CAAC,KAAK,iBAAiB;AACzC,eAAO,iBAAiB,MAAM,CAAC,KAAK,KAAK;AACzC,eAAO,iBAAiB,eAAe,CAAC,KAAK,KAAK;CACnD,EAAC;AAEF,IAAG,gDAAgD,MAAM;EACvD,MAAM,iBAAiB,IAAI,eAAe;EAC1C,MAAM,eAAe,IAAI,MAAM;AAE/B,eAAO,0BAA0B,eAAe,CAAC,KAAK,KAAK;AAC3D,eAAO,wBAAwB,eAAe,CAAC,KAAK,MAAM;CAC3D,EAAC;AACH,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting-BaARL2gT.js","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
|
|
3
2
|
//#region src/internal/formatting.ts
|
|
4
3
|
function formatFrameHeader(frame, platform) {
|
|
@@ -84,4 +83,4 @@ Object.defineProperty(exports, 'formatIssueOutput', {
|
|
|
84
83
|
return formatIssueOutput;
|
|
85
84
|
}
|
|
86
85
|
});
|
|
87
|
-
//# sourceMappingURL=formatting-
|
|
86
|
+
//# sourceMappingURL=formatting-C2kN0ok6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting-C2kN0ok6.cjs","names":["frame: z.infer<typeof FrameInterface>","platform: string | undefined | null","event: Event","data: z.infer<typeof ErrorEntrySchema>","data: z.infer<typeof RequestEntrySchema>","contexts: z.infer<typeof EventSchema>[\"contexts\"]"],"sources":["../src/internal/formatting.ts"],"sourcesContent":["/**\n * LLM response formatting utilities for Sentry data.\n *\n * Converts Sentry API responses into structured markdown format optimized\n * for LLM consumption. Handles stacktraces, event details, issue summaries,\n * and contextual information with consistent formatting patterns.\n */\nimport type { z } from \"zod\";\nimport type { Event, Issue } from \"../api-client/types\";\nimport type {\n ErrorEntrySchema,\n ErrorEventSchema,\n EventSchema,\n FrameInterface,\n RequestEntrySchema,\n SentryApiService,\n} from \"../api-client\";\n\nexport function formatFrameHeader(\n frame: z.infer<typeof FrameInterface>,\n platform: string | undefined | null,\n) {\n if (platform?.startsWith(\"javascript\")) {\n return `${[frame.filename, frame.lineNo, frame.colNo]\n .filter((i) => !!i)\n .join(\":\")}${frame.function ? ` (${frame.function})` : \"\"}`;\n }\n return `${frame.function ? `\"${frame.function}\"` : \"unknown function\"} in \"${frame.filename || frame.module}\"${\n frame.lineNo\n ? ` at line ${frame.lineNo}${frame.colNo !== null ? `:${frame.colNo}` : \"\"}`\n : \"\"\n }`;\n}\n\nexport function formatEventOutput(event: Event) {\n let output = \"\";\n for (const entry of event.entries) {\n if (entry.type === \"exception\") {\n output += formatExceptionInterfaceOutput(\n event,\n entry.data as z.infer<typeof ErrorEntrySchema>,\n );\n }\n if (entry.type === \"request\") {\n output += formatRequestInterfaceOutput(\n event,\n entry.data as z.infer<typeof RequestEntrySchema>,\n );\n }\n }\n output += formatContexts(event.contexts);\n return output;\n}\n\nfunction formatExceptionInterfaceOutput(\n event: Event,\n data: z.infer<typeof ErrorEntrySchema>,\n) {\n let output = \"\";\n // TODO: support chained exceptions\n const firstError = data.value ?? data.values[0];\n if (!firstError) {\n return \"\";\n }\n output += `### Error\\n\\n${\"```\"}\\n${firstError.type}: ${\n firstError.value\n }\\n${\"```\"}\\n\\n`;\n if (!firstError.stacktrace || !firstError.stacktrace.frames) {\n return output;\n }\n output += `**Stacktrace:**\\n${\"```\"}\\n${firstError.stacktrace.frames\n .map((frame) => {\n const context = frame.context?.length\n ? `${frame.context\n .filter(([lineno, _]) => lineno === frame.lineNo)\n .map(([_, code]) => `\\n${code}`)\n .join(\"\")}`\n : \"\";\n\n return `${formatFrameHeader(frame, event.platform)}${context}`;\n })\n .join(\"\\n\")}\\n${\"```\"}\\n\\n`;\n return output;\n}\n\nfunction formatRequestInterfaceOutput(\n event: Event,\n data: z.infer<typeof RequestEntrySchema>,\n) {\n if (!data.method || !data.url) {\n return \"\";\n }\n return `### HTTP Request\\n\\n**Method:** ${data.method}\\n**URL:** ${data.url}\\n\\n`;\n}\n\nfunction formatContexts(contexts: z.infer<typeof EventSchema>[\"contexts\"]) {\n if (!contexts) {\n return \"\";\n }\n return `### Additional Context\\n\\nThese are additional context provided by the user when they're instrumenting their application.\\n\\n${Object.entries(\n contexts,\n )\n .map(\n ([name, data]) =>\n `**${name}**\\n${Object.entries(data)\n .filter(([key, _]) => key !== \"type\")\n .map(([key, value]) => {\n return `${key}: ${JSON.stringify(value, undefined, 2)}`;\n })\n .join(\"\\n\")}`,\n )\n .join(\"\\n\\n\")}\\n\\n`;\n}\n\nexport function formatIssueOutput({\n organizationSlug,\n issue,\n event,\n apiService,\n}: {\n organizationSlug: string;\n issue: Issue;\n event: Event;\n apiService: SentryApiService;\n}) {\n let output = `# Issue ${issue.shortId} in **${organizationSlug}**\\n\\n`;\n output += `**Description**: ${issue.title}\\n`;\n output += `**Culprit**: ${issue.culprit}\\n`;\n output += `**First Seen**: ${new Date(issue.firstSeen).toISOString()}\\n`;\n output += `**Last Seen**: ${new Date(issue.lastSeen).toISOString()}\\n`;\n output += `**Occurrences**: ${issue.count}\\n`;\n output += `**Users Impacted**: ${issue.userCount}\\n`;\n output += `**Status**: ${issue.status}\\n`;\n output += `**Platform**: ${issue.platform}\\n`;\n output += `**Project**: ${issue.project.name}\\n`;\n output += `**URL**: ${apiService.getIssueUrl(organizationSlug, issue.shortId)}\\n`;\n output += \"\\n\";\n output += \"## Event Details\\n\\n\";\n output += `**Event ID**: ${event.id}\\n`;\n if (event.type === \"error\") {\n output += `**Occurred At**: ${new Date((event as z.infer<typeof ErrorEventSchema>).dateCreated).toISOString()}\\n`;\n }\n if (event.message) {\n output += `**Message**:\\n${event.message}\\n`;\n }\n output += \"\\n\";\n output += formatEventOutput(event);\n output += \"# Using this information\\n\\n\";\n output += `- You can reference the IssueID in commit messages (e.g. \\`Fixes ${issue.shortId}\\`) to automatically close the issue when the commit is merged.\\n`;\n output +=\n \"- The stacktrace includes both first-party application code as well as third-party code, its important to triage to first-party code.\\n\";\n return output;\n}\n"],"mappings":"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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require('./schema-
|
|
5
|
-
require('./client-
|
|
6
|
-
require('./types-
|
|
7
|
-
require('./api-client-
|
|
8
|
-
require('./formatting-
|
|
9
|
-
require('./issue-helpers-
|
|
10
|
-
require('./logging-
|
|
11
|
-
require('./tools-
|
|
12
|
-
require('./schema-
|
|
13
|
-
require('./toolDefinitions-
|
|
14
|
-
require('./resources-
|
|
15
|
-
require('./promptDefinitions-
|
|
16
|
-
require('./prompts-
|
|
17
|
-
require('./server-
|
|
18
|
-
const require_stdio = require('./stdio-
|
|
19
|
-
const require_version = require('./version-
|
|
2
|
+
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
3
|
+
require('./errors-B9fwS-aP.cjs');
|
|
4
|
+
require('./schema-BsvGMALe.cjs');
|
|
5
|
+
require('./client-B7vZ6JMk.cjs');
|
|
6
|
+
require('./types-MYBaygjr.cjs');
|
|
7
|
+
require('./api-client-CL1WDkw9.cjs');
|
|
8
|
+
require('./formatting-C2kN0ok6.cjs');
|
|
9
|
+
require('./issue-helpers-D712fGT2.cjs');
|
|
10
|
+
require('./logging-ByvSjT6V.cjs');
|
|
11
|
+
require('./tools-DyOqlsCW.cjs');
|
|
12
|
+
require('./schema-BTfISwFu.cjs');
|
|
13
|
+
require('./toolDefinitions-CUegGcWU.cjs');
|
|
14
|
+
require('./resources-DNyoutxH.cjs');
|
|
15
|
+
require('./promptDefinitions-BTLIBcGt.cjs');
|
|
16
|
+
require('./prompts-CDbQrutV.cjs');
|
|
17
|
+
require('./server-DeutbO8v.cjs');
|
|
18
|
+
const require_stdio = require('./stdio-B73CCTly.cjs');
|
|
19
|
+
const require_version = require('./version-BNmubeQI.cjs');
|
|
20
20
|
const __modelcontextprotocol_sdk_server_mcp_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/mcp.js"));
|
|
21
21
|
const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
22
22
|
|
|
@@ -56,7 +56,7 @@ __sentry_node.init({
|
|
|
56
56
|
"mcp.transport": "stdio",
|
|
57
57
|
"sentry.host": host
|
|
58
58
|
} },
|
|
59
|
-
release: "0.
|
|
59
|
+
release: "0.12.0",
|
|
60
60
|
integrations: [__sentry_node.consoleLoggingIntegration(), __sentry_node.zodErrorsIntegration()],
|
|
61
61
|
environment: "stdio"
|
|
62
62
|
});
|
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 * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? 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_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\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 = Sentry.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":";;;;;;;;;;;;;;;;;;;;;;;
|
|
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\n/**\n * Main CLI entry point for the Sentry MCP server.\n *\n * Handles command-line argument parsing, environment configuration, Sentry\n * initialization, and starts the MCP server with stdio transport. Requires\n * a Sentry access token and optionally accepts host and DSN configuration.\n *\n * @example CLI Usage\n * ```bash\n * npx @sentry/mcp-server --access-token=TOKEN --host=sentry.io\n * ```\n */\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? 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_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\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 = Sentry.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":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAIA,cACF,QAAQ,IAAI,uBAAuB,QAAQ,IAAI;AACjD,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,oGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,cAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsBA;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD;CACA,cAAc,CACZ,cAAO,2BAA2B,EAClC,cAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAIC,mDAAU;CAC3B,MAAM;CACN,SAASD;AACV;AAED,MAAM,qBAAqB,cAAO,wBAAwB,OAAO;AAEjE,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,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
2
|
+
import "./errors-BJSrT6Ou.js";
|
|
3
|
+
import "./schema-C_hp0BR7.js";
|
|
4
|
+
import "./client-CAoHZbyK.js";
|
|
5
|
+
import "./types-6zHoEWAx.js";
|
|
6
|
+
import "./api-client-CNv_hbPO.js";
|
|
7
|
+
import "./formatting-BaARL2gT.js";
|
|
8
|
+
import "./issue-helpers-BMVLc3mR.js";
|
|
9
|
+
import "./logging-CXLD0FFB.js";
|
|
10
|
+
import "./tools-DpiQwSTY.js";
|
|
11
|
+
import "./schema-Dv6aLZgz.js";
|
|
12
|
+
import "./toolDefinitions-DFAxp3nr.js";
|
|
13
|
+
import "./resources-Bol20Xuo.js";
|
|
14
|
+
import "./promptDefinitions-D8yow1m0.js";
|
|
15
|
+
import "./prompts-Dt3A8Qfl.js";
|
|
16
|
+
import "./server-C7cHq_pc.js";
|
|
17
|
+
import { startStdio } from "./stdio-ZQLC-i5Q.js";
|
|
18
|
+
import { LIB_VERSION } from "./version-CRto5Sn_.js";
|
|
18
19
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19
20
|
import * as Sentry from "@sentry/node";
|
|
20
21
|
|
|
@@ -54,7 +55,7 @@ Sentry.init({
|
|
|
54
55
|
"mcp.transport": "stdio",
|
|
55
56
|
"sentry.host": host
|
|
56
57
|
} },
|
|
57
|
-
release: "0.
|
|
58
|
+
release: "0.12.0",
|
|
58
59
|
integrations: [Sentry.consoleLoggingIntegration(), Sentry.zodErrorsIntegration()],
|
|
59
60
|
environment: "stdio"
|
|
60
61
|
});
|
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 * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? 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_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\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 = Sentry.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":"
|
|
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\n/**\n * Main CLI entry point for the Sentry MCP server.\n *\n * Handles command-line argument parsing, environment configuration, Sentry\n * initialization, and starts the MCP server with stdio transport. Requires\n * a Sentry access token and optionally accepts host and DSN configuration.\n *\n * @example CLI Usage\n * ```bash\n * npx @sentry/mcp-server --access-token=TOKEN --host=sentry.io\n * ```\n */\n\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { startStdio } from \"./transports/stdio\";\nimport * as Sentry from \"@sentry/node\";\nimport { LIB_VERSION } from \"./version\";\n\n// SENTRY_AUTH_TOKEN is deprecated, but we support it for backwards compatibility\nlet accessToken: string | undefined =\n process.env.SENTRY_ACCESS_TOKEN ?? 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_ACCESS_TOKEN`.\",\n );\n console.error(getUsage());\n process.exit(1);\n}\n\nSentry.init({\n dsn: sentryDsn,\n sendDefaultPii: true,\n tracesSampleRate: 1,\n initialScope: {\n tags: {\n \"mcp.server_version\": LIB_VERSION,\n \"mcp.transport\": \"stdio\",\n \"sentry.host\": host,\n },\n },\n release: process.env.SENTRY_RELEASE,\n integrations: [\n Sentry.consoleLoggingIntegration(),\n Sentry.zodErrorsIntegration(),\n ],\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 = Sentry.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":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAIA,cACF,QAAQ,IAAI,uBAAuB,QAAQ,IAAI;AACjD,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,oGACD;AACD,SAAQ,MAAM,UAAU,CAAC;AACzB,SAAQ,KAAK,EAAE;AAChB;AAED,OAAO,KAAK;CACV,KAAK;CACL,gBAAgB;CAChB,kBAAkB;CAClB,cAAc,EACZ,MAAM;EACJ,sBAAsB;EACtB,iBAAiB;EACjB,eAAe;CAChB,EACF;CACD;CACA,cAAc,CACZ,OAAO,2BAA2B,EAClC,OAAO,sBAAsB,AAC9B;CACD;AAGD,EAAC;AAEF,MAAM,SAAS,IAAI,UAAU;CAC3B,MAAM;CACN,SAAS;AACV;AAED,MAAM,qBAAqB,OAAO,wBAAwB,OAAO;AAEjE,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,5 +1,5 @@
|
|
|
1
|
-
const require_formatting = require('../formatting-
|
|
1
|
+
const require_formatting = require('../formatting-C2kN0ok6.cjs');
|
|
2
2
|
|
|
3
|
-
exports.formatEventOutput = require_formatting.formatEventOutput
|
|
4
|
-
exports.formatFrameHeader = require_formatting.formatFrameHeader
|
|
5
|
-
exports.formatIssueOutput = require_formatting.formatIssueOutput
|
|
3
|
+
exports.formatEventOutput = require_formatting.formatEventOutput;
|
|
4
|
+
exports.formatFrameHeader = require_formatting.formatFrameHeader;
|
|
5
|
+
exports.formatIssueOutput = require_formatting.formatIssueOutput;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FrameInterface } from "../schema-
|
|
2
|
-
import { Event, Issue } from "../types-
|
|
3
|
-
import { SentryApiService } from "../client-
|
|
1
|
+
import { FrameInterface } from "../schema-BJv7kREf.cjs";
|
|
2
|
+
import { Event, Issue } from "../types-NIQW7KyF.cjs";
|
|
3
|
+
import { SentryApiService } from "../client-DkY0ifZf.cjs";
|
|
4
4
|
import "../index-BPSCxsMC.cjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/internal/formatting.d.ts
|
|
8
|
+
|
|
8
9
|
declare function formatFrameHeader(frame: z.infer<typeof FrameInterface>, platform: string | undefined | null): string;
|
|
9
10
|
declare function formatEventOutput(event: Event): string;
|
|
10
11
|
declare function formatIssueOutput({
|
|
@@ -18,9 +19,8 @@ declare function formatIssueOutput({
|
|
|
18
19
|
event: Event;
|
|
19
20
|
apiService: SentryApiService;
|
|
20
21
|
}): string;
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
22
|
//# sourceMappingURL=formatting.d.ts.map
|
|
24
23
|
|
|
24
|
+
//#endregion
|
|
25
25
|
export { formatEventOutput, formatFrameHeader, formatIssueOutput };
|
|
26
26
|
//# sourceMappingURL=formatting.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"formatting.d.cts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBS,iBADO,iBAAA,CACL,KAAA,EAAF,CAAA,CAAE,KAAA,CAAA,OAAa,cAAb,CAAA,EAAA,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,IAAA,CAAA,EAAA,MAAA;AAAK,iBAeA,iBAAA,CAfA,KAAA,EAeyB,KAfzB,CAAA,EAAA,MAAA;AAeA,iBAgFA,iBAAA,CAhF8B;EAAA,gBAAA;EAAA,KAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAgF9B,gBAAA,EAAA,MAAiB;EAAA,KAAA,EAOxB,KAPwB;EAAA,KAC/B,EAOO,KAPP;EAAgB,UAChB,EAOY,gBAPZ;CAAK,CAAA,EAAA,MACL"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FrameInterface
|
|
2
|
-
import { Event, Issue } from "../types-
|
|
3
|
-
import { SentryApiService
|
|
1
|
+
import { FrameInterface } from "../schema-BnxGHL_i.js";
|
|
2
|
+
import { Event, Issue } from "../types-Daq2fm0E.js";
|
|
3
|
+
import { SentryApiService } from "../client-4jq_wVgn.js";
|
|
4
4
|
import "../index-h64gcVNJ.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/internal/formatting.d.ts
|
|
8
|
+
|
|
8
9
|
declare function formatFrameHeader(frame: z.infer<typeof FrameInterface>, platform: string | undefined | null): string;
|
|
9
10
|
declare function formatEventOutput(event: Event): string;
|
|
10
11
|
declare function formatIssueOutput({
|
|
@@ -18,9 +19,8 @@ declare function formatIssueOutput({
|
|
|
18
19
|
event: Event;
|
|
19
20
|
apiService: SentryApiService;
|
|
20
21
|
}): string;
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
22
|
//# sourceMappingURL=formatting.d.ts.map
|
|
24
23
|
|
|
24
|
+
//#endregion
|
|
25
25
|
export { formatEventOutput, formatFrameHeader, formatIssueOutput };
|
|
26
26
|
//# sourceMappingURL=formatting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","names":[],"sources":["../../src/internal/formatting.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBS,iBADO,iBAAA,CACL,KAAA,EAAF,CAAA,CAAE,KAAA,CAAA,OAAa,cAAb,CAAA,EAAA,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,IAAA,CAAA,EAAA,MAAA;AAAK,iBAeA,iBAAA,CAfA,KAAA,EAeyB,KAfzB,CAAA,EAAA,MAAA;AAeA,iBAgFA,iBAAA,CAhF8B;EAAA,gBAAA;EAAA,KAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAgF9B,gBAAA,EAAA,MAAiB;EAAA,KAAA,EAOxB,KAPwB;EAAA,KAC/B,EAOO,KAPP;EAAgB,UAChB,EAOY,gBAPZ;CAAK,CAAA,EAAA,MACL"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-
|
|
1
|
+
import { formatEventOutput, formatFrameHeader, formatIssueOutput } from "../formatting-BaARL2gT.js";
|
|
2
2
|
|
|
3
3
|
export { formatEventOutput, formatFrameHeader, formatIssueOutput };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_issue_helpers = require('../issue-helpers-
|
|
1
|
+
const require_issue_helpers = require('../issue-helpers-D712fGT2.cjs');
|
|
2
2
|
|
|
3
|
-
exports.extractIssueId = require_issue_helpers.extractIssueId
|
|
4
|
-
exports.parseIssueId = require_issue_helpers.parseIssueId
|
|
5
|
-
exports.parseIssueParams = require_issue_helpers.parseIssueParams
|
|
3
|
+
exports.extractIssueId = require_issue_helpers.extractIssueId;
|
|
4
|
+
exports.parseIssueId = require_issue_helpers.parseIssueId;
|
|
5
|
+
exports.parseIssueParams = require_issue_helpers.parseIssueParams;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
//#region src/internal/issue-helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Issue parameter parsing and validation utilities.
|
|
4
|
+
*
|
|
5
|
+
* Handles flexible input formats for Sentry issues (URLs vs explicit parameters),
|
|
6
|
+
* extracts organization and issue identifiers, and validates issue ID formats.
|
|
7
|
+
* Provides robust parsing for LLM-generated parameters that may contain formatting
|
|
8
|
+
* inconsistencies.
|
|
9
|
+
*/
|
|
2
10
|
/**
|
|
3
11
|
* Extracts the Sentry issue ID and organization slug from a full URL
|
|
4
12
|
*
|
|
@@ -37,8 +45,8 @@ declare function parseIssueParams({
|
|
|
37
45
|
}): {
|
|
38
46
|
organizationSlug: string;
|
|
39
47
|
issueId: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
48
|
+
};
|
|
42
49
|
//# sourceMappingURL=issue-helpers.d.ts.map
|
|
50
|
+
//#endregion
|
|
43
51
|
export { extractIssueId, parseIssueId, parseIssueParams };
|
|
44
52
|
//# sourceMappingURL=issue-helpers.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"issue-helpers.d.cts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAgBA;AAmEA;AAyBA;;;;;AAGkB;;;;;;;iBA/FF,cAAA;;;;;;;;;;;;iBAmEA,YAAA;;;;;;;;iBAyBA,gBAAA"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
//#region src/internal/issue-helpers.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Issue parameter parsing and validation utilities.
|
|
4
|
+
*
|
|
5
|
+
* Handles flexible input formats for Sentry issues (URLs vs explicit parameters),
|
|
6
|
+
* extracts organization and issue identifiers, and validates issue ID formats.
|
|
7
|
+
* Provides robust parsing for LLM-generated parameters that may contain formatting
|
|
8
|
+
* inconsistencies.
|
|
9
|
+
*/
|
|
2
10
|
/**
|
|
3
11
|
* Extracts the Sentry issue ID and organization slug from a full URL
|
|
4
12
|
*
|
|
@@ -37,8 +45,8 @@ declare function parseIssueParams({
|
|
|
37
45
|
}): {
|
|
38
46
|
organizationSlug: string;
|
|
39
47
|
issueId: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
48
|
+
};
|
|
42
49
|
//# sourceMappingURL=issue-helpers.d.ts.map
|
|
50
|
+
//#endregion
|
|
43
51
|
export { extractIssueId, parseIssueId, parseIssueParams };
|
|
44
52
|
//# sourceMappingURL=issue-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":
|
|
1
|
+
{"version":3,"file":"issue-helpers.d.ts","names":[],"sources":["../../src/internal/issue-helpers.ts"],"sourcesContent":[],"mappings":";;AAgBA;AAmEA;AAyBA;;;;;AAGkB;;;;;;;iBA/FF,cAAA;;;;;;;;;;;;iBAmEA,YAAA;;;;;;;;iBAyBA,gBAAA"}
|