@tokamohsen/sentry-mcp 0.29.4 → 0.29.6

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.
Files changed (57) hide show
  1. package/dist/{chunk-C0xms8kb.cjs → chunk-rXqPaSPc.cjs} +26 -0
  2. package/dist/cli/{parse-M8aGwIO5.d.ts → parse-CX7Bcldr.d.ts} +2 -2
  3. package/dist/cli/{parse-M8aGwIO5.d.ts.map → parse-CX7Bcldr.d.ts.map} +1 -1
  4. package/dist/cli/parse.cjs +1 -1
  5. package/dist/cli/{resolve-kNjr_UaF.d.ts → resolve-BVtyZcQM.d.ts} +2 -2
  6. package/dist/cli/resolve-BVtyZcQM.d.ts.map +1 -0
  7. package/dist/cli/resolve.cjs +9 -10
  8. package/dist/cli/resolve.cjs.map +1 -1
  9. package/dist/cli/resolve.js +2 -2
  10. package/dist/cli/{types-B2hDXVnQ.d.ts → types-CnTkIHzd.d.ts} +1 -1
  11. package/dist/cli/{types-B2hDXVnQ.d.ts.map → types-CnTkIHzd.d.ts.map} +1 -1
  12. package/dist/cli/{usage-BMxqEEQ3.d.ts → usage-BhCVaC5j.d.ts} +1 -1
  13. package/dist/cli/usage-BhCVaC5j.d.ts.map +1 -0
  14. package/dist/config-CzqCJmB9.js +613 -0
  15. package/dist/config-CzqCJmB9.js.map +1 -0
  16. package/dist/config-DMt6phB6.cjs +630 -0
  17. package/dist/config-DMt6phB6.cjs.map +1 -0
  18. package/dist/constants-BrEVt86y.js +194 -0
  19. package/dist/constants-BrEVt86y.js.map +1 -0
  20. package/dist/constants-C14tQf_s.cjs +217 -0
  21. package/dist/constants-C14tQf_s.cjs.map +1 -0
  22. package/dist/index.cjs +163 -14
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.js +191 -6
  25. package/dist/index.js.map +1 -1
  26. package/dist/server-DduxvXpe.js +32499 -0
  27. package/dist/server-DduxvXpe.js.map +1 -0
  28. package/dist/server-lur5iSHk.cjs +32530 -0
  29. package/dist/server-lur5iSHk.cjs.map +1 -0
  30. package/dist/skills-DOgs9MAy.cjs +96 -0
  31. package/dist/skills-DOgs9MAy.cjs.map +1 -0
  32. package/dist/skills-DfqlqYXj.js +72 -0
  33. package/dist/skills-DfqlqYXj.js.map +1 -0
  34. package/dist/token-CO5Bq1Ct.js +50 -0
  35. package/dist/token-CO5Bq1Ct.js.map +1 -0
  36. package/dist/token-GX19_oyM.cjs +54 -0
  37. package/dist/token-GX19_oyM.cjs.map +1 -0
  38. package/dist/token-util-1O_mwf8r.js +358 -0
  39. package/dist/token-util-1O_mwf8r.js.map +1 -0
  40. package/dist/token-util-Cw83HNFN.cjs +362 -0
  41. package/dist/token-util-Cw83HNFN.cjs.map +1 -0
  42. package/dist/transports/{stdio-DVcJU1wB.d.ts → stdio-DKQR8J7l.d.ts} +1 -1
  43. package/dist/transports/{stdio-DVcJU1wB.d.ts.map → stdio-DKQR8J7l.d.ts.map} +1 -1
  44. package/dist/transports/stdio.cjs +3 -3
  45. package/dist/transports/stdio.js +1 -1
  46. package/dist/url-utils-BHhxlntO.js +119 -0
  47. package/dist/url-utils-BHhxlntO.js.map +1 -0
  48. package/dist/url-utils-N2ExJl9F.cjs +161 -0
  49. package/dist/url-utils-N2ExJl9F.cjs.map +1 -0
  50. package/dist/version-4iOZzjiD.js +7 -0
  51. package/dist/version-4iOZzjiD.js.map +1 -0
  52. package/dist/version-BD4r13ze.cjs +19 -0
  53. package/dist/version-BD4r13ze.cjs.map +1 -0
  54. package/package.json +1 -1
  55. package/dist/cli/resolve-kNjr_UaF.d.ts.map +0 -1
  56. package/dist/cli/usage-BMxqEEQ3.d.ts.map +0 -1
  57. /package/dist/{index-DgNgxUxv.d.ts → index-UKPmYT-S.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url-utils-BHhxlntO.js","names":[],"sources":["../../mcp-core/dist/utils/url-utils.js"],"sourcesContent":["//#region src/utils/url-utils.ts\n/**\n* Determines if a Sentry instance is SaaS or self-hosted based on the host.\n* @param host The Sentry host (e.g., \"sentry.io\" or \"sentry.company.com\")\n* @returns true if SaaS instance, false if self-hosted\n*/\nfunction isSentryHost(host) {\n\treturn host === \"sentry.io\" || host.endsWith(\".sentry.io\");\n}\n/**\n* Generates a Sentry issue URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param issueId Issue identifier (e.g., \"PROJECT-123\")\n* @returns The complete issue URL\n*/\nfunction getIssueUrl(host, organizationSlug, issueId) {\n\tconst isSaas = isSentryHost(host);\n\treturn isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;\n}\n/**\n* Generates a Sentry issues search URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param query Optional search query\n* @param projectSlugOrId Optional project slug or ID\n* @returns The complete issues search URL\n*/\nfunction getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {\n\tconst isSaas = isSentryHost(host);\n\tlet url = isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;\n\tconst params = new URLSearchParams();\n\tif (projectSlugOrId) params.append(\"project\", projectSlugOrId);\n\tif (query) params.append(\"query\", query);\n\tconst queryString = params.toString();\n\tif (queryString) url += `?${queryString}`;\n\treturn url;\n}\n/**\n* Generates a Sentry trace URL for performance investigation.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param traceId Trace identifier\n* @returns The complete trace URL\n*/\nfunction getTraceUrl(host, organizationSlug, traceId) {\n\tconst isSaas = isSentryHost(host);\n\treturn isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n}\n/**\n* Generates a Sentry events explorer URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param query Search query\n* @param dataset Dataset type\n* @param projectSlug Optional project slug\n* @param fields Optional fields to display\n* @returns The complete events explorer URL\n*/\nfunction getEventsExplorerUrl(host, organizationSlug, query, dataset = \"spans\", projectSlug, fields) {\n\tconst isSaas = isSentryHost(host);\n\tlet url = isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/explore/` : `https://${host}/organizations/${organizationSlug}/explore/`;\n\tconst params = new URLSearchParams();\n\tparams.append(\"query\", query);\n\tparams.append(\"dataset\", dataset);\n\tparams.append(\"layout\", \"table\");\n\tif (projectSlug) params.append(\"project\", projectSlug);\n\tif (fields && fields.length > 0) for (const field of fields) params.append(\"field\", field);\n\turl += `?${params.toString()}`;\n\treturn url;\n}\n/**\n* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n* Throws an error if validation fails instead of exiting the process.\n*\n* @param host The hostname to validate\n* @throws {Error} If the host contains a protocol\n*/\nfunction _validateSentryHostInternal(host) {\n\tif (host.startsWith(\"http://\") || host.startsWith(\"https://\")) throw new Error(\"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\");\n}\n/**\n* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Throws an error if validation fails instead of exiting the process.\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n* @throws {Error} If the URL is invalid or not HTTPS\n*/\nfunction _validateAndParseSentryUrlInternal(url) {\n\tif (!url.startsWith(\"https://\")) throw new Error(\"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\");\n\ttry {\n\t\treturn new URL(url).host;\n\t} catch (error) {\n\t\tthrow new Error(\"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\");\n\t}\n}\n/**\n* Validates that a SENTRY_HOST value contains only hostname (no protocol).\n* Exits the process with error code 1 if validation fails (CLI behavior).\n*\n* @param host The hostname to validate\n*/\nfunction validateSentryHost(host) {\n\ttry {\n\t\t_validateSentryHostInternal(host);\n\t} catch (error) {\n\t\tconsole.error(`Error: ${error.message}`);\n\t\tprocess.exit(1);\n\t}\n}\n/**\n* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Exits the process with error code 1 if validation fails (CLI behavior).\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n*/\nfunction validateAndParseSentryUrl(url) {\n\ttry {\n\t\treturn _validateAndParseSentryUrlInternal(url);\n\t} catch (error) {\n\t\tconsole.error(`Error: ${error.message}`);\n\t\tprocess.exit(1);\n\t}\n}\n/**\n* Validates that a SENTRY_HOST value contains only hostname (no protocol).\n* Throws an error instead of exiting the process (for testing).\n*\n* @param host The hostname to validate\n* @throws {Error} If the host contains a protocol\n*/\nfunction validateSentryHostThrows(host) {\n\t_validateSentryHostInternal(host);\n}\n/**\n* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Throws an error instead of exiting the process (for testing).\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n* @throws {Error} If the URL is invalid or not HTTPS\n*/\nfunction validateAndParseSentryUrlThrows(url) {\n\treturn _validateAndParseSentryUrlInternal(url);\n}\n/**\n* Validates that the provided OpenAI base URL is a valid HTTP(S) URL and returns a normalized string.\n*\n* @param url The URL to validate and normalize\n* @returns The normalized URL string\n* @throws {Error} If the URL is empty, invalid, or uses an unsupported protocol\n*/\nfunction validateOpenAiBaseUrlThrows(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw new Error(\"OPENAI base URL must not be empty.\");\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(trimmed);\n\t} catch (error) {\n\t\tthrow new Error(\"OPENAI base URL must be a valid HTTP or HTTPS URL (e.g., https://example.com/v1).\", { cause: error });\n\t}\n\tif (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") throw new Error(\"OPENAI base URL must use http or https scheme (e.g., https://example.com/v1).\");\n\treturn parsed.toString();\n}\n\n//#endregion\nexport { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHost, validateSentryHostThrows };\n//# sourceMappingURL=url-utils.js.map"],"mappings":";;;;;;AAMA,SAAS,aAAa,MAAM;AAC3B,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;;;;;;;;;AAS3D,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,UAAU,YAAY,WAAW,KAAK,iBAAiB,iBAAiB,UAAU;;;;;;;;;;AAU9J,SAAS,mBAAmB,MAAM,kBAAkB,OAAO,iBAAiB;CAC3E,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,YAAY,WAAW,KAAK,iBAAiB,iBAAiB;CAC5I,MAAM,SAAS,IAAI,iBAAiB;AACpC,KAAI,gBAAiB,QAAO,OAAO,WAAW,gBAAgB;AAC9D,KAAI,MAAO,QAAO,OAAO,SAAS,MAAM;CACxC,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YAAa,QAAO,IAAI;AAC5B,QAAO;;;;;;;;;AASR,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,wBAAwB,YAAY,WAAW,KAAK,iBAAiB,iBAAiB,wBAAwB;;;;;;;;;AA+B1L,SAAS,4BAA4B,MAAM;AAC1C,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM,2HAA2H;;;;;;;;;;AAU3M,SAAS,mCAAmC,KAAK;AAChD,KAAI,CAAC,IAAI,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM,0EAA0E;AAC3H,KAAI;AACH,SAAO,IAAI,IAAI,IAAI,CAAC;UACZ,OAAO;AACf,QAAM,IAAI,MAAM,2EAA2E;;;;;;;;;;AAuC7F,SAAS,yBAAyB,MAAM;AACvC,6BAA4B,KAAK;;;;;;;;;;AAUlC,SAAS,gCAAgC,KAAK;AAC7C,QAAO,mCAAmC,IAAI;;;;;;;;;AAS/C,SAAS,4BAA4B,KAAK;CACzC,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,QAAQ,WAAW,EAAG,OAAM,IAAI,MAAM,qCAAqC;CAC/E,IAAI;AACJ,KAAI;AACH,WAAS,IAAI,IAAI,QAAQ;UACjB,OAAO;AACf,QAAM,IAAI,MAAM,qFAAqF,EAAE,OAAO,OAAO,CAAC;;AAEvH,KAAI,OAAO,aAAa,YAAY,OAAO,aAAa,QAAS,OAAM,IAAI,MAAM,gFAAgF;AACjK,QAAO,OAAO,UAAU"}
@@ -0,0 +1,161 @@
1
+
2
+ //#region ../mcp-core/dist/utils/url-utils.js
3
+ /**
4
+ * Determines if a Sentry instance is SaaS or self-hosted based on the host.
5
+ * @param host The Sentry host (e.g., "sentry.io" or "sentry.company.com")
6
+ * @returns true if SaaS instance, false if self-hosted
7
+ */
8
+ function isSentryHost(host) {
9
+ return host === "sentry.io" || host.endsWith(".sentry.io");
10
+ }
11
+ /**
12
+ * Generates a Sentry issue URL.
13
+ * @param host The Sentry host (may include regional subdomain for API access)
14
+ * @param organizationSlug Organization identifier
15
+ * @param issueId Issue identifier (e.g., "PROJECT-123")
16
+ * @returns The complete issue URL
17
+ */
18
+ function getIssueUrl(host, organizationSlug, issueId) {
19
+ const isSaas = isSentryHost(host);
20
+ return isSaas ? `https://${organizationSlug}.${isSaas ? "sentry.io" : host}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;
21
+ }
22
+ /**
23
+ * Generates a Sentry issues search URL.
24
+ * @param host The Sentry host (may include regional subdomain for API access)
25
+ * @param organizationSlug Organization identifier
26
+ * @param query Optional search query
27
+ * @param projectSlugOrId Optional project slug or ID
28
+ * @returns The complete issues search URL
29
+ */
30
+ function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
31
+ const isSaas = isSentryHost(host);
32
+ let url = isSaas ? `https://${organizationSlug}.${isSaas ? "sentry.io" : host}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;
33
+ const params = new URLSearchParams();
34
+ if (projectSlugOrId) params.append("project", projectSlugOrId);
35
+ if (query) params.append("query", query);
36
+ const queryString = params.toString();
37
+ if (queryString) url += `?${queryString}`;
38
+ return url;
39
+ }
40
+ /**
41
+ * Generates a Sentry trace URL for performance investigation.
42
+ * @param host The Sentry host (may include regional subdomain for API access)
43
+ * @param organizationSlug Organization identifier
44
+ * @param traceId Trace identifier
45
+ * @returns The complete trace URL
46
+ */
47
+ function getTraceUrl(host, organizationSlug, traceId) {
48
+ const isSaas = isSentryHost(host);
49
+ return isSaas ? `https://${organizationSlug}.${isSaas ? "sentry.io" : host}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
50
+ }
51
+ /**
52
+ * Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
53
+ * Throws an error if validation fails instead of exiting the process.
54
+ *
55
+ * @param host The hostname to validate
56
+ * @throws {Error} If the host contains a protocol
57
+ */
58
+ function _validateSentryHostInternal(host) {
59
+ if (host.startsWith("http://") || host.startsWith("https://")) throw new Error("SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.");
60
+ }
61
+ /**
62
+ * Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
63
+ * Throws an error if validation fails instead of exiting the process.
64
+ *
65
+ * @param url The HTTPS URL to validate and parse
66
+ * @returns The extracted hostname from the URL
67
+ * @throws {Error} If the URL is invalid or not HTTPS
68
+ */
69
+ function _validateAndParseSentryUrlInternal(url) {
70
+ if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
71
+ try {
72
+ return new URL(url).host;
73
+ } catch (error) {
74
+ throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
75
+ }
76
+ }
77
+ /**
78
+ * Validates that a SENTRY_HOST value contains only hostname (no protocol).
79
+ * Throws an error instead of exiting the process (for testing).
80
+ *
81
+ * @param host The hostname to validate
82
+ * @throws {Error} If the host contains a protocol
83
+ */
84
+ function validateSentryHostThrows(host) {
85
+ _validateSentryHostInternal(host);
86
+ }
87
+ /**
88
+ * Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
89
+ * Throws an error instead of exiting the process (for testing).
90
+ *
91
+ * @param url The HTTPS URL to validate and parse
92
+ * @returns The extracted hostname from the URL
93
+ * @throws {Error} If the URL is invalid or not HTTPS
94
+ */
95
+ function validateAndParseSentryUrlThrows(url) {
96
+ return _validateAndParseSentryUrlInternal(url);
97
+ }
98
+ /**
99
+ * Validates that the provided OpenAI base URL is a valid HTTP(S) URL and returns a normalized string.
100
+ *
101
+ * @param url The URL to validate and normalize
102
+ * @returns The normalized URL string
103
+ * @throws {Error} If the URL is empty, invalid, or uses an unsupported protocol
104
+ */
105
+ function validateOpenAiBaseUrlThrows(url) {
106
+ const trimmed = url.trim();
107
+ if (trimmed.length === 0) throw new Error("OPENAI base URL must not be empty.");
108
+ let parsed;
109
+ try {
110
+ parsed = new URL(trimmed);
111
+ } catch (error) {
112
+ throw new Error("OPENAI base URL must be a valid HTTP or HTTPS URL (e.g., https://example.com/v1).", { cause: error });
113
+ }
114
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") throw new Error("OPENAI base URL must use http or https scheme (e.g., https://example.com/v1).");
115
+ return parsed.toString();
116
+ }
117
+
118
+ //#endregion
119
+ Object.defineProperty(exports, 'getIssueUrl', {
120
+ enumerable: true,
121
+ get: function () {
122
+ return getIssueUrl;
123
+ }
124
+ });
125
+ Object.defineProperty(exports, 'getIssuesSearchUrl', {
126
+ enumerable: true,
127
+ get: function () {
128
+ return getIssuesSearchUrl;
129
+ }
130
+ });
131
+ Object.defineProperty(exports, 'getTraceUrl', {
132
+ enumerable: true,
133
+ get: function () {
134
+ return getTraceUrl;
135
+ }
136
+ });
137
+ Object.defineProperty(exports, 'isSentryHost', {
138
+ enumerable: true,
139
+ get: function () {
140
+ return isSentryHost;
141
+ }
142
+ });
143
+ Object.defineProperty(exports, 'validateAndParseSentryUrlThrows', {
144
+ enumerable: true,
145
+ get: function () {
146
+ return validateAndParseSentryUrlThrows;
147
+ }
148
+ });
149
+ Object.defineProperty(exports, 'validateOpenAiBaseUrlThrows', {
150
+ enumerable: true,
151
+ get: function () {
152
+ return validateOpenAiBaseUrlThrows;
153
+ }
154
+ });
155
+ Object.defineProperty(exports, 'validateSentryHostThrows', {
156
+ enumerable: true,
157
+ get: function () {
158
+ return validateSentryHostThrows;
159
+ }
160
+ });
161
+ //# sourceMappingURL=url-utils-N2ExJl9F.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url-utils-N2ExJl9F.cjs","names":[],"sources":["../../mcp-core/dist/utils/url-utils.js"],"sourcesContent":["//#region src/utils/url-utils.ts\n/**\n* Determines if a Sentry instance is SaaS or self-hosted based on the host.\n* @param host The Sentry host (e.g., \"sentry.io\" or \"sentry.company.com\")\n* @returns true if SaaS instance, false if self-hosted\n*/\nfunction isSentryHost(host) {\n\treturn host === \"sentry.io\" || host.endsWith(\".sentry.io\");\n}\n/**\n* Generates a Sentry issue URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param issueId Issue identifier (e.g., \"PROJECT-123\")\n* @returns The complete issue URL\n*/\nfunction getIssueUrl(host, organizationSlug, issueId) {\n\tconst isSaas = isSentryHost(host);\n\treturn isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;\n}\n/**\n* Generates a Sentry issues search URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param query Optional search query\n* @param projectSlugOrId Optional project slug or ID\n* @returns The complete issues search URL\n*/\nfunction getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {\n\tconst isSaas = isSentryHost(host);\n\tlet url = isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;\n\tconst params = new URLSearchParams();\n\tif (projectSlugOrId) params.append(\"project\", projectSlugOrId);\n\tif (query) params.append(\"query\", query);\n\tconst queryString = params.toString();\n\tif (queryString) url += `?${queryString}`;\n\treturn url;\n}\n/**\n* Generates a Sentry trace URL for performance investigation.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param traceId Trace identifier\n* @returns The complete trace URL\n*/\nfunction getTraceUrl(host, organizationSlug, traceId) {\n\tconst isSaas = isSentryHost(host);\n\treturn isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;\n}\n/**\n* Generates a Sentry events explorer URL.\n* @param host The Sentry host (may include regional subdomain for API access)\n* @param organizationSlug Organization identifier\n* @param query Search query\n* @param dataset Dataset type\n* @param projectSlug Optional project slug\n* @param fields Optional fields to display\n* @returns The complete events explorer URL\n*/\nfunction getEventsExplorerUrl(host, organizationSlug, query, dataset = \"spans\", projectSlug, fields) {\n\tconst isSaas = isSentryHost(host);\n\tlet url = isSaas ? `https://${organizationSlug}.${isSaas ? \"sentry.io\" : host}/explore/` : `https://${host}/organizations/${organizationSlug}/explore/`;\n\tconst params = new URLSearchParams();\n\tparams.append(\"query\", query);\n\tparams.append(\"dataset\", dataset);\n\tparams.append(\"layout\", \"table\");\n\tif (projectSlug) params.append(\"project\", projectSlug);\n\tif (fields && fields.length > 0) for (const field of fields) params.append(\"field\", field);\n\turl += `?${params.toString()}`;\n\treturn url;\n}\n/**\n* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).\n* Throws an error if validation fails instead of exiting the process.\n*\n* @param host The hostname to validate\n* @throws {Error} If the host contains a protocol\n*/\nfunction _validateSentryHostInternal(host) {\n\tif (host.startsWith(\"http://\") || host.startsWith(\"https://\")) throw new Error(\"SENTRY_HOST should only contain a hostname (e.g., sentry.example.com). Use SENTRY_URL if you want to provide a full URL.\");\n}\n/**\n* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Throws an error if validation fails instead of exiting the process.\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n* @throws {Error} If the URL is invalid or not HTTPS\n*/\nfunction _validateAndParseSentryUrlInternal(url) {\n\tif (!url.startsWith(\"https://\")) throw new Error(\"SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).\");\n\ttry {\n\t\treturn new URL(url).host;\n\t} catch (error) {\n\t\tthrow new Error(\"SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).\");\n\t}\n}\n/**\n* Validates that a SENTRY_HOST value contains only hostname (no protocol).\n* Exits the process with error code 1 if validation fails (CLI behavior).\n*\n* @param host The hostname to validate\n*/\nfunction validateSentryHost(host) {\n\ttry {\n\t\t_validateSentryHostInternal(host);\n\t} catch (error) {\n\t\tconsole.error(`Error: ${error.message}`);\n\t\tprocess.exit(1);\n\t}\n}\n/**\n* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Exits the process with error code 1 if validation fails (CLI behavior).\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n*/\nfunction validateAndParseSentryUrl(url) {\n\ttry {\n\t\treturn _validateAndParseSentryUrlInternal(url);\n\t} catch (error) {\n\t\tconsole.error(`Error: ${error.message}`);\n\t\tprocess.exit(1);\n\t}\n}\n/**\n* Validates that a SENTRY_HOST value contains only hostname (no protocol).\n* Throws an error instead of exiting the process (for testing).\n*\n* @param host The hostname to validate\n* @throws {Error} If the host contains a protocol\n*/\nfunction validateSentryHostThrows(host) {\n\t_validateSentryHostInternal(host);\n}\n/**\n* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.\n* Throws an error instead of exiting the process (for testing).\n*\n* @param url The HTTPS URL to validate and parse\n* @returns The extracted hostname from the URL\n* @throws {Error} If the URL is invalid or not HTTPS\n*/\nfunction validateAndParseSentryUrlThrows(url) {\n\treturn _validateAndParseSentryUrlInternal(url);\n}\n/**\n* Validates that the provided OpenAI base URL is a valid HTTP(S) URL and returns a normalized string.\n*\n* @param url The URL to validate and normalize\n* @returns The normalized URL string\n* @throws {Error} If the URL is empty, invalid, or uses an unsupported protocol\n*/\nfunction validateOpenAiBaseUrlThrows(url) {\n\tconst trimmed = url.trim();\n\tif (trimmed.length === 0) throw new Error(\"OPENAI base URL must not be empty.\");\n\tlet parsed;\n\ttry {\n\t\tparsed = new URL(trimmed);\n\t} catch (error) {\n\t\tthrow new Error(\"OPENAI base URL must be a valid HTTP or HTTPS URL (e.g., https://example.com/v1).\", { cause: error });\n\t}\n\tif (parsed.protocol !== \"https:\" && parsed.protocol !== \"http:\") throw new Error(\"OPENAI base URL must use http or https scheme (e.g., https://example.com/v1).\");\n\treturn parsed.toString();\n}\n\n//#endregion\nexport { getEventsExplorerUrl, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isSentryHost, validateAndParseSentryUrl, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHost, validateSentryHostThrows };\n//# sourceMappingURL=url-utils.js.map"],"mappings":";;;;;;;AAMA,SAAS,aAAa,MAAM;AAC3B,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;;;;;;;;;AAS3D,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,UAAU,YAAY,WAAW,KAAK,iBAAiB,iBAAiB,UAAU;;;;;;;;;;AAU9J,SAAS,mBAAmB,MAAM,kBAAkB,OAAO,iBAAiB;CAC3E,MAAM,SAAS,aAAa,KAAK;CACjC,IAAI,MAAM,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,YAAY,WAAW,KAAK,iBAAiB,iBAAiB;CAC5I,MAAM,SAAS,IAAI,iBAAiB;AACpC,KAAI,gBAAiB,QAAO,OAAO,WAAW,gBAAgB;AAC9D,KAAI,MAAO,QAAO,OAAO,SAAS,MAAM;CACxC,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YAAa,QAAO,IAAI;AAC5B,QAAO;;;;;;;;;AASR,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;AACjC,QAAO,SAAS,WAAW,iBAAiB,GAAG,SAAS,cAAc,KAAK,wBAAwB,YAAY,WAAW,KAAK,iBAAiB,iBAAiB,wBAAwB;;;;;;;;;AA+B1L,SAAS,4BAA4B,MAAM;AAC1C,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM,2HAA2H;;;;;;;;;;AAU3M,SAAS,mCAAmC,KAAK;AAChD,KAAI,CAAC,IAAI,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM,0EAA0E;AAC3H,KAAI;AACH,SAAO,IAAI,IAAI,IAAI,CAAC;UACZ,OAAO;AACf,QAAM,IAAI,MAAM,2EAA2E;;;;;;;;;;AAuC7F,SAAS,yBAAyB,MAAM;AACvC,6BAA4B,KAAK;;;;;;;;;;AAUlC,SAAS,gCAAgC,KAAK;AAC7C,QAAO,mCAAmC,IAAI;;;;;;;;;AAS/C,SAAS,4BAA4B,KAAK;CACzC,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,QAAQ,WAAW,EAAG,OAAM,IAAI,MAAM,qCAAqC;CAC/E,IAAI;AACJ,KAAI;AACH,WAAS,IAAI,IAAI,QAAQ;UACjB,OAAO;AACf,QAAM,IAAI,MAAM,qFAAqF,EAAE,OAAO,OAAO,CAAC;;AAEvH,KAAI,OAAO,aAAa,YAAY,OAAO,aAAa,QAAS,OAAM,IAAI,MAAM,gFAAgF;AACjK,QAAO,OAAO,UAAU"}
@@ -0,0 +1,7 @@
1
+ //#region ../mcp-core/dist/version.js
2
+ const LIB_VERSION = typeof process !== "undefined" && process.env?.npm_package_version || "0.0.0";
3
+ const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
4
+
5
+ //#endregion
6
+ export { USER_AGENT as n, LIB_VERSION as t };
7
+ //# sourceMappingURL=version-4iOZzjiD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-4iOZzjiD.js","names":[],"sources":["../../mcp-core/dist/version.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && process.env?.npm_package_version || \"0.0.0\";\nconst USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;\n\n//#endregion\nexport { LIB_VERSION, USER_AGENT };\n//# sourceMappingURL=version.js.map"],"mappings":";AACA,MAAM,cAAc,OAAO,YAAY,eAAe,QAAQ,KAAK,uBAAuB;AAC1F,MAAM,aAAa,cAAc,YAAY"}
@@ -0,0 +1,19 @@
1
+
2
+ //#region ../mcp-core/dist/version.js
3
+ const LIB_VERSION = typeof process !== "undefined" && process.env?.npm_package_version || "0.0.0";
4
+ const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
5
+
6
+ //#endregion
7
+ Object.defineProperty(exports, 'LIB_VERSION', {
8
+ enumerable: true,
9
+ get: function () {
10
+ return LIB_VERSION;
11
+ }
12
+ });
13
+ Object.defineProperty(exports, 'USER_AGENT', {
14
+ enumerable: true,
15
+ get: function () {
16
+ return USER_AGENT;
17
+ }
18
+ });
19
+ //# sourceMappingURL=version-BD4r13ze.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-BD4r13ze.cjs","names":[],"sources":["../../mcp-core/dist/version.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && process.env?.npm_package_version || \"0.0.0\";\nconst USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;\n\n//#endregion\nexport { LIB_VERSION, USER_AGENT };\n//# sourceMappingURL=version.js.map"],"mappings":";;AACA,MAAM,cAAc,OAAO,YAAY,eAAe,QAAQ,KAAK,uBAAuB;AAC1F,MAAM,aAAa,cAAc,YAAY"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tokamohsen/sentry-mcp",
3
3
  "mcpName": "io.github.getsentry/sentry-mcp",
4
- "version": "0.29.4",
4
+ "version": "0.29.6",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20"
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-kNjr_UaF.d.ts","names":[],"sources":["../../src/cli/resolve.ts"],"sourcesContent":[],"mappings":";;;iBAQgB,mBAAA;iBASA,QAAA,QAAgB,aAAa;AAT7C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage-BMxqEEQ3.d.ts","names":[],"sources":["../../src/cli/usage.ts"],"sourcesContent":[],"mappings":";;;iBAEgB,UAAA,iCAEH,cAAc"}