@sentry/mcp-server 0.23.1 → 0.25.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 (67) hide show
  1. package/dist/cli/parse.cjs +1 -1
  2. package/dist/cli/parse.d.cts +1 -1
  3. package/dist/cli/parse.d.cts.map +1 -1
  4. package/dist/cli/parse.d.ts +1 -1
  5. package/dist/cli/parse.d.ts.map +1 -1
  6. package/dist/cli/parse.js +1 -1
  7. package/dist/cli/resolve.cjs +1 -2
  8. package/dist/cli/resolve.d.cts +2 -3
  9. package/dist/cli/resolve.d.cts.map +1 -1
  10. package/dist/cli/resolve.d.ts +2 -3
  11. package/dist/cli/resolve.d.ts.map +1 -1
  12. package/dist/cli/resolve.js +2 -2
  13. package/dist/cli/types.d.cts +1 -1
  14. package/dist/cli/types.d.ts +1 -1
  15. package/dist/cli/usage.cjs +1 -1
  16. package/dist/cli/usage.d.cts +1 -2
  17. package/dist/cli/usage.d.cts.map +1 -1
  18. package/dist/cli/usage.d.ts +1 -2
  19. package/dist/cli/usage.d.ts.map +1 -1
  20. package/dist/cli/usage.js +1 -1
  21. package/dist/config-BEgU9ylR.js +3 -0
  22. package/dist/{config-DtimzxvV-D3ccpxhQ.cjs → config-BoFBjXRq-CGHqlnJ9.cjs} +296 -4
  23. package/dist/config-BoFBjXRq-CGHqlnJ9.cjs.map +1 -0
  24. package/dist/{config-DtimzxvV-BItTrGiz.js → config-BoFBjXRq-CMdBQOkQ.js} +291 -5
  25. package/dist/config-BoFBjXRq-CMdBQOkQ.js.map +1 -0
  26. package/dist/config-rZ982IEm.cjs +7 -0
  27. package/dist/index.cjs +482 -316
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.js +438 -272
  30. package/dist/index.js.map +1 -1
  31. package/dist/{parse-Dn9XeQSj.js → parse-46t_fITC.js} +2 -26
  32. package/dist/parse-46t_fITC.js.map +1 -0
  33. package/dist/{parse-By6nDBNs.cjs → parse-BjIH83SX.cjs} +2 -26
  34. package/dist/parse-BjIH83SX.cjs.map +1 -0
  35. package/dist/resolve-CdTP9riu.cjs +286 -0
  36. package/dist/resolve-CdTP9riu.cjs.map +1 -0
  37. package/dist/resolve-Cg3SH2zt.js +232 -0
  38. package/dist/resolve-Cg3SH2zt.js.map +1 -0
  39. package/dist/{stdio-aCI9XyaI.cjs → stdio-Cl-Ib8bu.cjs} +4 -4
  40. package/dist/{stdio-aCI9XyaI.cjs.map → stdio-Cl-Ib8bu.cjs.map} +1 -1
  41. package/dist/{stdio-232a22j4.js → stdio-CwqdTAhY.js} +4 -4
  42. package/dist/{stdio-232a22j4.js.map → stdio-CwqdTAhY.js.map} +1 -1
  43. package/dist/transports/stdio.cjs +1 -1
  44. package/dist/transports/stdio.js +1 -1
  45. package/dist/{types-CM88pHH_.d.ts → types-D5f00mg9.d.ts} +2 -11
  46. package/dist/types-D5f00mg9.d.ts.map +1 -0
  47. package/dist/{types-CnLRMjvf.d.cts → types-DpmAC3S8.d.cts} +2 -11
  48. package/dist/types-DpmAC3S8.d.cts.map +1 -0
  49. package/dist/{usage-DMGbIpV-.js → usage-BzYvqaru.js} +3 -11
  50. package/dist/usage-BzYvqaru.js.map +1 -0
  51. package/dist/{usage-iwGZsu3a.cjs → usage-DD58xBe3.cjs} +3 -11
  52. package/dist/usage-DD58xBe3.cjs.map +1 -0
  53. package/package.json +7 -6
  54. package/dist/config-Bs1p6XwV.js +0 -3
  55. package/dist/config-DFewJLVx.cjs +0 -6
  56. package/dist/config-DtimzxvV-BItTrGiz.js.map +0 -1
  57. package/dist/config-DtimzxvV-D3ccpxhQ.cjs.map +0 -1
  58. package/dist/parse-By6nDBNs.cjs.map +0 -1
  59. package/dist/parse-Dn9XeQSj.js.map +0 -1
  60. package/dist/resolve-BCdS4js5.js +0 -590
  61. package/dist/resolve-BCdS4js5.js.map +0 -1
  62. package/dist/resolve-BMmRdCFJ.cjs +0 -692
  63. package/dist/resolve-BMmRdCFJ.cjs.map +0 -1
  64. package/dist/types-CM88pHH_.d.ts.map +0 -1
  65. package/dist/types-CnLRMjvf.d.cts.map +0 -1
  66. package/dist/usage-DMGbIpV-.js.map +0 -1
  67. package/dist/usage-iwGZsu3a.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,17 +1,194 @@
1
1
  #!/usr/bin/env node
2
2
  const require_chunk = require('./chunk-DoeelZqw.cjs');
3
- const require_resolve = require('./resolve-BMmRdCFJ.cjs');
4
- const require_stdio = require('./stdio-aCI9XyaI.cjs');
5
- const require_config_DtimzxvV = require('./config-DtimzxvV-D3ccpxhQ.cjs');
6
- const require_usage = require('./usage-iwGZsu3a.cjs');
7
- const require_parse = require('./parse-By6nDBNs.cjs');
3
+ const require_resolve = require('./resolve-CdTP9riu.cjs');
4
+ const require_stdio = require('./stdio-Cl-Ib8bu.cjs');
5
+ const require_config_BoFBjXRq = require('./config-BoFBjXRq-CGHqlnJ9.cjs');
6
+ const require_usage = require('./usage-DD58xBe3.cjs');
7
+ const require_parse = require('./parse-BjIH83SX.cjs');
8
8
  const zod = require_chunk.__toESM(require("zod"));
9
9
  const node_util = require_chunk.__toESM(require("node:util"));
10
10
  const __sentry_core = require_chunk.__toESM(require("@sentry/core"));
11
- const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
11
+ const zod_v3 = require_chunk.__toESM(require("zod/v3"));
12
12
  const __modelcontextprotocol_sdk_server_mcp_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/mcp.js"));
13
13
  const __modelcontextprotocol_sdk_inMemory_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/inMemory.js"));
14
+ const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
15
+
16
+ //#region ../mcp-core/dist/constants-D8axTonA.js
17
+ /**
18
+ * Constants for Sentry MCP server.
19
+ *
20
+ * Defines platform and framework combinations available in Sentry documentation.
21
+ */
22
+ /**
23
+ * MCP Server identification
24
+ */
25
+ const MCP_SERVER_NAME = "Sentry MCP";
26
+ /**
27
+ * Allowed region domains for sentry.io
28
+ * Only these specific domains are permitted when using Sentry's cloud service
29
+ * This is used to prevent SSRF attacks by restricting regionUrl to known domains
30
+ */
31
+ const SENTRY_ALLOWED_REGION_DOMAINS = new Set([
32
+ "sentry.io",
33
+ "us.sentry.io",
34
+ "de.sentry.io"
35
+ ]);
36
+ /**
37
+ * Common Sentry platforms that have documentation available
38
+ */
39
+ const SENTRY_PLATFORMS_BASE = [
40
+ "javascript",
41
+ "python",
42
+ "java",
43
+ "dotnet",
44
+ "go",
45
+ "php",
46
+ "ruby",
47
+ "android",
48
+ "apple",
49
+ "unity",
50
+ "unreal",
51
+ "rust",
52
+ "elixir",
53
+ "kotlin",
54
+ "native",
55
+ "dart",
56
+ "godot",
57
+ "nintendo-switch",
58
+ "playstation",
59
+ "powershell",
60
+ "react-native",
61
+ "xbox"
62
+ ];
63
+ /**
64
+ * Platform-specific frameworks that have Sentry guides
65
+ */
66
+ const SENTRY_FRAMEWORKS = {
67
+ javascript: [
68
+ "nextjs",
69
+ "react",
70
+ "gatsby",
71
+ "remix",
72
+ "vue",
73
+ "angular",
74
+ "hono",
75
+ "svelte",
76
+ "express",
77
+ "fastify",
78
+ "astro",
79
+ "bun",
80
+ "capacitor",
81
+ "cloudflare",
82
+ "connect",
83
+ "cordova",
84
+ "deno",
85
+ "electron",
86
+ "ember",
87
+ "nuxt",
88
+ "solid",
89
+ "solidstart",
90
+ "sveltekit",
91
+ "tanstack-react",
92
+ "wasm",
93
+ "node",
94
+ "koa",
95
+ "nestjs",
96
+ "hapi"
97
+ ],
98
+ python: [
99
+ "django",
100
+ "flask",
101
+ "fastapi",
102
+ "celery",
103
+ "tornado",
104
+ "pyramid",
105
+ "aiohttp",
106
+ "anthropic",
107
+ "airflow",
108
+ "aws-lambda",
109
+ "boto3",
110
+ "bottle",
111
+ "chalice",
112
+ "dramatiq",
113
+ "falcon",
114
+ "langchain",
115
+ "litestar",
116
+ "logging",
117
+ "loguru",
118
+ "openai",
119
+ "quart",
120
+ "ray",
121
+ "redis",
122
+ "rq",
123
+ "sanic",
124
+ "sqlalchemy",
125
+ "starlette"
126
+ ],
127
+ dart: ["flutter"],
128
+ dotnet: [
129
+ "aspnetcore",
130
+ "maui",
131
+ "wpf",
132
+ "winforms",
133
+ "aspnet",
134
+ "aws-lambda",
135
+ "azure-functions",
136
+ "blazor-webassembly",
137
+ "entityframework",
138
+ "google-cloud-functions",
139
+ "extensions-logging",
140
+ "log4net",
141
+ "nlog",
142
+ "serilog",
143
+ "uwp",
144
+ "xamarin"
145
+ ],
146
+ java: [
147
+ "spring",
148
+ "spring-boot",
149
+ "android",
150
+ "jul",
151
+ "log4j2",
152
+ "logback",
153
+ "servlet"
154
+ ],
155
+ go: [
156
+ "echo",
157
+ "fasthttp",
158
+ "fiber",
159
+ "gin",
160
+ "http",
161
+ "iris",
162
+ "logrus",
163
+ "negroni",
164
+ "slog",
165
+ "zerolog"
166
+ ],
167
+ php: ["laravel", "symfony"],
168
+ ruby: [
169
+ "delayed_job",
170
+ "rack",
171
+ "rails",
172
+ "resque",
173
+ "sidekiq"
174
+ ],
175
+ android: ["kotlin"],
176
+ apple: [
177
+ "ios",
178
+ "macos",
179
+ "watchos",
180
+ "tvos",
181
+ "visionos"
182
+ ],
183
+ kotlin: ["multiplatform"]
184
+ };
185
+ /**
186
+ * All valid guides for Sentry docs search filtering.
187
+ * A guide can be either a platform (e.g., 'javascript') or a platform/framework combination (e.g., 'javascript/nextjs').
188
+ */
189
+ const SENTRY_GUIDES = [...SENTRY_PLATFORMS_BASE, ...Object.entries(SENTRY_FRAMEWORKS).flatMap(([platform, guides]) => guides.map((guide) => `${platform}/${guide}`))];
14
190
 
191
+ //#endregion
15
192
  //#region ../mcp-core/dist/errors-BXmNwD2K.js
16
193
  /**
17
194
  * Error thrown when user input validation fails.
@@ -36,7 +213,7 @@ var ConfigurationError = class extends Error {
36
213
  };
37
214
 
38
215
  //#endregion
39
- //#region ../mcp-core/dist/slug-validation-BKH2JUpn.js
216
+ //#region ../mcp-core/dist/slug-validation-BdDL1fV5.js
40
217
  /**
41
218
  * Maximum reasonable length for a slug.
42
219
  */
@@ -125,7 +302,7 @@ function validateSlugOrId(val, ctx) {
125
302
  }
126
303
 
127
304
  //#endregion
128
- //#region ../mcp-core/dist/schema-yM01CDL7.js
305
+ //#region ../mcp-core/dist/schema-Bl7AGsln.js
129
306
  const ParamOrganizationSlug = zod.z.string().toLowerCase().trim().superRefine(validateSlug).describe("The organization's slug. You can find a existing list of organizations you have access to using the `find_organizations()` tool.");
130
307
  const ParamTeamSlug = zod.z.string().toLowerCase().trim().superRefine(validateSlug).describe("The team's slug. You can find a list of existing teams in an organization using the `find_teams()` tool.");
131
308
  const ParamProjectSlug = zod.z.string().toLowerCase().trim().superRefine(validateSlug).describe("The project's slug. You can find a list of existing projects in an organization using the `find_projects()` tool.");
@@ -153,12 +330,12 @@ const ParamIssueStatus = zod.z.enum([
153
330
  "ignored"
154
331
  ]).describe("The new status for the issue. Valid values are 'resolved', 'resolvedInNextRelease', 'unresolved', and 'ignored'.");
155
332
  const ParamAssignedTo = zod.z.string().trim().describe("The assignee in format 'user:ID' or 'team:ID' where ID is numeric. Example: 'user:123456' or 'team:789'. Use the whoami tool to find your user ID.");
156
- const ParamSentryGuide = zod.z.enum(require_resolve.SENTRY_GUIDES).describe("Optional guide filter to limit search results to specific documentation sections. Use either a platform (e.g., 'javascript', 'python') or platform/guide combination (e.g., 'javascript/nextjs', 'python/django').");
333
+ const ParamSentryGuide = zod.z.enum(SENTRY_GUIDES).describe("Optional guide filter to limit search results to specific documentation sections. Use either a platform (e.g., 'javascript', 'python') or platform/guide combination (e.g., 'javascript/nextjs', 'python/django').");
157
334
  const ParamEventId = zod.z.string().trim().describe("The ID of the event.");
158
335
  const ParamAttachmentId = zod.z.string().trim().describe("The ID of the attachment to download.");
159
336
 
160
337
  //#endregion
161
- //#region ../mcp-core/dist/define-DUKsI6o0.js
338
+ //#region ../mcp-core/dist/define-vgYYpneQ.js
162
339
  function defineTool(config) {
163
340
  return config;
164
341
  }
@@ -315,8 +492,8 @@ var LoggerImpl = class LoggerImpl$1 {
315
492
  */
316
493
  resetDescendants() {
317
494
  for (const child of Object.values(this.children)) {
318
- const logger$1 = child instanceof LoggerImpl$1 ? child : child.deref();
319
- if (logger$1 != null) logger$1.resetDescendants();
495
+ const logger$2 = child instanceof LoggerImpl$1 ? child : child.deref();
496
+ if (logger$2 != null) logger$2.resetDescendants();
320
497
  }
321
498
  this.reset();
322
499
  }
@@ -480,8 +657,8 @@ var LoggerImpl = class LoggerImpl$1 {
480
657
  var LoggerCtx = class LoggerCtx$1 {
481
658
  logger;
482
659
  properties;
483
- constructor(logger$1, properties) {
484
- this.logger = logger$1;
660
+ constructor(logger$2, properties) {
661
+ this.logger = logger$2;
485
662
  this.properties = properties;
486
663
  }
487
664
  get category() {
@@ -1231,20 +1408,20 @@ function configureInternal(config, allowAsync) {
1231
1408
  const categoryKey = Array.isArray(cfg$1.category) ? JSON.stringify(cfg$1.category) : JSON.stringify([cfg$1.category]);
1232
1409
  if (configuredCategories.has(categoryKey)) throw new ConfigError(`Duplicate logger configuration for category: ${categoryKey}. Each category can only be configured once.`);
1233
1410
  configuredCategories.add(categoryKey);
1234
- const logger$1 = LoggerImpl.getLogger(cfg$1.category);
1411
+ const logger$2 = LoggerImpl.getLogger(cfg$1.category);
1235
1412
  for (const sinkId of cfg$1.sinks ?? []) {
1236
1413
  const sink = config.sinks[sinkId];
1237
1414
  if (!sink) throw new ConfigError(`Sink not found: ${sinkId}.`);
1238
- logger$1.sinks.push(sink);
1415
+ logger$2.sinks.push(sink);
1239
1416
  }
1240
- logger$1.parentSinks = cfg$1.parentSinks ?? "inherit";
1241
- if (cfg$1.lowestLevel !== void 0) logger$1.lowestLevel = cfg$1.lowestLevel;
1417
+ logger$2.parentSinks = cfg$1.parentSinks ?? "inherit";
1418
+ if (cfg$1.lowestLevel !== void 0) logger$2.lowestLevel = cfg$1.lowestLevel;
1242
1419
  for (const filterId of cfg$1.filters ?? []) {
1243
1420
  const filter$1 = config.filters?.[filterId];
1244
1421
  if (filter$1 === void 0) throw new ConfigError(`Filter not found: ${filterId}.`);
1245
- logger$1.filters.push(toFilter(filter$1));
1422
+ logger$2.filters.push(toFilter(filter$1));
1246
1423
  }
1247
- strongRefs.add(logger$1);
1424
+ strongRefs.add(logger$2);
1248
1425
  }
1249
1426
  LoggerImpl.getLogger().contextLocalStorage = config.contextLocalStorage;
1250
1427
  for (const sink of Object.values(config.sinks)) {
@@ -1328,7 +1505,7 @@ var ConfigError = class extends Error {
1328
1505
  };
1329
1506
 
1330
1507
  //#endregion
1331
- //#region ../mcp-core/dist/logging-DipAE5VU.js
1508
+ //#region ../mcp-core/dist/logging-BK_g0p3a.js
1332
1509
  const ROOT_LOG_CATEGORY = ["sentry", "mcp"];
1333
1510
  let loggingConfigured = false;
1334
1511
  function resolveLowestLevel() {
@@ -1345,12 +1522,12 @@ function resolveLowestLevel() {
1345
1522
  * (creating Issues), this sink uses Sentry.logger.* methods to send data to the
1346
1523
  * Logs product.
1347
1524
  *
1348
- * Note: This uses @sentry/node logger API. Cloudflare Workers will need a separate
1349
- * implementation using @sentry/cloudflare logger API.
1525
+ * This uses @sentry/core logger API which works across all platforms (Node.js,
1526
+ * Cloudflare Workers, etc.) as long as Sentry is initialized with the appropriate SDK.
1350
1527
  */
1351
1528
  function createSentryLogsSink() {
1352
1529
  return (record) => {
1353
- if (!__sentry_node.logger) return;
1530
+ if (!__sentry_core.logger) return;
1354
1531
  let message = "";
1355
1532
  for (let i = 0; i < record.message.length; i++) if (i % 2 === 0) message += record.message[i];
1356
1533
  else {
@@ -1360,24 +1537,24 @@ function createSentryLogsSink() {
1360
1537
  const attributes$73 = record.properties;
1361
1538
  switch (record.level) {
1362
1539
  case "trace":
1363
- __sentry_node.logger.trace(message, attributes$73);
1540
+ __sentry_core.logger.trace(message, attributes$73);
1364
1541
  break;
1365
1542
  case "debug":
1366
- __sentry_node.logger.debug(message, attributes$73);
1543
+ __sentry_core.logger.debug(message, attributes$73);
1367
1544
  break;
1368
1545
  case "info":
1369
- __sentry_node.logger.info(message, attributes$73);
1546
+ __sentry_core.logger.info(message, attributes$73);
1370
1547
  break;
1371
1548
  case "warning":
1372
- __sentry_node.logger.warn(message, attributes$73);
1549
+ __sentry_core.logger.warn(message, attributes$73);
1373
1550
  break;
1374
1551
  case "error":
1375
- __sentry_node.logger.error(message, attributes$73);
1552
+ __sentry_core.logger.error(message, attributes$73);
1376
1553
  break;
1377
1554
  case "fatal":
1378
- __sentry_node.logger.fatal(message, attributes$73);
1555
+ __sentry_core.logger.fatal(message, attributes$73);
1379
1556
  break;
1380
- default: __sentry_node.logger.info(message, attributes$73);
1557
+ default: __sentry_core.logger.info(message, attributes$73);
1381
1558
  }
1382
1559
  };
1383
1560
  }
@@ -1414,8 +1591,8 @@ function ensureLoggingConfigured() {
1414
1591
  function getLogger$1(scope, defaults) {
1415
1592
  ensureLoggingConfigured();
1416
1593
  const category = Array.isArray(scope) ? scope : [scope];
1417
- const logger$1 = getLogger([...ROOT_LOG_CATEGORY, ...category]);
1418
- return defaults ? logger$1.with(defaults) : logger$1;
1594
+ const logger$2 = getLogger([...ROOT_LOG_CATEGORY, ...category]);
1595
+ return defaults ? logger$2.with(defaults) : logger$2;
1419
1596
  }
1420
1597
  const ISSUE_LOGGER_SCOPE = ["runtime", "issues"];
1421
1598
  function isRecord(value) {
@@ -1493,7 +1670,7 @@ function serializeError(value, depth = 0) {
1493
1670
  }
1494
1671
  return { message: coerceMessage(value) };
1495
1672
  }
1496
- const logger = getLogger$1([]);
1673
+ const logger$1 = getLogger$1([]);
1497
1674
  const DEFAULT_LOGGER_SCOPE = [];
1498
1675
  function buildLogProperties(level, options, serializedError) {
1499
1676
  const properties = { severity: level };
@@ -1532,6 +1709,9 @@ function logWithLevel(level, value, contextsOrOptions) {
1532
1709
  default: scopedLogger.info(message, () => properties);
1533
1710
  }
1534
1711
  }
1712
+ function logInfo(value, contextsOrOptions) {
1713
+ logWithLevel("info", value, contextsOrOptions);
1714
+ }
1535
1715
  function logWarn(value, contextsOrOptions) {
1536
1716
  logWithLevel("warning", value, contextsOrOptions);
1537
1717
  }
@@ -1572,7 +1752,7 @@ function logIssue(error, contextsOrOptions, attachmentsArg) {
1572
1752
  }
1573
1753
 
1574
1754
  //#endregion
1575
- //#region ../mcp-core/dist/schema-COv2Mx9E.js
1755
+ //#region ../mcp-core/dist/schema-BO1YtJIJ.js
1576
1756
  /**
1577
1757
  * Schema for Sentry API error responses.
1578
1758
  *
@@ -2069,7 +2249,7 @@ const TraceIssueSchema = zod.z.object({
2069
2249
  const TraceSchema = zod.z.array(zod.z.union([TraceSpanSchema, TraceIssueSchema]));
2070
2250
 
2071
2251
  //#endregion
2072
- //#region ../mcp-core/dist/errors-h_Ebmo8b.js
2252
+ //#region ../mcp-core/dist/errors-ZBQnDL3L.js
2073
2253
  /**
2074
2254
  * API Error Class Hierarchy
2075
2255
  *
@@ -2284,7 +2464,7 @@ function createApiError(message, status, detail, responseBody) {
2284
2464
  }
2285
2465
 
2286
2466
  //#endregion
2287
- //#region ../mcp-core/dist/client-ywsSgZWL.js
2467
+ //#region ../mcp-core/dist/client-DsM0pHqr.js
2288
2468
  /**
2289
2469
  * Mapping of common network error codes to user-friendly messages.
2290
2470
  * These help users understand and resolve connection issues.
@@ -3373,7 +3553,7 @@ var SentryApiService = class {
3373
3553
  };
3374
3554
 
3375
3555
  //#endregion
3376
- //#region ../mcp-core/dist/validate-region-url-DAFGgDb3.js
3556
+ //#region ../mcp-core/dist/validate-region-url-BL1kR9T7.js
3377
3557
  /**
3378
3558
  * Validates that a regionUrl is valid.
3379
3559
  * Prevents SSRF attacks by only allowing the base host itself or domains from an allowlist.
@@ -3400,12 +3580,12 @@ function validateRegionUrl(regionUrl, baseHost) {
3400
3580
  const regionHost = parsedUrl.host.toLowerCase();
3401
3581
  const baseLower = baseHost.toLowerCase();
3402
3582
  if (regionHost === baseLower) return regionHost;
3403
- if (!require_resolve.SENTRY_ALLOWED_REGION_DOMAINS.has(regionHost)) throw new UserInputError(`Invalid regionUrl: ${regionUrl}. The domain '${regionHost}' is not allowed. Allowed domains are: ${Array.from(require_resolve.SENTRY_ALLOWED_REGION_DOMAINS).join(", ")}`);
3583
+ if (!SENTRY_ALLOWED_REGION_DOMAINS.has(regionHost)) throw new UserInputError(`Invalid regionUrl: ${regionUrl}. The domain '${regionHost}' is not allowed. Allowed domains are: ${Array.from(SENTRY_ALLOWED_REGION_DOMAINS).join(", ")}`);
3404
3584
  return regionHost;
3405
3585
  }
3406
3586
 
3407
3587
  //#endregion
3408
- //#region ../mcp-core/dist/api-C-36gW41.js
3588
+ //#region ../mcp-core/dist/api-DxBbW5xK.js
3409
3589
  /**
3410
3590
  * Create a Sentry API service from server context with optional region override
3411
3591
  * @param context - Server context containing host and access token
@@ -3426,7 +3606,7 @@ function apiServiceFromContext(context$1, opts = {}) {
3426
3606
  }
3427
3607
 
3428
3608
  //#endregion
3429
- //#region ../mcp-core/dist/whoami-Dme_5-Db.js
3609
+ //#region ../mcp-core/dist/whoami-Ri2i43vR.js
3430
3610
  var whoami_default = defineTool({
3431
3611
  name: "whoami",
3432
3612
  description: [
@@ -3436,7 +3616,7 @@ var whoami_default = defineTool({
3436
3616
  "- Get the user's name and email address."
3437
3617
  ].join("\n"),
3438
3618
  inputSchema: {},
3439
- requiredSkills: require_resolve.ALL_SKILLS,
3619
+ skills: require_resolve.ALL_SKILLS,
3440
3620
  requiredScopes: [],
3441
3621
  annotations: {
3442
3622
  readOnlyHint: true,
@@ -3459,11 +3639,11 @@ var whoami_default = defineTool({
3459
3639
  });
3460
3640
 
3461
3641
  //#endregion
3462
- //#region ../mcp-core/dist/find-organizations-DaWlAPTI.js
3642
+ //#region ../mcp-core/dist/find-organizations-Cf2YI972.js
3463
3643
  const RESULT_LIMIT$2 = 25;
3464
3644
  var find_organizations_default = defineTool({
3465
3645
  name: "find_organizations",
3466
- requiredSkills: require_resolve.ALL_SKILLS,
3646
+ skills: require_resolve.ALL_SKILLS,
3467
3647
  requiredScopes: ["org:read"],
3468
3648
  description: [
3469
3649
  "Find organizations that the user has access to in Sentry.",
@@ -3482,7 +3662,7 @@ var find_organizations_default = defineTool({
3482
3662
  },
3483
3663
  async handler(params, context$1) {
3484
3664
  const apiService = apiServiceFromContext(context$1);
3485
- const organizations = await apiService.listOrganizations({ query: params.query });
3665
+ const organizations = await apiService.listOrganizations({ query: params.query ?? void 0 });
3486
3666
  let output = "# Organizations\n\n";
3487
3667
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3488
3668
  if (organizations.length === 0) {
@@ -3511,11 +3691,11 @@ var find_organizations_default = defineTool({
3511
3691
  });
3512
3692
 
3513
3693
  //#endregion
3514
- //#region ../mcp-core/dist/find-teams-DurHMQdf.js
3694
+ //#region ../mcp-core/dist/find-teams-C_HR4IHN.js
3515
3695
  const RESULT_LIMIT$1 = 25;
3516
3696
  var find_teams_default = defineTool({
3517
3697
  name: "find_teams",
3518
- requiredSkills: [
3698
+ skills: [
3519
3699
  "inspect",
3520
3700
  "triage",
3521
3701
  "project-management"
@@ -3541,11 +3721,11 @@ var find_teams_default = defineTool({
3541
3721
  openWorldHint: true
3542
3722
  },
3543
3723
  async handler(params, context$1) {
3544
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3724
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3545
3725
  const organizationSlug = params.organizationSlug;
3546
3726
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3547
3727
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3548
- const teams = await apiService.listTeams(organizationSlug, { query: params.query });
3728
+ const teams = await apiService.listTeams(organizationSlug, { query: params.query ?? void 0 });
3549
3729
  let output = `# Teams in **${organizationSlug}**\n\n`;
3550
3730
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3551
3731
  if (teams.length === 0) {
@@ -3559,11 +3739,11 @@ var find_teams_default = defineTool({
3559
3739
  });
3560
3740
 
3561
3741
  //#endregion
3562
- //#region ../mcp-core/dist/find-projects-DT8-Ot8E.js
3742
+ //#region ../mcp-core/dist/find-projects-DLZN7tox.js
3563
3743
  const RESULT_LIMIT = 25;
3564
3744
  var find_projects_default = defineTool({
3565
3745
  name: "find_projects",
3566
- requiredSkills: require_resolve.ALL_SKILLS,
3746
+ skills: require_resolve.ALL_SKILLS,
3567
3747
  requiredScopes: ["project:read"],
3568
3748
  description: [
3569
3749
  "Find projects in Sentry.",
@@ -3585,11 +3765,11 @@ var find_projects_default = defineTool({
3585
3765
  openWorldHint: true
3586
3766
  },
3587
3767
  async handler(params, context$1) {
3588
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3768
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3589
3769
  const organizationSlug = params.organizationSlug;
3590
3770
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3591
3771
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3592
- const projects = await apiService.listProjects(organizationSlug, { query: params.query });
3772
+ const projects = await apiService.listProjects(organizationSlug, { query: params.query ?? void 0 });
3593
3773
  let output = `# Projects in **${organizationSlug}**\n\n`;
3594
3774
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3595
3775
  if (projects.length === 0) {
@@ -3603,10 +3783,10 @@ var find_projects_default = defineTool({
3603
3783
  });
3604
3784
 
3605
3785
  //#endregion
3606
- //#region ../mcp-core/dist/find-releases-CH1SfYpB.js
3786
+ //#region ../mcp-core/dist/find-releases-B5iKG6ZO.js
3607
3787
  var find_releases_default = defineTool({
3608
3788
  name: "find_releases",
3609
- requiredSkills: ["inspect"],
3789
+ skills: ["inspect"],
3610
3790
  requiredScopes: ["project:read"],
3611
3791
  description: [
3612
3792
  "Find releases in Sentry.",
@@ -3645,13 +3825,13 @@ var find_releases_default = defineTool({
3645
3825
  openWorldHint: true
3646
3826
  },
3647
3827
  async handler(params, context$1) {
3648
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3828
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3649
3829
  const organizationSlug = params.organizationSlug;
3650
3830
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3651
3831
  const releases = await apiService.listReleases({
3652
3832
  organizationSlug,
3653
- projectSlug: params.projectSlug,
3654
- query: params.query
3833
+ projectSlug: params.projectSlug ?? void 0,
3834
+ query: params.query ?? void 0
3655
3835
  });
3656
3836
  let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : ""}**\n\n`;
3657
3837
  if (releases.length === 0) {
@@ -3694,7 +3874,7 @@ var find_releases_default = defineTool({
3694
3874
  });
3695
3875
 
3696
3876
  //#endregion
3697
- //#region ../mcp-core/dist/issue-helpers-CW_FS0Jn.js
3877
+ //#region ../mcp-core/dist/issue-helpers-DtCbXiRZ.js
3698
3878
  /**
3699
3879
  * Extracts the Sentry issue ID and organization slug from a full URL
3700
3880
  *
@@ -3770,7 +3950,7 @@ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
3770
3950
  }
3771
3951
 
3772
3952
  //#endregion
3773
- //#region ../mcp-core/dist/seer-D6i7nmhd.js
3953
+ //#region ../mcp-core/dist/seer-CSFgx4AP.js
3774
3954
  const SEER_POLLING_INTERVAL = 5e3;
3775
3955
  const SEER_TIMEOUT = 5 * 60 * 1e3;
3776
3956
  const SEER_MAX_RETRIES = 3;
@@ -3851,7 +4031,7 @@ function getOutputForAutofixStep(step) {
3851
4031
  }
3852
4032
 
3853
4033
  //#endregion
3854
- //#region ../mcp-core/dist/formatting-CBQAlru_.js
4034
+ //#region ../mcp-core/dist/formatting-CbPBuuTP.js
3855
4035
  const LANGUAGE_EXTENSIONS = {
3856
4036
  ".java": "java",
3857
4037
  ".py": "python",
@@ -4769,6 +4949,12 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
4769
4949
  output += `**Users Impacted**: ${issue.userCount}\n`;
4770
4950
  output += `**Status**: ${issue.status}\n`;
4771
4951
  if (issue.substatus) output += `**Substatus**: ${issue.substatus}\n`;
4952
+ if (issue.assignedTo) if (typeof issue.assignedTo === "string") output += `**Assigned To**: ${issue.assignedTo}\n`;
4953
+ else {
4954
+ const assignee = issue.assignedTo;
4955
+ const type = assignee.type === "team" ? "Team" : "User";
4956
+ output += `**Assigned To**: ${assignee.name} (${type})\n`;
4957
+ }
4772
4958
  if (issue.issueType) output += `**Issue Type**: ${issue.issueType}\n`;
4773
4959
  if (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\n`;
4774
4960
  output += `**Platform**: ${issue.platform}\n`;
@@ -4813,7 +4999,7 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
4813
4999
  }
4814
5000
 
4815
5001
  //#endregion
4816
- //#region ../mcp-core/dist/enhance-error-oY19n4bn.js
5002
+ //#region ../mcp-core/dist/enhance-error-BzwoJ7V0.js
4817
5003
  /**
4818
5004
  * Enhances a 404 error with parameter context to help users understand what went wrong.
4819
5005
  * This is optional - tools can use this when they want to provide extra context.
@@ -4841,10 +5027,10 @@ function enhanceNotFoundError(error, params) {
4841
5027
  }
4842
5028
 
4843
5029
  //#endregion
4844
- //#region ../mcp-core/dist/get-issue-details-Bj1LiaC2.js
5030
+ //#region ../mcp-core/dist/get-issue-details-CzHzJZi2.js
4845
5031
  var get_issue_details_default = defineTool({
4846
5032
  name: "get_issue_details",
4847
- requiredSkills: [
5033
+ skills: [
4848
5034
  "inspect",
4849
5035
  "triage",
4850
5036
  "seer"
@@ -4903,7 +5089,7 @@ var get_issue_details_default = defineTool({
4903
5089
  openWorldHint: true
4904
5090
  },
4905
5091
  async handler(params, context$1) {
4906
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5092
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
4907
5093
  if (params.eventId) {
4908
5094
  const orgSlug$1 = params.organizationSlug;
4909
5095
  const eventId = params.eventId;
@@ -5022,14 +5208,14 @@ function shouldFetchTraceForEvent(event) {
5022
5208
  }
5023
5209
 
5024
5210
  //#endregion
5025
- //#region ../mcp-core/dist/get-trace-details-DynWtF0W.js
5211
+ //#region ../mcp-core/dist/get-trace-details-DGzLP_Mo.js
5026
5212
  const MAX_DEPTH = 2;
5027
5213
  const MINIMUM_DURATION_THRESHOLD_MS = 10;
5028
5214
  const MIN_MEANINGFUL_CHILD_DURATION = 5;
5029
5215
  const MIN_AVG_DURATION_MS = 5;
5030
5216
  var get_trace_details_default = defineTool({
5031
5217
  name: "get_trace_details",
5032
- requiredSkills: ["inspect"],
5218
+ skills: ["inspect"],
5033
5219
  requiredScopes: ["event:read"],
5034
5220
  description: [
5035
5221
  "Get detailed information about a specific Sentry trace by ID.",
@@ -5071,7 +5257,7 @@ var get_trace_details_default = defineTool({
5071
5257
  },
5072
5258
  async handler(params, context$1) {
5073
5259
  if (!/^[0-9a-fA-F]{32}$/.test(params.traceId)) throw new UserInputError("Trace ID must be a 32-character hexadecimal string");
5074
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5260
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5075
5261
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
5076
5262
  (0, __sentry_core.setTag)("trace.id", params.traceId);
5077
5263
  const traceMeta = await apiService.getTraceMeta({
@@ -5321,10 +5507,10 @@ function formatTraceOutput({ organizationSlug, traceId, traceMeta, trace: trace$
5321
5507
  }
5322
5508
 
5323
5509
  //#endregion
5324
- //#region ../mcp-core/dist/get-event-attachment-DmIqKy4p.js
5510
+ //#region ../mcp-core/dist/get-event-attachment-4_XbtsrW.js
5325
5511
  var get_event_attachment_default = defineTool({
5326
5512
  name: "get_event_attachment",
5327
- requiredSkills: ["inspect"],
5513
+ skills: ["inspect"],
5328
5514
  requiredScopes: ["event:read"],
5329
5515
  description: [
5330
5516
  "Download attachments from a Sentry event.",
@@ -5367,7 +5553,7 @@ var get_event_attachment_default = defineTool({
5367
5553
  openWorldHint: true
5368
5554
  },
5369
5555
  async handler(params, context$1) {
5370
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5556
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5371
5557
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
5372
5558
  if (params.attachmentId) {
5373
5559
  const attachment = await apiService.getEventAttachment({
@@ -5392,7 +5578,6 @@ var get_event_attachment_default = defineTool({
5392
5578
  contentParts.push(image);
5393
5579
  } else {
5394
5580
  const resource = {
5395
- id: params.attachmentId,
5396
5581
  type: "resource",
5397
5582
  resource: {
5398
5583
  uri: `file://${attachment.filename}`,
@@ -5458,7 +5643,7 @@ var get_event_attachment_default = defineTool({
5458
5643
  });
5459
5644
 
5460
5645
  //#endregion
5461
- //#region ../mcp-core/dist/formatting-CIwRyNGU.js
5646
+ //#region ../mcp-core/dist/formatting-DJFcfTJG.js
5462
5647
  /**
5463
5648
  * Helper function to format assignedTo field for display
5464
5649
  */
@@ -5470,10 +5655,10 @@ function formatAssignedTo(assignedTo) {
5470
5655
  }
5471
5656
 
5472
5657
  //#endregion
5473
- //#region ../mcp-core/dist/update-issue-COCI-f3S.js
5658
+ //#region ../mcp-core/dist/update-issue-BSKY4Du1.js
5474
5659
  var update_issue_default = defineTool({
5475
5660
  name: "update_issue",
5476
- requiredSkills: ["triage"],
5661
+ skills: ["triage"],
5477
5662
  requiredScopes: ["event:write"],
5478
5663
  description: [
5479
5664
  "Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.",
@@ -5534,7 +5719,7 @@ var update_issue_default = defineTool({
5534
5719
  openWorldHint: true
5535
5720
  },
5536
5721
  async handler(params, context$1) {
5537
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5722
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5538
5723
  if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
5539
5724
  if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
5540
5725
  if (!params.status && !params.assignedTo) throw new UserInputError("At least one of `status` or `assignedTo` must be provided to update the issue");
@@ -5939,7 +6124,7 @@ var require_secure_json_parse = require_chunk.__commonJS({ "../../node_modules/.
5939
6124
  } });
5940
6125
 
5941
6126
  //#endregion
5942
- //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.72/node_modules/@ai-sdk/provider-utils/dist/index.mjs
6127
+ //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
5943
6128
  var import_secure_json_parse = require_chunk.__toESM(require_secure_json_parse(), 1);
5944
6129
  function combineHeaders(...headers) {
5945
6130
  return headers.reduce((combinedHeaders, currentHeaders) => ({
@@ -6430,7 +6615,7 @@ function withoutTrailingSlash(url) {
6430
6615
  }
6431
6616
 
6432
6617
  //#endregion
6433
- //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.72/node_modules/@ai-sdk/openai/dist/index.mjs
6618
+ //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs
6434
6619
  function convertToOpenAIChatMessages({ prompt, useLegacyFunctionCalling = false, systemMessageMode = "system" }) {
6435
6620
  const messages = [];
6436
6621
  const warnings = [];
@@ -8743,7 +8928,7 @@ function createOpenAI(options = {}) {
8743
8928
  var openai = createOpenAI({ compatibility: "strict" });
8744
8929
 
8745
8930
  //#endregion
8746
- //#region ../mcp-core/dist/openai-provider-CxDJ8Xy2.js
8931
+ //#region ../mcp-core/dist/openai-provider-BwPDNx0z.js
8747
8932
  const DEFAULT_OPENAI_MODEL = "gpt-5";
8748
8933
  const VALID_REASONING_EFFORTS = [
8749
8934
  "low",
@@ -8786,7 +8971,7 @@ function getOpenAIModel(model) {
8786
8971
  }
8787
8972
 
8788
8973
  //#endregion
8789
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/Options.js
8974
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
8790
8975
  const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
8791
8976
  const defaultOptions = {
8792
8977
  name: void 0,
@@ -8821,7 +9006,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
8821
9006
  };
8822
9007
 
8823
9008
  //#endregion
8824
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/Refs.js
9009
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js
8825
9010
  const getRefs = (options) => {
8826
9011
  const _options = getDefaultOptions(options);
8827
9012
  const currentPath = _options.name !== void 0 ? [
@@ -8847,7 +9032,7 @@ const getRefs = (options) => {
8847
9032
  };
8848
9033
 
8849
9034
  //#endregion
8850
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
9035
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
8851
9036
  function addErrorMessage(res, key, errorMessage, refs) {
8852
9037
  if (!refs?.errorMessages) return;
8853
9038
  if (errorMessage) res.errorMessage = {
@@ -8861,7 +9046,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
8861
9046
  }
8862
9047
 
8863
9048
  //#endregion
8864
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
9049
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
8865
9050
  const getRelativePath = (pathA, pathB) => {
8866
9051
  let i = 0;
8867
9052
  for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
@@ -8869,7 +9054,7 @@ const getRelativePath = (pathA, pathB) => {
8869
9054
  };
8870
9055
 
8871
9056
  //#endregion
8872
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
9057
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
8873
9058
  function parseAnyDef(refs) {
8874
9059
  if (refs.target !== "openAi") return {};
8875
9060
  const anyDefinitionPath = [
@@ -8882,10 +9067,10 @@ function parseAnyDef(refs) {
8882
9067
  }
8883
9068
 
8884
9069
  //#endregion
8885
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
9070
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
8886
9071
  function parseArrayDef(def, refs) {
8887
9072
  const res = { type: "array" };
8888
- if (def.type?._def && def.type?._def?.typeName !== zod.ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
9073
+ if (def.type?._def && def.type?._def?.typeName !== zod_v3.ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
8889
9074
  ...refs,
8890
9075
  currentPath: [...refs.currentPath, "items"]
8891
9076
  });
@@ -8899,7 +9084,7 @@ function parseArrayDef(def, refs) {
8899
9084
  }
8900
9085
 
8901
9086
  //#endregion
8902
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
9087
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
8903
9088
  function parseBigintDef(def, refs) {
8904
9089
  const res = {
8905
9090
  type: "integer",
@@ -8931,25 +9116,25 @@ function parseBigintDef(def, refs) {
8931
9116
  }
8932
9117
 
8933
9118
  //#endregion
8934
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
9119
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
8935
9120
  function parseBooleanDef() {
8936
9121
  return { type: "boolean" };
8937
9122
  }
8938
9123
 
8939
9124
  //#endregion
8940
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
9125
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
8941
9126
  function parseBrandedDef(_def, refs) {
8942
9127
  return parseDef(_def.type._def, refs);
8943
9128
  }
8944
9129
 
8945
9130
  //#endregion
8946
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
9131
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
8947
9132
  const parseCatchDef = (def, refs) => {
8948
9133
  return parseDef(def.innerType._def, refs);
8949
9134
  };
8950
9135
 
8951
9136
  //#endregion
8952
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
9137
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
8953
9138
  function parseDateDef(def, refs, overrideDateStrategy) {
8954
9139
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
8955
9140
  if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
@@ -8984,7 +9169,7 @@ const integerDateParser = (def, refs) => {
8984
9169
  };
8985
9170
 
8986
9171
  //#endregion
8987
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
9172
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
8988
9173
  function parseDefaultDef(_def, refs) {
8989
9174
  return {
8990
9175
  ...parseDef(_def.innerType._def, refs),
@@ -8993,13 +9178,13 @@ function parseDefaultDef(_def, refs) {
8993
9178
  }
8994
9179
 
8995
9180
  //#endregion
8996
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
9181
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
8997
9182
  function parseEffectsDef(_def, refs) {
8998
9183
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
8999
9184
  }
9000
9185
 
9001
9186
  //#endregion
9002
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
9187
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
9003
9188
  function parseEnumDef(def) {
9004
9189
  return {
9005
9190
  type: "string",
@@ -9008,7 +9193,7 @@ function parseEnumDef(def) {
9008
9193
  }
9009
9194
 
9010
9195
  //#endregion
9011
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
9196
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
9012
9197
  const isJsonSchema7AllOfType = (type) => {
9013
9198
  if ("type" in type && type.type === "string") return false;
9014
9199
  return "allOf" in type;
@@ -9051,7 +9236,7 @@ function parseIntersectionDef(def, refs) {
9051
9236
  }
9052
9237
 
9053
9238
  //#endregion
9054
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
9239
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
9055
9240
  function parseLiteralDef(def, refs) {
9056
9241
  const parsedType = typeof def.value;
9057
9242
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
@@ -9066,7 +9251,7 @@ function parseLiteralDef(def, refs) {
9066
9251
  }
9067
9252
 
9068
9253
  //#endregion
9069
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
9254
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
9070
9255
  let emojiRegex = void 0;
9071
9256
  /**
9072
9257
  * Generated from the regular expressions found here as of 2024-05-22:
@@ -9200,9 +9385,7 @@ function parseStringDef(def, refs) {
9200
9385
  case "toLowerCase":
9201
9386
  case "toUpperCase":
9202
9387
  case "trim": break;
9203
- default:
9204
- /* c8 ignore next */
9205
- ((_) => {})(check);
9388
+ default: ((_) => {})(check);
9206
9389
  }
9207
9390
  return res;
9208
9391
  }
@@ -9322,10 +9505,10 @@ function stringifyRegExpWithFlags(regex, refs) {
9322
9505
  }
9323
9506
 
9324
9507
  //#endregion
9325
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
9508
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
9326
9509
  function parseRecordDef(def, refs) {
9327
9510
  if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
9328
- if (refs.target === "openApi3" && def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodEnum) return {
9511
+ if (refs.target === "openApi3" && def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodEnum) return {
9329
9512
  type: "object",
9330
9513
  required: def.keyType._def.values,
9331
9514
  properties: def.keyType._def.values.reduce((acc, key) => ({
@@ -9349,17 +9532,17 @@ function parseRecordDef(def, refs) {
9349
9532
  }) ?? refs.allowedAdditionalProperties
9350
9533
  };
9351
9534
  if (refs.target === "openApi3") return schema;
9352
- if (def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
9535
+ if (def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
9353
9536
  const { type,...keyType } = parseStringDef(def.keyType._def, refs);
9354
9537
  return {
9355
9538
  ...schema,
9356
9539
  propertyNames: keyType
9357
9540
  };
9358
- } else if (def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodEnum) return {
9541
+ } else if (def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodEnum) return {
9359
9542
  ...schema,
9360
9543
  propertyNames: { enum: def.keyType._def.values }
9361
9544
  };
9362
- else if (def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === zod.ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {
9545
+ else if (def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {
9363
9546
  const { type,...keyType } = parseBrandedDef(def.keyType._def, refs);
9364
9547
  return {
9365
9548
  ...schema,
@@ -9370,7 +9553,7 @@ function parseRecordDef(def, refs) {
9370
9553
  }
9371
9554
 
9372
9555
  //#endregion
9373
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
9556
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
9374
9557
  function parseMapDef(def, refs) {
9375
9558
  if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
9376
9559
  const keys = parseDef(def.keyType._def, {
@@ -9404,7 +9587,7 @@ function parseMapDef(def, refs) {
9404
9587
  }
9405
9588
 
9406
9589
  //#endregion
9407
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
9590
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
9408
9591
  function parseNativeEnumDef(def) {
9409
9592
  const object$1 = def.values;
9410
9593
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -9419,7 +9602,7 @@ function parseNativeEnumDef(def) {
9419
9602
  }
9420
9603
 
9421
9604
  //#endregion
9422
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
9605
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
9423
9606
  function parseNeverDef(refs) {
9424
9607
  return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
9425
9608
  ...refs,
@@ -9428,7 +9611,7 @@ function parseNeverDef(refs) {
9428
9611
  }
9429
9612
 
9430
9613
  //#endregion
9431
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
9614
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
9432
9615
  function parseNullDef(refs) {
9433
9616
  return refs.target === "openApi3" ? {
9434
9617
  enum: ["null"],
@@ -9437,7 +9620,7 @@ function parseNullDef(refs) {
9437
9620
  }
9438
9621
 
9439
9622
  //#endregion
9440
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
9623
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
9441
9624
  const primitiveMappings = {
9442
9625
  ZodString: "string",
9443
9626
  ZodNumber: "number",
@@ -9497,7 +9680,7 @@ const asAnyOf = (def, refs) => {
9497
9680
  };
9498
9681
 
9499
9682
  //#endregion
9500
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
9683
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
9501
9684
  function parseNullableDef(def, refs) {
9502
9685
  if ([
9503
9686
  "ZodString",
@@ -9538,7 +9721,7 @@ function parseNullableDef(def, refs) {
9538
9721
  }
9539
9722
 
9540
9723
  //#endregion
9541
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
9724
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
9542
9725
  function parseNumberDef(def, refs) {
9543
9726
  const res = { type: "number" };
9544
9727
  if (!def.checks) return res;
@@ -9571,7 +9754,7 @@ function parseNumberDef(def, refs) {
9571
9754
  }
9572
9755
 
9573
9756
  //#endregion
9574
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
9757
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
9575
9758
  function parseObjectDef(def, refs) {
9576
9759
  const forceOptionalIntoNullable = refs.target === "openAi";
9577
9760
  const result = {
@@ -9631,7 +9814,7 @@ function safeIsOptional(schema) {
9631
9814
  }
9632
9815
 
9633
9816
  //#endregion
9634
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
9817
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
9635
9818
  const parseOptionalDef = (def, refs) => {
9636
9819
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
9637
9820
  const innerSchema = parseDef(def.innerType._def, {
@@ -9646,7 +9829,7 @@ const parseOptionalDef = (def, refs) => {
9646
9829
  };
9647
9830
 
9648
9831
  //#endregion
9649
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
9832
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
9650
9833
  const parsePipelineDef = (def, refs) => {
9651
9834
  if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
9652
9835
  else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
@@ -9670,13 +9853,13 @@ const parsePipelineDef = (def, refs) => {
9670
9853
  };
9671
9854
 
9672
9855
  //#endregion
9673
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
9856
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
9674
9857
  function parsePromiseDef(def, refs) {
9675
9858
  return parseDef(def.type._def, refs);
9676
9859
  }
9677
9860
 
9678
9861
  //#endregion
9679
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
9862
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
9680
9863
  function parseSetDef(def, refs) {
9681
9864
  const items = parseDef(def.valueType._def, {
9682
9865
  ...refs,
@@ -9693,7 +9876,7 @@ function parseSetDef(def, refs) {
9693
9876
  }
9694
9877
 
9695
9878
  //#endregion
9696
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
9879
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
9697
9880
  function parseTupleDef(def, refs) {
9698
9881
  if (def.rest) return {
9699
9882
  type: "array",
@@ -9727,71 +9910,69 @@ function parseTupleDef(def, refs) {
9727
9910
  }
9728
9911
 
9729
9912
  //#endregion
9730
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
9913
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
9731
9914
  function parseUndefinedDef(refs) {
9732
9915
  return { not: parseAnyDef(refs) };
9733
9916
  }
9734
9917
 
9735
9918
  //#endregion
9736
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
9919
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
9737
9920
  function parseUnknownDef(refs) {
9738
9921
  return parseAnyDef(refs);
9739
9922
  }
9740
9923
 
9741
9924
  //#endregion
9742
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
9925
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
9743
9926
  const parseReadonlyDef = (def, refs) => {
9744
9927
  return parseDef(def.innerType._def, refs);
9745
9928
  };
9746
9929
 
9747
9930
  //#endregion
9748
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/selectParser.js
9931
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js
9749
9932
  const selectParser = (def, typeName, refs) => {
9750
9933
  switch (typeName) {
9751
- case zod.ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
9752
- case zod.ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);
9753
- case zod.ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);
9754
- case zod.ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);
9755
- case zod.ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();
9756
- case zod.ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);
9757
- case zod.ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);
9758
- case zod.ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);
9759
- case zod.ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);
9760
- case zod.ZodFirstPartyTypeKind.ZodUnion:
9761
- case zod.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);
9762
- case zod.ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);
9763
- case zod.ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);
9764
- case zod.ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);
9765
- case zod.ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);
9766
- case zod.ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);
9767
- case zod.ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);
9768
- case zod.ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);
9769
- case zod.ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);
9770
- case zod.ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);
9771
- case zod.ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);
9772
- case zod.ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;
9773
- case zod.ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);
9774
- case zod.ZodFirstPartyTypeKind.ZodNaN:
9775
- case zod.ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);
9776
- case zod.ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);
9777
- case zod.ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);
9778
- case zod.ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);
9779
- case zod.ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);
9780
- case zod.ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);
9781
- case zod.ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);
9782
- case zod.ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);
9783
- case zod.ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);
9784
- case zod.ZodFirstPartyTypeKind.ZodFunction:
9785
- case zod.ZodFirstPartyTypeKind.ZodVoid:
9786
- case zod.ZodFirstPartyTypeKind.ZodSymbol: return void 0;
9787
- default:
9788
- /* c8 ignore next */
9789
- return ((_) => void 0)(typeName);
9934
+ case zod_v3.ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
9935
+ case zod_v3.ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);
9936
+ case zod_v3.ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);
9937
+ case zod_v3.ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);
9938
+ case zod_v3.ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();
9939
+ case zod_v3.ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);
9940
+ case zod_v3.ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);
9941
+ case zod_v3.ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);
9942
+ case zod_v3.ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);
9943
+ case zod_v3.ZodFirstPartyTypeKind.ZodUnion:
9944
+ case zod_v3.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);
9945
+ case zod_v3.ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);
9946
+ case zod_v3.ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);
9947
+ case zod_v3.ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);
9948
+ case zod_v3.ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);
9949
+ case zod_v3.ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);
9950
+ case zod_v3.ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);
9951
+ case zod_v3.ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);
9952
+ case zod_v3.ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);
9953
+ case zod_v3.ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);
9954
+ case zod_v3.ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);
9955
+ case zod_v3.ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;
9956
+ case zod_v3.ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);
9957
+ case zod_v3.ZodFirstPartyTypeKind.ZodNaN:
9958
+ case zod_v3.ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);
9959
+ case zod_v3.ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);
9960
+ case zod_v3.ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);
9961
+ case zod_v3.ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);
9962
+ case zod_v3.ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);
9963
+ case zod_v3.ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);
9964
+ case zod_v3.ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);
9965
+ case zod_v3.ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);
9966
+ case zod_v3.ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);
9967
+ case zod_v3.ZodFirstPartyTypeKind.ZodFunction:
9968
+ case zod_v3.ZodFirstPartyTypeKind.ZodVoid:
9969
+ case zod_v3.ZodFirstPartyTypeKind.ZodSymbol: return void 0;
9970
+ default: return ((_) => void 0)(typeName);
9790
9971
  }
9791
9972
  };
9792
9973
 
9793
9974
  //#endregion
9794
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/parseDef.js
9975
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js
9795
9976
  function parseDef(def, refs, forceResolution = false) {
9796
9977
  const seenItem = refs.seen.get(def);
9797
9978
  if (refs.override) {
@@ -9842,7 +10023,7 @@ const addMeta = (def, refs, jsonSchema$1) => {
9842
10023
  };
9843
10024
 
9844
10025
  //#endregion
9845
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
10026
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
9846
10027
  const zodToJsonSchema = (schema, options) => {
9847
10028
  const refs = getRefs(options);
9848
10029
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name$3, schema$1]) => ({
@@ -9906,11 +10087,11 @@ const zodToJsonSchema = (schema, options) => {
9906
10087
  };
9907
10088
 
9908
10089
  //#endregion
9909
- //#region ../../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.72/node_modules/zod-to-json-schema/dist/esm/index.js
10090
+ //#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.0_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js
9910
10091
  var esm_default = zodToJsonSchema;
9911
10092
 
9912
10093
  //#endregion
9913
- //#region ../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.72/node_modules/@ai-sdk/ui-utils/dist/index.mjs
10094
+ //#region ../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.76/node_modules/@ai-sdk/ui-utils/dist/index.mjs
9914
10095
  var textStreamPart = {
9915
10096
  code: "0",
9916
10097
  name: "text",
@@ -10751,10 +10932,10 @@ var DiagComponentLogger = function() {
10751
10932
  return DiagComponentLogger$1;
10752
10933
  }();
10753
10934
  function logProxy(funcName, namespace$73, args) {
10754
- var logger$1 = getGlobal("diag");
10755
- if (!logger$1) return;
10935
+ var logger$2 = getGlobal("diag");
10936
+ if (!logger$2) return;
10756
10937
  args.unshift(namespace$73);
10757
- return logger$1[funcName].apply(logger$1, __spreadArray$3([], __read$3(args), false));
10938
+ return logger$2[funcName].apply(logger$2, __spreadArray$3([], __read$3(args), false));
10758
10939
  }
10759
10940
 
10760
10941
  //#endregion
@@ -10787,13 +10968,13 @@ var DiagLogLevel;
10787
10968
 
10788
10969
  //#endregion
10789
10970
  //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
10790
- function createLogLevelDiagLogger(maxLevel, logger$1) {
10971
+ function createLogLevelDiagLogger(maxLevel, logger$2) {
10791
10972
  if (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;
10792
10973
  else if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;
10793
- logger$1 = logger$1 || {};
10974
+ logger$2 = logger$2 || {};
10794
10975
  function _filterFunc(funcName, theLevel) {
10795
- var theFunc = logger$1[funcName];
10796
- if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger$1);
10976
+ var theFunc = logger$2[funcName];
10977
+ if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger$2);
10797
10978
  return function() {};
10798
10979
  }
10799
10980
  return {
@@ -10848,23 +11029,23 @@ var DiagAPI = function() {
10848
11029
  return function() {
10849
11030
  var args = [];
10850
11031
  for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
10851
- var logger$1 = getGlobal("diag");
10852
- if (!logger$1) return;
10853
- return logger$1[funcName].apply(logger$1, __spreadArray$2([], __read$2(args), false));
11032
+ var logger$2 = getGlobal("diag");
11033
+ if (!logger$2) return;
11034
+ return logger$2[funcName].apply(logger$2, __spreadArray$2([], __read$2(args), false));
10854
11035
  };
10855
11036
  }
10856
11037
  var self = this;
10857
- var setLogger = function(logger$1, optionsOrLogLevel) {
11038
+ var setLogger = function(logger$2, optionsOrLogLevel) {
10858
11039
  var _a$2, _b, _c;
10859
11040
  if (optionsOrLogLevel === void 0) optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
10860
- if (logger$1 === self) {
11041
+ if (logger$2 === self) {
10861
11042
  var err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
10862
11043
  self.error((_a$2 = err.stack) !== null && _a$2 !== void 0 ? _a$2 : err.message);
10863
11044
  return false;
10864
11045
  }
10865
11046
  if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
10866
11047
  var oldLogger = getGlobal("diag");
10867
- var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger$1);
11048
+ var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger$2);
10868
11049
  if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
10869
11050
  var stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
10870
11051
  oldLogger.warn("Current logger will be overwritten from " + stack);
@@ -11428,7 +11609,7 @@ var TraceAPI = function() {
11428
11609
  var trace = TraceAPI.getInstance();
11429
11610
 
11430
11611
  //#endregion
11431
- //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.72/node_modules/ai/dist/index.mjs
11612
+ //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.76/node_modules/ai/dist/index.mjs
11432
11613
  var __defProp = Object.defineProperty;
11433
11614
  var __export$1 = (target, all) => {
11434
11615
  for (var name17 in all) __defProp(target, name17, {
@@ -14065,7 +14246,7 @@ function trimStartOfStream() {
14065
14246
  var HANGING_STREAM_WARNING_TIME_MS = 15 * 1e3;
14066
14247
 
14067
14248
  //#endregion
14068
- //#region ../mcp-core/dist/callEmbeddedAgent-DDLo-17Q.js
14249
+ //#region ../mcp-core/dist/callEmbeddedAgent-C4iLIZ6C.js
14069
14250
  /**
14070
14251
  * Call an embedded agent with tool call capture
14071
14252
  * This is the standard way to call embedded AI agents within MCP tools
@@ -14084,6 +14265,10 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
14084
14265
  maxSteps: 5,
14085
14266
  temperature: 1,
14086
14267
  experimental_output: output_exports.object({ schema }),
14268
+ experimental_telemetry: {
14269
+ isEnabled: true,
14270
+ functionId: "callEmbeddedAgent"
14271
+ },
14087
14272
  providerOptions: { openai: {
14088
14273
  structuredOutputs: false,
14089
14274
  strictJsonSchema: false
@@ -14107,7 +14292,7 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
14107
14292
  }
14108
14293
 
14109
14294
  //#endregion
14110
- //#region ../mcp-core/dist/utils-Bq75Ba9Z.js
14295
+ //#region ../mcp-core/dist/utils-wepw5Cmn.js
14111
14296
  /**
14112
14297
  * Standard response schema for all embedded agent tools.
14113
14298
  * Tools return either an error message or the result data, never both.
@@ -14189,7 +14374,7 @@ function agentTool(config) {
14189
14374
  }
14190
14375
 
14191
14376
  //#endregion
14192
- //#region ../mcp-core/dist/otel-semantics-DEnkwUAq.js
14377
+ //#region ../mcp-core/dist/otel-semantics-ji8CZiqz.js
14193
14378
  var namespace$72 = "android";
14194
14379
  var description$72 = "The Android platform on which the Android application is running.\n";
14195
14380
  var attributes$72 = {
@@ -19035,7 +19220,7 @@ function createOtelLookupTool(options) {
19035
19220
  }
19036
19221
 
19037
19222
  //#endregion
19038
- //#region ../mcp-core/dist/whoami-BHrE9F4J.js
19223
+ //#region ../mcp-core/dist/whoami-B-N3_K3B.js
19039
19224
  /**
19040
19225
  * Get the current authenticated user's information from Sentry API
19041
19226
  */
@@ -19064,7 +19249,7 @@ function createWhoamiTool(options) {
19064
19249
  }
19065
19250
 
19066
19251
  //#endregion
19067
- //#region ../mcp-core/dist/utils-EGQqk2W7.js
19252
+ //#region ../mcp-core/dist/utils-Dehfm_qW.js
19068
19253
  function getStringValue(event, key, defaultValue = "") {
19069
19254
  const value = event[key];
19070
19255
  return typeof value === "string" ? value : defaultValue;
@@ -19117,7 +19302,7 @@ function createDatasetAttributesTool(options) {
19117
19302
  "logs"
19118
19303
  ]).describe("The dataset to query attributes for") }),
19119
19304
  execute: async ({ dataset }) => {
19120
- const { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS: RECOMMENDED_FIELDS$1, NUMERIC_FIELDS } = await Promise.resolve().then(() => require("./config-DFewJLVx.cjs"));
19305
+ const { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS: RECOMMENDED_FIELDS$1, NUMERIC_FIELDS, DATASET_EXAMPLES } = await Promise.resolve().then(() => require("./config-rZ982IEm.cjs"));
19121
19306
  const { attributes: customAttributes, fieldTypes } = await fetchCustomAttributes(apiService, organizationSlug, dataset, projectId);
19122
19307
  const allFields = {
19123
19308
  ...BASE_COMMON_FIELDS,
@@ -19143,13 +19328,16 @@ ${Object.keys(allFieldTypes).length > 30 ? `\n... and ${Object.keys(allFieldType
19143
19328
 
19144
19329
  IMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.
19145
19330
 
19146
- Use this information to construct appropriate queries for the ${dataset} dataset.`;
19331
+ EXAMPLE QUERIES FOR ${dataset.toUpperCase()}:
19332
+ ${DATASET_EXAMPLES[dataset].map((ex) => `- "${ex.description}" →\n ${JSON.stringify(ex.output)}`).join("\n\n")}
19333
+
19334
+ Use these examples as patterns for constructing your query.`;
19147
19335
  }
19148
19336
  });
19149
19337
  }
19150
19338
 
19151
19339
  //#endregion
19152
- //#region ../mcp-core/dist/agent-bpoyT2ZL.js
19340
+ //#region ../mcp-core/dist/agent-B24BDcpH.js
19153
19341
  const searchEventsAgentOutputSchema = zod.z.object({
19154
19342
  dataset: zod.z.enum([
19155
19343
  "spans",
@@ -19191,7 +19379,7 @@ async function searchEventsAgent(options) {
19191
19379
  });
19192
19380
  const whoamiTool = createWhoamiTool({ apiService: options.apiService });
19193
19381
  return await callEmbeddedAgent({
19194
- system: require_config_DtimzxvV.systemPrompt,
19382
+ system: require_config_BoFBjXRq.systemPrompt,
19195
19383
  prompt: options.query,
19196
19384
  tools: {
19197
19385
  datasetAttributes: datasetAttributesTool,
@@ -19203,7 +19391,7 @@ async function searchEventsAgent(options) {
19203
19391
  }
19204
19392
 
19205
19393
  //#endregion
19206
- //#region ../mcp-core/dist/formatters-BDf0umPC.js
19394
+ //#region ../mcp-core/dist/formatters-CBiThZnb.js
19207
19395
  /**
19208
19396
  * Format an explanation for how a natural language query was translated
19209
19397
  */
@@ -19225,12 +19413,12 @@ function formatErrorResults(params) {
19225
19413
  output += `**View these results in Sentry**:\n${explorerUrl}\n`;
19226
19414
  output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
19227
19415
  if (eventData.length === 0) {
19228
- __sentry_node.logger.info(__sentry_node.logger.fmt`No error events found for query: ${naturalLanguageQuery}`, {
19416
+ logInfo(`No error events found for query: ${naturalLanguageQuery}`, { extra: {
19229
19417
  query: sentryQuery,
19230
19418
  fields,
19231
19419
  organizationSlug,
19232
19420
  dataset: "errors"
19233
- });
19421
+ } });
19234
19422
  output += `No results found.\n\n`;
19235
19423
  output += `Try being more specific or using different terms in your search.\n`;
19236
19424
  return output;
@@ -19289,12 +19477,12 @@ function formatLogResults(params) {
19289
19477
  output += `**View these results in Sentry**:\n${explorerUrl}\n`;
19290
19478
  output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
19291
19479
  if (eventData.length === 0) {
19292
- __sentry_node.logger.info(__sentry_node.logger.fmt`No log events found for query: ${naturalLanguageQuery}`, {
19480
+ logInfo(`No log events found for query: ${naturalLanguageQuery}`, { extra: {
19293
19481
  query: sentryQuery,
19294
19482
  fields,
19295
19483
  organizationSlug,
19296
19484
  dataset: "logs"
19297
- });
19485
+ } });
19298
19486
  output += `No results found.\n\n`;
19299
19487
  output += `Try being more specific or using different terms in your search.\n`;
19300
19488
  return output;
@@ -19370,12 +19558,12 @@ function formatSpanResults(params) {
19370
19558
  output += `**View these results in Sentry**:\n${explorerUrl}\n`;
19371
19559
  output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
19372
19560
  if (eventData.length === 0) {
19373
- __sentry_node.logger.info(__sentry_node.logger.fmt`No span events found for query: ${naturalLanguageQuery}`, {
19561
+ logInfo(`No span events found for query: ${naturalLanguageQuery}`, { extra: {
19374
19562
  query: sentryQuery,
19375
19563
  fields,
19376
19564
  organizationSlug,
19377
19565
  dataset: "spans"
19378
- });
19566
+ } });
19379
19567
  output += `No results found.\n\n`;
19380
19568
  output += `Try being more specific or using different terms in your search.\n`;
19381
19569
  return output;
@@ -19421,10 +19609,10 @@ function formatSpanResults(params) {
19421
19609
  }
19422
19610
 
19423
19611
  //#endregion
19424
- //#region ../mcp-core/dist/handler-DJTZOFfy.js
19612
+ //#region ../mcp-core/dist/handler-BV5deuNu.js
19425
19613
  var handler_default = defineTool({
19426
19614
  name: "search_events",
19427
- requiredSkills: [
19615
+ skills: [
19428
19616
  "inspect",
19429
19617
  "triage",
19430
19618
  "seer"
@@ -19481,7 +19669,7 @@ var handler_default = defineTool({
19481
19669
  openWorldHint: true
19482
19670
  },
19483
19671
  async handler(params, context$1) {
19484
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19672
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19485
19673
  const organizationSlug = params.organizationSlug;
19486
19674
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19487
19675
  if (params.projectSlug) (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19501,7 +19689,7 @@ var handler_default = defineTool({
19501
19689
  });
19502
19690
  const parsed = agentResult.result;
19503
19691
  const dataset = parsed.dataset;
19504
- const recommendedFields = require_config_DtimzxvV.RECOMMENDED_FIELDS[dataset];
19692
+ const recommendedFields = require_config_BoFBjXRq.RECOMMENDED_FIELDS[dataset];
19505
19693
  if (!parsed.sort) throw new UserInputError(`Search Events Agent response missing required 'sort' parameter. Received: ${JSON.stringify(parsed, null, 2)}. The agent must specify how to sort results (e.g., '-timestamp' for newest first, '-count()' for highest count).`);
19506
19694
  const sentryQuery = parsed.query || "";
19507
19695
  const requestedFields = parsed.fields || [];
@@ -19562,10 +19750,10 @@ var handler_default = defineTool({
19562
19750
  });
19563
19751
 
19564
19752
  //#endregion
19565
- //#region ../mcp-core/dist/create-team-Z6r4JkRE.js
19753
+ //#region ../mcp-core/dist/create-team-Dy96alMI.js
19566
19754
  var create_team_default = defineTool({
19567
19755
  name: "create_team",
19568
- requiredSkills: ["project-management"],
19756
+ skills: ["project-management"],
19569
19757
  requiredScopes: ["team:write"],
19570
19758
  description: [
19571
19759
  "Create a new team in Sentry.",
@@ -19599,7 +19787,7 @@ var create_team_default = defineTool({
19599
19787
  openWorldHint: true
19600
19788
  },
19601
19789
  async handler(params, context$1) {
19602
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19790
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19603
19791
  const organizationSlug = params.organizationSlug;
19604
19792
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19605
19793
  const team = await apiService.createTeam({
@@ -19617,10 +19805,10 @@ var create_team_default = defineTool({
19617
19805
  });
19618
19806
 
19619
19807
  //#endregion
19620
- //#region ../mcp-core/dist/create-project-crr_ixMJ.js
19808
+ //#region ../mcp-core/dist/create-project-CgOCqPNP.js
19621
19809
  var create_project_default = defineTool({
19622
19810
  name: "create_project",
19623
- requiredSkills: ["project-management"],
19811
+ skills: ["project-management"],
19624
19812
  requiredScopes: ["project:write", "team:read"],
19625
19813
  description: [
19626
19814
  "Create a new project in Sentry (includes DSN automatically).",
@@ -19660,7 +19848,7 @@ var create_project_default = defineTool({
19660
19848
  openWorldHint: true
19661
19849
  },
19662
19850
  async handler(params, context$1) {
19663
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19851
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19664
19852
  const organizationSlug = params.organizationSlug;
19665
19853
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19666
19854
  (0, __sentry_core.setTag)("team.slug", params.teamSlug);
@@ -19694,10 +19882,10 @@ var create_project_default = defineTool({
19694
19882
  });
19695
19883
 
19696
19884
  //#endregion
19697
- //#region ../mcp-core/dist/update-project-DVURDZRG.js
19885
+ //#region ../mcp-core/dist/update-project-CMtXKaXN.js
19698
19886
  var update_project_default = defineTool({
19699
19887
  name: "update_project",
19700
- requiredSkills: ["project-management"],
19888
+ skills: ["project-management"],
19701
19889
  requiredScopes: ["project:write"],
19702
19890
  description: [
19703
19891
  "Update project settings in Sentry, such as name, slug, platform, and team assignment.",
@@ -19753,7 +19941,7 @@ var update_project_default = defineTool({
19753
19941
  openWorldHint: true
19754
19942
  },
19755
19943
  async handler(params, context$1) {
19756
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19944
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19757
19945
  const organizationSlug = params.organizationSlug;
19758
19946
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19759
19947
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19812,10 +20000,10 @@ var update_project_default = defineTool({
19812
20000
  });
19813
20001
 
19814
20002
  //#endregion
19815
- //#region ../mcp-core/dist/create-dsn-CqIOWiA_.js
20003
+ //#region ../mcp-core/dist/create-dsn-C-zvRMtE.js
19816
20004
  var create_dsn_default = defineTool({
19817
20005
  name: "create_dsn",
19818
- requiredSkills: ["project-management"],
20006
+ skills: ["project-management"],
19819
20007
  requiredScopes: ["project:write"],
19820
20008
  description: [
19821
20009
  "Create an additional DSN for an EXISTING project.",
@@ -19853,7 +20041,7 @@ var create_dsn_default = defineTool({
19853
20041
  openWorldHint: true
19854
20042
  },
19855
20043
  async handler(params, context$1) {
19856
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20044
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19857
20045
  const organizationSlug = params.organizationSlug;
19858
20046
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19859
20047
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19872,10 +20060,10 @@ var create_dsn_default = defineTool({
19872
20060
  });
19873
20061
 
19874
20062
  //#endregion
19875
- //#region ../mcp-core/dist/find-dsns-BT30qIJi.js
20063
+ //#region ../mcp-core/dist/find-dsns-sufkfAux.js
19876
20064
  var find_dsns_default = defineTool({
19877
20065
  name: "find_dsns",
19878
- requiredSkills: ["project-management"],
20066
+ skills: ["project-management"],
19879
20067
  requiredScopes: ["project:read"],
19880
20068
  description: [
19881
20069
  "List all Sentry DSNs for a specific project.",
@@ -19898,7 +20086,7 @@ var find_dsns_default = defineTool({
19898
20086
  openWorldHint: true
19899
20087
  },
19900
20088
  async handler(params, context$1) {
19901
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20089
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19902
20090
  const organizationSlug = params.organizationSlug;
19903
20091
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19904
20092
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19923,7 +20111,7 @@ var find_dsns_default = defineTool({
19923
20111
  });
19924
20112
 
19925
20113
  //#endregion
19926
- //#region ../mcp-core/dist/fetch-utils-BWMzxmEl.js
20114
+ //#region ../mcp-core/dist/fetch-utils-C6qSgZai.js
19927
20115
  /**
19928
20116
  * Fetch with timeout using AbortController
19929
20117
  * @param url - The URL to fetch
@@ -19973,10 +20161,10 @@ async function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, should
19973
20161
  }
19974
20162
 
19975
20163
  //#endregion
19976
- //#region ../mcp-core/dist/analyze-issue-with-seer-DFzhVutx.js
20164
+ //#region ../mcp-core/dist/analyze-issue-with-seer-jcYxRIL1.js
19977
20165
  var analyze_issue_with_seer_default = defineTool({
19978
20166
  name: "analyze_issue_with_seer",
19979
- requiredSkills: ["seer"],
20167
+ skills: ["seer"],
19980
20168
  requiredScopes: [],
19981
20169
  description: [
19982
20170
  "Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.",
@@ -20032,7 +20220,7 @@ var analyze_issue_with_seer_default = defineTool({
20032
20220
  openWorldHint: true
20033
20221
  },
20034
20222
  async handler(params, context$1) {
20035
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20223
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20036
20224
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
20037
20225
  organizationSlug: params.organizationSlug,
20038
20226
  issueId: params.issueId,
@@ -20161,10 +20349,10 @@ var analyze_issue_with_seer_default = defineTool({
20161
20349
  });
20162
20350
 
20163
20351
  //#endregion
20164
- //#region ../mcp-core/dist/search-docs-BTxn8zJZ.js
20352
+ //#region ../mcp-core/dist/search-docs-BzvTE9Na.js
20165
20353
  var search_docs_default = defineTool({
20166
20354
  name: "search_docs",
20167
- requiredSkills: ["docs"],
20355
+ skills: ["docs"],
20168
20356
  requiredScopes: [],
20169
20357
  description: [
20170
20358
  "Search Sentry documentation for SDK setup, instrumentation, and configuration guidance.",
@@ -20244,10 +20432,10 @@ var search_docs_default = defineTool({
20244
20432
  });
20245
20433
 
20246
20434
  //#endregion
20247
- //#region ../mcp-core/dist/get-doc-1R-f9w5O.js
20435
+ //#region ../mcp-core/dist/get-doc-CImfwkht.js
20248
20436
  var get_doc_default = defineTool({
20249
20437
  name: "get_doc",
20250
- requiredSkills: ["docs"],
20438
+ skills: ["docs"],
20251
20439
  requiredScopes: [],
20252
20440
  description: [
20253
20441
  "Fetch the full markdown content of a Sentry documentation page.",
@@ -20321,7 +20509,7 @@ var get_doc_default = defineTool({
20321
20509
  });
20322
20510
 
20323
20511
  //#endregion
20324
- //#region ../mcp-core/dist/dataset-fields-DNUZW54W.js
20512
+ //#region ../mcp-core/dist/dataset-fields-nvbboMpe.js
20325
20513
  /**
20326
20514
  * Discover available fields for a dataset by querying Sentry's tags API
20327
20515
  */
@@ -20471,7 +20659,7 @@ function getCommonPatterns(dataset) {
20471
20659
  }
20472
20660
 
20473
20661
  //#endregion
20474
- //#region ../mcp-core/dist/config-48eLu9dt.js
20662
+ //#region ../mcp-core/dist/config-BFaJp4hW.js
20475
20663
  /**
20476
20664
  * Configuration for the search-issues agent
20477
20665
  */
@@ -20543,7 +20731,7 @@ Always use the issueFields tool to discover available fields when needed.
20543
20731
  Use the whoami tool when you need to resolve 'me' references.`;
20544
20732
 
20545
20733
  //#endregion
20546
- //#region ../mcp-core/dist/agent-Dp98c6gn.js
20734
+ //#region ../mcp-core/dist/agent-4n2tvUk3.js
20547
20735
  const searchIssuesAgentOutputSchema = zod.z.object({
20548
20736
  query: zod.z.string().describe("The Sentry issue search query"),
20549
20737
  sort: zod.z.enum([
@@ -20577,7 +20765,7 @@ async function searchIssuesAgent(options) {
20577
20765
  }
20578
20766
 
20579
20767
  //#endregion
20580
- //#region ../mcp-core/dist/formatters-ddoifBDN.js
20768
+ //#region ../mcp-core/dist/formatters-W4LF85x9.js
20581
20769
  /**
20582
20770
  * Format an explanation for how a natural language query was translated
20583
20771
  */
@@ -20601,12 +20789,12 @@ function formatIssueResults(params) {
20601
20789
  output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\n\n`;
20602
20790
  }
20603
20791
  if (issues.length === 0) {
20604
- __sentry_node.logger.info(__sentry_node.logger.fmt`No issues found for query: ${naturalLanguageQuery || query}`, {
20792
+ logInfo(`No issues found for query: ${naturalLanguageQuery || query}`, { extra: {
20605
20793
  query,
20606
20794
  organizationSlug,
20607
20795
  projectSlug: projectSlugOrId,
20608
20796
  naturalLanguageQuery
20609
- });
20797
+ } });
20610
20798
  output += "No issues found matching your search criteria.\n\n";
20611
20799
  output += "Try adjusting your search criteria or time range.";
20612
20800
  return output;
@@ -20658,10 +20846,10 @@ function formatDate(dateString) {
20658
20846
  }
20659
20847
 
20660
20848
  //#endregion
20661
- //#region ../mcp-core/dist/handler-AE-i3IgX.js
20849
+ //#region ../mcp-core/dist/handler-DqBNjidz.js
20662
20850
  var handler_default$1 = defineTool({
20663
20851
  name: "search_issues",
20664
- requiredSkills: [
20852
+ skills: [
20665
20853
  "inspect",
20666
20854
  "triage",
20667
20855
  "seer"
@@ -20716,7 +20904,7 @@ var handler_default$1 = defineTool({
20716
20904
  openWorldHint: true
20717
20905
  },
20718
20906
  async handler(params, context$1) {
20719
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20907
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20720
20908
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
20721
20909
  if (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) (0, __sentry_core.setTag)("project.id", params.projectSlugOrId);
20722
20910
  else (0, __sentry_core.setTag)("project.slug", params.projectSlugOrId);
@@ -20738,8 +20926,8 @@ var handler_default$1 = defineTool({
20738
20926
  const translatedQuery = agentResult.result;
20739
20927
  const issues = await apiService.listIssues({
20740
20928
  organizationSlug: params.organizationSlug,
20741
- projectSlug: params.projectSlugOrId,
20742
- query: translatedQuery.query,
20929
+ projectSlug: params.projectSlugOrId ?? void 0,
20930
+ query: translatedQuery.query ?? void 0,
20743
20931
  sortBy: translatedQuery.sort || "date",
20744
20932
  limit: params.limit
20745
20933
  });
@@ -20759,18 +20947,18 @@ var handler_default$1 = defineTool({
20759
20947
  output += formatIssueResults({
20760
20948
  issues,
20761
20949
  organizationSlug: params.organizationSlug,
20762
- projectSlugOrId: params.projectSlugOrId,
20950
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20763
20951
  query: translatedQuery.query,
20764
- regionUrl: params.regionUrl,
20952
+ regionUrl: params.regionUrl ?? void 0,
20765
20953
  naturalLanguageQuery: params.naturalLanguageQuery,
20766
20954
  skipHeader: true
20767
20955
  });
20768
20956
  } else output = formatIssueResults({
20769
20957
  issues,
20770
20958
  organizationSlug: params.organizationSlug,
20771
- projectSlugOrId: params.projectSlugOrId,
20959
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20772
20960
  query: translatedQuery.query,
20773
- regionUrl: params.regionUrl,
20961
+ regionUrl: params.regionUrl ?? void 0,
20774
20962
  naturalLanguageQuery: params.naturalLanguageQuery,
20775
20963
  skipHeader: false
20776
20964
  });
@@ -20779,7 +20967,7 @@ var handler_default$1 = defineTool({
20779
20967
  });
20780
20968
 
20781
20969
  //#endregion
20782
- //#region ../mcp-core/dist/config-DkQjdsDV.js
20970
+ //#region ../mcp-core/dist/config-Dh25cVhL.js
20783
20971
  /**
20784
20972
  * Configuration for the use_sentry embedded agent.
20785
20973
  *
@@ -20798,7 +20986,7 @@ The user may include various parameters to pass to those tools in their prompt.
20798
20986
  You MUST return tool results directly without interpreting them.`;
20799
20987
 
20800
20988
  //#endregion
20801
- //#region ../mcp-core/dist/agent-DoJNlQyJ.js
20989
+ //#region ../mcp-core/dist/agent-bVTgqfc0.js
20802
20990
  /**
20803
20991
  * Output schema for the embedded agent.
20804
20992
  * The agent returns the final result string directly from its tool calls.
@@ -20820,7 +21008,7 @@ async function useSentryAgent(options) {
20820
21008
  }
20821
21009
 
20822
21010
  //#endregion
20823
- //#region ../mcp-core/dist/error-handling-jSzAQs4J.js
21011
+ //#region ../mcp-core/dist/error-handling-BVlYIE1J.js
20824
21012
  /**
20825
21013
  * Type guard to identify user input validation errors.
20826
21014
  */
@@ -20911,7 +21099,7 @@ async function formatErrorForUser(error) {
20911
21099
  }
20912
21100
 
20913
21101
  //#endregion
20914
- //#region ../mcp-core/dist/constraint-helpers-CBddlAo8.js
21102
+ //#region ../mcp-core/dist/constraint-helpers-0jgp7p3K.js
20915
21103
  /**
20916
21104
  * Determines which tool parameter keys should be filtered out of the schema
20917
21105
  * because they will be injected from constraints.
@@ -20973,7 +21161,7 @@ function getConstraintParametersToInject(constraints, toolInputSchema) {
20973
21161
  }
20974
21162
 
20975
21163
  //#endregion
20976
- //#region ../mcp-core/dist/server-CroFA_Gp.js
21164
+ //#region ../mcp-core/dist/server-DGF-NUWx.js
20977
21165
  /**
20978
21166
  * Format tool calls into a readable trace
20979
21167
  */
@@ -20994,7 +21182,7 @@ function formatToolCallTrace(toolCalls) {
20994
21182
  }
20995
21183
  var handler_default$2 = defineTool({
20996
21184
  name: "use_sentry",
20997
- requiredSkills: [],
21185
+ skills: [],
20998
21186
  requiredScopes: [],
20999
21187
  description: [
21000
21188
  "Natural language interface to Sentry via an embedded AI agent.",
@@ -21088,7 +21276,7 @@ var tools_default = {
21088
21276
  /**
21089
21277
  * Creates and configures a complete MCP server with Sentry instrumentation.
21090
21278
  *
21091
- * The server is built with tools filtered based on the granted scopes in the context.
21279
+ * The server is built with tools filtered based on the granted skills in the context.
21092
21280
  * Context is captured in tool handler closures and passed directly to handlers.
21093
21281
  *
21094
21282
  * @example Usage with stdio transport
@@ -21121,33 +21309,31 @@ var tools_default = {
21121
21309
  * return createMcpHandler(server, { route: "/mcp" })(request, env, ctx);
21122
21310
  * ```
21123
21311
  */
21124
- function buildServer({ context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21312
+ function buildServer({ context: context$1, agentMode = false, tools: customTools }) {
21125
21313
  const server$1 = new __modelcontextprotocol_sdk_server_mcp_js.McpServer({
21126
- name: require_resolve.MCP_SERVER_NAME,
21314
+ name: MCP_SERVER_NAME,
21127
21315
  version: require_stdio.LIB_VERSION
21128
21316
  });
21129
21317
  configureServer({
21130
21318
  server: server$1,
21131
21319
  context: context$1,
21132
- onToolComplete,
21133
21320
  agentMode,
21134
21321
  tools: customTools
21135
21322
  });
21136
21323
  return (0, __sentry_core.wrapMcpServerWithSentry)(server$1);
21137
21324
  }
21138
21325
  /**
21139
- * Configures an MCP server with tools filtered by granted skills or scopes.
21326
+ * Configures an MCP server with tools filtered by granted skills.
21140
21327
  *
21141
21328
  * Internal function used by buildServer(). Use buildServer() instead for most cases.
21142
- * Tools are filtered at registration time based on grantedSkills OR grantedScopes
21143
- * (either system can grant access), and context is captured in closures for tool handler execution.
21329
+ * Tools are filtered at registration time based on grantedSkills, and context is
21330
+ * captured in closures for tool handler execution.
21144
21331
  *
21145
21332
  * In agent mode, only the use_sentry tool is registered, bypassing authorization checks.
21146
21333
  */
21147
- function configureServer({ server: server$1, context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21334
+ function configureServer({ server: server$1, context: context$1, agentMode = false, tools: customTools }) {
21148
21335
  const toolsToRegister = agentMode ? { use_sentry: tools_default.use_sentry } : customTools ?? tools_default;
21149
21336
  const grantedSkills = context$1.grantedSkills ? new Set(context$1.grantedSkills) : void 0;
21150
- const grantedScopes = context$1.grantedScopes ? new Set(context$1.grantedScopes) : void 0;
21151
21337
  server$1.server.onerror = (error) => {
21152
21338
  const transportLogOptions = {
21153
21339
  loggerScope: ["server", "transport"],
@@ -21157,96 +21343,77 @@ function configureServer({ server: server$1, context: context$1, onToolComplete,
21157
21343
  };
21158
21344
  for (const [toolKey, tool$1] of Object.entries(toolsToRegister)) {
21159
21345
  /**
21160
- * Authorization System Precedence
21161
- * ================================
21346
+ * Skills-Based Authorization
21347
+ * ==========================
21162
21348
  *
21163
- * The server supports two authorization systems:
21164
- * 1. **Skills System (NEW)** - User-facing permission groups (inspect, triage, etc.)
21165
- * 2. **Scopes System (LEGACY)** - Low-level API permissions (event:read, project:write, etc.)
21349
+ * Tools are filtered at registration time based on grantedSkills.
21350
+ * Tool must have non-empty `skills` array to be exposed.
21351
+ * Empty `skills: []` means intentionally excluded from skills system.
21166
21352
  *
21167
- * IMPORTANT: These systems are **MUTUALLY EXCLUSIVE** - only one is active per session:
21168
- *
21169
- * ## Skills Mode (when grantedSkills is set):
21170
- * - ONLY skills are checked (scopes are ignored)
21171
- * - Tool must have non-empty `requiredSkills` array to be exposed
21172
- * - Empty `requiredSkills: []` means intentionally excluded from skills system
21173
- * - Authorization: `allowed = hasRequiredSkills(grantedSkills, tool.requiredSkills)`
21174
- *
21175
- * ## Scopes Mode (when grantedSkills is NOT set, but grantedScopes is set):
21176
- * - Falls back to legacy scope checking
21177
- * - Empty `requiredScopes: []` means no scopes required (always allowed)
21178
- * - Authorization: `allowed = isToolAllowed(tool.requiredScopes, grantedScopes)`
21179
- *
21180
- * ## Tool Visibility:
21181
- * - If not allowed by active authorization system: tool is NOT registered
21182
- * - Only registered tools are visible to MCP clients
21353
+ * In agent mode, authorization is skipped - use_sentry handles it internally.
21183
21354
  *
21184
21355
  * ## Examples:
21185
21356
  * ```typescript
21186
- * // Tool available in "triage" skill only:
21187
- * { requiredSkills: ["triage"], requiredScopes: ["event:write"] }
21357
+ * // Tool belongs to "triage" skill only:
21358
+ * { skills: ["triage"] }
21188
21359
  *
21189
- * // Tool available to ALL skills (foundational tool like whoami):
21190
- * { requiredSkills: ALL_SKILLS, requiredScopes: [] }
21360
+ * // Tool belongs to ALL skills (foundational tool like whoami):
21361
+ * { skills: ALL_SKILLS }
21191
21362
  *
21192
21363
  * // Tool excluded from skills system (like use_sentry in agent mode):
21193
- * { requiredSkills: [], requiredScopes: [] }
21364
+ * { skills: [] }
21194
21365
  * ```
21195
21366
  */
21196
21367
  let allowed = false;
21197
21368
  if (agentMode) allowed = true;
21198
21369
  else if (grantedSkills) {
21199
- if (tool$1.requiredSkills && tool$1.requiredSkills.length > 0) allowed = require_resolve.hasRequiredSkills(grantedSkills, tool$1.requiredSkills);
21200
- } else if (grantedScopes) allowed = require_resolve.isToolAllowed(tool$1.requiredScopes, grantedScopes);
21370
+ if (tool$1.skills && tool$1.skills.length > 0) allowed = require_resolve.isEnabledBySkills(grantedSkills, tool$1.skills);
21371
+ }
21201
21372
  if (!allowed) continue;
21202
21373
  if (toolKey === "find_organizations" && context$1.constraints.organizationSlug || toolKey === "find_projects" && context$1.constraints.projectSlug) continue;
21203
21374
  const constraintKeysToFilter = new Set(getConstraintKeysToFilter(context$1.constraints, tool$1.inputSchema));
21204
21375
  const filteredInputSchema = Object.fromEntries(Object.entries(tool$1.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));
21205
21376
  server$1.tool(tool$1.name, tool$1.description, filteredInputSchema, tool$1.annotations, async (params, extra) => {
21377
+ const activeSpan = (0, __sentry_core.getActiveSpan)();
21378
+ if (activeSpan) {
21379
+ if (context$1.constraints.organizationSlug) activeSpan.setAttribute("sentry-mcp.constraint-organization", context$1.constraints.organizationSlug);
21380
+ if (context$1.constraints.projectSlug) activeSpan.setAttribute("sentry-mcp.constraint-project", context$1.constraints.projectSlug);
21381
+ }
21382
+ if (context$1.userId) (0, __sentry_core.setUser)({ id: context$1.userId });
21383
+ if (context$1.clientId) (0, __sentry_core.setTag)("client.id", context$1.clientId);
21206
21384
  try {
21207
- const activeSpan = (0, __sentry_core.getActiveSpan)();
21385
+ const applicableConstraints = getConstraintParametersToInject(context$1.constraints, tool$1.inputSchema);
21386
+ const paramsWithConstraints = {
21387
+ ...params,
21388
+ ...applicableConstraints
21389
+ };
21390
+ const output = await tool$1.handler(paramsWithConstraints, context$1);
21391
+ if (activeSpan) activeSpan.setStatus({ code: 1 });
21392
+ if (typeof output === "string") return { content: [{
21393
+ type: "text",
21394
+ text: output
21395
+ }] };
21396
+ if (Array.isArray(output)) return { content: output };
21397
+ throw new Error(`Invalid tool output: ${output}`);
21398
+ } catch (error) {
21208
21399
  if (activeSpan) {
21209
- if (context$1.constraints.organizationSlug) activeSpan.setAttribute("sentry-mcp.constraint-organization", context$1.constraints.organizationSlug);
21210
- if (context$1.constraints.projectSlug) activeSpan.setAttribute("sentry-mcp.constraint-project", context$1.constraints.projectSlug);
21400
+ activeSpan.setStatus({ code: 2 });
21401
+ activeSpan.recordException(error);
21211
21402
  }
21212
- if (context$1.userId) (0, __sentry_core.setUser)({ id: context$1.userId });
21213
- if (context$1.clientId) (0, __sentry_core.setTag)("client.id", context$1.clientId);
21214
- try {
21215
- const applicableConstraints = getConstraintParametersToInject(context$1.constraints, tool$1.inputSchema);
21216
- const paramsWithConstraints = {
21217
- ...params,
21218
- ...applicableConstraints
21219
- };
21220
- const output = await tool$1.handler(paramsWithConstraints, context$1);
21221
- if (activeSpan) activeSpan.setStatus({ code: 1 });
21222
- if (typeof output === "string") return { content: [{
21403
+ return {
21404
+ content: [{
21223
21405
  type: "text",
21224
- text: output
21225
- }] };
21226
- if (Array.isArray(output)) return { content: output };
21227
- throw new Error(`Invalid tool output: ${output}`);
21228
- } catch (error) {
21229
- if (activeSpan) {
21230
- activeSpan.setStatus({ code: 2 });
21231
- activeSpan.recordException(error);
21232
- }
21233
- return {
21234
- content: [{
21235
- type: "text",
21236
- text: await formatErrorForUser(error)
21237
- }],
21238
- isError: true
21239
- };
21240
- }
21241
- } finally {
21242
- onToolComplete?.();
21406
+ text: await formatErrorForUser(error)
21407
+ }],
21408
+ isError: true
21409
+ };
21243
21410
  }
21244
21411
  });
21245
21412
  }
21246
21413
  }
21247
21414
 
21248
21415
  //#endregion
21249
- //#region ../mcp-core/dist/sentry-Bz8KwQu9.js
21416
+ //#region ../mcp-core/dist/sentry-Cim_ihS6.js
21250
21417
  const SCRUB_PATTERNS = [
21251
21418
  {
21252
21419
  pattern: /\bsk-[a-zA-Z0-9]{48}\b/g,
@@ -21351,7 +21518,7 @@ function sentryBeforeSend(event, hint) {
21351
21518
  //#region src/index.ts
21352
21519
  const packageName = "@sentry/mcp-server";
21353
21520
  const allSkills = Object.keys(require_resolve.SKILLS);
21354
- const usageText = require_usage.buildUsage(packageName, require_resolve.DEFAULT_SCOPES, require_resolve.ALL_SCOPES, require_resolve.DEFAULT_SKILLS, allSkills);
21521
+ const usageText = require_usage.buildUsage(packageName, allSkills);
21355
21522
  function die(message) {
21356
21523
  console.error(message);
21357
21524
  console.error(usageText);
@@ -21420,7 +21587,6 @@ if (cli.agent) {
21420
21587
  const SENTRY_TIMEOUT = 5e3;
21421
21588
  const context = {
21422
21589
  accessToken: cfg.accessToken,
21423
- grantedScopes: cfg.finalScopes,
21424
21590
  grantedSkills: cfg.finalSkills,
21425
21591
  constraints: {
21426
21592
  organizationSlug: cfg.organizationSlug ?? null,