@sentry/mcp-server 0.36.0 → 0.38.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.
Files changed (156) hide show
  1. package/dist/auth/constants.cjs +1 -1
  2. package/dist/auth/constants.d.cts +1 -1
  3. package/dist/auth/constants.d.ts +1 -1
  4. package/dist/auth/constants.js +1 -1
  5. package/dist/auth/device-code-flow.cjs +4 -4
  6. package/dist/auth/device-code-flow.d.cts +1 -1
  7. package/dist/auth/device-code-flow.d.ts +1 -1
  8. package/dist/auth/device-code-flow.js +4 -4
  9. package/dist/auth/resolve-token.cjs +6 -6
  10. package/dist/auth/resolve-token.d.cts +1 -1
  11. package/dist/auth/resolve-token.d.ts +1 -1
  12. package/dist/auth/resolve-token.js +6 -6
  13. package/dist/auth/token-cache.cjs +1 -1
  14. package/dist/auth/token-cache.d.cts +1 -1
  15. package/dist/auth/token-cache.d.ts +1 -1
  16. package/dist/auth/token-cache.js +1 -1
  17. package/dist/auth/types.cjs +1 -1
  18. package/dist/auth/types.d.cts +1 -1
  19. package/dist/auth/types.d.ts +1 -1
  20. package/dist/auth/types.js +1 -1
  21. package/dist/{auth-D8TSQ4oy.cjs → auth-BlhX8Vom.cjs} +7 -7
  22. package/dist/{auth-D8TSQ4oy.cjs.map → auth-BlhX8Vom.cjs.map} +1 -1
  23. package/dist/{auth-CRgAEwzo.js → auth-CmWwtW3L.js} +7 -7
  24. package/dist/{auth-CRgAEwzo.js.map → auth-CmWwtW3L.js.map} +1 -1
  25. package/dist/blob-utils-ByQZ_jqM.cjs +3 -0
  26. package/dist/{blob-utils-Cle0aVpg-6ww8NFf5.js → blob-utils-CdbE_jsd-9sHzy4nK.js} +2 -2
  27. package/dist/{blob-utils-Cle0aVpg-6ww8NFf5.js.map → blob-utils-CdbE_jsd-9sHzy4nK.js.map} +1 -1
  28. package/dist/{blob-utils-Cle0aVpg-hsHMwzjW.cjs → blob-utils-CdbE_jsd-zazUDulT.cjs} +2 -2
  29. package/dist/{blob-utils-Cle0aVpg-hsHMwzjW.cjs.map → blob-utils-CdbE_jsd-zazUDulT.cjs.map} +1 -1
  30. package/dist/blob-utils-KYOyFu79.js +3 -0
  31. package/dist/cli/commands/auth.cjs +8 -8
  32. package/dist/cli/commands/auth.js +8 -8
  33. package/dist/cli/output.cjs +3 -0
  34. package/dist/cli/output.d.cts +7 -0
  35. package/dist/cli/output.d.cts.map +1 -0
  36. package/dist/cli/output.d.ts +7 -0
  37. package/dist/cli/output.d.ts.map +1 -0
  38. package/dist/cli/output.js +3 -0
  39. package/dist/cli/parse.cjs +1 -1
  40. package/dist/cli/parse.d.cts +1 -1
  41. package/dist/cli/parse.d.ts +1 -1
  42. package/dist/cli/parse.d.ts.map +1 -1
  43. package/dist/cli/parse.js +1 -1
  44. package/dist/cli/resolve.cjs +2 -2
  45. package/dist/cli/resolve.d.cts +1 -1
  46. package/dist/cli/resolve.d.cts.map +1 -1
  47. package/dist/cli/resolve.d.ts +1 -1
  48. package/dist/cli/resolve.d.ts.map +1 -1
  49. package/dist/cli/resolve.js +2 -2
  50. package/dist/cli/types.d.cts +2 -2
  51. package/dist/cli/types.d.ts +2 -2
  52. package/dist/cli/usage.cjs +1 -1
  53. package/dist/cli/usage.js +1 -1
  54. package/dist/{config-CNbv1NHi.js → config-BUwpc74z.js} +1 -1
  55. package/dist/{config-9W1R-AgS-DQqdqWsA.js → config-BqCCImAX-C9xxoOuk.js} +11 -5
  56. package/dist/config-BqCCImAX-C9xxoOuk.js.map +1 -0
  57. package/dist/{config-9W1R-AgS-i6Wokc_9.cjs → config-BqCCImAX-CqsS5Qiu.cjs} +11 -5
  58. package/dist/config-BqCCImAX-CqsS5Qiu.cjs.map +1 -0
  59. package/dist/config-Md3ohhLy.cjs +7 -0
  60. package/dist/{constants-n6iE6tnq.cjs → constants-BF1H5JLS.cjs} +93 -8
  61. package/dist/constants-BF1H5JLS.cjs.map +1 -0
  62. package/dist/{constants-DGLkHYpN.js → constants-BZbaI-zR.js} +70 -9
  63. package/dist/constants-BZbaI-zR.js.map +1 -0
  64. package/dist/{device-code-flow-E2NU5-6y.js → device-code-flow-D8_wFtpA.js} +4 -4
  65. package/dist/{device-code-flow-E2NU5-6y.js.map → device-code-flow-D8_wFtpA.js.map} +1 -1
  66. package/dist/{device-code-flow-DpBK3Ta8.cjs → device-code-flow-R-ZBimNL.cjs} +4 -4
  67. package/dist/{device-code-flow-DpBK3Ta8.cjs.map → device-code-flow-R-ZBimNL.cjs.map} +1 -1
  68. package/dist/index.cjs +42083 -23134
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.js +44885 -25936
  71. package/dist/index.js.map +1 -1
  72. package/dist/output-A_-7o7gV.js +8 -0
  73. package/dist/output-A_-7o7gV.js.map +1 -0
  74. package/dist/output-DEoNyYz7.cjs +14 -0
  75. package/dist/output-DEoNyYz7.cjs.map +1 -0
  76. package/dist/{parse-BTaa9TK5.cjs → parse-CPY7-_2_.cjs} +5 -5
  77. package/dist/parse-CPY7-_2_.cjs.map +1 -0
  78. package/dist/{parse-CjQzHya6.js → parse-Dd3OOgIq.js} +5 -5
  79. package/dist/parse-Dd3OOgIq.js.map +1 -0
  80. package/dist/{resolve-8yBa_PAl.cjs → resolve-BsYckCew.cjs} +14 -17
  81. package/dist/resolve-BsYckCew.cjs.map +1 -0
  82. package/dist/{resolve-FA_uxRo8.js → resolve-CS-Bms6W.js} +14 -17
  83. package/dist/resolve-CS-Bms6W.js.map +1 -0
  84. package/dist/{resolve-token-74r8iwMZ.js → resolve-token-6Nwn0wwt.js} +5 -5
  85. package/dist/{resolve-token-74r8iwMZ.js.map → resolve-token-6Nwn0wwt.js.map} +1 -1
  86. package/dist/{resolve-token-Is-MZ02B.cjs → resolve-token-D8ViFyUf.cjs} +5 -5
  87. package/dist/{resolve-token-Is-MZ02B.cjs.map → resolve-token-D8ViFyUf.cjs.map} +1 -1
  88. package/dist/{stdio-zkywG2E1.cjs → stdio-BAG9vDZV.cjs} +2 -3
  89. package/dist/stdio-BAG9vDZV.cjs.map +1 -0
  90. package/dist/{stdio-D9nJL1b3.js → stdio-DFJbp9zP.js} +2 -3
  91. package/dist/stdio-DFJbp9zP.js.map +1 -0
  92. package/dist/{token-BZUr25tZ.js → token-3xpHVxQo.js} +2 -2
  93. package/dist/{token-BZUr25tZ.js.map → token-3xpHVxQo.js.map} +1 -1
  94. package/dist/{token-URCv7LSS.cjs → token-C7MavkKX.cjs} +2 -2
  95. package/dist/{token-URCv7LSS.cjs.map → token-C7MavkKX.cjs.map} +1 -1
  96. package/dist/{token-cache-914WGYb3.cjs → token-cache-ATUcs1cg.cjs} +1 -1
  97. package/dist/token-cache-ATUcs1cg.cjs.map +1 -0
  98. package/dist/{token-cache-BxoAFS6B.js → token-cache-DbZp4rvg.js} +1 -1
  99. package/dist/token-cache-DbZp4rvg.js.map +1 -0
  100. package/dist/{token-util-DER1G2YU.js → token-util-4bIYDTMS.js} +1 -1
  101. package/dist/{token-util-I45r8kkb.cjs → token-util-BRoQwIG6.cjs} +1 -1
  102. package/dist/{token-util-I45r8kkb.cjs.map → token-util-BRoQwIG6.cjs.map} +1 -1
  103. package/dist/{token-util-B-ZIWywO.cjs → token-util-DurDL44i.cjs} +1 -1
  104. package/dist/{token-util-CyoHfXBG.js → token-util-batRsXGA.js} +1 -1
  105. package/dist/{token-util-CyoHfXBG.js.map → token-util-batRsXGA.js.map} +1 -1
  106. package/dist/transports/stdio.cjs +2 -2
  107. package/dist/transports/stdio.d.cts +0 -1
  108. package/dist/transports/stdio.d.cts.map +1 -1
  109. package/dist/transports/stdio.d.ts +0 -1
  110. package/dist/transports/stdio.d.ts.map +1 -1
  111. package/dist/transports/stdio.js +2 -2
  112. package/dist/{types-CRcGDSCR.js → types-BCSxlxZI.js} +1 -1
  113. package/dist/{types-CRcGDSCR.js.map → types-BCSxlxZI.js.map} +1 -1
  114. package/dist/{types-CX5R989g.d.ts → types-BGyk9F4G.d.ts} +6 -57
  115. package/dist/types-BGyk9F4G.d.ts.map +1 -0
  116. package/dist/{types-BJpeKPWI.d.cts → types-C9HgNyIE.d.cts} +6 -57
  117. package/dist/types-C9HgNyIE.d.cts.map +1 -0
  118. package/dist/{types-B6xU9-uZ.d.ts → types-D-BIcaY4.d.ts} +6 -5
  119. package/dist/types-D-BIcaY4.d.ts.map +1 -0
  120. package/dist/{types-BHd78Leq.d.cts → types-Dyacb-A8.d.cts} +6 -5
  121. package/dist/types-Dyacb-A8.d.cts.map +1 -0
  122. package/dist/{types-CxTPg1vE.cjs → types-dghCRFW4.cjs} +1 -1
  123. package/dist/{types-CxTPg1vE.cjs.map → types-dghCRFW4.cjs.map} +1 -1
  124. package/dist/{usage-BvMOKdze.js → usage-Con424Df.js} +12 -7
  125. package/dist/usage-Con424Df.js.map +1 -0
  126. package/dist/{usage-WAgAGh1G.cjs → usage-Crfzx1qJ.cjs} +12 -7
  127. package/dist/usage-Crfzx1qJ.cjs.map +1 -0
  128. package/dist/{version-0F5BJUB4.cjs → version-CXUk1-K3.cjs} +3 -3
  129. package/dist/version-CXUk1-K3.cjs.map +1 -0
  130. package/dist/version-Duuvuy5h.js +7 -0
  131. package/dist/version-Duuvuy5h.js.map +1 -0
  132. package/package.json +10 -10
  133. package/dist/blob-utils-6d2dcrax.js +0 -3
  134. package/dist/blob-utils-B_m4t9Jw.cjs +0 -3
  135. package/dist/config-9W1R-AgS-DQqdqWsA.js.map +0 -1
  136. package/dist/config-9W1R-AgS-i6Wokc_9.cjs.map +0 -1
  137. package/dist/config-CMn1JPkk.cjs +0 -7
  138. package/dist/constants-DGLkHYpN.js.map +0 -1
  139. package/dist/constants-n6iE6tnq.cjs.map +0 -1
  140. package/dist/parse-BTaa9TK5.cjs.map +0 -1
  141. package/dist/parse-CjQzHya6.js.map +0 -1
  142. package/dist/resolve-8yBa_PAl.cjs.map +0 -1
  143. package/dist/resolve-FA_uxRo8.js.map +0 -1
  144. package/dist/stdio-D9nJL1b3.js.map +0 -1
  145. package/dist/stdio-zkywG2E1.cjs.map +0 -1
  146. package/dist/token-cache-914WGYb3.cjs.map +0 -1
  147. package/dist/token-cache-BxoAFS6B.js.map +0 -1
  148. package/dist/types-B6xU9-uZ.d.ts.map +0 -1
  149. package/dist/types-BHd78Leq.d.cts.map +0 -1
  150. package/dist/types-BJpeKPWI.d.cts.map +0 -1
  151. package/dist/types-CX5R989g.d.ts.map +0 -1
  152. package/dist/usage-BvMOKdze.js.map +0 -1
  153. package/dist/usage-WAgAGh1G.cjs.map +0 -1
  154. package/dist/version-0F5BJUB4.cjs.map +0 -1
  155. package/dist/version-BT_3sqKh.js +0 -7
  156. package/dist/version-BT_3sqKh.js.map +0 -1
@@ -0,0 +1,8 @@
1
+ //#region src/cli/output.ts
2
+ function printCliLine(message) {
3
+ console.log(message);
4
+ }
5
+
6
+ //#endregion
7
+ export { printCliLine };
8
+ //# sourceMappingURL=output-A_-7o7gV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-A_-7o7gV.js","names":["message: string"],"sources":["../src/cli/output.ts"],"sourcesContent":["export function printCliLine(message: string): void {\n console.log(message);\n}\n"],"mappings":";AAAA,SAAgB,aAAaA,SAAuB;AAClD,SAAQ,IAAI,QAAQ;AACrB"}
@@ -0,0 +1,14 @@
1
+
2
+ //#region src/cli/output.ts
3
+ function printCliLine(message) {
4
+ console.log(message);
5
+ }
6
+
7
+ //#endregion
8
+ Object.defineProperty(exports, 'printCliLine', {
9
+ enumerable: true,
10
+ get: function () {
11
+ return printCliLine;
12
+ }
13
+ });
14
+ //# sourceMappingURL=output-DEoNyYz7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-DEoNyYz7.cjs","names":["message: string"],"sources":["../src/cli/output.ts"],"sourcesContent":["export function printCliLine(message: string): void {\n console.log(message);\n}\n"],"mappings":";;AAAA,SAAgB,aAAaA,SAAuB;AAClD,SAAQ,IAAI,QAAQ;AACrB"}
@@ -18,8 +18,8 @@ function parseArgv(argv) {
18
18
  "organization-slug": { type: "string" },
19
19
  "project-slug": { type: "string" },
20
20
  skills: { type: "string" },
21
+ "all-skills": { type: "boolean" },
21
22
  "disable-skills": { type: "string" },
22
- agent: { type: "boolean" },
23
23
  experimental: { type: "boolean" },
24
24
  help: {
25
25
  type: "boolean",
@@ -59,8 +59,8 @@ function parseArgv(argv) {
59
59
  organizationSlug: values["organization-slug"],
60
60
  projectSlug: values["project-slug"],
61
61
  skills: values.skills,
62
+ allSkills: values["all-skills"] === true,
62
63
  disableSkills: values["disable-skills"],
63
- agent: values.agent === true,
64
64
  experimental: values.experimental === true,
65
65
  help: values.help === true,
66
66
  version: values.version === true,
@@ -96,9 +96,9 @@ function merge(cli, env) {
96
96
  anthropicModel: cli.anthropicModel ?? env.anthropicModel,
97
97
  agentProvider: cli.agentProvider ?? env.agentProvider,
98
98
  clientId: env.clientId,
99
- skills: cli.skills ?? env.skills,
99
+ skills: cli.skills ?? (cli.allSkills ? void 0 : env.skills),
100
+ allSkills: cli.allSkills === true,
100
101
  disableSkills: cli.disableSkills ?? env.disableSkills,
101
- agent: cli.agent === true,
102
102
  experimental: cli.experimental === true,
103
103
  organizationSlug: cli.organizationSlug,
104
104
  projectSlug: cli.projectSlug,
@@ -127,4 +127,4 @@ Object.defineProperty(exports, 'parseEnv', {
127
127
  return parseEnv;
128
128
  }
129
129
  });
130
- //# sourceMappingURL=parse-BTaa9TK5.cjs.map
130
+ //# sourceMappingURL=parse-CPY7-_2_.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-CPY7-_2_.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 \"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 \"all-skills\": { type: \"boolean\" as const },\n \"disable-skills\": { type: \"string\" 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 allSkills: values[\"all-skills\"] === true,\n disableSkills: values[\"disable-skills\"] as string | undefined,\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; --all-skills also overrides env skills.\n skills: cli.skills ?? (cli.allSkills ? undefined : env.skills),\n allSkills: cli.allSkills === true,\n disableSkills: cli.disableSkills ?? env.disableSkills,\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,cAAc,EAAE,MAAM,UAAoB;EAC1C,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,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,MAA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c,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,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,WAAW,IAAI,qBAAwB,IAAI;EACvD,WAAW,IAAI,cAAc;EAC7B,eAAe,IAAI,iBAAiB,IAAI;EACxC,cAAc,IAAI,iBAAiB;EACnC,kBAAkB,IAAI;EACtB,aAAa,IAAI;EACjB,MAAM,IAAI,SAAS;EACnB,SAAS,IAAI,YAAY;EACzB,aAAa,IAAI;CAClB;AACF"}
@@ -17,8 +17,8 @@ function parseArgv(argv) {
17
17
  "organization-slug": { type: "string" },
18
18
  "project-slug": { type: "string" },
19
19
  skills: { type: "string" },
20
+ "all-skills": { type: "boolean" },
20
21
  "disable-skills": { type: "string" },
21
- agent: { type: "boolean" },
22
22
  experimental: { type: "boolean" },
23
23
  help: {
24
24
  type: "boolean",
@@ -58,8 +58,8 @@ function parseArgv(argv) {
58
58
  organizationSlug: values["organization-slug"],
59
59
  projectSlug: values["project-slug"],
60
60
  skills: values.skills,
61
+ allSkills: values["all-skills"] === true,
61
62
  disableSkills: values["disable-skills"],
62
- agent: values.agent === true,
63
63
  experimental: values.experimental === true,
64
64
  help: values.help === true,
65
65
  version: values.version === true,
@@ -95,9 +95,9 @@ function merge(cli, env) {
95
95
  anthropicModel: cli.anthropicModel ?? env.anthropicModel,
96
96
  agentProvider: cli.agentProvider ?? env.agentProvider,
97
97
  clientId: env.clientId,
98
- skills: cli.skills ?? env.skills,
98
+ skills: cli.skills ?? (cli.allSkills ? void 0 : env.skills),
99
+ allSkills: cli.allSkills === true,
99
100
  disableSkills: cli.disableSkills ?? env.disableSkills,
100
- agent: cli.agent === true,
101
101
  experimental: cli.experimental === true,
102
102
  organizationSlug: cli.organizationSlug,
103
103
  projectSlug: cli.projectSlug,
@@ -109,4 +109,4 @@ function merge(cli, env) {
109
109
 
110
110
  //#endregion
111
111
  export { merge, parseArgv, parseEnv };
112
- //# sourceMappingURL=parse-CjQzHya6.js.map
112
+ //# sourceMappingURL=parse-Dd3OOgIq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-Dd3OOgIq.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 \"all-skills\": { type: \"boolean\" as const },\n \"disable-skills\": { type: \"string\" 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 allSkills: values[\"all-skills\"] === true,\n disableSkills: values[\"disable-skills\"] as string | undefined,\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; --all-skills also overrides env skills.\n skills: cli.skills ?? (cli.allSkills ? undefined : env.skills),\n allSkills: cli.allSkills === true,\n disableSkills: cli.disableSkills ?? env.disableSkills,\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,cAAc,EAAE,MAAM,UAAoB;EAC1C,kBAAkB,EAAE,MAAM,SAAmB;EAC7C,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,IAAI,IAAI,OAAO,KAAK,QAAQ;CAC9C,MAAM,aAAa,IAAI,IAAI,CACzB,GAAI,OAAO,OAAO,QAAQ,CACvB,IAAI,CAAC,MAAO,WAAW,IAAK,EAAE,eAA0C,CACxE,OAAO,QAAQ,AACnB;CAED,MAAMC,cAAwB,CAAE;AAChC,MAAK,MAAM,KAAM,UAAoB,CAAE,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zC,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,WAAW,IAAI,qBAAwB,IAAI;EACvD,WAAW,IAAI,cAAc;EAC7B,eAAe,IAAI,iBAAiB,IAAI;EACxC,cAAc,IAAI,iBAAiB;EACnC,kBAAkB,IAAI;EACtB,aAAa,IAAI;EACjB,MAAM,IAAI,SAAS;EACnB,SAAS,IAAI,YAAY;EACzB,aAAa,IAAI;CAClB;AACF"}
@@ -1,11 +1,11 @@
1
- const require_constants = require('./constants-n6iE6tnq.cjs');
1
+ const require_constants = require('./constants-BF1H5JLS.cjs');
2
2
 
3
- //#region ../mcp-core/dist/skills-chhJ9BEU.js
3
+ //#region ../mcp-core/dist/skills-Dj4T8Duc.js
4
4
  const SKILLS = {
5
5
  inspect: {
6
6
  id: "inspect",
7
7
  name: "Inspect Issues & Events",
8
- description: "Search for errors, analyze traces, and explore event details",
8
+ description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata",
9
9
  defaultEnabled: true,
10
10
  order: 1
11
11
  },
@@ -19,8 +19,9 @@ const SKILLS = {
19
19
  docs: {
20
20
  id: "docs",
21
21
  name: "Documentation",
22
- description: "Search and read Sentry SDK documentation",
22
+ description: "Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.",
23
23
  defaultEnabled: false,
24
+ deprecated: true,
24
25
  order: 3
25
26
  },
26
27
  triage: {
@@ -33,23 +34,17 @@ const SKILLS = {
33
34
  "project-management": {
34
35
  id: "project-management",
35
36
  name: "Manage Projects & Teams",
36
- description: "Create and modify projects, teams, and DSNs",
37
+ description: "Create and modify projects, teams, DSNs, and uptime monitors",
37
38
  defaultEnabled: false,
38
39
  order: 5
39
- },
40
- preprod: {
41
- id: "preprod",
42
- name: "Preprod Snapshots",
43
- description: "Inspect visual regression snapshot tests from CI — view changed images and diff masks",
44
- defaultEnabled: false,
45
- order: 6
46
40
  }
47
41
  };
48
42
  const SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);
49
43
  const ALL_SKILLS = Object.keys(SKILLS);
44
+ const ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);
50
45
  const DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);
51
46
  function isValidSkill(skill) {
52
- return skill in SKILLS;
47
+ return Object.hasOwn(SKILLS, skill);
53
48
  }
54
49
  function isEnabledBySkills(grantedSkills, toolSkills) {
55
50
  if (!grantedSkills || toolSkills.length === 0) return false;
@@ -101,12 +96,14 @@ function finalize(input) {
101
96
  if (input.insecureHttp && require_constants.isSentryHost(sentryHost)) throw new Error("Error: --insecure-http is only supported for self-hosted Sentry hosts.");
102
97
  const sentryProtocol = input.insecureHttp ? "http" : "https";
103
98
  let finalSkills;
104
- if (input.skills) {
99
+ if (input.skills && input.allSkills) throw new Error("Error: --all-skills cannot be combined with --skills.");
100
+ if (input.allSkills) finalSkills = new Set(ACTIVE_SKILLS);
101
+ else if (input.skills) {
105
102
  const { valid, invalid } = parseSkills(input.skills);
106
103
  if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid));
107
104
  if (valid.size === 0) throw new Error("Error: Invalid skills provided. No valid skills found.");
108
105
  finalSkills = valid;
109
- } else finalSkills = new Set(ALL_SKILLS);
106
+ } else finalSkills = new Set(ACTIVE_SKILLS);
110
107
  if (input.disableSkills) {
111
108
  const { valid: skillsToDisable, invalid } = parseSkills(input.disableSkills);
112
109
  if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid, "--disable-skills"));
@@ -118,7 +115,7 @@ function finalize(input) {
118
115
  let agentProvider = void 0;
119
116
  if (input.agentProvider) {
120
117
  const provider = input.agentProvider.toLowerCase();
121
- if (provider !== "openai" && provider !== "azure-openai" && provider !== "anthropic") throw new Error(`Error: Invalid agent provider "${input.agentProvider}". Must be "openai", "azure-openai", or "anthropic".`);
118
+ if (provider !== "openai" && provider !== "azure-openai" && provider !== "anthropic" && provider !== "openrouter") throw new Error(`Error: Invalid agent provider "${input.agentProvider}". Must be "openai", "azure-openai", "anthropic", or "openrouter".`);
122
119
  agentProvider = provider;
123
120
  }
124
121
  return {
@@ -176,4 +173,4 @@ Object.defineProperty(exports, 'resolveHost', {
176
173
  return resolveHost;
177
174
  }
178
175
  });
179
- //# sourceMappingURL=resolve-8yBa_PAl.cjs.map
176
+ //# sourceMappingURL=resolve-BsYckCew.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-BsYckCew.cjs","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined","DEFAULT_SENTRY_CLIENT_ID"],"sources":["../../mcp-core/dist/skills-Dj4T8Duc.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: \"Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata\",\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: \"Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.\",\n\t\tdefaultEnabled: false,\n\t\tdeprecated: true,\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, DSNs, and uptime monitors\",\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 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 (tool.includeInSkillDefinitions === false) 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 ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn Object.hasOwn(SKILLS, skill);\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 { ACTIVE_SKILLS, ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-Dj4T8Duc.js.map","import {\n ACTIVE_SKILLS,\n ALL_SKILLS,\n parseSkills,\n type Skill,\n} 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 active 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 non-deprecated skills\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 && input.allSkills) {\n throw new Error(\"Error: --all-skills cannot be combined with --skills.\");\n }\n\n if (input.allSkills) {\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n } else 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 active skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ACTIVE_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:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\" &&\n provider !== \"openrouter\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-openai\", \"anthropic\", or \"openrouter\".`,\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,YAAY;EACZ,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;AAmB5E,MAAM,aAAa,OAAO,KAAK,OAAO;AACtC,MAAM,gBAAgB,aAAa,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;AAChF,MAAM,iBAAiB,aAAa,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;AACpF,SAAS,aAAa,OAAO;AAC5B,QAAO,OAAO,OAAO,QAAQ,MAAM;AACnC;AACD,SAAS,kBAAkB,eAAe,YAAY;AACrD,MAAK,iBAAiB,WAAW,WAAW,EAAG,QAAO;AACtD,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AS,GAAG,YAAY,MAAM,OAAO;AACpD,MAAI,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;AAMJ,KAAI,MAAM,eAAe;EACvB,MAAM,WAAW,MAAM,cAAc,aAAa;AAClD,MACE,aAAa,YACb,aAAa,kBACb,aAAa,eACb,aAAa,aAEb,OAAM,IAAI,OACP,iCAAiC,MAAM,cAAc;AAG1D,kBAAgB;CACjB;AAED,QAAO;EACL,aAAa,MAAM;EACnB,UAAU,MAAM,YAAYC;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,11 +1,11 @@
1
- import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-DGLkHYpN.js";
1
+ import { DEFAULT_SENTRY_CLIENT_ID, isSentryHost, validateAndParseSentryUrlThrows, validateOpenAiBaseUrlThrows, validateSentryHostThrows } from "./constants-BZbaI-zR.js";
2
2
 
3
- //#region ../mcp-core/dist/skills-chhJ9BEU.js
3
+ //#region ../mcp-core/dist/skills-Dj4T8Duc.js
4
4
  const SKILLS = {
5
5
  inspect: {
6
6
  id: "inspect",
7
7
  name: "Inspect Issues & Events",
8
- description: "Search for errors, analyze traces, and explore event details",
8
+ description: "Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata",
9
9
  defaultEnabled: true,
10
10
  order: 1
11
11
  },
@@ -19,8 +19,9 @@ const SKILLS = {
19
19
  docs: {
20
20
  id: "docs",
21
21
  name: "Documentation",
22
- description: "Search and read Sentry SDK documentation",
22
+ description: "Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.",
23
23
  defaultEnabled: false,
24
+ deprecated: true,
24
25
  order: 3
25
26
  },
26
27
  triage: {
@@ -33,23 +34,17 @@ const SKILLS = {
33
34
  "project-management": {
34
35
  id: "project-management",
35
36
  name: "Manage Projects & Teams",
36
- description: "Create and modify projects, teams, and DSNs",
37
+ description: "Create and modify projects, teams, DSNs, and uptime monitors",
37
38
  defaultEnabled: false,
38
39
  order: 5
39
- },
40
- preprod: {
41
- id: "preprod",
42
- name: "Preprod Snapshots",
43
- description: "Inspect visual regression snapshot tests from CI — view changed images and diff masks",
44
- defaultEnabled: false,
45
- order: 6
46
40
  }
47
41
  };
48
42
  const SKILLS_ARRAY = Object.values(SKILLS).sort((a, b) => a.order - b.order);
49
43
  const ALL_SKILLS = Object.keys(SKILLS);
44
+ const ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);
50
45
  const DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);
51
46
  function isValidSkill(skill) {
52
- return skill in SKILLS;
47
+ return Object.hasOwn(SKILLS, skill);
53
48
  }
54
49
  function isEnabledBySkills(grantedSkills, toolSkills) {
55
50
  if (!grantedSkills || toolSkills.length === 0) return false;
@@ -101,12 +96,14 @@ function finalize(input) {
101
96
  if (input.insecureHttp && isSentryHost(sentryHost)) throw new Error("Error: --insecure-http is only supported for self-hosted Sentry hosts.");
102
97
  const sentryProtocol = input.insecureHttp ? "http" : "https";
103
98
  let finalSkills;
104
- if (input.skills) {
99
+ if (input.skills && input.allSkills) throw new Error("Error: --all-skills cannot be combined with --skills.");
100
+ if (input.allSkills) finalSkills = new Set(ACTIVE_SKILLS);
101
+ else if (input.skills) {
105
102
  const { valid, invalid } = parseSkills(input.skills);
106
103
  if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid));
107
104
  if (valid.size === 0) throw new Error("Error: Invalid skills provided. No valid skills found.");
108
105
  finalSkills = valid;
109
- } else finalSkills = new Set(ALL_SKILLS);
106
+ } else finalSkills = new Set(ACTIVE_SKILLS);
110
107
  if (input.disableSkills) {
111
108
  const { valid: skillsToDisable, invalid } = parseSkills(input.disableSkills);
112
109
  if (invalid.length > 0) throw new Error(formatInvalidSkills(invalid, "--disable-skills"));
@@ -118,7 +115,7 @@ function finalize(input) {
118
115
  let agentProvider = void 0;
119
116
  if (input.agentProvider) {
120
117
  const provider = input.agentProvider.toLowerCase();
121
- if (provider !== "openai" && provider !== "azure-openai" && provider !== "anthropic") throw new Error(`Error: Invalid agent provider "${input.agentProvider}". Must be "openai", "azure-openai", or "anthropic".`);
118
+ if (provider !== "openai" && provider !== "azure-openai" && provider !== "anthropic" && provider !== "openrouter") throw new Error(`Error: Invalid agent provider "${input.agentProvider}". Must be "openai", "azure-openai", "anthropic", or "openrouter".`);
122
119
  agentProvider = provider;
123
120
  }
124
121
  return {
@@ -141,4 +138,4 @@ function finalize(input) {
141
138
 
142
139
  //#endregion
143
140
  export { ALL_SKILLS, SKILLS, finalize, formatInvalidSkills, isEnabledBySkills, resolveHost };
144
- //# sourceMappingURL=resolve-FA_uxRo8.js.map
141
+ //# sourceMappingURL=resolve-CS-Bms6W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-CS-Bms6W.js","names":["invalid: string[]","source?: string","url?: string","host?: string","input: MergedArgs","finalSkills: Set<Skill>","agentProvider:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined"],"sources":["../../mcp-core/dist/skills-Dj4T8Duc.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: \"Read-only access to core Sentry data: issues, events, traces, replays, releases, cron monitors, uptime monitors, profiles, documentation, and project metadata\",\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: \"Deprecated legacy docs-only grant. Documentation tools are now available through Inspect Issues & Events.\",\n\t\tdefaultEnabled: false,\n\t\tdeprecated: true,\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, DSNs, and uptime monitors\",\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 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 (tool.includeInSkillDefinitions === false) 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 ACTIVE_SKILLS = SKILLS_ARRAY.filter((s) => !s.deprecated).map((s) => s.id);\nconst DEFAULT_SKILLS = SKILLS_ARRAY.filter((s) => s.defaultEnabled).map((s) => s.id);\nfunction isValidSkill(skill) {\n\treturn Object.hasOwn(SKILLS, skill);\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 { ACTIVE_SKILLS, ALL_SKILLS, DEFAULT_SKILLS, SKILLS, SKILLS_ARRAY, getScopesForSkills, getSkillsArrayWithCounts, isEnabledBySkills, isValidSkill, parseSkills };\n//# sourceMappingURL=skills-Dj4T8Duc.js.map","import {\n ACTIVE_SKILLS,\n ALL_SKILLS,\n parseSkills,\n type Skill,\n} 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 active 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 non-deprecated skills\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 && input.allSkills) {\n throw new Error(\"Error: --all-skills cannot be combined with --skills.\");\n }\n\n if (input.allSkills) {\n finalSkills = new Set<Skill>(ACTIVE_SKILLS);\n } else 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 active skills when no flag is provided (see comment block above for rationale)\n finalSkills = new Set<Skill>(ACTIVE_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:\n | \"openai\"\n | \"azure-openai\"\n | \"anthropic\"\n | \"openrouter\"\n | undefined = undefined;\n if (input.agentProvider) {\n const provider = input.agentProvider.toLowerCase();\n if (\n provider !== \"openai\" &&\n provider !== \"azure-openai\" &&\n provider !== \"anthropic\" &&\n provider !== \"openrouter\"\n ) {\n throw new Error(\n `Error: Invalid agent provider \"${input.agentProvider}\". Must be \"openai\", \"azure-openai\", \"anthropic\", or \"openrouter\".`,\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,YAAY;EACZ,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,OAA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AAM,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-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";
1
+ import { OAUTH_HOST, isSentryHost } from "./constants-BZbaI-zR.js";
2
+ import { toCachedToken } from "./types-BCSxlxZI.js";
3
+ import { authenticate } from "./device-code-flow-D8_wFtpA.js";
4
+ import { readCachedToken, writeCachedToken } from "./token-cache-DbZp4rvg.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-74r8iwMZ.js.map
47
+ //# sourceMappingURL=resolve-token-6Nwn0wwt.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"resolve-token-6Nwn0wwt.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,7 +1,7 @@
1
- const require_constants = require('./constants-n6iE6tnq.cjs');
2
- const require_types = require('./types-CxTPg1vE.cjs');
3
- const require_device_code_flow = require('./device-code-flow-DpBK3Ta8.cjs');
4
- const require_token_cache = require('./token-cache-914WGYb3.cjs');
1
+ const require_constants = require('./constants-BF1H5JLS.cjs');
2
+ const require_types = require('./types-dghCRFW4.cjs');
3
+ const require_device_code_flow = require('./device-code-flow-R-ZBimNL.cjs');
4
+ const require_token_cache = require('./token-cache-ATUcs1cg.cjs');
5
5
 
6
6
  //#region src/auth/resolve-token.ts
7
7
  function withToken(partial, accessToken) {
@@ -49,4 +49,4 @@ Object.defineProperty(exports, 'resolveAccessToken', {
49
49
  return resolveAccessToken;
50
50
  }
51
51
  });
52
- //# sourceMappingURL=resolve-token-Is-MZ02B.cjs.map
52
+ //# sourceMappingURL=resolve-token-D8ViFyUf.cjs.map
@@ -1 +1 @@
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
+ {"version":3,"file":"resolve-token-D8ViFyUf.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,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-Cv9WC9bY.cjs');
2
- const require_version = require('./version-0F5BJUB4.cjs');
2
+ const require_version = require('./version-CXUk1-K3.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
 
@@ -8,7 +8,6 @@ function getStdioSpanAttributes(context) {
8
8
  const attributes = {
9
9
  "app.transport": "stdio",
10
10
  "app.server.version": require_version.LIB_VERSION,
11
- "app.server.mode.agent": context.agentMode ?? false,
12
11
  "app.server.mode.experimental": context.experimentalMode ?? false,
13
12
  "network.transport": "pipe",
14
13
  "service.version": require_version.LIB_VERSION
@@ -63,4 +62,4 @@ Object.defineProperty(exports, 'startStdio', {
63
62
  return startStdio;
64
63
  }
65
64
  });
66
- //# sourceMappingURL=stdio-zkywG2E1.cjs.map
65
+ //# sourceMappingURL=stdio-BAG9vDZV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdio-BAG9vDZV.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 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.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":";;;;;;AA+BA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsBC;EACtB,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,4 +1,4 @@
1
- import { LIB_VERSION } from "./version-BT_3sqKh.js";
1
+ import { LIB_VERSION } from "./version-Duuvuy5h.js";
2
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import * as Sentry from "@sentry/node";
4
4
 
@@ -7,7 +7,6 @@ function getStdioSpanAttributes(context) {
7
7
  const attributes = {
8
8
  "app.transport": "stdio",
9
9
  "app.server.version": LIB_VERSION,
10
- "app.server.mode.agent": context.agentMode ?? false,
11
10
  "app.server.mode.experimental": context.experimentalMode ?? false,
12
11
  "network.transport": "pipe",
13
12
  "service.version": LIB_VERSION
@@ -57,4 +56,4 @@ async function startStdio(server, context) {
57
56
 
58
57
  //#endregion
59
58
  export { startStdio };
60
- //# sourceMappingURL=stdio-D9nJL1b3.js.map
59
+ //# sourceMappingURL=stdio-DFJbp9zP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stdio-DFJbp9zP.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 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.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":";;;;;AA+BA,SAAS,uBACPA,SACkC;CAClC,MAAMC,aAA+C;EACnD,iBAAiB;EACjB,sBAAsB;EACtB,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,6 +1,6 @@
1
1
  import { __commonJS } from "./chunk-CunrlGP7.js";
2
2
  import { require_token_error } from "./token-error-CBmJNKLY.js";
3
- import { require_token_util } from "./token-util-CyoHfXBG.js";
3
+ import { require_token_util } from "./token-util-batRsXGA.js";
4
4
 
5
5
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
6
6
  var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
@@ -48,4 +48,4 @@ var require_token = __commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/no
48
48
  //#endregion
49
49
  export default require_token();
50
50
 
51
- //# sourceMappingURL=token-BZUr25tZ.js.map
51
+ //# sourceMappingURL=token-3xpHVxQo.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"token-3xpHVxQo.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,IAA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AU;EACxD;AACD,UAAQ,IAAI,oBAAoB,WAAW;AAC3C;CACD"}
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-Cv9WC9bY.cjs');
2
2
  const require_token_error$1 = require('./token-error-x_miDBP3.cjs');
3
- const require_token_util$1 = require('./token-util-I45r8kkb.cjs');
3
+ const require_token_util$1 = require('./token-util-BRoQwIG6.cjs');
4
4
 
5
5
  //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js
6
6
  var require_token = require_chunk.__commonJS({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
@@ -52,4 +52,4 @@ Object.defineProperty(exports, 'default', {
52
52
  return require_token();
53
53
  }
54
54
  });
55
- //# sourceMappingURL=token-URCv7LSS.cjs.map
55
+ //# sourceMappingURL=token-C7MavkKX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-URCv7LSS.cjs","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
+ {"version":3,"file":"token-C7MavkKX.cjs","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"}
@@ -81,4 +81,4 @@ Object.defineProperty(exports, 'writeCachedToken', {
81
81
  return writeCachedToken;
82
82
  }
83
83
  });
84
- //# sourceMappingURL=token-cache-914WGYb3.cjs.map
84
+ //# sourceMappingURL=token-cache-ATUcs1cg.cjs.map