@sentry/mcp-server 0.31.0 → 0.33.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/auth/constants.cjs +1 -1
- package/dist/auth/constants.js +1 -1
- package/dist/auth/device-code-flow.cjs +4 -4
- package/dist/auth/device-code-flow.d.cts +1 -1
- package/dist/auth/device-code-flow.d.cts.map +1 -1
- package/dist/auth/device-code-flow.d.ts +1 -1
- package/dist/auth/device-code-flow.d.ts.map +1 -1
- package/dist/auth/device-code-flow.js +4 -4
- package/dist/auth/resolve-token.cjs +5 -5
- package/dist/auth/resolve-token.d.cts +1 -1
- package/dist/auth/resolve-token.d.ts +1 -1
- package/dist/auth/resolve-token.js +5 -5
- package/dist/auth/token-cache.d.cts +1 -1
- package/dist/auth/token-cache.d.ts +1 -1
- package/dist/auth/types.cjs +2 -1
- package/dist/auth/types.d.cts +2 -2
- package/dist/auth/types.d.ts +2 -2
- package/dist/auth/types.js +2 -2
- package/dist/{auth-BIb4PBnL.js → auth-BJo6H1uD.js} +6 -6
- package/dist/{auth-BIb4PBnL.js.map → auth-BJo6H1uD.js.map} +1 -1
- package/dist/{auth-BK5LL8QY.cjs → auth-UwueZrbT.cjs} +6 -6
- package/dist/{auth-BK5LL8QY.cjs.map → auth-UwueZrbT.cjs.map} +1 -1
- package/dist/cli/commands/auth.cjs +7 -7
- package/dist/cli/commands/auth.js +7 -7
- package/dist/cli/parse.cjs +1 -1
- package/dist/cli/parse.d.cts +1 -1
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/parse.d.ts +1 -1
- package/dist/cli/parse.d.ts.map +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +2 -2
- package/dist/cli/resolve.d.cts +1 -1
- package/dist/cli/resolve.d.cts.map +1 -1
- package/dist/cli/resolve.d.ts +1 -1
- package/dist/cli/resolve.d.ts.map +1 -1
- package/dist/cli/resolve.js +2 -2
- package/dist/cli/types.d.cts +1 -1
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/{config-BYPjNBPX-Bqwc8iZW.cjs → config-CSIYxVpS-ClZCOpEv.cjs} +287 -14
- package/dist/config-CSIYxVpS-ClZCOpEv.cjs.map +1 -0
- package/dist/{config-BYPjNBPX-7d8TAxBc.js → config-CSIYxVpS-cfJbXQHs.js} +282 -15
- package/dist/config-CSIYxVpS-cfJbXQHs.js.map +1 -0
- package/dist/config-gtQq2u0M.cjs +7 -0
- package/dist/config-k-CwrU2A.js +3 -0
- package/dist/constants-DjY87Pdc.js +367 -0
- package/dist/constants-DjY87Pdc.js.map +1 -0
- package/dist/constants-wVeitIuo.cjs +517 -0
- package/dist/constants-wVeitIuo.cjs.map +1 -0
- package/dist/{device-code-flow-DmgeS5QN.js → device-code-flow-BJxgQqnk.js} +5 -5
- package/dist/device-code-flow-BJxgQqnk.js.map +1 -0
- package/dist/{device-code-flow-CpGZ3Eqv.cjs → device-code-flow-BMOB5yEt.cjs} +5 -5
- package/dist/device-code-flow-BMOB5yEt.cjs.map +1 -0
- package/dist/index.cjs +4252 -2127
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4247 -2122
- package/dist/index.js.map +1 -1
- package/dist/{parse-BC0czE2L.js → parse-B7klESpr.js} +4 -1
- package/dist/parse-B7klESpr.js.map +1 -0
- package/dist/{parse-CBlXTQfk.cjs → parse-BR-mFmYz.cjs} +4 -1
- package/dist/parse-BR-mFmYz.cjs.map +1 -0
- package/dist/{resolve-D0W2gbu8.js → resolve-BrniID8M.js} +7 -3
- package/dist/resolve-BrniID8M.js.map +1 -0
- package/dist/{resolve-BfYJ9Cqy.cjs → resolve-C24qYHAk.cjs} +7 -3
- package/dist/resolve-C24qYHAk.cjs.map +1 -0
- package/dist/{resolve-token-C2eTEtoo.cjs → resolve-token-ZTTdPX3U.cjs} +4 -4
- package/dist/{resolve-token-C2eTEtoo.cjs.map → resolve-token-ZTTdPX3U.cjs.map} +1 -1
- package/dist/{resolve-token-pfPBO9EK.js → resolve-token-xrdqUeT7.js} +4 -4
- package/dist/{resolve-token-pfPBO9EK.js.map → resolve-token-xrdqUeT7.js.map} +1 -1
- package/dist/{stdio-B08zZS4X.cjs → stdio-CMTtwTjK.cjs} +2 -2
- package/dist/{stdio-B08zZS4X.cjs.map → stdio-CMTtwTjK.cjs.map} +1 -1
- package/dist/{stdio-CUhyR_jH.js → stdio-CrPIATQh.js} +2 -2
- package/dist/{stdio-CUhyR_jH.js.map → stdio-CrPIATQh.js.map} +1 -1
- package/dist/transports/stdio.cjs +2 -2
- package/dist/transports/stdio.d.cts +1 -1
- package/dist/transports/stdio.js +2 -2
- package/dist/{types-rlmLVpNO.d.cts → types-BHd78Leq.d.cts} +6 -2
- package/dist/types-BHd78Leq.d.cts.map +1 -0
- package/dist/{types-ClEPUb_D.d.cts → types-BJpeKPWI.d.cts} +8 -7
- package/dist/types-BJpeKPWI.d.cts.map +1 -0
- package/dist/{types-C8FoyqMN.js → types-C336ZSwF.js} +7 -4
- package/dist/types-C336ZSwF.js.map +1 -0
- package/dist/{types-BN426G4g.d.ts → types-DDkgkRP9.d.ts} +8 -7
- package/dist/types-DDkgkRP9.d.ts.map +1 -0
- package/dist/{types-CX4uOY82.d.ts → types-DEixQGjv.d.ts} +6 -2
- package/dist/types-DEixQGjv.d.ts.map +1 -0
- package/dist/{types-xUmfecYm.cjs → types-DViCeKUc.cjs} +12 -3
- package/dist/types-DViCeKUc.cjs.map +1 -0
- package/dist/{usage-DRK6TiDr.cjs → usage-5IJewEUC.cjs} +7 -4
- package/dist/usage-5IJewEUC.cjs.map +1 -0
- package/dist/{usage-DB-MGezA.js → usage-CJXm-LBM.js} +7 -4
- package/dist/usage-CJXm-LBM.js.map +1 -0
- package/dist/version-C-VwoRFq.js +7 -0
- package/dist/version-C-VwoRFq.js.map +1 -0
- package/dist/{version-Ca7qUBih.cjs → version-CG1gvrBK.cjs} +3 -3
- package/dist/version-CG1gvrBK.cjs.map +1 -0
- package/package.json +5 -5
- package/dist/config--FiEKpQR.js +0 -3
- package/dist/config-BYPjNBPX-7d8TAxBc.js.map +0 -1
- package/dist/config-BYPjNBPX-Bqwc8iZW.cjs.map +0 -1
- package/dist/config-DU03TDiU.cjs +0 -7
- package/dist/constants-Ciwj7kb9.js +0 -153
- package/dist/constants-Ciwj7kb9.js.map +0 -1
- package/dist/constants-DmV1Benp.cjs +0 -231
- package/dist/constants-DmV1Benp.cjs.map +0 -1
- package/dist/device-code-flow-CpGZ3Eqv.cjs.map +0 -1
- package/dist/device-code-flow-DmgeS5QN.js.map +0 -1
- package/dist/parse-BC0czE2L.js.map +0 -1
- package/dist/parse-CBlXTQfk.cjs.map +0 -1
- package/dist/resolve-BfYJ9Cqy.cjs.map +0 -1
- package/dist/resolve-D0W2gbu8.js.map +0 -1
- package/dist/types-BN426G4g.d.ts.map +0 -1
- package/dist/types-C8FoyqMN.js.map +0 -1
- package/dist/types-CX4uOY82.d.ts.map +0 -1
- package/dist/types-ClEPUb_D.d.cts.map +0 -1
- package/dist/types-rlmLVpNO.d.cts.map +0 -1
- package/dist/types-xUmfecYm.cjs.map +0 -1
- package/dist/usage-DB-MGezA.js.map +0 -1
- package/dist/usage-DRK6TiDr.cjs.map +0 -1
- package/dist/version-CYYpU4RZ.js +0 -7
- package/dist/version-CYYpU4RZ.js.map +0 -1
- package/dist/version-Ca7qUBih.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-Ciwj7kb9.js","names":[],"sources":["../../mcp-core/dist/url-utils-hSW2gkfr.js","../../mcp-core/dist/scopes.js","../src/auth/constants.ts"],"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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\treturn isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\tlet url = isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\treturn isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\tlet url = isSaas ? `https://${organizationSlug}.${webHost}/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\tconst parsedUrl = new URL(url);\n\t\treturn parsedUrl.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-hSW2gkfr.js.map","//#region src/scopes.ts\nconst SCOPES = {\n\t\"org:read\": \"Read organization data\",\n\t\"project:write\": \"Write project data\",\n\t\"team:write\": \"Write team data\",\n\t\"event:write\": \"Write event data\"\n};\n\n//#endregion\nexport { SCOPES };\n//# sourceMappingURL=scopes.js.map","import { SCOPES } from \"@sentry/mcp-core/scopes\";\nimport { isSentryHost } from \"@sentry/mcp-core/utils/url-utils\";\n\n/**\n * Public OAuth app registered on sentry.io for the stdio device code flow.\n * No client secret — device code grant is a public client flow.\n * The Cloudflare transport uses a separate OAuth app with a secret.\n * Override via SENTRY_CLIENT_ID environment variable.\n * See docs/stdio-auth.md for the full credential architecture.\n */\nexport const DEFAULT_SENTRY_CLIENT_ID =\n \"0acbeba7d07d58076dd7dbde8cea2fed8ab525ce3713bda604988009ab35d765\";\n\nexport const DEVICE_CODE_ENDPOINT = \"/oauth/device/code/\";\nexport const TOKEN_ENDPOINT = \"/oauth/token/\";\nexport const DEVICE_CODE_SCOPES = Object.keys(SCOPES).join(\" \");\n\n/** Interval increment on slow_down response (RFC 8628). */\nexport const SLOW_DOWN_INCREMENT_SEC = 5;\n\n/**\n * Whether device code auth is available for this host.\n * Supports sentry.io and regional subdomains (us.sentry.io, eu.sentry.io).\n */\nexport { isSentryHost as isSentryIo };\n\n/**\n * OAuth endpoints live on sentry.io regardless of regional host.\n * Always use this as the host for device code and token requests.\n */\nexport const OAUTH_HOST = \"sentry.io\";\n"],"mappings":";;;;;;AAMA,SAAS,aAAa,MAAM;AAC3B,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;AAC1D;;;;;;;;AAQD,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,UAAU,S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AI,MAAM;AAC1B,KAAI,QAAQ,WAAW,EAAG,OAAM,IAAI,MAAM;CAC1C,IAAI;AACJ,KAAI;AACH,WAAS,IAAI,IAAI;CACjB,SAAQ,OAAO;AACf,QAAM,IAAI,MAAM,qFAAqF,EAAE,OAAO,MAAO;CACrH;AACD,KAAI,OAAO,aAAa,YAAY,OAAO,aAAa,QAAS,OAAM,IAAI,MAAM;AACjF,QAAO,OAAO,UAAU;AACxB;;;;ACzKD,MAAM,SAAS;CACd,YAAY;CACZ,iBAAiB;CACjB,cAAc;CACd,eAAe;AACf;;;;;;;;;;;ACID,MAAa,2BACX;AAEF,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,qBAAqB,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI;;AAG/D,MAAa,0BAA0B;;;;;AAYvC,MAAa,aAAa"}
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../mcp-core/dist/url-utils-hSW2gkfr.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
|
-
const webHost = isSaas ? "sentry.io" : host;
|
|
21
|
-
return isSaas ? `https://${organizationSlug}.${webHost}/issues/${issueId}` : `https://${host}/organizations/${organizationSlug}/issues/${issueId}`;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Generates a Sentry issues search URL.
|
|
25
|
-
* @param host The Sentry host (may include regional subdomain for API access)
|
|
26
|
-
* @param organizationSlug Organization identifier
|
|
27
|
-
* @param query Optional search query
|
|
28
|
-
* @param projectSlugOrId Optional project slug or ID
|
|
29
|
-
* @returns The complete issues search URL
|
|
30
|
-
*/
|
|
31
|
-
function getIssuesSearchUrl(host, organizationSlug, query, projectSlugOrId) {
|
|
32
|
-
const isSaas = isSentryHost(host);
|
|
33
|
-
const webHost = isSaas ? "sentry.io" : host;
|
|
34
|
-
let url = isSaas ? `https://${organizationSlug}.${webHost}/issues/` : `https://${host}/organizations/${organizationSlug}/issues/`;
|
|
35
|
-
const params = new URLSearchParams();
|
|
36
|
-
if (projectSlugOrId) params.append("project", projectSlugOrId);
|
|
37
|
-
if (query) params.append("query", query);
|
|
38
|
-
const queryString = params.toString();
|
|
39
|
-
if (queryString) url += `?${queryString}`;
|
|
40
|
-
return url;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Generates a Sentry trace URL for performance investigation.
|
|
44
|
-
* @param host The Sentry host (may include regional subdomain for API access)
|
|
45
|
-
* @param organizationSlug Organization identifier
|
|
46
|
-
* @param traceId Trace identifier
|
|
47
|
-
* @returns The complete trace URL
|
|
48
|
-
*/
|
|
49
|
-
function getTraceUrl(host, organizationSlug, traceId) {
|
|
50
|
-
const isSaas = isSentryHost(host);
|
|
51
|
-
const webHost = isSaas ? "sentry.io" : host;
|
|
52
|
-
return isSaas ? `https://${organizationSlug}.${webHost}/explore/traces/trace/${traceId}` : `https://${host}/organizations/${organizationSlug}/explore/traces/trace/${traceId}`;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Internal validation function that checks if a SENTRY_HOST value contains only hostname (no protocol).
|
|
56
|
-
* Throws an error if validation fails instead of exiting the process.
|
|
57
|
-
*
|
|
58
|
-
* @param host The hostname to validate
|
|
59
|
-
* @throws {Error} If the host contains a protocol
|
|
60
|
-
*/
|
|
61
|
-
function _validateSentryHostInternal(host) {
|
|
62
|
-
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.");
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Internal validation function that checks if a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
66
|
-
* Throws an error if validation fails instead of exiting the process.
|
|
67
|
-
*
|
|
68
|
-
* @param url The HTTPS URL to validate and parse
|
|
69
|
-
* @returns The extracted hostname from the URL
|
|
70
|
-
* @throws {Error} If the URL is invalid or not HTTPS
|
|
71
|
-
*/
|
|
72
|
-
function _validateAndParseSentryUrlInternal(url) {
|
|
73
|
-
if (!url.startsWith("https://")) throw new Error("SENTRY_URL must be a full HTTPS URL (e.g., https://sentry.example.com).");
|
|
74
|
-
try {
|
|
75
|
-
const parsedUrl = new URL(url);
|
|
76
|
-
return parsedUrl.host;
|
|
77
|
-
} catch (error) {
|
|
78
|
-
throw new Error("SENTRY_URL must be a valid HTTPS URL (e.g., https://sentry.example.com).");
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Validates that a SENTRY_HOST value contains only hostname (no protocol).
|
|
83
|
-
* Throws an error instead of exiting the process (for testing).
|
|
84
|
-
*
|
|
85
|
-
* @param host The hostname to validate
|
|
86
|
-
* @throws {Error} If the host contains a protocol
|
|
87
|
-
*/
|
|
88
|
-
function validateSentryHostThrows(host) {
|
|
89
|
-
_validateSentryHostInternal(host);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Validates that a SENTRY_URL value is a valid HTTPS URL and extracts the hostname.
|
|
93
|
-
* Throws an error instead of exiting the process (for testing).
|
|
94
|
-
*
|
|
95
|
-
* @param url The HTTPS URL to validate and parse
|
|
96
|
-
* @returns The extracted hostname from the URL
|
|
97
|
-
* @throws {Error} If the URL is invalid or not HTTPS
|
|
98
|
-
*/
|
|
99
|
-
function validateAndParseSentryUrlThrows(url) {
|
|
100
|
-
return _validateAndParseSentryUrlInternal(url);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Validates that the provided OpenAI base URL is a valid HTTP(S) URL and returns a normalized string.
|
|
104
|
-
*
|
|
105
|
-
* @param url The URL to validate and normalize
|
|
106
|
-
* @returns The normalized URL string
|
|
107
|
-
* @throws {Error} If the URL is empty, invalid, or uses an unsupported protocol
|
|
108
|
-
*/
|
|
109
|
-
function validateOpenAiBaseUrlThrows(url) {
|
|
110
|
-
const trimmed = url.trim();
|
|
111
|
-
if (trimmed.length === 0) throw new Error("OPENAI base URL must not be empty.");
|
|
112
|
-
let parsed;
|
|
113
|
-
try {
|
|
114
|
-
parsed = new URL(trimmed);
|
|
115
|
-
} catch (error) {
|
|
116
|
-
throw new Error("OPENAI base URL must be a valid HTTP or HTTPS URL (e.g., https://example.com/v1).", { cause: error });
|
|
117
|
-
}
|
|
118
|
-
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).");
|
|
119
|
-
return parsed.toString();
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region ../mcp-core/dist/scopes.js
|
|
124
|
-
const SCOPES = {
|
|
125
|
-
"org:read": "Read organization data",
|
|
126
|
-
"project:write": "Write project data",
|
|
127
|
-
"team:write": "Write team data",
|
|
128
|
-
"event:write": "Write event data"
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/auth/constants.ts
|
|
133
|
-
/**
|
|
134
|
-
* Public OAuth app registered on sentry.io for the stdio device code flow.
|
|
135
|
-
* No client secret — device code grant is a public client flow.
|
|
136
|
-
* The Cloudflare transport uses a separate OAuth app with a secret.
|
|
137
|
-
* Override via SENTRY_CLIENT_ID environment variable.
|
|
138
|
-
* See docs/stdio-auth.md for the full credential architecture.
|
|
139
|
-
*/
|
|
140
|
-
const DEFAULT_SENTRY_CLIENT_ID = "0acbeba7d07d58076dd7dbde8cea2fed8ab525ce3713bda604988009ab35d765";
|
|
141
|
-
const DEVICE_CODE_ENDPOINT = "/oauth/device/code/";
|
|
142
|
-
const TOKEN_ENDPOINT = "/oauth/token/";
|
|
143
|
-
const DEVICE_CODE_SCOPES = Object.keys(SCOPES).join(" ");
|
|
144
|
-
/** Interval increment on slow_down response (RFC 8628). */
|
|
145
|
-
const SLOW_DOWN_INCREMENT_SEC = 5;
|
|
146
|
-
/**
|
|
147
|
-
* OAuth endpoints live on sentry.io regardless of regional host.
|
|
148
|
-
* Always use this as the host for device code and token requests.
|
|
149
|
-
*/
|
|
150
|
-
const OAUTH_HOST = "sentry.io";
|
|
151
|
-
|
|
152
|
-
//#endregion
|
|
153
|
-
Object.defineProperty(exports, 'DEFAULT_SENTRY_CLIENT_ID', {
|
|
154
|
-
enumerable: true,
|
|
155
|
-
get: function () {
|
|
156
|
-
return DEFAULT_SENTRY_CLIENT_ID;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(exports, 'DEVICE_CODE_ENDPOINT', {
|
|
160
|
-
enumerable: true,
|
|
161
|
-
get: function () {
|
|
162
|
-
return DEVICE_CODE_ENDPOINT;
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
Object.defineProperty(exports, 'DEVICE_CODE_SCOPES', {
|
|
166
|
-
enumerable: true,
|
|
167
|
-
get: function () {
|
|
168
|
-
return DEVICE_CODE_SCOPES;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(exports, 'OAUTH_HOST', {
|
|
172
|
-
enumerable: true,
|
|
173
|
-
get: function () {
|
|
174
|
-
return OAUTH_HOST;
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
Object.defineProperty(exports, 'SLOW_DOWN_INCREMENT_SEC', {
|
|
178
|
-
enumerable: true,
|
|
179
|
-
get: function () {
|
|
180
|
-
return SLOW_DOWN_INCREMENT_SEC;
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
Object.defineProperty(exports, 'TOKEN_ENDPOINT', {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
get: function () {
|
|
186
|
-
return TOKEN_ENDPOINT;
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
Object.defineProperty(exports, 'getIssueUrl', {
|
|
190
|
-
enumerable: true,
|
|
191
|
-
get: function () {
|
|
192
|
-
return getIssueUrl;
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
Object.defineProperty(exports, 'getIssuesSearchUrl', {
|
|
196
|
-
enumerable: true,
|
|
197
|
-
get: function () {
|
|
198
|
-
return getIssuesSearchUrl;
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
Object.defineProperty(exports, 'getTraceUrl', {
|
|
202
|
-
enumerable: true,
|
|
203
|
-
get: function () {
|
|
204
|
-
return getTraceUrl;
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
Object.defineProperty(exports, 'isSentryHost', {
|
|
208
|
-
enumerable: true,
|
|
209
|
-
get: function () {
|
|
210
|
-
return isSentryHost;
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
Object.defineProperty(exports, 'validateAndParseSentryUrlThrows', {
|
|
214
|
-
enumerable: true,
|
|
215
|
-
get: function () {
|
|
216
|
-
return validateAndParseSentryUrlThrows;
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
Object.defineProperty(exports, 'validateOpenAiBaseUrlThrows', {
|
|
220
|
-
enumerable: true,
|
|
221
|
-
get: function () {
|
|
222
|
-
return validateOpenAiBaseUrlThrows;
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
Object.defineProperty(exports, 'validateSentryHostThrows', {
|
|
226
|
-
enumerable: true,
|
|
227
|
-
get: function () {
|
|
228
|
-
return validateSentryHostThrows;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
//# sourceMappingURL=constants-DmV1Benp.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-DmV1Benp.cjs","names":[],"sources":["../../mcp-core/dist/url-utils-hSW2gkfr.js","../../mcp-core/dist/scopes.js","../src/auth/constants.ts"],"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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\treturn isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\tlet url = isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\treturn isSaas ? `https://${organizationSlug}.${webHost}/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\tconst webHost = isSaas ? \"sentry.io\" : host;\n\tlet url = isSaas ? `https://${organizationSlug}.${webHost}/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\tconst parsedUrl = new URL(url);\n\t\treturn parsedUrl.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-hSW2gkfr.js.map","//#region src/scopes.ts\nconst SCOPES = {\n\t\"org:read\": \"Read organization data\",\n\t\"project:write\": \"Write project data\",\n\t\"team:write\": \"Write team data\",\n\t\"event:write\": \"Write event data\"\n};\n\n//#endregion\nexport { SCOPES };\n//# sourceMappingURL=scopes.js.map","import { SCOPES } from \"@sentry/mcp-core/scopes\";\nimport { isSentryHost } from \"@sentry/mcp-core/utils/url-utils\";\n\n/**\n * Public OAuth app registered on sentry.io for the stdio device code flow.\n * No client secret — device code grant is a public client flow.\n * The Cloudflare transport uses a separate OAuth app with a secret.\n * Override via SENTRY_CLIENT_ID environment variable.\n * See docs/stdio-auth.md for the full credential architecture.\n */\nexport const DEFAULT_SENTRY_CLIENT_ID =\n \"0acbeba7d07d58076dd7dbde8cea2fed8ab525ce3713bda604988009ab35d765\";\n\nexport const DEVICE_CODE_ENDPOINT = \"/oauth/device/code/\";\nexport const TOKEN_ENDPOINT = \"/oauth/token/\";\nexport const DEVICE_CODE_SCOPES = Object.keys(SCOPES).join(\" \");\n\n/** Interval increment on slow_down response (RFC 8628). */\nexport const SLOW_DOWN_INCREMENT_SEC = 5;\n\n/**\n * Whether device code auth is available for this host.\n * Supports sentry.io and regional subdomains (us.sentry.io, eu.sentry.io).\n */\nexport { isSentryHost as isSentryIo };\n\n/**\n * OAuth endpoints live on sentry.io regardless of regional host.\n * Always use this as the host for device code and token requests.\n */\nexport const OAUTH_HOST = \"sentry.io\";\n"],"mappings":";;;;;;;AAMA,SAAS,aAAa,MAAM;AAC3B,QAAO,SAAS,eAAe,KAAK,SAAS,aAAa;AAC1D;;;;;;;;AAQD,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,UAAU,SAAS,cAAc;AACvC,QAAO,UAAU,UAAU,iBAAiB,GAAG,QAAQ,UAAU,aAAa,UAAU,KAAK,iBAAiB,iBAAiB,UAAU;AACzI;;;;;;;;;AASD,SAAS,mBAAmB,MAAM,kBAAkB,OAAO,iBAAiB;CAC3E,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,UAAU,SAAS,cAAc;CACvC,IAAI,MAAM,UAAU,UAAU,iBAAiB,GAAG,QAAQ,aAAa,UAAU,KAAK,iBAAiB,iBAAiB;CACxH,MAAM,SAAS,IAAI;AACnB,KAAI,gBAAiB,QAAO,OAAO,WAAW,gBAAgB;AAC9D,KAAI,MAAO,QAAO,OAAO,SAAS,MAAM;CACxC,MAAM,cAAc,OAAO,UAAU;AACrC,KAAI,YAAa,SAAQ,GAAG;AAC5B,QAAO;AACP;;;;;;;;AAQD,SAAS,YAAY,MAAM,kBAAkB,SAAS;CACrD,MAAM,SAAS,aAAa,KAAK;CACjC,MAAM,UAAU,SAAS,cAAc;AACvC,QAAO,UAAU,UAAU,iBAAiB,GAAG,QAAQ,wBAAwB,aAAa,UAAU,KAAK,iBAAiB,iBAAiB,wBAAwB;AACrK;;;;;;;;AA+BD,SAAS,4BAA4B,MAAM;AAC1C,KAAI,KAAK,WAAW,UAAU,IAAI,KAAK,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM;AAC/E;;;;;;;;;AASD,SAAS,mCAAmC,KAAK;AAChD,MAAK,IAAI,WAAW,WAAW,CAAE,OAAM,IAAI,MAAM;AACjD,KAAI;EACH,MAAM,YAAY,IAAI,IAAI;AAC1B,SAAO,UAAU;CACjB,SAAQ,OAAO;AACf,QAAM,IAAI,MAAM;CAChB;AACD;;;;;;;;AAqCD,SAAS,yBAAyB,MAAM;AACvC,6BAA4B,KAAK;AACjC;;;;;;;;;AASD,SAAS,gCAAgC,KAAK;AAC7C,QAAO,mCAAmC,IAAI;AAC9C;;;;;;;;AAQD,SAAS,4BAA4B,KAAK;CACzC,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,QAAQ,WAAW,EAAG,OAAM,IAAI,MAAM;CAC1C,IAAI;AACJ,KAAI;AACH,WAAS,IAAI,IAAI;CACjB,SAAQ,OAAO;AACf,QAAM,IAAI,MAAM,qFAAqF,EAAE,OAAO,MAAO;CACrH;AACD,KAAI,OAAO,aAAa,YAAY,OAAO,aAAa,QAAS,OAAM,IAAI,MAAM;AACjF,QAAO,OAAO,UAAU;AACxB;;;;ACzKD,MAAM,SAAS;CACd,YAAY;CACZ,iBAAiB;CACjB,cAAc;CACd,eAAe;AACf;;;;;;;;;;;ACID,MAAa,2BACX;AAEF,MAAa,uBAAuB;AACpC,MAAa,iBAAiB;AAC9B,MAAa,qBAAqB,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI;;AAG/D,MAAa,0BAA0B;;;;;AAYvC,MAAa,aAAa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-code-flow-CpGZ3Eqv.cjs","names":["LIB_VERSION","message: string","code?: string","clientId: string","host: string","scopes: string","DEVICE_CODE_SCOPES","DEVICE_CODE_ENDPOINT","ms: number","TOKEN_ENDPOINT","SLOW_DOWN_INCREMENT_SEC","msg: string","url: string","response: DeviceCodeResponse"],"sources":["../src/auth/device-code-flow.ts"],"sourcesContent":["import { exec } from \"node:child_process\";\nimport * as fs from \"node:fs\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport {\n DEVICE_CODE_ENDPOINT,\n DEVICE_CODE_SCOPES,\n SLOW_DOWN_INCREMENT_SEC,\n TOKEN_ENDPOINT,\n} from \"./constants\";\nimport {\n DeviceCodeResponseSchema,\n DeviceCodeErrorSchema,\n TokenResponseSchema,\n type DeviceCodeResponse,\n type TokenResponse,\n} from \"./types\";\n\nconst USER_AGENT = `sentry-mcp-server/${LIB_VERSION}`;\n\nexport class DeviceCodeError extends Error {\n constructor(\n message: string,\n public readonly code?: string,\n ) {\n super(message);\n this.name = \"DeviceCodeError\";\n }\n}\n\nexport async function requestDeviceCode(\n clientId: string,\n host: string,\n scopes: string = DEVICE_CODE_SCOPES,\n): Promise<DeviceCodeResponse> {\n const url = `https://${host}${DEVICE_CODE_ENDPOINT}`;\n const resp = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"User-Agent\": USER_AGENT,\n },\n body: new URLSearchParams({\n client_id: clientId,\n scope: scopes,\n }),\n });\n\n if (!resp.ok) {\n const text = await resp.text();\n throw new DeviceCodeError(\n `Failed to request device code (HTTP ${resp.status}): ${text}`,\n );\n }\n\n const body = await resp.json();\n return DeviceCodeResponseSchema.parse(body);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport async function pollForToken({\n deviceCode,\n clientId,\n host,\n interval,\n expiresIn,\n}: {\n deviceCode: string;\n clientId: string;\n host: string;\n interval: number;\n expiresIn: number;\n}): Promise<TokenResponse> {\n const url = `https://${host}${TOKEN_ENDPOINT}`;\n const deadline = Date.now() + expiresIn * 1000;\n let pollInterval = interval;\n\n while (Date.now() < deadline) {\n await sleep(pollInterval * 1000);\n\n const resp = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"User-Agent\": USER_AGENT,\n },\n body: new URLSearchParams({\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n device_code: deviceCode,\n client_id: clientId,\n }),\n });\n\n if (resp.ok) {\n const body = await resp.json();\n return TokenResponseSchema.parse(body);\n }\n\n const errorBody = await resp.json().catch(() => null);\n const parsed = DeviceCodeErrorSchema.safeParse(errorBody);\n const errorCode = parsed.success ? parsed.data.error : undefined;\n\n switch (errorCode) {\n case \"authorization_pending\":\n // Keep polling at current interval\n continue;\n case \"slow_down\":\n pollInterval += SLOW_DOWN_INCREMENT_SEC;\n continue;\n case \"access_denied\":\n throw new DeviceCodeError(\n \"Authorization was denied. Please try again or provide --access-token.\",\n errorCode,\n );\n case \"expired_token\":\n throw new DeviceCodeError(\n \"Device code expired before authorization was completed.\",\n errorCode,\n );\n default:\n throw new DeviceCodeError(\n `Unexpected error during device code polling: ${errorCode ?? resp.statusText}`,\n errorCode,\n );\n }\n }\n\n throw new DeviceCodeError(\n \"Device code expired before authorization was completed.\",\n \"expired_token\",\n );\n}\n\n/**\n * Write directly to stderr, bypassing console.warn which may be\n * intercepted by the MCP transport layer.\n */\nfunction stderr(msg: string): void {\n process.stderr.write(`${msg}\\n`);\n}\n\nfunction isWSL(): boolean {\n try {\n return fs\n .readFileSync(\"/proc/version\", \"utf-8\")\n .toLowerCase()\n .includes(\"microsoft\");\n } catch {\n return false;\n }\n}\n\nfunction openBrowser(url: string): void {\n try {\n const { platform } = process;\n if (platform === \"darwin\") {\n exec(`open ${JSON.stringify(url)}`);\n } else if (platform === \"win32\") {\n exec(`start \"\" ${JSON.stringify(url)}`);\n } else if (isWSL()) {\n // WSL: invoke cmd.exe to open the default browser.\n exec(`cmd.exe /c start \"\" ${JSON.stringify(url)}`);\n } else {\n exec(`xdg-open ${JSON.stringify(url)}`);\n }\n } catch {\n // Best-effort — ignore errors (headless, etc.)\n }\n}\n\nexport function displayDeviceCode(response: DeviceCodeResponse): void {\n stderr(\"\");\n stderr(`To authorize, visit: ${response.verification_uri_complete}`);\n stderr(` and enter code: ${response.user_code}`);\n stderr(\"\");\n stderr(\"Waiting for authorization...\");\n\n openBrowser(response.verification_uri_complete);\n}\n\nexport async function authenticate({\n clientId,\n host,\n}: {\n clientId: string;\n host: string;\n}): Promise<TokenResponse> {\n stderr(\"No access token provided. Starting device authorization...\");\n\n const deviceCodeResponse = await requestDeviceCode(clientId, host);\n displayDeviceCode(deviceCodeResponse);\n\n const tokenResponse = await pollForToken({\n deviceCode: deviceCodeResponse.device_code,\n clientId,\n host,\n interval: deviceCodeResponse.interval,\n expiresIn: deviceCodeResponse.expires_in,\n });\n\n stderr(`Successfully authenticated as ${tokenResponse.user.email}`);\n return tokenResponse;\n}\n"],"mappings":";;;;;;;;AAiBA,MAAM,cAAc,oBAAoBA;AAExC,IAAa,kBAAb,cAAqC,MAAM;CACzC,YACEC,SACgBC,MAChB;AACA,QAAM,QAAQ;EAFE;AAGhB,OAAK,OAAO;CACb;AACF;AAED,eAAsB,kBACpBC,UACAC,MACAC,SAAiBC,sCACY;CAC7B,MAAM,OAAO,UAAU,OAAOC;CAC9B,MAAM,OAAO,MAAM,MAAM,KAAK;EAC5B,QAAQ;EACR,SAAS;GACP,gBAAgB;GAChB,cAAc;EACf;EACD,MAAM,IAAI,gBAAgB;GACxB,WAAW;GACX,OAAO;EACR;CACF,EAAC;AAEF,MAAK,KAAK,IAAI;EACZ,MAAM,OAAO,MAAM,KAAK,MAAM;AAC9B,QAAM,IAAI,iBACP,sCAAsC,KAAK,OAAO,KAAK;CAE3D;CAED,MAAM,OAAO,MAAM,KAAK,MAAM;AAC9B,QAAO,uCAAyB,MAAM,KAAK;AAC5C;AAED,SAAS,MAAMC,IAA2B;AACxC,QAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,GAAG;AACxD;AAED,eAAsB,aAAa,EACjC,YACA,UACA,MACA,UACA,WAOD,EAA0B;CACzB,MAAM,OAAO,UAAU,OAAOC;CAC9B,MAAM,WAAW,KAAK,KAAK,GAAG,YAAY;CAC1C,IAAI,eAAe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QAAO,CAEP;AACF;AAED,SAAgB,kBAAkBC,UAAoC;AACpE,QAAO,GAAG;AACV,SAAQ,uBAAuB,SAAS,4BAA4B;AACpE,SAAQ,oBAAoB,SAAS,YAAY;AACjD,QAAO,GAAG;AACV,QAAO,+BAA+B;AAEtC,aAAY,SAAS,0BAA0B;AAChD;AAED,eAAsB,aAAa,EACjC,UACA,MAID,EAA0B;AACzB,QAAO,6DAA6D;CAEpE,MAAM,qBAAqB,MAAM,kBAAkB,UAAU,KAAK;AAClE,mBAAkB,mBAAmB;CAErC,MAAM,gBAAgB,MAAM,aAAa;EACvC,YAAY,mBAAmB;EAC/B;EACA;EACA,UAAU,mBAAmB;EAC7B,WAAW,mBAAmB;CAC/B,EAAC;AAEF,SAAQ,gCAAgC,cAAc,KAAK,QAAQ;AACnE,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device-code-flow-DmgeS5QN.js","names":["message: string","code?: string","clientId: string","host: string","scopes: string","ms: number","msg: string","url: string","response: DeviceCodeResponse"],"sources":["../src/auth/device-code-flow.ts"],"sourcesContent":["import { exec } from \"node:child_process\";\nimport * as fs from \"node:fs\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport {\n DEVICE_CODE_ENDPOINT,\n DEVICE_CODE_SCOPES,\n SLOW_DOWN_INCREMENT_SEC,\n TOKEN_ENDPOINT,\n} from \"./constants\";\nimport {\n DeviceCodeResponseSchema,\n DeviceCodeErrorSchema,\n TokenResponseSchema,\n type DeviceCodeResponse,\n type TokenResponse,\n} from \"./types\";\n\nconst USER_AGENT = `sentry-mcp-server/${LIB_VERSION}`;\n\nexport class DeviceCodeError extends Error {\n constructor(\n message: string,\n public readonly code?: string,\n ) {\n super(message);\n this.name = \"DeviceCodeError\";\n }\n}\n\nexport async function requestDeviceCode(\n clientId: string,\n host: string,\n scopes: string = DEVICE_CODE_SCOPES,\n): Promise<DeviceCodeResponse> {\n const url = `https://${host}${DEVICE_CODE_ENDPOINT}`;\n const resp = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"User-Agent\": USER_AGENT,\n },\n body: new URLSearchParams({\n client_id: clientId,\n scope: scopes,\n }),\n });\n\n if (!resp.ok) {\n const text = await resp.text();\n throw new DeviceCodeError(\n `Failed to request device code (HTTP ${resp.status}): ${text}`,\n );\n }\n\n const body = await resp.json();\n return DeviceCodeResponseSchema.parse(body);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nexport async function pollForToken({\n deviceCode,\n clientId,\n host,\n interval,\n expiresIn,\n}: {\n deviceCode: string;\n clientId: string;\n host: string;\n interval: number;\n expiresIn: number;\n}): Promise<TokenResponse> {\n const url = `https://${host}${TOKEN_ENDPOINT}`;\n const deadline = Date.now() + expiresIn * 1000;\n let pollInterval = interval;\n\n while (Date.now() < deadline) {\n await sleep(pollInterval * 1000);\n\n const resp = await fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"User-Agent\": USER_AGENT,\n },\n body: new URLSearchParams({\n grant_type: \"urn:ietf:params:oauth:grant-type:device_code\",\n device_code: deviceCode,\n client_id: clientId,\n }),\n });\n\n if (resp.ok) {\n const body = await resp.json();\n return TokenResponseSchema.parse(body);\n }\n\n const errorBody = await resp.json().catch(() => null);\n const parsed = DeviceCodeErrorSchema.safeParse(errorBody);\n const errorCode = parsed.success ? parsed.data.error : undefined;\n\n switch (errorCode) {\n case \"authorization_pending\":\n // Keep polling at current interval\n continue;\n case \"slow_down\":\n pollInterval += SLOW_DOWN_INCREMENT_SEC;\n continue;\n case \"access_denied\":\n throw new DeviceCodeError(\n \"Authorization was denied. Please try again or provide --access-token.\",\n errorCode,\n );\n case \"expired_token\":\n throw new DeviceCodeError(\n \"Device code expired before authorization was completed.\",\n errorCode,\n );\n default:\n throw new DeviceCodeError(\n `Unexpected error during device code polling: ${errorCode ?? resp.statusText}`,\n errorCode,\n );\n }\n }\n\n throw new DeviceCodeError(\n \"Device code expired before authorization was completed.\",\n \"expired_token\",\n );\n}\n\n/**\n * Write directly to stderr, bypassing console.warn which may be\n * intercepted by the MCP transport layer.\n */\nfunction stderr(msg: string): void {\n process.stderr.write(`${msg}\\n`);\n}\n\nfunction isWSL(): boolean {\n try {\n return fs\n .readFileSync(\"/proc/version\", \"utf-8\")\n .toLowerCase()\n .includes(\"microsoft\");\n } catch {\n return false;\n }\n}\n\nfunction openBrowser(url: string): void {\n try {\n const { platform } = process;\n if (platform === \"darwin\") {\n exec(`open ${JSON.stringify(url)}`);\n } else if (platform === \"win32\") {\n exec(`start \"\" ${JSON.stringify(url)}`);\n } else if (isWSL()) {\n // WSL: invoke cmd.exe to open the default browser.\n exec(`cmd.exe /c start \"\" ${JSON.stringify(url)}`);\n } else {\n exec(`xdg-open ${JSON.stringify(url)}`);\n }\n } catch {\n // Best-effort — ignore errors (headless, etc.)\n }\n}\n\nexport function displayDeviceCode(response: DeviceCodeResponse): void {\n stderr(\"\");\n stderr(`To authorize, visit: ${response.verification_uri_complete}`);\n stderr(` and enter code: ${response.user_code}`);\n stderr(\"\");\n stderr(\"Waiting for authorization...\");\n\n openBrowser(response.verification_uri_complete);\n}\n\nexport async function authenticate({\n clientId,\n host,\n}: {\n clientId: string;\n host: string;\n}): Promise<TokenResponse> {\n stderr(\"No access token provided. Starting device authorization...\");\n\n const deviceCodeResponse = await requestDeviceCode(clientId, host);\n displayDeviceCode(deviceCodeResponse);\n\n const tokenResponse = await pollForToken({\n deviceCode: deviceCodeResponse.device_code,\n clientId,\n host,\n interval: deviceCodeResponse.interval,\n expiresIn: deviceCodeResponse.expires_in,\n });\n\n stderr(`Successfully authenticated as ${tokenResponse.user.email}`);\n return tokenResponse;\n}\n"],"mappings":";;;;;;;AAiBA,MAAM,cAAc,oBAAoB;AAExC,IAAa,kBAAb,cAAqC,MAAM;CACzC,YACEA,SACgBC,MAChB;AACA,QAAM,Q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@
|
|
|
1
|
-
{"version":3,"file":"parse-BC0czE2L.js","names":["argv: string[]","unknownArgs: string[]","env: NodeJS.ProcessEnv","fromEnv: EnvArgs","cli: CliArgs","env: EnvArgs"],"sources":["../src/cli/parse.ts"],"sourcesContent":["import { parseArgs } from \"node:util\";\nimport type { CliArgs, EnvArgs, MergedArgs } from \"./types\";\n\nexport function parseArgv(argv: string[]): CliArgs {\n const options = {\n \"access-token\": { type: \"string\" as const },\n host: { type: \"string\" as const },\n url: { type: \"string\" as const },\n \"mcp-url\": { type: \"string\" as const },\n \"sentry-dsn\": { type: \"string\" as const },\n \"openai-base-url\": { type: \"string\" as const },\n \"openai-model\": { type: \"string\" as const },\n \"anthropic-base-url\": { type: \"string\" as const },\n \"anthropic-model\": { type: \"string\" as const },\n \"agent-provider\": { type: \"string\" as const },\n \"organization-slug\": { type: \"string\" as const },\n \"project-slug\": { type: \"string\" as const },\n skills: { type: \"string\" as const },\n \"disable-skills\": { type: \"string\" as const },\n agent: { type: \"boolean\" as const },\n experimental: { type: \"boolean\" as const },\n help: { type: \"boolean\" as const, short: \"h\" as const },\n version: { type: \"boolean\" as const, short: \"v\" as const },\n };\n\n const { values, positionals, tokens } = parseArgs({\n args: argv,\n options,\n allowPositionals: false,\n strict: false,\n tokens: true,\n });\n\n const knownLong = new Set(Object.keys(options));\n const knownShort = new Set([\n ...(Object.values(options)\n .map((o) => (\"short\" in o ? (o.short as string | undefined) : undefined))\n .filter(Boolean) as string[]),\n ]);\n\n const unknownArgs: string[] = [];\n for (const t of (tokens as any[]) || []) {\n if (t.kind === \"option\") {\n const name = t.name as string | undefined;\n if (name && !(knownLong.has(name) || knownShort.has(name))) {\n unknownArgs.push((t.raw as string) ?? `--${name}`);\n }\n } else if (t.kind === \"positional\") {\n unknownArgs.push((t.raw as string) ?? String(t.value ?? \"\"));\n }\n }\n\n return {\n accessToken: values[\"access-token\"] as string | undefined,\n host: values.host as string | undefined,\n url: values.url as string | undefined,\n mcpUrl: values[\"mcp-url\"] as string | undefined,\n sentryDsn: values[\"sentry-dsn\"] as string | undefined,\n openaiBaseUrl: values[\"openai-base-url\"] as string | undefined,\n openaiModel: values[\"openai-model\"] as string | undefined,\n anthropicBaseUrl: values[\"anthropic-base-url\"] as string | undefined,\n anthropicModel: values[\"anthropic-model\"] as string | undefined,\n agentProvider: values[\"agent-provider\"] as string | undefined,\n organizationSlug: values[\"organization-slug\"] as string | undefined,\n projectSlug: values[\"project-slug\"] as string | undefined,\n skills: values.skills as string | undefined,\n disableSkills: values[\"disable-skills\"] as string | undefined,\n agent: values.agent === true,\n experimental: values.experimental === true,\n help: (values.help as boolean | undefined) === true,\n version: (values.version as boolean | undefined) === true,\n unknownArgs:\n unknownArgs.length > 0 ? unknownArgs : (positionals as string[]) || [],\n };\n}\n\nexport function parseEnv(env: NodeJS.ProcessEnv): EnvArgs {\n const fromEnv: EnvArgs = {};\n if (env.SENTRY_ACCESS_TOKEN) fromEnv.accessToken = env.SENTRY_ACCESS_TOKEN;\n if (env.SENTRY_URL) fromEnv.url = env.SENTRY_URL;\n if (env.SENTRY_HOST) fromEnv.host = env.SENTRY_HOST;\n if (env.MCP_URL) fromEnv.mcpUrl = env.MCP_URL;\n if (env.SENTRY_DSN || env.DEFAULT_SENTRY_DSN)\n fromEnv.sentryDsn = env.SENTRY_DSN || env.DEFAULT_SENTRY_DSN;\n\n if (env.OPENAI_MODEL) fromEnv.openaiModel = env.OPENAI_MODEL;\n if (env.ANTHROPIC_MODEL) fromEnv.anthropicModel = env.ANTHROPIC_MODEL;\n if (env.EMBEDDED_AGENT_PROVIDER)\n fromEnv.agentProvider = env.EMBEDDED_AGENT_PROVIDER;\n if (env.SENTRY_CLIENT_ID) fromEnv.clientId = env.SENTRY_CLIENT_ID;\n if (env.MCP_SKILLS) fromEnv.skills = env.MCP_SKILLS;\n if (env.MCP_DISABLE_SKILLS) fromEnv.disableSkills = env.MCP_DISABLE_SKILLS;\n return fromEnv;\n}\n\nexport function merge(cli: CliArgs, env: EnvArgs): MergedArgs {\n // CLI wins over env\n return {\n accessToken: cli.accessToken ?? env.accessToken,\n // If CLI provided url/host, prefer those; else fall back to env\n url: cli.url ?? env.url,\n host: cli.host ?? env.host,\n mcpUrl: cli.mcpUrl ?? env.mcpUrl,\n sentryDsn: cli.sentryDsn ?? env.sentryDsn,\n openaiBaseUrl: cli.openaiBaseUrl,\n openaiModel: cli.openaiModel ?? env.openaiModel,\n anthropicBaseUrl: cli.anthropicBaseUrl,\n anthropicModel: cli.anthropicModel ?? env.anthropicModel,\n agentProvider: cli.agentProvider ?? env.agentProvider,\n clientId: env.clientId,\n // Skills precedence: CLI skills override env\n skills: cli.skills ?? env.skills,\n disableSkills: cli.disableSkills ?? env.disableSkills,\n agent: cli.agent === true,\n experimental: cli.experimental === true,\n organizationSlug: cli.organizationSlug,\n projectSlug: cli.projectSlug,\n help: cli.help === true,\n version: cli.version === true,\n unknownArgs: cli.unknownArgs,\n };\n}\n"],"mappings":";;;AAGA,SAAgB,UAAUA,MAAyB;CACjD,MAAM,UAAU;EACd,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,MAAM,EAAE,MAAM,SAAmB;EACjC,KAAK,EAAE,MAAM,SAAmB;EAChC,WAAW,EAAE,MAAM,SAAmB;EACtC,cAAc,EAAE,MAAM,SAAmB;EACzC,mBAAmB,EAAE,MAAM,SAAmB;EAC9C,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,sBAAsB,EAAE,MAAM,SAAmB;EACjD,mBAAmB,EAAE,MAAM,SAAmB;EAC9C,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,qBAAqB,EAAE,MAAM,SAAmB;EAChD,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,QAAQ,EAAE,MAAM,SAAmB;EACnC,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,OAAO,EAAE,MAAM,UAAoB;EACnC,cAAc,EAAE,MAAM,UAAoB;EAC1C,MAAM;GAAE,MAAM;GAAoB,OAAO;EAAc;EACvD,SAAS;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AAI,YAAa,SAAQ,OAAO,IAAI;AACxC,KAAI,IAAI,QAAS,SAAQ,SAAS,IAAI;AACtC,KAAI,IAAI,cAAc,IAAI,mBACxB,SAAQ,YAAY,IAAI,cAAc,IAAI;AAE5C,KAAI,IAAI,aAAc,SAAQ,cAAc,IAAI;AAChD,KAAI,IAAI,gBAAiB,SAAQ,iBAAiB,IAAI;AACtD,KAAI,IAAI,wBACN,SAAQ,gBAAgB,IAAI;AAC9B,KAAI,IAAI,iBAAkB,SAAQ,WAAW,IAAI;AACjD,KAAI,IAAI,WAAY,SAAQ,SAAS,IAAI;AACzC,KAAI,IAAI,mBAAoB,SAAQ,gBAAgB,IAAI;AACxD,QAAO;AACR;AAED,SAAgB,MAAMC,KAAcC,KAA0B;AAE5D,QAAO;EACL,aAAa,IAAI,eAAe,IAAI;EAEpC,KAAK,IAAI,OAAO,IAAI;EACpB,MAAM,IAAI,QAAQ,IAAI;EACtB,QAAQ,IAAI,UAAU,IAAI;EAC1B,WAAW,IAAI,aAAa,IAAI;EAChC,eAAe,IAAI;EACnB,aAAa,IAAI,eAAe,IAAI;EACpC,kBAAkB,IAAI;EACtB,gBAAgB,IAAI,kBAAkB,IAAI;EAC1C,eAAe,IAAI,iBAAiB,IAAI;EACxC,UAAU,IAAI;EAEd,QAAQ,IAAI,UAAU,IAAI;EAC1B,eAAe,IAAI,iBAAiB,IAAI;EACxC,OAAO,IAAI,UAAU;EACrB,cAAc,IAAI,iBAAiB;EACnC,kBAAkB,IAAI;EACtB,aAAa,IAAI;EACjB,MAAM,IAAI,SAAS;EACnB,SAAS,IAAI,YAAY;EACzB,aAAa,IAAI;CAClB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-CBlXTQfk.cjs","names":["argv: string[]","unknownArgs: string[]","env: NodeJS.ProcessEnv","fromEnv: EnvArgs","cli: CliArgs","env: EnvArgs"],"sources":["../src/cli/parse.ts"],"sourcesContent":["import { parseArgs } from \"node:util\";\nimport type { CliArgs, EnvArgs, MergedArgs } from \"./types\";\n\nexport function parseArgv(argv: string[]): CliArgs {\n const options = {\n \"access-token\": { type: \"string\" as const },\n host: { type: \"string\" as const },\n url: { type: \"string\" as const },\n \"mcp-url\": { type: \"string\" as const },\n \"sentry-dsn\": { type: \"string\" as const },\n \"openai-base-url\": { type: \"string\" as const },\n \"openai-model\": { type: \"string\" as const },\n \"anthropic-base-url\": { type: \"string\" as const },\n \"anthropic-model\": { type: \"string\" as const },\n \"agent-provider\": { type: \"string\" as const },\n \"organization-slug\": { type: \"string\" as const },\n \"project-slug\": { type: \"string\" as const },\n skills: { type: \"string\" as const },\n \"disable-skills\": { type: \"string\" as const },\n agent: { type: \"boolean\" as const },\n experimental: { type: \"boolean\" as const },\n help: { type: \"boolean\" as const, short: \"h\" as const },\n version: { type: \"boolean\" as const, short: \"v\" as const },\n };\n\n const { values, positionals, tokens } = parseArgs({\n args: argv,\n options,\n allowPositionals: false,\n strict: false,\n tokens: true,\n });\n\n const knownLong = new Set(Object.keys(options));\n const knownShort = new Set([\n ...(Object.values(options)\n .map((o) => (\"short\" in o ? (o.short as string | undefined) : undefined))\n .filter(Boolean) as string[]),\n ]);\n\n const unknownArgs: string[] = [];\n for (const t of (tokens as any[]) || []) {\n if (t.kind === \"option\") {\n const name = t.name as string | undefined;\n if (name && !(knownLong.has(name) || knownShort.has(name))) {\n unknownArgs.push((t.raw as string) ?? `--${name}`);\n }\n } else if (t.kind === \"positional\") {\n unknownArgs.push((t.raw as string) ?? String(t.value ?? \"\"));\n }\n }\n\n return {\n accessToken: values[\"access-token\"] as string | undefined,\n host: values.host as string | undefined,\n url: values.url as string | undefined,\n mcpUrl: values[\"mcp-url\"] as string | undefined,\n sentryDsn: values[\"sentry-dsn\"] as string | undefined,\n openaiBaseUrl: values[\"openai-base-url\"] as string | undefined,\n openaiModel: values[\"openai-model\"] as string | undefined,\n anthropicBaseUrl: values[\"anthropic-base-url\"] as string | undefined,\n anthropicModel: values[\"anthropic-model\"] as string | undefined,\n agentProvider: values[\"agent-provider\"] as string | undefined,\n organizationSlug: values[\"organization-slug\"] as string | undefined,\n projectSlug: values[\"project-slug\"] as string | undefined,\n skills: values.skills as string | undefined,\n disableSkills: values[\"disable-skills\"] as string | undefined,\n agent: values.agent === true,\n experimental: values.experimental === true,\n help: (values.help as boolean | undefined) === true,\n version: (values.version as boolean | undefined) === true,\n unknownArgs:\n unknownArgs.length > 0 ? unknownArgs : (positionals as string[]) || [],\n };\n}\n\nexport function parseEnv(env: NodeJS.ProcessEnv): EnvArgs {\n const fromEnv: EnvArgs = {};\n if (env.SENTRY_ACCESS_TOKEN) fromEnv.accessToken = env.SENTRY_ACCESS_TOKEN;\n if (env.SENTRY_URL) fromEnv.url = env.SENTRY_URL;\n if (env.SENTRY_HOST) fromEnv.host = env.SENTRY_HOST;\n if (env.MCP_URL) fromEnv.mcpUrl = env.MCP_URL;\n if (env.SENTRY_DSN || env.DEFAULT_SENTRY_DSN)\n fromEnv.sentryDsn = env.SENTRY_DSN || env.DEFAULT_SENTRY_DSN;\n\n if (env.OPENAI_MODEL) fromEnv.openaiModel = env.OPENAI_MODEL;\n if (env.ANTHROPIC_MODEL) fromEnv.anthropicModel = env.ANTHROPIC_MODEL;\n if (env.EMBEDDED_AGENT_PROVIDER)\n fromEnv.agentProvider = env.EMBEDDED_AGENT_PROVIDER;\n if (env.SENTRY_CLIENT_ID) fromEnv.clientId = env.SENTRY_CLIENT_ID;\n if (env.MCP_SKILLS) fromEnv.skills = env.MCP_SKILLS;\n if (env.MCP_DISABLE_SKILLS) fromEnv.disableSkills = env.MCP_DISABLE_SKILLS;\n return fromEnv;\n}\n\nexport function merge(cli: CliArgs, env: EnvArgs): MergedArgs {\n // CLI wins over env\n return {\n accessToken: cli.accessToken ?? env.accessToken,\n // If CLI provided url/host, prefer those; else fall back to env\n url: cli.url ?? env.url,\n host: cli.host ?? env.host,\n mcpUrl: cli.mcpUrl ?? env.mcpUrl,\n sentryDsn: cli.sentryDsn ?? env.sentryDsn,\n openaiBaseUrl: cli.openaiBaseUrl,\n openaiModel: cli.openaiModel ?? env.openaiModel,\n anthropicBaseUrl: cli.anthropicBaseUrl,\n anthropicModel: cli.anthropicModel ?? env.anthropicModel,\n agentProvider: cli.agentProvider ?? env.agentProvider,\n clientId: env.clientId,\n // Skills precedence: CLI skills override env\n skills: cli.skills ?? env.skills,\n disableSkills: cli.disableSkills ?? env.disableSkills,\n agent: cli.agent === true,\n experimental: cli.experimental === true,\n organizationSlug: cli.organizationSlug,\n projectSlug: cli.projectSlug,\n help: cli.help === true,\n version: cli.version === true,\n unknownArgs: cli.unknownArgs,\n };\n}\n"],"mappings":";;;;AAGA,SAAgB,UAAUA,MAAyB;CACjD,MAAM,UAAU;EACd,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,MAAM,EAAE,MAAM,SAAmB;EACjC,KAAK,EAAE,MAAM,SAAmB;EAChC,WAAW,EAAE,MAAM,SAAmB;EACtC,cAAc,EAAE,MAAM,SAAmB;EACzC,mBAAmB,EAAE,MAAM,SAAmB;EAC9C,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,sBAAsB,EAAE,MAAM,SAAmB;EACjD,mBAAmB,EAAE,MAAM,SAAmB;EAC9C,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,qBAAqB,EAAE,MAAM,SAAmB;EAChD,gBAAgB,EAAE,MAAM,SAAmB;EAC3C,QAAQ,EAAE,MAAM,SAAmB;EACnC,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,OAAO,EAAE,MAAM,UAAoB;EACnC,cAAc,EAAE,MAAM,UAAoB;EAC1C,MAAM;GAAE,MAAM;GAAoB,OAAO;EAAc;EACvD,SAAS;GAAE,MAAM;GAAoB,OAAO;EAAc;CAC3D;CAED,MAAM,EAAE,QAAQ,aAAa,QAAQ,GAAG,yBAAU;EAChD,MAAM;EACN;EACA,kBAAkB;EAClB,QAAQ;EACR,QAAQ;CACT,EAAC;CAEF,MAAM,YAAY,IAAI,IAA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AAI;AAChD,KAAI,IAAI,gBAAiB,SAAQ,iBAAiB,IAAI;AACtD,KAAI,IAAI,wBACN,SAAQ,gBAAgB,IAAI;AAC9B,KAAI,IAAI,iBAAkB,SAAQ,WAAW,IAAI;AACjD,KAAI,IAAI,WAAY,SAAQ,SAAS,IAAI;AACzC,KAAI,IAAI,mBAAoB,SAAQ,gBAAgB,IAAI;AACxD,QAAO;AACR;AAED,SAAgB,MAAMC,KAAcC,KAA0B;AAE5D,QAAO;EACL,aAAa,IAAI,eAAe,IAAI;EAEpC,KAAK,IAAI,OAAO,IAAI;EACpB,MAAM,IAAI,QAAQ,IAAI;EACtB,QAAQ,IAAI,UAAU,IAAI;EAC1B,WAAW,IAAI,aAAa,IAAI;EAChC,eAAe,IAAI;EACnB,aAAa,IAAI,eAAe,IAAI;EACpC,kBAAkB,IAAI;EACtB,gBAAgB,IAAI,kBAAkB,IAAI;EAC1C,eAAe,IAAI,iBAAiB,IAAI;EACxC,UAAU,IAAI;EAEd,QAAQ,IAAI,UAAU,IAAI;EAC1B,eAAe,IAAI,iBAAiB,IAAI;EACxC,OAAO,IAAI,UAAU;EACrB,cAAc,IAAI,iBAAiB;EACnC,kBAAkB,IAAI;EACtB,aAAa,IAAI;EACjB,MAAM,IAAI,SAAS;EACnB,SAAS,IAAI,YAAY;EACzB,aAAa,IAAI;CAClB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-BfYJ9Cqy.cjs","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider: \"openai\" | \"anthropic\" | undefined","DEFAULT_SENTRY_CLIENT_ID"],"sources":["../../mcp-core/dist/skills-DN-CVDkO.js","../src/cli/resolve.ts"],"sourcesContent":["//#region src/skills.ts\nconst SKILLS = {\n\tinspect: {\n\t\tid: \"inspect\",\n\t\tname: \"Inspect Issues & Events\",\n\t\tdescription: \"Search for errors, analyze traces, and explore event details\",\n\t\tdefaultEnabled: true,\n\t\torder: 1\n\t},\n\tseer: {\n\t\tid: \"seer\",\n\t\tname: \"Seer\",\n\t\tdescription: \"Sentry's AI debugger that helps you analyze, root cause, and fix issues\",\n\t\tdefaultEnabled: true,\n\t\torder: 2\n\t},\n\tdocs: {\n\t\tid: \"docs\",\n\t\tname: \"Documentation\",\n\t\tdescription: \"Search and read Sentry SDK documentation\",\n\t\tdefaultEnabled: false,\n\t\torder: 3\n\t},\n\ttriage: {\n\t\tid: \"triage\",\n\t\tname: \"Triage Issues\",\n\t\tdescription: \"Resolve, assign, and update issues\",\n\t\tdefaultEnabled: false,\n\t\torder: 4\n\t},\n\t\"project-management\": {\n\t\tid: \"project-management\",\n\t\tname: \"Manage Projects & Teams\",\n\t\tdescription: \"Create and modify projects, teams, and DSNs\",\n\t\tdefaultEnabled: false,\n\t\torder: 5\n\t}\n};\nconst SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);\nasync function getSkillsArrayWithCounts() {\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst tools = toolsModule.default;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const tool of Object.values(tools)) {\n\t\tif (tool.internalOnly) continue;\n\t\tif (Array.isArray(tool.skills)) for (const skill of tool.skills) counts.set(skill, (counts.get(skill) || 0) + 1);\n\t}\n\treturn SKILLS_ARRAY.map((skill) => ({\n\t\t...skill,\n\t\ttoolCount: counts.get(skill.id) || 0\n\t}));\n}\nconst ALL_SKILLS = Object.keys(SKILLS);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn skill in SKILLS;\n}\nfunction isEnabledBySkills(grantedSkills, toolSkills) {\n\tif (!grantedSkills || toolSkills.length === 0) return false;\n\treturn toolSkills.some((skill) => grantedSkills.has(skill));\n}\nfunction parseSkills(input) {\n\tconst valid = /* @__PURE__ */ new Set();\n\tconst invalid = [];\n\tif (!input) return {\n\t\tvalid,\n\t\tinvalid\n\t};\n\tlet skills = [];\n\tif (typeof input === \"string\") skills = input.split(\",\");\n\telse if (Array.isArray(input)) skills = input.map((v) => typeof v === \"string\" ? v : \"\");\n\tfor (const skill of skills) {\n\t\tconst trimmed = String(skill).trim();\n\t\tif (isValidSkill(trimmed)) valid.add(trimmed);\n\t\telse if (trimmed) invalid.push(trimmed);\n\t}\n\treturn {\n\t\tvalid,\n\t\tinvalid\n\t};\n}\nasync function getScopesForSkills(grantedSkills) {\n\tconst { DEFAULT_SCOPES } = await import(\"./constants.js\");\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst tools = toolsModule.default;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const tool of Object.values(tools)) {\n\t\tif (tool.internalOnly) continue;\n\t\tconst toolEnabled = tool.skills.some((skill) => grantedSkills.has(skill));\n\t\tif (toolEnabled) for (const scope of tool.requiredScopes) scopes.add(scope);\n\t}\n\treturn scopes;\n}\n\n//#endregion\nexport { ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-DN-CVDkO.js.map","import { ALL_SKILLS, parseSkills, type Skill } from \"@sentry/mcp-core/skills\";\nimport {\n validateAndParseSentryUrlThrows,\n validateOpenAiBaseUrlThrows,\n validateSentryHostThrows,\n} from \"@sentry/mcp-core/utils/url-utils\";\nimport { DEFAULT_SENTRY_CLIENT_ID } from \"../auth/constants\";\nimport type { MergedArgs, PartiallyResolvedConfig } from \"./types\";\n\nexport function formatInvalidSkills(\n invalid: string[],\n source?: string,\n): string {\n const prefix = source ? `${source} provided` : \"Invalid skills provided\";\n return `Error: ${prefix}: ${invalid.join(\", \")}\\nAvailable skills: ${ALL_SKILLS.join(\", \")}`;\n}\n\n/**\n * Resolves the Sentry host from url/host inputs with validation.\n * Used by both the server flow (finalize) and auth commands (resolveAuthContext)\n * to ensure cache keys always match.\n */\nexport function resolveHost(url?: string, host?: string): string {\n if (url) {\n return validateAndParseSentryUrlThrows(url);\n }\n if (host) {\n validateSentryHostThrows(host);\n return host;\n }\n return \"sentry.io\";\n}\n\nexport function finalize(input: MergedArgs): PartiallyResolvedConfig {\n const sentryHost = resolveHost(input.url, input.host);\n\n // Skills resolution\n //\n // IMPORTANT: stdio (CLI) intentionally defaults to ALL skills when no --skills flag is provided\n //\n // This differs from the OAuth flow, which requires explicit user selection:\n // - stdio/CLI: Non-interactive, defaults to ALL skills (inspect, docs, seer, triage, project-management)\n // - OAuth: Interactive, requires user to explicitly select skills (with sensible defaults pre-checked)\n //\n // Rationale:\n // We don't want the MCP to break if users don't specify skills. stdio is typically used in\n // local development and CI/CD environments where maximum access by default is expected.\n // OAuth is used in multi-tenant hosted environments where users should consciously grant\n // permissions on a per-app basis.\n //\n // For OAuth validation that enforces minimum 1 skill selection, see:\n // packages/mcp-cloudflare/src/server/oauth/routes/callback.ts (lines 234-248)\n //\n let finalSkills: Set<Skill>;\n if (input.skills) {\n // Override: use only the specified skills\n const { valid, invalid } = parseSkills(input.skills);\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\"Error: Invalid skills provided. No valid skills found.\");\n }\n finalSkills = valid;\n } else {\n // Default: grant ALL skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ALL_SKILLS);\n }\n\n // Disable-skills: remove specific skills from the active set\n if (input.disableSkills) {\n const { valid: skillsToDisable, invalid } = parseSkills(\n input.disableSkills,\n );\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid, \"--disable-skills\"));\n }\n for (const skill of skillsToDisable) {\n finalSkills.delete(skill);\n }\n if (finalSkills.size === 0) {\n throw new Error(\n \"Error: All skills have been disabled. At least one skill must remain enabled.\",\n );\n }\n }\n\n const resolvedOpenAiBaseUrl = input.openaiBaseUrl\n ? validateOpenAiBaseUrlThrows(input.openaiBaseUrl)\n : undefined;\n\n // Validate anthropic base URL if provided (same validation as OpenAI)\n const resolvedAnthropicBaseUrl = input.anthropicBaseUrl\n ? validateOpenAiBaseUrlThrows(input.anthropicBaseUrl)\n : undefined;\n\n // Validate agent provider if explicitly set\n let agentProvider: \"openai\" | \"anthropic\" | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (provider !== \"openai\" && provider !== \"anthropic\") {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\" or \"anthropic\".`,\n );\n }\n agentProvider = provider;\n }\n\n return {\n accessToken: input.accessToken,\n clientId: input.clientId || DEFAULT_SENTRY_CLIENT_ID,\n sentryHost,\n mcpUrl: input.mcpUrl,\n sentryDsn: input.sentryDsn,\n openaiBaseUrl: resolvedOpenAiBaseUrl,\n openaiModel: input.openaiModel,\n anthropicBaseUrl: resolvedAnthropicBaseUrl,\n anthropicModel: input.anthropicModel,\n agentProvider,\n finalSkills,\n organizationSlug: input.organizationSlug,\n projectSlug: input.projectSlug,\n };\n}\n"],"mappings":";;;AACA,MAAM,SAAS;CACd,SAAS;EACR,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,QAAQ;EACP,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,sBAAsB;EACrB,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;AACD;AACD,MAAM,eAAe,OAAO,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM;AAe5E,MAAM,aAAa,OAAO,KAAK,OAAO;AACtC,MAAM,i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QAAQ,SAAS,EACnB,OAAM,IAAI,MAAM,oBAAoB,QAAQ;AAE9C,MAAI,MAAM,SAAS,EACjB,OAAM,IAAI,MAAM;AAElB,gBAAc;CACf,MAEC,eAAc,IAAI,IAAW;AAI/B,KAAI,MAAM,eAAe;EACvB,MAAM,EAAE,OAAO,iBAAiB,SAAS,GAAG,YAC1C,MAAM,cACP;AACD,MAAI,QAAQ,SAAS,EACnB,OAAM,IAAI,MAAM,oBAAoB,SAAS,mBAAmB;AAElE,OAAK,MAAM,SAAS,gBAClB,aAAY,OAAO,MAAM;AAE3B,MAAI,YAAY,SAAS,EACvB,OAAM,IAAI,MACR;CAGL;CAED,MAAM,wBAAwB,MAAM,gBAChC,8CAA4B,MAAM,cAAc;CAIpD,MAAM,2BAA2B,MAAM,mBACnC,8CAA4B,MAAM,iBAAiB;CAIvD,IAAIC;AACJ,KAAI,MAAM,eAAe;EACvB,MAAM,WAAW,MAAM,cAAc,aAAa;AAClD,MAAI,aAAa,YAAY,aAAa,YACxC,OAAM,IAAI,OACP,iCAAiC,MAAM,cAAc;AAG1D,kBAAgB;CACjB;AAED,QAAO;EACL,aAAa,MAAM;EACnB,UAAU,MAAM,YAAYC;EAC5B;EACA,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,eAAe;EACf,aAAa,MAAM;EACnB,kBAAkB;EAClB,gBAAgB,MAAM;EACtB;EACA;EACA,kBAAkB,MAAM;EACxB,aAAa,MAAM;CACpB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-D0W2gbu8.js","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider: \"openai\" | \"anthropic\" | undefined"],"sources":["../../mcp-core/dist/skills-DN-CVDkO.js","../src/cli/resolve.ts"],"sourcesContent":["//#region src/skills.ts\nconst SKILLS = {\n\tinspect: {\n\t\tid: \"inspect\",\n\t\tname: \"Inspect Issues & Events\",\n\t\tdescription: \"Search for errors, analyze traces, and explore event details\",\n\t\tdefaultEnabled: true,\n\t\torder: 1\n\t},\n\tseer: {\n\t\tid: \"seer\",\n\t\tname: \"Seer\",\n\t\tdescription: \"Sentry's AI debugger that helps you analyze, root cause, and fix issues\",\n\t\tdefaultEnabled: true,\n\t\torder: 2\n\t},\n\tdocs: {\n\t\tid: \"docs\",\n\t\tname: \"Documentation\",\n\t\tdescription: \"Search and read Sentry SDK documentation\",\n\t\tdefaultEnabled: false,\n\t\torder: 3\n\t},\n\ttriage: {\n\t\tid: \"triage\",\n\t\tname: \"Triage Issues\",\n\t\tdescription: \"Resolve, assign, and update issues\",\n\t\tdefaultEnabled: false,\n\t\torder: 4\n\t},\n\t\"project-management\": {\n\t\tid: \"project-management\",\n\t\tname: \"Manage Projects & Teams\",\n\t\tdescription: \"Create and modify projects, teams, and DSNs\",\n\t\tdefaultEnabled: false,\n\t\torder: 5\n\t}\n};\nconst SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);\nasync function getSkillsArrayWithCounts() {\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst tools = toolsModule.default;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const tool of Object.values(tools)) {\n\t\tif (tool.internalOnly) continue;\n\t\tif (Array.isArray(tool.skills)) for (const skill of tool.skills) counts.set(skill, (counts.get(skill) || 0) + 1);\n\t}\n\treturn SKILLS_ARRAY.map((skill) => ({\n\t\t...skill,\n\t\ttoolCount: counts.get(skill.id) || 0\n\t}));\n}\nconst ALL_SKILLS = Object.keys(SKILLS);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn skill in SKILLS;\n}\nfunction isEnabledBySkills(grantedSkills, toolSkills) {\n\tif (!grantedSkills || toolSkills.length === 0) return false;\n\treturn toolSkills.some((skill) => grantedSkills.has(skill));\n}\nfunction parseSkills(input) {\n\tconst valid = /* @__PURE__ */ new Set();\n\tconst invalid = [];\n\tif (!input) return {\n\t\tvalid,\n\t\tinvalid\n\t};\n\tlet skills = [];\n\tif (typeof input === \"string\") skills = input.split(\",\");\n\telse if (Array.isArray(input)) skills = input.map((v) => typeof v === \"string\" ? v : \"\");\n\tfor (const skill of skills) {\n\t\tconst trimmed = String(skill).trim();\n\t\tif (isValidSkill(trimmed)) valid.add(trimmed);\n\t\telse if (trimmed) invalid.push(trimmed);\n\t}\n\treturn {\n\t\tvalid,\n\t\tinvalid\n\t};\n}\nasync function getScopesForSkills(grantedSkills) {\n\tconst { DEFAULT_SCOPES } = await import(\"./constants.js\");\n\tconst toolsModule = await import(\"./tools/index.js\");\n\tconst tools = toolsModule.default;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const tool of Object.values(tools)) {\n\t\tif (tool.internalOnly) continue;\n\t\tconst toolEnabled = tool.skills.some((skill) => grantedSkills.has(skill));\n\t\tif (toolEnabled) for (const scope of tool.requiredScopes) scopes.add(scope);\n\t}\n\treturn scopes;\n}\n\n//#endregion\nexport { ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-DN-CVDkO.js.map","import { ALL_SKILLS, parseSkills, type Skill } from \"@sentry/mcp-core/skills\";\nimport {\n validateAndParseSentryUrlThrows,\n validateOpenAiBaseUrlThrows,\n validateSentryHostThrows,\n} from \"@sentry/mcp-core/utils/url-utils\";\nimport { DEFAULT_SENTRY_CLIENT_ID } from \"../auth/constants\";\nimport type { MergedArgs, PartiallyResolvedConfig } from \"./types\";\n\nexport function formatInvalidSkills(\n invalid: string[],\n source?: string,\n): string {\n const prefix = source ? `${source} provided` : \"Invalid skills provided\";\n return `Error: ${prefix}: ${invalid.join(\", \")}\\nAvailable skills: ${ALL_SKILLS.join(\", \")}`;\n}\n\n/**\n * Resolves the Sentry host from url/host inputs with validation.\n * Used by both the server flow (finalize) and auth commands (resolveAuthContext)\n * to ensure cache keys always match.\n */\nexport function resolveHost(url?: string, host?: string): string {\n if (url) {\n return validateAndParseSentryUrlThrows(url);\n }\n if (host) {\n validateSentryHostThrows(host);\n return host;\n }\n return \"sentry.io\";\n}\n\nexport function finalize(input: MergedArgs): PartiallyResolvedConfig {\n const sentryHost = resolveHost(input.url, input.host);\n\n // Skills resolution\n //\n // IMPORTANT: stdio (CLI) intentionally defaults to ALL skills when no --skills flag is provided\n //\n // This differs from the OAuth flow, which requires explicit user selection:\n // - stdio/CLI: Non-interactive, defaults to ALL skills (inspect, docs, seer, triage, project-management)\n // - OAuth: Interactive, requires user to explicitly select skills (with sensible defaults pre-checked)\n //\n // Rationale:\n // We don't want the MCP to break if users don't specify skills. stdio is typically used in\n // local development and CI/CD environments where maximum access by default is expected.\n // OAuth is used in multi-tenant hosted environments where users should consciously grant\n // permissions on a per-app basis.\n //\n // For OAuth validation that enforces minimum 1 skill selection, see:\n // packages/mcp-cloudflare/src/server/oauth/routes/callback.ts (lines 234-248)\n //\n let finalSkills: Set<Skill>;\n if (input.skills) {\n // Override: use only the specified skills\n const { valid, invalid } = parseSkills(input.skills);\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid));\n }\n if (valid.size === 0) {\n throw new Error(\"Error: Invalid skills provided. No valid skills found.\");\n }\n finalSkills = valid;\n } else {\n // Default: grant ALL skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ALL_SKILLS);\n }\n\n // Disable-skills: remove specific skills from the active set\n if (input.disableSkills) {\n const { valid: skillsToDisable, invalid } = parseSkills(\n input.disableSkills,\n );\n if (invalid.length > 0) {\n throw new Error(formatInvalidSkills(invalid, \"--disable-skills\"));\n }\n for (const skill of skillsToDisable) {\n finalSkills.delete(skill);\n }\n if (finalSkills.size === 0) {\n throw new Error(\n \"Error: All skills have been disabled. At least one skill must remain enabled.\",\n );\n }\n }\n\n const resolvedOpenAiBaseUrl = input.openaiBaseUrl\n ? validateOpenAiBaseUrlThrows(input.openaiBaseUrl)\n : undefined;\n\n // Validate anthropic base URL if provided (same validation as OpenAI)\n const resolvedAnthropicBaseUrl = input.anthropicBaseUrl\n ? validateOpenAiBaseUrlThrows(input.anthropicBaseUrl)\n : undefined;\n\n // Validate agent provider if explicitly set\n let agentProvider: \"openai\" | \"anthropic\" | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (provider !== \"openai\" && provider !== \"anthropic\") {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\" or \"anthropic\".`,\n );\n }\n agentProvider = provider;\n }\n\n return {\n accessToken: input.accessToken,\n clientId: input.clientId || DEFAULT_SENTRY_CLIENT_ID,\n sentryHost,\n mcpUrl: input.mcpUrl,\n sentryDsn: input.sentryDsn,\n openaiBaseUrl: resolvedOpenAiBaseUrl,\n openaiModel: input.openaiModel,\n anthropicBaseUrl: resolvedAnthropicBaseUrl,\n anthropicModel: input.anthropicModel,\n agentProvider,\n finalSkills,\n organizationSlug: input.organizationSlug,\n projectSlug: input.projectSlug,\n };\n}\n"],"mappings":";;;AACA,MAAM,SAAS;CACd,SAAS;EACR,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,MAAM;EACL,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,QAAQ;EACP,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;CACD,sBAAsB;EACrB,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;AACD;AACD,MAAM,eAAe,OAAO,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM;AAe5E,MAAM,aAAa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AAA,yBAAkB,EAAA,MAAA;EAAwB,QAArC,EAAA,MAAA;EAAK,UAAA,EAAA,MAAA;AAKxC,CAAA,EAAA;EAGE,WAAA,EAAA,MAAA;EAAA,SAAA,EAAA,MAAA;;;;YAHgC,EAAA,MAAA;AAAA,CAAA,CAAA;AASrB,KAdD,kBAAA,GAAqB,CAAA,CAAE,KA0BjC,CAAA,OA1B8C,wBA0B9C,CAAA;;;;cArBW,uBAAqB,CAAA,CAAA;SAGhC,CAAA,CAAA;;;;;;;;;;;AAM8B;AAchC;AAAyB,cAdZ,mBAcY,EAdO,CAAA,CAAA,SAcP,CAAA;EAAA,YAAkB,EAFzC,CAAA,CAAA,SAEyC;EAAmB,aAAhC,aAAA;EAAK,UAAA,aAAA;EAKvB,UAAA,aAAW;EAUP,UAAA,aAAa;EAAA,IAAA,aAAA,CAAA;IACZ,KAAA,aAAA;IAGd,EAAA,aAAA;IAAW,IAAA,eAAA,YAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAnBF,aAAA,GAAgB,CAAA,CAAE,aAAa;;;;KAK/B,WAAA;;;;;;;;;iBAUI,aAAA,gBACC,sDAGd"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-C8FoyqMN.js","names":["tokenResponse: TokenResponse","sentryHost: string","clientId: string"],"sources":["../src/auth/types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Response from Sentry's device code endpoint (POST /oauth/device/code/).\n * See: https://docs.sentry.io/api/auth/#device-authorization-flow\n */\nexport const DeviceCodeResponseSchema = z.object({\n device_code: z.string(),\n user_code: z.string(),\n verification_uri: z.string().url(),\n verification_uri_complete: z.string().url(),\n interval: z.number().int().positive(),\n expires_in: z.number().int().positive(),\n});\n\nexport type DeviceCodeResponse = z.infer<typeof DeviceCodeResponseSchema>;\n\n/**\n * Error response during device code token polling.\n */\nexport const DeviceCodeErrorSchema = z.object({\n error: z.string(),\n error_description: z.string().optional(),\n});\n\n/**\n * Successful token response from Sentry's token endpoint.\n * Mirrors the shape used by the cloudflare OAuth callback.\n */\nexport const TokenResponseSchema = z.object({\n access_token: z.string(),\n refresh_token: z.string(),\n token_type: z.string(),\n expires_in: z.number(),\n expires_at: z.string().datetime(),\n user: z.object({\n email: z.string().email(),\n id: z.string(),\n name: z.string().nullable(),\n }),\n scope: z.string(),\n});\n\nexport type TokenResponse = z.infer<typeof TokenResponseSchema>;\n\n/**\n * Shape of a cached token entry stored on disk.\n */\nexport type CachedToken = {\n access_token: string;\n refresh_token: string;\n expires_at: string;\n sentry_host: string;\n client_id: string;\n user_email: string;\n scope: string;\n};\n\nexport function toCachedToken(\n tokenResponse: TokenResponse,\n sentryHost: string,\n clientId: string,\n): CachedToken {\n return {\n access_token: tokenResponse.access_token,\n refresh_token: tokenResponse.refresh_token,\n expires_at: tokenResponse.expires_at,\n sentry_host: sentryHost,\n client_id: clientId,\n user_email: tokenResponse.user.email,\n scope: tokenResponse.scope,\n };\n}\n"],"mappings":";;;;;;;AAMA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,aAAa,EAAE,QAAQ;CACvB,WAAW,EAAE,QAAQ;CACrB,kBAAkB,EAAE,QAAQ,CAAC,KAAK;CAClC,2BAA2B,EAAE,QAAQ,CAAC,KAAK;CAC3C,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;CACrC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;AACxC,EAAC;;;;AAOF,MAAa,wBAAwB,EAAE,OAAO;CAC5C,OAAO,EAAE,QAAQ;CACjB,mBAAmB,EAAE,QAAQ,CAAC,UAAU;AACzC,EAAC;;;;;AAMF,MAAa,sBAAsB,EAAE,OAAO;CAC1C,cAAc,EAAE,QAAQ;CACxB,eAAe,EAAE,QAAQ;CACzB,YAAY,EAAE,QAAQ;CACtB,YAAY,EAAE,QAAQ;CACtB,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,MAAM,EAAE,OAAO;EACb,OAAO,EAAE,QAAQ,CAAC,OAAO;EACzB,IAAI,EAAE,QAAQ;EACd,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC5B,EAAC;CACF,OAAO,EAAE,QAAQ;AAClB,EAAC;AAiBF,SAAgB,cACdA,eACAC,YACAC,UACa;AACb,QAAO;EACL,cAAc,cAAc;EAC5B,eAAe,cAAc;EAC7B,YAAY,cAAc;EAC1B,aAAa;EACb,WAAW;EACX,YAAY,cAAc,KAAK;EAC/B,OAAO,cAAc;CACtB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-CX4uOY82.d.ts","names":[],"sources":["../src/cli/types.ts"],"sourcesContent":[],"mappings":";;;KAEY,OAAA;;EAAA,IAAA,CAAA,EAAA,MAAO;EAsBP,GAAA,CAAA,EAAA,MAAO;EAcP,MAAA,CAAA,EAAA,MAAU;EA2BV,SAAA,CAAA,EAAA,MAAA;EAAuB,aAAA,CAAA,EAAA,MAAA;EAAA,WAYhB,CAAA,EAAA,MAAA;EAAK,gBAAT,CAAA,EAAA,MAAA;EAAG,cAAA,CAAA,EAAA,MAAA;EAKN,aAAA,CAAA,EAAA,MAAc;EAAA,MAAA,CAAA,EAAA,MAAA;EAAA,aAAQ,CAAA,EAAA,MAAA;EAAuB,KAA5B,CAAA,EAAA,OAAA;EAAI,YAAA,CAAA,EAAA,OAAA;;;;;;;KA1DrB,OAAA;;;;;;;;;;;;;KAcA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BA,uBAAA;;;;;;;;;;;;eAYG,IAAI;;;;KAKP,cAAA,GAAiB,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-ClEPUb_D.d.cts","names":[],"sources":["../src/auth/types.ts"],"sourcesContent":[],"mappings":";;;;;;AAMA;;AAOE,cAPW,wBAOX,EAPmC,CAAA,CAAA,SAOnC,CAAA;eAAA,CAAA,CAAA;;;;;;UAPmC,cAAA,EAAA;EAAA,WAAA,EAAA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,CAAA,EAAA,MAAA;EAAuB,KAA5B,CAAA,EAAA,OAAA;EAAI,YAAA,CAAA,EAAA,OAAA;;;;;;;KA1DrB,OAAA;;;;;;;;;;;;;KAcA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BA,uBAAA;;;;;;;;;;;;eAYG,IAAI;;;;KAKP,cAAA,GAAiB,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-xUmfecYm.cjs","names":["tokenResponse: TokenResponse","sentryHost: string","clientId: string"],"sources":["../src/auth/types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * Response from Sentry's device code endpoint (POST /oauth/device/code/).\n * See: https://docs.sentry.io/api/auth/#device-authorization-flow\n */\nexport const DeviceCodeResponseSchema = z.object({\n device_code: z.string(),\n user_code: z.string(),\n verification_uri: z.string().url(),\n verification_uri_complete: z.string().url(),\n interval: z.number().int().positive(),\n expires_in: z.number().int().positive(),\n});\n\nexport type DeviceCodeResponse = z.infer<typeof DeviceCodeResponseSchema>;\n\n/**\n * Error response during device code token polling.\n */\nexport const DeviceCodeErrorSchema = z.object({\n error: z.string(),\n error_description: z.string().optional(),\n});\n\n/**\n * Successful token response from Sentry's token endpoint.\n * Mirrors the shape used by the cloudflare OAuth callback.\n */\nexport const TokenResponseSchema = z.object({\n access_token: z.string(),\n refresh_token: z.string(),\n token_type: z.string(),\n expires_in: z.number(),\n expires_at: z.string().datetime(),\n user: z.object({\n email: z.string().email(),\n id: z.string(),\n name: z.string().nullable(),\n }),\n scope: z.string(),\n});\n\nexport type TokenResponse = z.infer<typeof TokenResponseSchema>;\n\n/**\n * Shape of a cached token entry stored on disk.\n */\nexport type CachedToken = {\n access_token: string;\n refresh_token: string;\n expires_at: string;\n sentry_host: string;\n client_id: string;\n user_email: string;\n scope: string;\n};\n\nexport function toCachedToken(\n tokenResponse: TokenResponse,\n sentryHost: string,\n clientId: string,\n): CachedToken {\n return {\n access_token: tokenResponse.access_token,\n refresh_token: tokenResponse.refresh_token,\n expires_at: tokenResponse.expires_at,\n sentry_host: sentryHost,\n client_id: clientId,\n user_email: tokenResponse.user.email,\n scope: tokenResponse.scope,\n };\n}\n"],"mappings":";;;;;;;;AAMA,MAAa,2BAA2B,MAAE,OAAO;CAC/C,aAAa,MAAE,QAAQ;CACvB,WAAW,MAAE,QAAQ;CACrB,kBAAkB,MAAE,QAAQ,CAAC,KAAK;CAClC,2BAA2B,MAAE,QAAQ,CAAC,KAAK;CAC3C,UAAU,MAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;CACrC,YAAY,MAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;AACxC,EAAC;;;;AAOF,MAAa,wBAAwB,MAAE,OAAO;CAC5C,OAAO,MAAE,QAAQ;CACjB,mBAAmB,MAAE,QAAQ,CAAC,UAAU;AACzC,EAAC;;;;;AAMF,MAAa,sBAAsB,MAAE,OAAO;CAC1C,cAAc,MAAE,QAAQ;CACxB,eAAe,MAAE,QAAQ;CACzB,YAAY,MAAE,QAAQ;CACtB,YAAY,MAAE,QAAQ;CACtB,YAAY,MAAE,QAAQ,CAAC,UAAU;CACjC,MAAM,MAAE,OAAO;EACb,OAAO,MAAE,QAAQ,CAAC,OAAO;EACzB,IAAI,MAAE,QAAQ;EACd,MAAM,MAAE,QAAQ,CAAC,UAAU;CAC5B,EAAC;CACF,OAAO,MAAE,QAAQ;AAClB,EAAC;AAiBF,SAAgB,cACdA,eACAC,YACAC,UACa;AACb,QAAO;EACL,cAAc,cAAc;EAC5B,eAAe,cAAc;EAC7B,YAAY,cAAc;EAC1B,aAAa;EACb,WAAW;EACX,YAAY,cAAc,KAAK;EAC/B,OAAO,cAAc;CACtB;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage-DB-MGezA.js","names":["packageName: string","allSkills: ReadonlyArray<Skill>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Skill } from \"@sentry/mcp-core/skills\";\n\nexport function buildUsage(\n packageName: string,\n allSkills: ReadonlyArray<Skill>,\n): string {\n return `Usage: ${packageName} [--access-token=<token>] [--host=<host>]\n ${packageName} auth [login|logout|status]\n\nCommands:\n auth login Authenticate via device code flow (sentry.io only)\n auth logout Clear cached authentication\n auth status Show current authentication state\n\nAuthentication:\n --access-token <token> Sentry User Auth Token with API access\n Optional for sentry.io (device code flow is used if omitted)\n Required for self-hosted instances\n\nCommon optional flags:\n --host <host> Change Sentry host (self-hosted)\n --sentry-dsn <dsn> Override DSN used for telemetry reporting\n --agent Agent mode: only expose use_sentry tool (for AI agents)\n --experimental Enable forward-looking tool variants and experimental features\n\nEmbedded agent configuration:\n --agent-provider <provider> LLM provider: openai or anthropic (auto-detects from API keys)\n --openai-base-url <url> Override OpenAI API base URL\n --openai-model <model> Override OpenAI model (default: gpt-5)\n --anthropic-base-url <url> Override Anthropic API base URL\n --anthropic-model <model> Override Anthropic model (default: claude-sonnet-4-5)\n\nSession constraints:\n --organization-slug <slug> Force all calls to an organization\n --project-slug <slug> Optional project constraint\n\nSkill controls:\n --skills <list> Specify which skills to grant (default: all skills)\n --disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)\n\nAll skills: ${allSkills.join(\", \")}\n\nEnvironment variables:\n SENTRY_ACCESS_TOKEN Sentry auth token (alternative to --access-token)\n SENTRY_CLIENT_ID Override OAuth client ID for device code flow\n OPENAI_API_KEY OpenAI API key for AI-powered search tools\n ANTHROPIC_API_KEY Anthropic API key for AI-powered search tools\n EMBEDDED_AGENT_PROVIDER Provider override: openai or anthropic\n MCP_DISABLE_SKILLS Disable specific skills (comma-separated)\n\nExamples:\n ${packageName} # device code auth (sentry.io only)\n ${packageName} --access-token=TOKEN\n ${packageName} --access-token=TOKEN --skills=inspect,triage\n ${packageName} --access-token=TOKEN --host=sentry.example.com\n ${packageName} --access-token=TOKEN --host=sentry.example.com --disable-skills=seer\n ${packageName} --access-token=TOKEN --agent-provider=anthropic`;\n}\n"],"mappings":";AAEA,SAAgB,WACdA,aACAC,WACQ;AACR,SAAQ,SAAS,YAAY;SACtB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCP,UAAU,KAAK,KAAK,CAAC;;;;;;;;;;;IAW/B,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;AACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage-DRK6TiDr.cjs","names":["packageName: string","allSkills: ReadonlyArray<Skill>"],"sources":["../src/cli/usage.ts"],"sourcesContent":["import type { Skill } from \"@sentry/mcp-core/skills\";\n\nexport function buildUsage(\n packageName: string,\n allSkills: ReadonlyArray<Skill>,\n): string {\n return `Usage: ${packageName} [--access-token=<token>] [--host=<host>]\n ${packageName} auth [login|logout|status]\n\nCommands:\n auth login Authenticate via device code flow (sentry.io only)\n auth logout Clear cached authentication\n auth status Show current authentication state\n\nAuthentication:\n --access-token <token> Sentry User Auth Token with API access\n Optional for sentry.io (device code flow is used if omitted)\n Required for self-hosted instances\n\nCommon optional flags:\n --host <host> Change Sentry host (self-hosted)\n --sentry-dsn <dsn> Override DSN used for telemetry reporting\n --agent Agent mode: only expose use_sentry tool (for AI agents)\n --experimental Enable forward-looking tool variants and experimental features\n\nEmbedded agent configuration:\n --agent-provider <provider> LLM provider: openai or anthropic (auto-detects from API keys)\n --openai-base-url <url> Override OpenAI API base URL\n --openai-model <model> Override OpenAI model (default: gpt-5)\n --anthropic-base-url <url> Override Anthropic API base URL\n --anthropic-model <model> Override Anthropic model (default: claude-sonnet-4-5)\n\nSession constraints:\n --organization-slug <slug> Force all calls to an organization\n --project-slug <slug> Optional project constraint\n\nSkill controls:\n --skills <list> Specify which skills to grant (default: all skills)\n --disable-skills <list> Remove specific skills (e.g. --disable-skills=seer)\n\nAll skills: ${allSkills.join(\", \")}\n\nEnvironment variables:\n SENTRY_ACCESS_TOKEN Sentry auth token (alternative to --access-token)\n SENTRY_CLIENT_ID Override OAuth client ID for device code flow\n OPENAI_API_KEY OpenAI API key for AI-powered search tools\n ANTHROPIC_API_KEY Anthropic API key for AI-powered search tools\n EMBEDDED_AGENT_PROVIDER Provider override: openai or anthropic\n MCP_DISABLE_SKILLS Disable specific skills (comma-separated)\n\nExamples:\n ${packageName} # device code auth (sentry.io only)\n ${packageName} --access-token=TOKEN\n ${packageName} --access-token=TOKEN --skills=inspect,triage\n ${packageName} --access-token=TOKEN --host=sentry.example.com\n ${packageName} --access-token=TOKEN --host=sentry.example.com --disable-skills=seer\n ${packageName} --access-token=TOKEN --agent-provider=anthropic`;\n}\n"],"mappings":";;AAEA,SAAgB,WACdA,aACAC,WACQ;AACR,SAAQ,SAAS,YAAY;SACtB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCP,UAAU,KAAK,KAAK,CAAC;;;;;;;;;;;IAW/B,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;AACf"}
|
package/dist/version-CYYpU4RZ.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region ../mcp-core/dist/version-DRuyPBSD.js
|
|
2
|
-
const LIB_VERSION = typeof process !== "undefined" && "0.31.0" || "0.0.0";
|
|
3
|
-
const USER_AGENT = `sentry-mcp/${LIB_VERSION} (https://mcp.sentry.dev)`;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
export { LIB_VERSION, USER_AGENT };
|
|
7
|
-
//# sourceMappingURL=version-CYYpU4RZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-CYYpU4RZ.js","names":[],"sources":["../../mcp-core/dist/version-DRuyPBSD.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && \"0.31.0\" || \"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-DRuyPBSD.js.map"],"mappings":";AACA,MAAM,qBAAqB,YAAY,eAAe,YAAY;AAClE,MAAM,cAAc,aAAa,YAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version-Ca7qUBih.cjs","names":[],"sources":["../../mcp-core/dist/version-DRuyPBSD.js"],"sourcesContent":["//#region src/version.ts\nconst LIB_VERSION = typeof process !== \"undefined\" && \"0.31.0\" || \"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-DRuyPBSD.js.map"],"mappings":";;AACA,MAAM,qBAAqB,YAAY,eAAe,YAAY;AAClE,MAAM,cAAc,aAAa,YAAY"}
|