@sentry/mcp-server 0.35.0 → 0.36.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 +3 -3
- package/dist/auth/device-code-flow.d.ts +1 -1
- package/dist/auth/device-code-flow.js +4 -4
- package/dist/auth/resolve-token.cjs +4 -4
- package/dist/auth/resolve-token.d.ts +1 -1
- package/dist/auth/resolve-token.js +6 -6
- package/dist/auth/token-cache.d.ts +1 -1
- package/dist/auth/token-cache.js +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/auth/types.js +1 -1
- package/dist/{auth-NuILycy3.js → auth-CRgAEwzo.js} +7 -7
- package/dist/{auth-NuILycy3.js.map → auth-CRgAEwzo.js.map} +1 -1
- package/dist/{auth-DeUVu86q.cjs → auth-D8TSQ4oy.cjs} +4 -4
- package/dist/{auth-DeUVu86q.cjs.map → auth-D8TSQ4oy.cjs.map} +1 -1
- package/dist/blob-utils-6d2dcrax.js +3 -0
- package/dist/blob-utils-B_m4t9Jw.cjs +3 -0
- package/dist/blob-utils-Cle0aVpg-6ww8NFf5.js +4692 -0
- package/dist/blob-utils-Cle0aVpg-6ww8NFf5.js.map +1 -0
- package/dist/blob-utils-Cle0aVpg-hsHMwzjW.cjs +4709 -0
- package/dist/blob-utils-Cle0aVpg-hsHMwzjW.cjs.map +1 -0
- package/dist/chunk-CunrlGP7.js +37 -0
- package/dist/cli/commands/auth.cjs +5 -5
- package/dist/cli/commands/auth.js +8 -8
- package/dist/cli/parse.d.ts +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +2 -2
- package/dist/cli/resolve.d.ts +1 -1
- package/dist/cli/resolve.js +2 -2
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/{config-YHBj037H-DRbUBG2X.js → config-9W1R-AgS-DQqdqWsA.js} +2 -2
- package/dist/config-9W1R-AgS-DQqdqWsA.js.map +1 -0
- package/dist/{config-YHBj037H-DI-vM9pT.cjs → config-9W1R-AgS-i6Wokc_9.cjs} +2 -2
- package/dist/config-9W1R-AgS-i6Wokc_9.cjs.map +1 -0
- package/dist/config-CMn1JPkk.cjs +7 -0
- package/dist/{config-Bnslg67w.js → config-CNbv1NHi.js} +1 -1
- package/dist/{constants-BjQ5jCEg.js → constants-DGLkHYpN.js} +15 -4
- package/dist/constants-DGLkHYpN.js.map +1 -0
- package/dist/{constants-Bgs-7WBj.cjs → constants-n6iE6tnq.cjs} +20 -3
- package/dist/constants-n6iE6tnq.cjs.map +1 -0
- package/dist/{device-code-flow-b6KaQzNJ.cjs → device-code-flow-DpBK3Ta8.cjs} +3 -3
- package/dist/{device-code-flow-b6KaQzNJ.cjs.map → device-code-flow-DpBK3Ta8.cjs.map} +1 -1
- package/dist/{device-code-flow-CltWJnOC.js → device-code-flow-E2NU5-6y.js} +4 -4
- package/dist/{device-code-flow-CltWJnOC.js.map → device-code-flow-E2NU5-6y.js.map} +1 -1
- package/dist/index.cjs +4561 -1110
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4562 -1110
- package/dist/index.js.map +1 -1
- package/dist/{parse-BSFxOAQG.js → parse-CjQzHya6.js} +1 -1
- package/dist/{parse-BSFxOAQG.js.map → parse-CjQzHya6.js.map} +1 -1
- package/dist/{resolve-D4TZw-d-.cjs → resolve-8yBa_PAl.cjs} +3 -3
- package/dist/resolve-8yBa_PAl.cjs.map +1 -0
- package/dist/{resolve-D9XJMdCX.js → resolve-FA_uxRo8.js} +3 -3
- package/dist/resolve-FA_uxRo8.js.map +1 -0
- package/dist/{resolve-token-DitlJMRA.js → resolve-token-74r8iwMZ.js} +5 -5
- package/dist/{resolve-token-DitlJMRA.js.map → resolve-token-74r8iwMZ.js.map} +1 -1
- package/dist/{resolve-token-BfHulcsU.cjs → resolve-token-Is-MZ02B.cjs} +3 -3
- package/dist/{resolve-token-BfHulcsU.cjs.map → resolve-token-Is-MZ02B.cjs.map} +1 -1
- package/dist/{stdio-Eif0LiAU.js → stdio-D9nJL1b3.js} +17 -8
- package/dist/stdio-D9nJL1b3.js.map +1 -0
- package/dist/{stdio-CHTzpWeM.cjs → stdio-zkywG2E1.cjs} +17 -8
- package/dist/stdio-zkywG2E1.cjs.map +1 -0
- package/dist/{token-YhriRz-K.js → token-BZUr25tZ.js} +4 -3
- package/dist/{token-YhriRz-K.js.map → token-BZUr25tZ.js.map} +1 -1
- package/dist/{token-cache-DHBN2ixb.js → token-cache-BxoAFS6B.js} +1 -1
- package/dist/{token-cache-DHBN2ixb.js.map → token-cache-BxoAFS6B.js.map} +1 -1
- package/dist/token-error-CBmJNKLY.js +43 -0
- package/dist/{token-error-Df8A7mgb.js.map → token-error-CBmJNKLY.js.map} +1 -1
- package/dist/{token-util-Dnkz6ExF.js → token-util-CyoHfXBG.js} +3 -2
- package/dist/{token-util-Dnkz6ExF.js.map → token-util-CyoHfXBG.js.map} +1 -1
- package/dist/token-util-DER1G2YU.js +4 -0
- package/dist/transports/stdio.cjs +2 -2
- package/dist/transports/stdio.d.cts +9 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +9 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +2 -2
- package/dist/{types-BdLzKRyK.d.ts → types-B6xU9-uZ.d.ts} +1 -1
- package/dist/{types-BdLzKRyK.d.ts.map → types-B6xU9-uZ.d.ts.map} +1 -1
- package/dist/{types-nsyASfJr.js → types-CRcGDSCR.js} +1 -1
- package/dist/{types-nsyASfJr.js.map → types-CRcGDSCR.js.map} +1 -1
- package/dist/{types-C0xriI9T.d.ts → types-CX5R989g.d.ts} +1 -1
- package/dist/{types-C0xriI9T.d.ts.map → types-CX5R989g.d.ts.map} +1 -1
- package/dist/{usage-CyXue87B.js → usage-BvMOKdze.js} +1 -1
- package/dist/{usage-CyXue87B.js.map → usage-BvMOKdze.js.map} +1 -1
- package/dist/{version-BsYB56vP.cjs → version-0F5BJUB4.cjs} +3 -3
- package/dist/version-0F5BJUB4.cjs.map +1 -0
- package/dist/version-BT_3sqKh.js +7 -0
- package/dist/version-BT_3sqKh.js.map +1 -0
- package/package.json +6 -6
- package/dist/blob-utils-B9a20TSV.js +0 -3
- package/dist/blob-utils-CGHZbDNh-CN3juEJQ.cjs +0 -66
- package/dist/blob-utils-CGHZbDNh-CN3juEJQ.cjs.map +0 -1
- package/dist/blob-utils-CGHZbDNh-Dhzb2_wT.js +0 -54
- package/dist/blob-utils-CGHZbDNh-Dhzb2_wT.js.map +0 -1
- package/dist/blob-utils-dQmZRlIb.cjs +0 -3
- package/dist/config-IA5hZFjI.cjs +0 -7
- package/dist/config-YHBj037H-DI-vM9pT.cjs.map +0 -1
- package/dist/config-YHBj037H-DRbUBG2X.js.map +0 -1
- package/dist/constants-Bgs-7WBj.cjs.map +0 -1
- package/dist/constants-BjQ5jCEg.js.map +0 -1
- package/dist/resolve-D4TZw-d-.cjs.map +0 -1
- package/dist/resolve-D9XJMdCX.js.map +0 -1
- package/dist/stdio-CHTzpWeM.cjs.map +0 -1
- package/dist/stdio-Eif0LiAU.js.map +0 -1
- package/dist/token-error-Df8A7mgb.js +0 -77
- package/dist/token-util-7XgZqk3d.js +0 -4
- package/dist/version-BbMRHfZS.js +0 -7
- package/dist/version-BbMRHfZS.js.map +0 -1
- package/dist/version-BsYB56vP.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-CjQzHya6.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 \"insecure-http\": { type: \"boolean\" 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 insecureHttp: values[\"insecure-http\"] === true,\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 insecureHttp: cli.insecureHttp === true,\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,iBAAiB,EAAE,MAAM,UAAoB;EAC7C,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,UAAU;EAChD,MAAM;EACN;EACA,kBAAkB;EAClB,QAAQ;EACR,QAAQ;CACT,EAAC;CAEF,MAAM,YAAY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AE5C,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,cAAc,IAAI,iBAAiB;EACnC,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,6 +1,6 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-n6iE6tnq.cjs');
|
|
2
2
|
|
|
3
|
-
//#region ../mcp-core/dist/skills-
|
|
3
|
+
//#region ../mcp-core/dist/skills-chhJ9BEU.js
|
|
4
4
|
const SKILLS = {
|
|
5
5
|
inspect: {
|
|
6
6
|
id: "inspect",
|
|
@@ -176,4 +176,4 @@ Object.defineProperty(exports, 'resolveHost', {
|
|
|
176
176
|
return resolveHost;
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
//# sourceMappingURL=resolve-
|
|
179
|
+
//# sourceMappingURL=resolve-8yBa_PAl.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-8yBa_PAl.cjs","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider: \"openai\" | \"azure-openai\" | \"anthropic\" | undefined","DEFAULT_SENTRY_CLIENT_ID"],"sources":["../../mcp-core/dist/skills-chhJ9BEU.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\tpreprod: {\n\t\tid: \"preprod\",\n\t\tname: \"Preprod Snapshots\",\n\t\tdescription: \"Inspect visual regression snapshot tests from CI — view changed images and diff masks\",\n\t\tdefaultEnabled: false,\n\t\torder: 6\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 surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) 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 surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) 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-chhJ9BEU.js.map","import { ALL_SKILLS, parseSkills, type Skill } from \"@sentry/mcp-core/skills\";\nimport {\n isSentryHost,\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 if (input.insecureHttp && input.url) {\n throw new Error(\n \"Error: --insecure-http cannot be used with --url or SENTRY_URL. Use --host for insecure self-hosted instances.\",\n );\n }\n\n const sentryHost = resolveHost(input.url, input.host);\n\n if (input.insecureHttp && isSentryHost(sentryHost)) {\n throw new Error(\n \"Error: --insecure-http is only supported for self-hosted Sentry hosts.\",\n );\n }\n\n const sentryProtocol = input.insecureHttp ? \"http\" : \"https\";\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\" | \"azure-openai\" | \"anthropic\" | undefined =\n undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-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 sentryProtocol,\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;CACD,SAAS;EACR,IAAI;EACJ,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,OAAO;CACP;AACD;AACD,MAAM,eAA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@@
|
|
|
1
|
-
import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-
|
|
1
|
+
import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-DGLkHYpN.js";
|
|
2
2
|
|
|
3
|
-
//#region ../mcp-core/dist/skills-
|
|
3
|
+
//#region ../mcp-core/dist/skills-chhJ9BEU.js
|
|
4
4
|
const SKILLS = {
|
|
5
5
|
inspect: {
|
|
6
6
|
id: "inspect",
|
|
@@ -141,4 +141,4 @@ function finalize(input) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { ALL_SKILLS, SKILLS, finalize, formatInvalidSkills, isEnabledBySkills, resolveHost };
|
|
144
|
-
//# sourceMappingURL=resolve-
|
|
144
|
+
//# sourceMappingURL=resolve-FA_uxRo8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-FA_uxRo8.js","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider: \"openai\" | \"azure-openai\" | \"anthropic\" | undefined"],"sources":["../../mcp-core/dist/skills-chhJ9BEU.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\tpreprod: {\n\t\tid: \"preprod\",\n\t\tname: \"Preprod Snapshots\",\n\t\tdescription: \"Inspect visual regression snapshot tests from CI — view changed images and diff masks\",\n\t\tdefaultEnabled: false,\n\t\torder: 6\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 surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const skill of Object.keys(SKILLS)) counts.set(skill, 0);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) 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 surfacesModule = await import(\"./tools/surfaces.js\");\n\tconst tools = toolsModule.default;\n\tconst isCatalogInfrastructureTool = surfacesModule.isCatalogInfrastructureToolName;\n\tconst isWrapperTool = surfacesModule.isWrapperToolName;\n\tconst scopes = new Set(DEFAULT_SCOPES);\n\tfor (const [toolName, tool] of Object.entries(tools)) {\n\t\tif (isWrapperTool(toolName) || isCatalogInfrastructureTool(toolName)) 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-chhJ9BEU.js.map","import { ALL_SKILLS, parseSkills, type Skill } from \"@sentry/mcp-core/skills\";\nimport {\n isSentryHost,\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 if (input.insecureHttp && input.url) {\n throw new Error(\n \"Error: --insecure-http cannot be used with --url or SENTRY_URL. Use --host for insecure self-hosted instances.\",\n );\n }\n\n const sentryHost = resolveHost(input.url, input.host);\n\n if (input.insecureHttp && isSentryHost(sentryHost)) {\n throw new Error(\n \"Error: --insecure-http is only supported for self-hosted Sentry hosts.\",\n );\n }\n\n const sentryProtocol = input.insecureHttp ? \"http\" : \"https\";\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\" | \"azure-openai\" | \"anthropic\" | undefined =\n undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-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 sentryProtocol,\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;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2BAA2B,MAAM,mBACnC,4BAA4B,MAAM,iBAAiB;CAIvD,IAAIC;AAEJ,KAAI,MAAM,eAAe;EACvB,MAAM,WAAW,MAAM,cAAc,aAAa;AAClD,MACE,aAAa,YACb,aAAa,kBACb,aAAa,YAEb,OAAM,IAAI,OACP,iCAAiC,MAAM,cAAc;AAG1D,kBAAgB;CACjB;AAED,QAAO;EACL,aAAa,MAAM;EACnB,UAAU,MAAM,YAAY;EAC5B;EACA;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,7 +1,7 @@
|
|
|
1
|
-
import { OAUTH_HOST, isSentryHost } from "./constants-
|
|
2
|
-
import { toCachedToken } from "./types-
|
|
3
|
-
import { authenticate } from "./device-code-flow-
|
|
4
|
-
import { readCachedToken, writeCachedToken } from "./token-cache-
|
|
1
|
+
import { OAUTH_HOST, isSentryHost } from "./constants-DGLkHYpN.js";
|
|
2
|
+
import { toCachedToken } from "./types-CRcGDSCR.js";
|
|
3
|
+
import { authenticate } from "./device-code-flow-E2NU5-6y.js";
|
|
4
|
+
import { readCachedToken, writeCachedToken } from "./token-cache-BxoAFS6B.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auth/resolve-token.ts
|
|
7
7
|
function withToken(partial, accessToken) {
|
|
@@ -44,4 +44,4 @@ async function resolveAccessToken(partial) {
|
|
|
44
44
|
|
|
45
45
|
//#endregion
|
|
46
46
|
export { resolveAccessToken };
|
|
47
|
-
//# sourceMappingURL=resolve-token-
|
|
47
|
+
//# sourceMappingURL=resolve-token-74r8iwMZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-token-
|
|
1
|
+
{"version":3,"file":"resolve-token-74r8iwMZ.js","names":["partial: PartiallyResolvedConfig","accessToken: string"],"sources":["../src/auth/resolve-token.ts"],"sourcesContent":["import type { PartiallyResolvedConfig, ResolvedConfig } from \"../cli/types\";\nimport { isSentryIo, OAUTH_HOST } from \"./constants\";\nimport { authenticate } from \"./device-code-flow\";\nimport { readCachedToken, writeCachedToken } from \"./token-cache\";\nimport { toCachedToken } from \"./types\";\n\nfunction withToken(\n partial: PartiallyResolvedConfig,\n accessToken: string,\n): ResolvedConfig {\n return { ...partial, accessToken };\n}\n\n/**\n * Resolves the access token for the session.\n *\n * If an access token is already provided, returns immediately.\n * If the host is sentry.io, attempts to use a cached token or\n * initiates the device code flow (only when stderr is a TTY).\n * For non-sentry.io hosts, throws an error requiring --access-token.\n */\nexport async function resolveAccessToken(\n partial: PartiallyResolvedConfig,\n): Promise<ResolvedConfig> {\n if (partial.accessToken) {\n return withToken(partial, partial.accessToken);\n }\n\n if (!isSentryIo(partial.sentryHost)) {\n throw new Error(\n \"Error: No access token was provided. Device code authentication is only supported for sentry.io.\\n\" +\n \"Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const { clientId, sentryHost } = partial;\n\n // Try cached token first (works in both interactive and non-interactive contexts)\n try {\n const cached = await readCachedToken(sentryHost, clientId);\n if (cached) {\n process.stderr.write(\n `Using cached authentication for ${cached.user_email}\\n`,\n );\n return withToken(partial, cached.access_token);\n }\n } catch {\n // Cache read failure is non-fatal\n }\n\n // Device code flow requires a human to visit a URL and authorize.\n // In non-interactive contexts (CI, piped stdio), fail immediately\n // instead of hanging on the polling loop until expiry.\n if (!process.stderr.isTTY) {\n throw new Error(\n \"Error: No access token was provided.\\n\" +\n \"Run `sentry-mcp auth login` interactively first, or pass `--access-token` / `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const tokenResponse = await authenticate({ clientId, host: OAUTH_HOST });\n\n try {\n await writeCachedToken(toCachedToken(tokenResponse, sentryHost, clientId));\n } catch {\n process.stderr.write(\"Warning: Could not cache authentication token.\\n\");\n }\n\n return withToken(partial, tokenResponse.access_token);\n}\n"],"mappings":";;;;;;AAMA,SAAS,UACPA,SACAC,aACgB;AAChB,QAAO;EAAE,GAAG;EAAS;CAAa;AACnC;;;;;;;;;AAUD,eAAsB,mBACpBD,SACyB;AACzB,KAAI,QAAQ,YACV,QAAO,UAAU,SAAS,QAAQ,YAAY;AAGhD,MAAK,aAAW,QAAQ,WAAW,CACjC,OAAM,IAAI,MACR;CAKJ,MAAM,EAAE,UAAU,YAAY,GAAG;AAGjC,KAAI;EACF,MAAM,SAAS,MAAM,gBAAgB,YAAY,SAAS;AAC1D,MAAI,QAAQ;AACV,WAAQ,OAAO,OACZ,kCAAkC,OAAO,WAAW,IACtD;AACD,UAAO,UAAU,SAAS,OAAO,aAAa;EAC/C;CACF,QAAO,CAEP;AAKD,MAAK,QAAQ,OAAO,MAClB,OAAM,IAAI,MACR;CAKJ,MAAM,gBAAgB,MAAM,aAAa;EAAE;EAAU,MAAM;CAAY,EAAC;AAExE,KAAI;AACF,QAAM,iBAAiB,cAAc,eAAe,YAAY,SAAS,CAAC;CAC3E,QAAO;AACN,UAAQ,OAAO,MAAM,mDAAmD;CACzE;AAED,QAAO,UAAU,SAAS,cAAc,aAAa;AACtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_constants = require('./constants-
|
|
1
|
+
const require_constants = require('./constants-n6iE6tnq.cjs');
|
|
2
2
|
const require_types = require('./types-CxTPg1vE.cjs');
|
|
3
|
-
const require_device_code_flow = require('./device-code-flow-
|
|
3
|
+
const require_device_code_flow = require('./device-code-flow-DpBK3Ta8.cjs');
|
|
4
4
|
const require_token_cache = require('./token-cache-914WGYb3.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/auth/resolve-token.ts
|
|
@@ -49,4 +49,4 @@ Object.defineProperty(exports, 'resolveAccessToken', {
|
|
|
49
49
|
return resolveAccessToken;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
//# sourceMappingURL=resolve-token-
|
|
52
|
+
//# sourceMappingURL=resolve-token-Is-MZ02B.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-token-
|
|
1
|
+
{"version":3,"file":"resolve-token-Is-MZ02B.cjs","names":["partial: PartiallyResolvedConfig","accessToken: string","OAUTH_HOST"],"sources":["../src/auth/resolve-token.ts"],"sourcesContent":["import type { PartiallyResolvedConfig, ResolvedConfig } from \"../cli/types\";\nimport { isSentryIo, OAUTH_HOST } from \"./constants\";\nimport { authenticate } from \"./device-code-flow\";\nimport { readCachedToken, writeCachedToken } from \"./token-cache\";\nimport { toCachedToken } from \"./types\";\n\nfunction withToken(\n partial: PartiallyResolvedConfig,\n accessToken: string,\n): ResolvedConfig {\n return { ...partial, accessToken };\n}\n\n/**\n * Resolves the access token for the session.\n *\n * If an access token is already provided, returns immediately.\n * If the host is sentry.io, attempts to use a cached token or\n * initiates the device code flow (only when stderr is a TTY).\n * For non-sentry.io hosts, throws an error requiring --access-token.\n */\nexport async function resolveAccessToken(\n partial: PartiallyResolvedConfig,\n): Promise<ResolvedConfig> {\n if (partial.accessToken) {\n return withToken(partial, partial.accessToken);\n }\n\n if (!isSentryIo(partial.sentryHost)) {\n throw new Error(\n \"Error: No access token was provided. Device code authentication is only supported for sentry.io.\\n\" +\n \"Pass one with `--access-token` or via `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const { clientId, sentryHost } = partial;\n\n // Try cached token first (works in both interactive and non-interactive contexts)\n try {\n const cached = await readCachedToken(sentryHost, clientId);\n if (cached) {\n process.stderr.write(\n `Using cached authentication for ${cached.user_email}\\n`,\n );\n return withToken(partial, cached.access_token);\n }\n } catch {\n // Cache read failure is non-fatal\n }\n\n // Device code flow requires a human to visit a URL and authorize.\n // In non-interactive contexts (CI, piped stdio), fail immediately\n // instead of hanging on the polling loop until expiry.\n if (!process.stderr.isTTY) {\n throw new Error(\n \"Error: No access token was provided.\\n\" +\n \"Run `sentry-mcp auth login` interactively first, or pass `--access-token` / `SENTRY_ACCESS_TOKEN`.\",\n );\n }\n\n const tokenResponse = await authenticate({ clientId, host: OAUTH_HOST });\n\n try {\n await writeCachedToken(toCachedToken(tokenResponse, sentryHost, clientId));\n } catch {\n process.stderr.write(\"Warning: Could not cache authentication token.\\n\");\n }\n\n return withToken(partial, tokenResponse.access_token);\n}\n"],"mappings":";;;;;;AAMA,SAAS,UACPA,SACAC,aACgB;AAChB,QAAO;EAAE,GAAG;EAAS;CAAa;AACnC;;;;;;;;;AAUD,eAAsB,mBACpBD,SACyB;AACzB,KAAI,QAAQ,YACV,QAAO,UAAU,SAAS,QAAQ,YAAY;AAGhD,MAAK,+BAAW,QAAQ,WAAW,CACjC,OAAM,IAAI,MACR;CAKJ,MAAM,EAAE,UAAU,YAAY,GAAG;AAGjC,KAAI;EACF,MAAM,SAAS,MAAM,oCAAgB,YAAY,SAAS;AAC1D,MAAI,QAAQ;AACV,WAAQ,OAAO,OACZ,kCAAkC,OAAO,WAAW,IACtD;AACD,UAAO,UAAU,SAAS,OAAO,aAAa;EAC/C;CACF,QAAO,CAEP;AAKD,MAAK,QAAQ,OAAO,MAClB,OAAM,IAAI,MACR;CAKJ,MAAM,gBAAgB,MAAM,sCAAa;EAAE;EAAU,MAAME;CAAY,EAAC;AAExE,KAAI;AACF,QAAM,qCAAiB,4BAAc,eAAe,YAAY,SAAS,CAAC;CAC3E,QAAO;AACN,UAAQ,OAAO,MAAM,mDAAmD;CACzE;AAED,QAAO,UAAU,SAAS,cAAc,aAAa;AACtD"}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { LIB_VERSION } from "./version-
|
|
1
|
+
import { LIB_VERSION } from "./version-BT_3sqKh.js";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import * as Sentry from "@sentry/node";
|
|
4
4
|
|
|
5
5
|
//#region src/transports/stdio.ts
|
|
6
|
+
function getStdioSpanAttributes(context) {
|
|
7
|
+
const attributes = {
|
|
8
|
+
"app.transport": "stdio",
|
|
9
|
+
"app.server.version": LIB_VERSION,
|
|
10
|
+
"app.server.mode.agent": context.agentMode ?? false,
|
|
11
|
+
"app.server.mode.experimental": context.experimentalMode ?? false,
|
|
12
|
+
"network.transport": "pipe",
|
|
13
|
+
"service.version": LIB_VERSION
|
|
14
|
+
};
|
|
15
|
+
if (context.sentryHost) attributes["app.upstream.host"] = context.sentryHost;
|
|
16
|
+
if (context.mcpUrl) attributes["app.url.full"] = context.mcpUrl;
|
|
17
|
+
return attributes;
|
|
18
|
+
}
|
|
6
19
|
/**
|
|
7
20
|
* Starts the MCP server with stdio transport and telemetry.
|
|
8
21
|
*
|
|
@@ -11,7 +24,7 @@ import * as Sentry from "@sentry/node";
|
|
|
11
24
|
* All operations are wrapped in Sentry tracing for observability.
|
|
12
25
|
*
|
|
13
26
|
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
14
|
-
* @param context -
|
|
27
|
+
* @param context - Context values used for telemetry attributes
|
|
15
28
|
*
|
|
16
29
|
* @example CLI Integration
|
|
17
30
|
* ```typescript
|
|
@@ -34,11 +47,7 @@ async function startStdio(server, context) {
|
|
|
34
47
|
await Sentry.startNewTrace(async () => {
|
|
35
48
|
return await Sentry.startSpan({
|
|
36
49
|
name: "mcp.server/stdio",
|
|
37
|
-
attributes:
|
|
38
|
-
"app.transport": "stdio",
|
|
39
|
-
"network.transport": "pipe",
|
|
40
|
-
"service.version": LIB_VERSION
|
|
41
|
-
}
|
|
50
|
+
attributes: getStdioSpanAttributes(context)
|
|
42
51
|
}, async () => {
|
|
43
52
|
const transport = new StdioServerTransport();
|
|
44
53
|
await server.connect(transport);
|
|
@@ -48,4 +57,4 @@ async function startStdio(server, context) {
|
|
|
48
57
|
|
|
49
58
|
//#endregion
|
|
50
59
|
export { startStdio };
|
|
51
|
-
//# sourceMappingURL=stdio-
|
|
60
|
+
//# sourceMappingURL=stdio-D9nJL1b3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-D9nJL1b3.js","names":["context: StdioServerContext","attributes: Record<string, string | boolean>","server: McpServer","context: Context"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport * as Sentry from \"@sentry/node\";\n\nexport type StdioServerContext = {\n sentryHost?: string;\n mcpUrl?: string;\n agentMode?: boolean;\n experimentalMode?: boolean;\n};\n\nfunction getStdioSpanAttributes(\n context: StdioServerContext,\n): Record<string, string | boolean> {\n const attributes: Record<string, string | boolean> = {\n \"app.transport\": \"stdio\",\n \"app.server.version\": LIB_VERSION,\n \"app.server.mode.agent\": context.agentMode ?? false,\n \"app.server.mode.experimental\": context.experimentalMode ?? false,\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n };\n\n if (context.sentryHost) {\n attributes[\"app.upstream.host\"] = context.sentryHost;\n }\n if (context.mcpUrl) {\n attributes[\"app.url.full\"] = context.mcpUrl;\n }\n\n return attributes;\n}\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Context values used for telemetry attributes\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio<Context extends StdioServerContext>(\n server: McpServer,\n context: Context,\n) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: getStdioSpanAttributes(context),\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;AAgCA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsB;EACtB,yBAAyB,QAAQ,aAAa;EAC9C,gCAAgC,QAAQ,oBAAoB;EAC5D,qBAAqB;EACrB,mBAAmB;CACpB;AAED,KAAI,QAAQ,WACV,YAAW,uBAAuB,QAAQ;AAE5C,KAAI,QAAQ,OACV,YAAW,kBAAkB,QAAQ;AAGvC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BD,eAAsB,WACpBC,QACAC,SACA;AACA,OAAM,OAAO,cAAc,YAAY;AACrC,SAAO,MAAM,OAAO,UAClB;GACE,MAAM;GACN,YAAY,uBAAuB,QAAQ;EAC5C,GACD,YAAY;GAEV,MAAM,YAAY,IAAI;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-Cv9WC9bY.cjs');
|
|
2
|
-
const require_version = require('./version-
|
|
2
|
+
const require_version = require('./version-0F5BJUB4.cjs');
|
|
3
3
|
const __modelcontextprotocol_sdk_server_stdio_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/stdio.js"));
|
|
4
4
|
const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
5
5
|
|
|
6
6
|
//#region src/transports/stdio.ts
|
|
7
|
+
function getStdioSpanAttributes(context) {
|
|
8
|
+
const attributes = {
|
|
9
|
+
"app.transport": "stdio",
|
|
10
|
+
"app.server.version": require_version.LIB_VERSION,
|
|
11
|
+
"app.server.mode.agent": context.agentMode ?? false,
|
|
12
|
+
"app.server.mode.experimental": context.experimentalMode ?? false,
|
|
13
|
+
"network.transport": "pipe",
|
|
14
|
+
"service.version": require_version.LIB_VERSION
|
|
15
|
+
};
|
|
16
|
+
if (context.sentryHost) attributes["app.upstream.host"] = context.sentryHost;
|
|
17
|
+
if (context.mcpUrl) attributes["app.url.full"] = context.mcpUrl;
|
|
18
|
+
return attributes;
|
|
19
|
+
}
|
|
7
20
|
/**
|
|
8
21
|
* Starts the MCP server with stdio transport and telemetry.
|
|
9
22
|
*
|
|
@@ -12,7 +25,7 @@ const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
|
|
|
12
25
|
* All operations are wrapped in Sentry tracing for observability.
|
|
13
26
|
*
|
|
14
27
|
* @param server - Configured and instrumented MCP server instance (with context in closures)
|
|
15
|
-
* @param context -
|
|
28
|
+
* @param context - Context values used for telemetry attributes
|
|
16
29
|
*
|
|
17
30
|
* @example CLI Integration
|
|
18
31
|
* ```typescript
|
|
@@ -35,11 +48,7 @@ async function startStdio(server, context) {
|
|
|
35
48
|
await __sentry_node.startNewTrace(async () => {
|
|
36
49
|
return await __sentry_node.startSpan({
|
|
37
50
|
name: "mcp.server/stdio",
|
|
38
|
-
attributes:
|
|
39
|
-
"app.transport": "stdio",
|
|
40
|
-
"network.transport": "pipe",
|
|
41
|
-
"service.version": require_version.LIB_VERSION
|
|
42
|
-
}
|
|
51
|
+
attributes: getStdioSpanAttributes(context)
|
|
43
52
|
}, async () => {
|
|
44
53
|
const transport = new __modelcontextprotocol_sdk_server_stdio_js.StdioServerTransport();
|
|
45
54
|
await server.connect(transport);
|
|
@@ -54,4 +63,4 @@ Object.defineProperty(exports, 'startStdio', {
|
|
|
54
63
|
return startStdio;
|
|
55
64
|
}
|
|
56
65
|
});
|
|
57
|
-
//# sourceMappingURL=stdio-
|
|
66
|
+
//# sourceMappingURL=stdio-zkywG2E1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio-zkywG2E1.cjs","names":["context: StdioServerContext","attributes: Record<string, string | boolean>","LIB_VERSION","server: McpServer","context: Context","StdioServerTransport"],"sources":["../src/transports/stdio.ts"],"sourcesContent":["import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\n/**\n * Standard I/O Transport for MCP Server.\n *\n * Provides stdio-based communication for the Sentry MCP server, typically used\n * when the server runs as a subprocess communicating via stdin/stdout pipes.\n *\n * @example Basic Usage\n * ```typescript\n * import { Server } from \"@modelcontextprotocol/sdk/server/index.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const server = new Server();\n * const context = {\n * accessToken: process.env.SENTRY_TOKEN,\n * host: \"sentry.io\"\n * };\n *\n * await startStdio(server, context);\n * ```\n */\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { LIB_VERSION } from \"@sentry/mcp-core/version\";\nimport * as Sentry from \"@sentry/node\";\n\nexport type StdioServerContext = {\n sentryHost?: string;\n mcpUrl?: string;\n agentMode?: boolean;\n experimentalMode?: boolean;\n};\n\nfunction getStdioSpanAttributes(\n context: StdioServerContext,\n): Record<string, string | boolean> {\n const attributes: Record<string, string | boolean> = {\n \"app.transport\": \"stdio\",\n \"app.server.version\": LIB_VERSION,\n \"app.server.mode.agent\": context.agentMode ?? false,\n \"app.server.mode.experimental\": context.experimentalMode ?? false,\n \"network.transport\": \"pipe\",\n \"service.version\": LIB_VERSION,\n };\n\n if (context.sentryHost) {\n attributes[\"app.upstream.host\"] = context.sentryHost;\n }\n if (context.mcpUrl) {\n attributes[\"app.url.full\"] = context.mcpUrl;\n }\n\n return attributes;\n}\n\n/**\n * Starts the MCP server with stdio transport and telemetry.\n *\n * Connects the server using stdio transport for process-based communication.\n * Context is already captured in tool handler closures during buildServer().\n * All operations are wrapped in Sentry tracing for observability.\n *\n * @param server - Configured and instrumented MCP server instance (with context in closures)\n * @param context - Context values used for telemetry attributes\n *\n * @example CLI Integration\n * ```typescript\n * import { buildServer } from \"./server.js\";\n * import { startStdio } from \"./transports/stdio.js\";\n *\n * const context = {\n * accessToken: userToken,\n * sentryHost: \"sentry.io\",\n * userId: \"user-123\",\n * clientId: \"cursor-ide\",\n * constraints: {}\n * };\n *\n * const server = buildServer({ context }); // Context captured in closures\n * await startStdio(server, context);\n * ```\n */\nexport async function startStdio<Context extends StdioServerContext>(\n server: McpServer,\n context: Context,\n) {\n await Sentry.startNewTrace(async () => {\n return await Sentry.startSpan(\n {\n name: \"mcp.server/stdio\",\n attributes: getStdioSpanAttributes(context),\n },\n async () => {\n // Context already captured in tool handler closures during buildServer()\n const transport = new StdioServerTransport();\n await server.connect(transport);\n },\n );\n });\n}\n"],"mappings":";;;;;;AAgCA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsBC;EACtB,yBAAyB,QAAQ,aAAa;EAC9C,gCAAgC,QAAQ,oBAAoB;EAC5D,qBAAqB;EACrB,mBAAmBA;CACpB;AAED,KAAI,QAAQ,WACV,YAAW,uBAAuB,QAAQ;AAE5C,KAAI,QAAQ,OACV,YAAW,kBAAkB,QAAQ;AAGvC,QAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BD,eAAsB,WACpBC,QACAC,SACA;AACA,OAAM,cAAO,cAAc,YAAY;AACrC,SAAO,MAAM,cAAO,UAClB;GACE,MAAM;GACN,YAAY,uBAAuB,QAAQ;EAC5C,GACD,YAAY;GAEV,MAAM,YAAY,IAAIC;AACtB,SAAM,OAAO,QAAQ,UAAU;EAChC,EACF;CACF,EAAC;AACH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { __commonJS
|
|
2
|
-
import {
|
|
1
|
+
import { __commonJS } from "./chunk-CunrlGP7.js";
|
|
2
|
+
import { require_token_error } from "./token-error-CBmJNKLY.js";
|
|
3
|
+
import { require_token_util } from "./token-util-CyoHfXBG.js";
|
|
3
4
|
|
|
4
5
|
//#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
|
|
5
6
|
var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
@@ -47,4 +48,4 @@ var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/no
|
|
|
47
48
|
//#endregion
|
|
48
49
|
export default require_token();
|
|
49
50
|
|
|
50
|
-
//# sourceMappingURL=token-
|
|
51
|
+
//# sourceMappingURL=token-BZUr25tZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-
|
|
1
|
+
{"version":3,"file":"token-BZUr25tZ.js","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = await (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Log in to Vercel CLI and link your project with `vc link`\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: Try re-linking your project with `vc link`\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,MAAK,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;GAAY,EAAC;EAAC;AAEzH,SAAO;CACR;CACD,IAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAE,GAAE,cAAc,EAAE,OAAO,KAAM,EAAC,EAAE,IAAI;CAC1F,IAAI,gBAAgB,CAAE;AACtB,UAAS,eAAe,EACtB,cAAc,MAAM,aACrB,EAAC;AACF,QAAO,UAAU,aAAa,cAAc;CAC5C,IAAI;CACJ,IAAI;CACJ,eAAe,eAAe;EAC5B,MAAM,EAAE,WAAW,QAAQ,GAAG,CAAC,GAAG,kBAAkB,kBAAkB;EACtE,IAAI,aAAa,CAAC,GAAG,kBAAkB,WAAW,UAAU;AAC5D,OAAK,cAAc,CAAC,GAAG,kBAAkB,WAAW,CAAC,GAAG,kBAAkB,iBAAiB,WAAW,MAAM,CAAC,EAAE;GAC7G,MAAM,YAAY,MAAM,CAAC,GAAG,kBAAkB,oBAAoB;AAClE,QAAK,UACH,OAAM,IAAI,mBAAmB,qBAC3B;AAGJ,QAAK,UACH,OAAM,IAAI,mBAAmB,qBAC3B;AAGJ,gBAAa,MAAM,CAAC,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,OAAO;AAC1F,QAAK,WACH,OAAM,IAAI,mBAAmB,qBAAqB;AAEpD,IAAC,GAAG,kBAAkB,WAAW,YAAY,UAAU;EACxD;AACD,UAAQ,IAAI,oBAAoB,WAAW;AAC3C;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-cache-
|
|
1
|
+
{"version":3,"file":"token-cache-BxoAFS6B.js","names":["host: string","clientId: string","data: CacheFile","token: CachedToken"],"sources":["../src/auth/token-cache.ts"],"sourcesContent":["/**\n * Persistent token cache for device code auth.\n * Tokens are stored at ~/.sentry/mcp.json, keyed by {host}:{clientId}.\n * See docs/stdio-auth.md for cache format and security details.\n */\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport type { CachedToken } from \"./types\";\n\n/** Safety window: treat tokens as expired 5 minutes before actual expiry. */\nconst EXPIRY_SAFETY_MS = 5 * 60 * 1000;\n\nfunction getCacheFilePath(): string {\n if (process.env.SENTRY_MCP_AUTH_CACHE) {\n return process.env.SENTRY_MCP_AUTH_CACHE;\n }\n return path.join(os.homedir(), \".sentry\", \"mcp.json\");\n}\n\nfunction cacheKey(host: string, clientId: string): string {\n return `${host}:${clientId}`;\n}\n\ntype CacheFile = Record<string, CachedToken>;\n\nasync function readCacheFile(): Promise<CacheFile> {\n try {\n const raw = await fs.readFile(getCacheFilePath(), \"utf-8\");\n return JSON.parse(raw) as CacheFile;\n } catch {\n return {};\n }\n}\n\nasync function writeCacheFile(data: CacheFile): Promise<void> {\n const filePath = getCacheFilePath();\n const dir = path.dirname(filePath);\n\n await fs.mkdir(dir, { recursive: true, mode: 0o700 });\n\n // Atomic write: write to temp file then rename\n const tmpPath = `${filePath}.tmp.${process.pid}`;\n await fs.writeFile(tmpPath, JSON.stringify(data, null, 2), {\n encoding: \"utf-8\",\n mode: 0o600,\n });\n await fs.rename(tmpPath, filePath);\n}\n\nexport async function readCachedToken(\n host: string,\n clientId: string,\n): Promise<CachedToken | null> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n const entry = data[key];\n if (!entry) return null;\n\n const expiresAt = new Date(entry.expires_at).getTime();\n if (\n !Number.isFinite(expiresAt) ||\n expiresAt - Date.now() <= EXPIRY_SAFETY_MS\n ) {\n delete data[key];\n await writeCacheFile(data);\n return null;\n }\n\n return entry;\n}\n\nexport async function writeCachedToken(token: CachedToken): Promise<void> {\n const data = await readCacheFile();\n data[cacheKey(token.sentry_host, token.client_id)] = token;\n await writeCacheFile(data);\n}\n\nexport async function clearCachedToken(\n host: string,\n clientId: string,\n): Promise<void> {\n const data = await readCacheFile();\n const key = cacheKey(host, clientId);\n if (key in data) {\n delete data[key];\n await writeCacheFile(data);\n }\n}\n"],"mappings":";;;;;;AAWA,MAAM,mBAAmB,IAAI,KAAK;AAElC,SAAS,mBAA2B;AAClC,KAAI,QAAQ,IAAI,sBACd,QAAO,QAAQ,IAAI;AAErB,QAAO,KA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eAAe,KAAK;CAC3B;AACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __commonJS } from "./chunk-CunrlGP7.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-error.js
|
|
4
|
+
var require_token_error = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-error.js"(exports, module) {
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var token_error_exports = {};
|
|
26
|
+
__export(token_error_exports, { VercelOidcTokenError: () => VercelOidcTokenError });
|
|
27
|
+
module.exports = __toCommonJS(token_error_exports);
|
|
28
|
+
var VercelOidcTokenError = class extends Error {
|
|
29
|
+
constructor(message, cause) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = "VercelOidcTokenError";
|
|
32
|
+
this.cause = cause;
|
|
33
|
+
}
|
|
34
|
+
toString() {
|
|
35
|
+
if (this.cause) return `${this.name}: ${this.message}: ${this.cause}`;
|
|
36
|
+
return `${this.name}: ${this.message}`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
} });
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { require_token_error };
|
|
43
|
+
//# sourceMappingURL=token-error-CBmJNKLY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-error-
|
|
1
|
+
{"version":3,"file":"token-error-CBmJNKLY.js","names":[],"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-error.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;CACA,IAAI,YAAY,OAAO;CACvB,IAAI,mBAAmB,OAAO;CAC9B,IAAI,oBAAoB,OAAO;CAC/B,IAAI,eAAe,OAAO,UAAU;CACpC,IAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,OAAK,IAAI,QAAQ,IACf,WAAU,QAAQ,MAAM;GAAE,KAAK,IAAI;GAAO,YAAY;EAAM,EAAC;CAChE;CACD,IAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,MAAI,eAAe,SAAS,mBAAmB,SAAS,YACtD;QAAK,IAAI,OAAO,kBAAkB,KAAK,CACrC,MAAK,aAAa,KAAK,IAAI,IAAI,IAAI,QAAQ,OACzC,WAAU,IAAI,KAAK;IAAE,KAAK,MAAM,KAAK;IAAM,cAAc,OAAO,iBAAiB,MAAM,IAAI,KAAK,KAAK;GAAY,EAAC;EAAC;AAEzH,SAAO;CACR;CACD,IAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAE,GAAE,cAAc,EAAE,OAAO,KAAM,EAAC,EAAE,IAAI;CAC1F,IAAI,sBAAsB,CAAE;AAC5B,UAAS,qBAAqB,EAC5B,sBAAsB,MAAM,qBAC7B,EAAC;AACF,QAAO,UAAU,aAAa,oBAAoB;CAClD,IAAM,uBAAN,cAAmC,MAAM;EACvC,YAAY,SAAS,OAAO;AAC1B,SAAM,QAAQ;AACd,QAAK,OAAO;AACZ,QAAK,QAAQ;EACd;EACD,WAAW;AACT,OAAI,KAAK,MACP,WAAU,KAAK,KAAK,IAAI,KAAK,QAAQ,IAAI,KAAK;AAEhD,aAAU,KAAK,KAAK,IAAI,KAAK;EAC9B;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { __commonJS, __require
|
|
1
|
+
import { __commonJS, __require } from "./chunk-CunrlGP7.js";
|
|
2
|
+
import { require_token_error } from "./token-error-CBmJNKLY.js";
|
|
2
3
|
|
|
3
4
|
//#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js
|
|
4
5
|
var require_token_io = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token-io.js"(exports, module) {
|
|
@@ -354,4 +355,4 @@ var require_token_util = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1
|
|
|
354
355
|
|
|
355
356
|
//#endregion
|
|
356
357
|
export { require_token_util };
|
|
357
|
-
//# sourceMappingURL=token-util-
|
|
358
|
+
//# sourceMappingURL=token-util-CyoHfXBG.js.map
|