@sentry/mcp-server 0.23.1 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  const require_chunk = require('./chunk-DoeelZqw.cjs');
3
3
  const require_resolve = require('./resolve-BMmRdCFJ.cjs');
4
- const require_stdio = require('./stdio-aCI9XyaI.cjs');
4
+ const require_stdio = require('./stdio-iRuX-anh.cjs');
5
5
  const require_config_DtimzxvV = require('./config-DtimzxvV-D3ccpxhQ.cjs');
6
6
  const require_usage = require('./usage-iwGZsu3a.cjs');
7
7
  const require_parse = require('./parse-By6nDBNs.cjs');
@@ -9,6 +9,7 @@ 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
11
  const __sentry_node = require_chunk.__toESM(require("@sentry/node"));
12
+ const zod_v3 = require_chunk.__toESM(require("zod/v3"));
12
13
  const __modelcontextprotocol_sdk_server_mcp_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/server/mcp.js"));
13
14
  const __modelcontextprotocol_sdk_inMemory_js = require_chunk.__toESM(require("@modelcontextprotocol/sdk/inMemory.js"));
14
15
 
@@ -2284,7 +2285,7 @@ function createApiError(message, status, detail, responseBody) {
2284
2285
  }
2285
2286
 
2286
2287
  //#endregion
2287
- //#region ../mcp-core/dist/client-ywsSgZWL.js
2288
+ //#region ../mcp-core/dist/client-B9APZB0N.js
2288
2289
  /**
2289
2290
  * Mapping of common network error codes to user-friendly messages.
2290
2291
  * These help users understand and resolve connection issues.
@@ -3405,7 +3406,7 @@ function validateRegionUrl(regionUrl, baseHost) {
3405
3406
  }
3406
3407
 
3407
3408
  //#endregion
3408
- //#region ../mcp-core/dist/api-C-36gW41.js
3409
+ //#region ../mcp-core/dist/api-C49LlEqH.js
3409
3410
  /**
3410
3411
  * Create a Sentry API service from server context with optional region override
3411
3412
  * @param context - Server context containing host and access token
@@ -3426,7 +3427,7 @@ function apiServiceFromContext(context$1, opts = {}) {
3426
3427
  }
3427
3428
 
3428
3429
  //#endregion
3429
- //#region ../mcp-core/dist/whoami-Dme_5-Db.js
3430
+ //#region ../mcp-core/dist/whoami-BoraVlxR.js
3430
3431
  var whoami_default = defineTool({
3431
3432
  name: "whoami",
3432
3433
  description: [
@@ -3459,7 +3460,7 @@ var whoami_default = defineTool({
3459
3460
  });
3460
3461
 
3461
3462
  //#endregion
3462
- //#region ../mcp-core/dist/find-organizations-DaWlAPTI.js
3463
+ //#region ../mcp-core/dist/find-organizations-Df_7XcZh.js
3463
3464
  const RESULT_LIMIT$2 = 25;
3464
3465
  var find_organizations_default = defineTool({
3465
3466
  name: "find_organizations",
@@ -3482,7 +3483,7 @@ var find_organizations_default = defineTool({
3482
3483
  },
3483
3484
  async handler(params, context$1) {
3484
3485
  const apiService = apiServiceFromContext(context$1);
3485
- const organizations = await apiService.listOrganizations({ query: params.query });
3486
+ const organizations = await apiService.listOrganizations({ query: params.query ?? void 0 });
3486
3487
  let output = "# Organizations\n\n";
3487
3488
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3488
3489
  if (organizations.length === 0) {
@@ -3511,7 +3512,7 @@ var find_organizations_default = defineTool({
3511
3512
  });
3512
3513
 
3513
3514
  //#endregion
3514
- //#region ../mcp-core/dist/find-teams-DurHMQdf.js
3515
+ //#region ../mcp-core/dist/find-teams-Ci9--JWk.js
3515
3516
  const RESULT_LIMIT$1 = 25;
3516
3517
  var find_teams_default = defineTool({
3517
3518
  name: "find_teams",
@@ -3541,11 +3542,11 @@ var find_teams_default = defineTool({
3541
3542
  openWorldHint: true
3542
3543
  },
3543
3544
  async handler(params, context$1) {
3544
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3545
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3545
3546
  const organizationSlug = params.organizationSlug;
3546
3547
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3547
3548
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3548
- const teams = await apiService.listTeams(organizationSlug, { query: params.query });
3549
+ const teams = await apiService.listTeams(organizationSlug, { query: params.query ?? void 0 });
3549
3550
  let output = `# Teams in **${organizationSlug}**\n\n`;
3550
3551
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3551
3552
  if (teams.length === 0) {
@@ -3559,7 +3560,7 @@ var find_teams_default = defineTool({
3559
3560
  });
3560
3561
 
3561
3562
  //#endregion
3562
- //#region ../mcp-core/dist/find-projects-DT8-Ot8E.js
3563
+ //#region ../mcp-core/dist/find-projects-_xE0VUHG.js
3563
3564
  const RESULT_LIMIT = 25;
3564
3565
  var find_projects_default = defineTool({
3565
3566
  name: "find_projects",
@@ -3585,11 +3586,11 @@ var find_projects_default = defineTool({
3585
3586
  openWorldHint: true
3586
3587
  },
3587
3588
  async handler(params, context$1) {
3588
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3589
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3589
3590
  const organizationSlug = params.organizationSlug;
3590
3591
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3591
3592
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3592
- const projects = await apiService.listProjects(organizationSlug, { query: params.query });
3593
+ const projects = await apiService.listProjects(organizationSlug, { query: params.query ?? void 0 });
3593
3594
  let output = `# Projects in **${organizationSlug}**\n\n`;
3594
3595
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3595
3596
  if (projects.length === 0) {
@@ -3603,7 +3604,7 @@ var find_projects_default = defineTool({
3603
3604
  });
3604
3605
 
3605
3606
  //#endregion
3606
- //#region ../mcp-core/dist/find-releases-CH1SfYpB.js
3607
+ //#region ../mcp-core/dist/find-releases-B-2KNnj4.js
3607
3608
  var find_releases_default = defineTool({
3608
3609
  name: "find_releases",
3609
3610
  requiredSkills: ["inspect"],
@@ -3645,13 +3646,13 @@ var find_releases_default = defineTool({
3645
3646
  openWorldHint: true
3646
3647
  },
3647
3648
  async handler(params, context$1) {
3648
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3649
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3649
3650
  const organizationSlug = params.organizationSlug;
3650
3651
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
3651
3652
  const releases = await apiService.listReleases({
3652
3653
  organizationSlug,
3653
- projectSlug: params.projectSlug,
3654
- query: params.query
3654
+ projectSlug: params.projectSlug ?? void 0,
3655
+ query: params.query ?? void 0
3655
3656
  });
3656
3657
  let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : ""}**\n\n`;
3657
3658
  if (releases.length === 0) {
@@ -3851,7 +3852,7 @@ function getOutputForAutofixStep(step) {
3851
3852
  }
3852
3853
 
3853
3854
  //#endregion
3854
- //#region ../mcp-core/dist/formatting-CBQAlru_.js
3855
+ //#region ../mcp-core/dist/formatting-CGRFosDy.js
3855
3856
  const LANGUAGE_EXTENSIONS = {
3856
3857
  ".java": "java",
3857
3858
  ".py": "python",
@@ -4769,6 +4770,12 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
4769
4770
  output += `**Users Impacted**: ${issue.userCount}\n`;
4770
4771
  output += `**Status**: ${issue.status}\n`;
4771
4772
  if (issue.substatus) output += `**Substatus**: ${issue.substatus}\n`;
4773
+ if (issue.assignedTo) if (typeof issue.assignedTo === "string") output += `**Assigned To**: ${issue.assignedTo}\n`;
4774
+ else {
4775
+ const assignee = issue.assignedTo;
4776
+ const type = assignee.type === "team" ? "Team" : "User";
4777
+ output += `**Assigned To**: ${assignee.name} (${type})\n`;
4778
+ }
4772
4779
  if (issue.issueType) output += `**Issue Type**: ${issue.issueType}\n`;
4773
4780
  if (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\n`;
4774
4781
  output += `**Platform**: ${issue.platform}\n`;
@@ -4841,7 +4848,7 @@ function enhanceNotFoundError(error, params) {
4841
4848
  }
4842
4849
 
4843
4850
  //#endregion
4844
- //#region ../mcp-core/dist/get-issue-details-Bj1LiaC2.js
4851
+ //#region ../mcp-core/dist/get-issue-details-Dkx3WdXu.js
4845
4852
  var get_issue_details_default = defineTool({
4846
4853
  name: "get_issue_details",
4847
4854
  requiredSkills: [
@@ -4903,7 +4910,7 @@ var get_issue_details_default = defineTool({
4903
4910
  openWorldHint: true
4904
4911
  },
4905
4912
  async handler(params, context$1) {
4906
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
4913
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
4907
4914
  if (params.eventId) {
4908
4915
  const orgSlug$1 = params.organizationSlug;
4909
4916
  const eventId = params.eventId;
@@ -5022,7 +5029,7 @@ function shouldFetchTraceForEvent(event) {
5022
5029
  }
5023
5030
 
5024
5031
  //#endregion
5025
- //#region ../mcp-core/dist/get-trace-details-DynWtF0W.js
5032
+ //#region ../mcp-core/dist/get-trace-details-f5XoKmIu.js
5026
5033
  const MAX_DEPTH = 2;
5027
5034
  const MINIMUM_DURATION_THRESHOLD_MS = 10;
5028
5035
  const MIN_MEANINGFUL_CHILD_DURATION = 5;
@@ -5071,7 +5078,7 @@ var get_trace_details_default = defineTool({
5071
5078
  },
5072
5079
  async handler(params, context$1) {
5073
5080
  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 });
5081
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5075
5082
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
5076
5083
  (0, __sentry_core.setTag)("trace.id", params.traceId);
5077
5084
  const traceMeta = await apiService.getTraceMeta({
@@ -5321,7 +5328,7 @@ function formatTraceOutput({ organizationSlug, traceId, traceMeta, trace: trace$
5321
5328
  }
5322
5329
 
5323
5330
  //#endregion
5324
- //#region ../mcp-core/dist/get-event-attachment-DmIqKy4p.js
5331
+ //#region ../mcp-core/dist/get-event-attachment-B5GR2cWj.js
5325
5332
  var get_event_attachment_default = defineTool({
5326
5333
  name: "get_event_attachment",
5327
5334
  requiredSkills: ["inspect"],
@@ -5367,7 +5374,7 @@ var get_event_attachment_default = defineTool({
5367
5374
  openWorldHint: true
5368
5375
  },
5369
5376
  async handler(params, context$1) {
5370
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5377
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5371
5378
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
5372
5379
  if (params.attachmentId) {
5373
5380
  const attachment = await apiService.getEventAttachment({
@@ -5392,7 +5399,6 @@ var get_event_attachment_default = defineTool({
5392
5399
  contentParts.push(image);
5393
5400
  } else {
5394
5401
  const resource = {
5395
- id: params.attachmentId,
5396
5402
  type: "resource",
5397
5403
  resource: {
5398
5404
  uri: `file://${attachment.filename}`,
@@ -5470,7 +5476,7 @@ function formatAssignedTo(assignedTo) {
5470
5476
  }
5471
5477
 
5472
5478
  //#endregion
5473
- //#region ../mcp-core/dist/update-issue-COCI-f3S.js
5479
+ //#region ../mcp-core/dist/update-issue-BKnQHYYL.js
5474
5480
  var update_issue_default = defineTool({
5475
5481
  name: "update_issue",
5476
5482
  requiredSkills: ["triage"],
@@ -5534,7 +5540,7 @@ var update_issue_default = defineTool({
5534
5540
  openWorldHint: true
5535
5541
  },
5536
5542
  async handler(params, context$1) {
5537
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5543
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5538
5544
  if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
5539
5545
  if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
5540
5546
  if (!params.status && !params.assignedTo) throw new UserInputError("At least one of `status` or `assignedTo` must be provided to update the issue");
@@ -5939,7 +5945,7 @@ var require_secure_json_parse = require_chunk.__commonJS({ "../../node_modules/.
5939
5945
  } });
5940
5946
 
5941
5947
  //#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
5948
+ //#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
5949
  var import_secure_json_parse = require_chunk.__toESM(require_secure_json_parse(), 1);
5944
5950
  function combineHeaders(...headers) {
5945
5951
  return headers.reduce((combinedHeaders, currentHeaders) => ({
@@ -6430,7 +6436,7 @@ function withoutTrailingSlash(url) {
6430
6436
  }
6431
6437
 
6432
6438
  //#endregion
6433
- //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.72/node_modules/@ai-sdk/openai/dist/index.mjs
6439
+ //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs
6434
6440
  function convertToOpenAIChatMessages({ prompt, useLegacyFunctionCalling = false, systemMessageMode = "system" }) {
6435
6441
  const messages = [];
6436
6442
  const warnings = [];
@@ -8743,7 +8749,7 @@ function createOpenAI(options = {}) {
8743
8749
  var openai = createOpenAI({ compatibility: "strict" });
8744
8750
 
8745
8751
  //#endregion
8746
- //#region ../mcp-core/dist/openai-provider-CxDJ8Xy2.js
8752
+ //#region ../mcp-core/dist/openai-provider-C18ibzKZ.js
8747
8753
  const DEFAULT_OPENAI_MODEL = "gpt-5";
8748
8754
  const VALID_REASONING_EFFORTS = [
8749
8755
  "low",
@@ -8786,7 +8792,7 @@ function getOpenAIModel(model) {
8786
8792
  }
8787
8793
 
8788
8794
  //#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
8795
+ //#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
8796
  const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
8791
8797
  const defaultOptions = {
8792
8798
  name: void 0,
@@ -8821,7 +8827,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
8821
8827
  };
8822
8828
 
8823
8829
  //#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
8830
+ //#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
8831
  const getRefs = (options) => {
8826
8832
  const _options = getDefaultOptions(options);
8827
8833
  const currentPath = _options.name !== void 0 ? [
@@ -8847,7 +8853,7 @@ const getRefs = (options) => {
8847
8853
  };
8848
8854
 
8849
8855
  //#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
8856
+ //#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
8857
  function addErrorMessage(res, key, errorMessage, refs) {
8852
8858
  if (!refs?.errorMessages) return;
8853
8859
  if (errorMessage) res.errorMessage = {
@@ -8861,7 +8867,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
8861
8867
  }
8862
8868
 
8863
8869
  //#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
8870
+ //#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
8871
  const getRelativePath = (pathA, pathB) => {
8866
8872
  let i = 0;
8867
8873
  for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
@@ -8869,7 +8875,7 @@ const getRelativePath = (pathA, pathB) => {
8869
8875
  };
8870
8876
 
8871
8877
  //#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
8878
+ //#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
8879
  function parseAnyDef(refs) {
8874
8880
  if (refs.target !== "openAi") return {};
8875
8881
  const anyDefinitionPath = [
@@ -8882,10 +8888,10 @@ function parseAnyDef(refs) {
8882
8888
  }
8883
8889
 
8884
8890
  //#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
8891
+ //#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
8892
  function parseArrayDef(def, refs) {
8887
8893
  const res = { type: "array" };
8888
- if (def.type?._def && def.type?._def?.typeName !== zod.ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
8894
+ if (def.type?._def && def.type?._def?.typeName !== zod_v3.ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
8889
8895
  ...refs,
8890
8896
  currentPath: [...refs.currentPath, "items"]
8891
8897
  });
@@ -8899,7 +8905,7 @@ function parseArrayDef(def, refs) {
8899
8905
  }
8900
8906
 
8901
8907
  //#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
8908
+ //#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
8909
  function parseBigintDef(def, refs) {
8904
8910
  const res = {
8905
8911
  type: "integer",
@@ -8931,25 +8937,25 @@ function parseBigintDef(def, refs) {
8931
8937
  }
8932
8938
 
8933
8939
  //#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
8940
+ //#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
8941
  function parseBooleanDef() {
8936
8942
  return { type: "boolean" };
8937
8943
  }
8938
8944
 
8939
8945
  //#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
8946
+ //#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
8947
  function parseBrandedDef(_def, refs) {
8942
8948
  return parseDef(_def.type._def, refs);
8943
8949
  }
8944
8950
 
8945
8951
  //#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
8952
+ //#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
8953
  const parseCatchDef = (def, refs) => {
8948
8954
  return parseDef(def.innerType._def, refs);
8949
8955
  };
8950
8956
 
8951
8957
  //#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
8958
+ //#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
8959
  function parseDateDef(def, refs, overrideDateStrategy) {
8954
8960
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
8955
8961
  if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
@@ -8984,7 +8990,7 @@ const integerDateParser = (def, refs) => {
8984
8990
  };
8985
8991
 
8986
8992
  //#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
8993
+ //#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
8994
  function parseDefaultDef(_def, refs) {
8989
8995
  return {
8990
8996
  ...parseDef(_def.innerType._def, refs),
@@ -8993,13 +8999,13 @@ function parseDefaultDef(_def, refs) {
8993
8999
  }
8994
9000
 
8995
9001
  //#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
9002
+ //#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
9003
  function parseEffectsDef(_def, refs) {
8998
9004
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
8999
9005
  }
9000
9006
 
9001
9007
  //#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
9008
+ //#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
9009
  function parseEnumDef(def) {
9004
9010
  return {
9005
9011
  type: "string",
@@ -9008,7 +9014,7 @@ function parseEnumDef(def) {
9008
9014
  }
9009
9015
 
9010
9016
  //#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
9017
+ //#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
9018
  const isJsonSchema7AllOfType = (type) => {
9013
9019
  if ("type" in type && type.type === "string") return false;
9014
9020
  return "allOf" in type;
@@ -9051,7 +9057,7 @@ function parseIntersectionDef(def, refs) {
9051
9057
  }
9052
9058
 
9053
9059
  //#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
9060
+ //#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
9061
  function parseLiteralDef(def, refs) {
9056
9062
  const parsedType = typeof def.value;
9057
9063
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
@@ -9066,7 +9072,7 @@ function parseLiteralDef(def, refs) {
9066
9072
  }
9067
9073
 
9068
9074
  //#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
9075
+ //#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
9076
  let emojiRegex = void 0;
9071
9077
  /**
9072
9078
  * Generated from the regular expressions found here as of 2024-05-22:
@@ -9200,9 +9206,7 @@ function parseStringDef(def, refs) {
9200
9206
  case "toLowerCase":
9201
9207
  case "toUpperCase":
9202
9208
  case "trim": break;
9203
- default:
9204
- /* c8 ignore next */
9205
- ((_) => {})(check);
9209
+ default: ((_) => {})(check);
9206
9210
  }
9207
9211
  return res;
9208
9212
  }
@@ -9322,10 +9326,10 @@ function stringifyRegExpWithFlags(regex, refs) {
9322
9326
  }
9323
9327
 
9324
9328
  //#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
9329
+ //#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
9330
  function parseRecordDef(def, refs) {
9327
9331
  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 {
9332
+ if (refs.target === "openApi3" && def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodEnum) return {
9329
9333
  type: "object",
9330
9334
  required: def.keyType._def.values,
9331
9335
  properties: def.keyType._def.values.reduce((acc, key) => ({
@@ -9349,17 +9353,17 @@ function parseRecordDef(def, refs) {
9349
9353
  }) ?? refs.allowedAdditionalProperties
9350
9354
  };
9351
9355
  if (refs.target === "openApi3") return schema;
9352
- if (def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
9356
+ if (def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {
9353
9357
  const { type,...keyType } = parseStringDef(def.keyType._def, refs);
9354
9358
  return {
9355
9359
  ...schema,
9356
9360
  propertyNames: keyType
9357
9361
  };
9358
- } else if (def.keyType?._def.typeName === zod.ZodFirstPartyTypeKind.ZodEnum) return {
9362
+ } else if (def.keyType?._def.typeName === zod_v3.ZodFirstPartyTypeKind.ZodEnum) return {
9359
9363
  ...schema,
9360
9364
  propertyNames: { enum: def.keyType._def.values }
9361
9365
  };
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) {
9366
+ 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
9367
  const { type,...keyType } = parseBrandedDef(def.keyType._def, refs);
9364
9368
  return {
9365
9369
  ...schema,
@@ -9370,7 +9374,7 @@ function parseRecordDef(def, refs) {
9370
9374
  }
9371
9375
 
9372
9376
  //#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
9377
+ //#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
9378
  function parseMapDef(def, refs) {
9375
9379
  if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
9376
9380
  const keys = parseDef(def.keyType._def, {
@@ -9404,7 +9408,7 @@ function parseMapDef(def, refs) {
9404
9408
  }
9405
9409
 
9406
9410
  //#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
9411
+ //#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
9412
  function parseNativeEnumDef(def) {
9409
9413
  const object$1 = def.values;
9410
9414
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -9419,7 +9423,7 @@ function parseNativeEnumDef(def) {
9419
9423
  }
9420
9424
 
9421
9425
  //#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
9426
+ //#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
9427
  function parseNeverDef(refs) {
9424
9428
  return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
9425
9429
  ...refs,
@@ -9428,7 +9432,7 @@ function parseNeverDef(refs) {
9428
9432
  }
9429
9433
 
9430
9434
  //#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
9435
+ //#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
9436
  function parseNullDef(refs) {
9433
9437
  return refs.target === "openApi3" ? {
9434
9438
  enum: ["null"],
@@ -9437,7 +9441,7 @@ function parseNullDef(refs) {
9437
9441
  }
9438
9442
 
9439
9443
  //#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
9444
+ //#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
9445
  const primitiveMappings = {
9442
9446
  ZodString: "string",
9443
9447
  ZodNumber: "number",
@@ -9497,7 +9501,7 @@ const asAnyOf = (def, refs) => {
9497
9501
  };
9498
9502
 
9499
9503
  //#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
9504
+ //#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
9505
  function parseNullableDef(def, refs) {
9502
9506
  if ([
9503
9507
  "ZodString",
@@ -9538,7 +9542,7 @@ function parseNullableDef(def, refs) {
9538
9542
  }
9539
9543
 
9540
9544
  //#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
9545
+ //#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
9546
  function parseNumberDef(def, refs) {
9543
9547
  const res = { type: "number" };
9544
9548
  if (!def.checks) return res;
@@ -9571,7 +9575,7 @@ function parseNumberDef(def, refs) {
9571
9575
  }
9572
9576
 
9573
9577
  //#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
9578
+ //#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
9579
  function parseObjectDef(def, refs) {
9576
9580
  const forceOptionalIntoNullable = refs.target === "openAi";
9577
9581
  const result = {
@@ -9631,7 +9635,7 @@ function safeIsOptional(schema) {
9631
9635
  }
9632
9636
 
9633
9637
  //#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
9638
+ //#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
9639
  const parseOptionalDef = (def, refs) => {
9636
9640
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
9637
9641
  const innerSchema = parseDef(def.innerType._def, {
@@ -9646,7 +9650,7 @@ const parseOptionalDef = (def, refs) => {
9646
9650
  };
9647
9651
 
9648
9652
  //#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
9653
+ //#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
9654
  const parsePipelineDef = (def, refs) => {
9651
9655
  if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
9652
9656
  else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
@@ -9670,13 +9674,13 @@ const parsePipelineDef = (def, refs) => {
9670
9674
  };
9671
9675
 
9672
9676
  //#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
9677
+ //#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
9678
  function parsePromiseDef(def, refs) {
9675
9679
  return parseDef(def.type._def, refs);
9676
9680
  }
9677
9681
 
9678
9682
  //#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
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/set.js
9680
9684
  function parseSetDef(def, refs) {
9681
9685
  const items = parseDef(def.valueType._def, {
9682
9686
  ...refs,
@@ -9693,7 +9697,7 @@ function parseSetDef(def, refs) {
9693
9697
  }
9694
9698
 
9695
9699
  //#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
9700
+ //#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
9701
  function parseTupleDef(def, refs) {
9698
9702
  if (def.rest) return {
9699
9703
  type: "array",
@@ -9727,71 +9731,69 @@ function parseTupleDef(def, refs) {
9727
9731
  }
9728
9732
 
9729
9733
  //#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
9734
+ //#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
9735
  function parseUndefinedDef(refs) {
9732
9736
  return { not: parseAnyDef(refs) };
9733
9737
  }
9734
9738
 
9735
9739
  //#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
9740
+ //#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
9741
  function parseUnknownDef(refs) {
9738
9742
  return parseAnyDef(refs);
9739
9743
  }
9740
9744
 
9741
9745
  //#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
9746
+ //#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
9747
  const parseReadonlyDef = (def, refs) => {
9744
9748
  return parseDef(def.innerType._def, refs);
9745
9749
  };
9746
9750
 
9747
9751
  //#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
9752
+ //#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
9753
  const selectParser = (def, typeName, refs) => {
9750
9754
  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);
9755
+ case zod_v3.ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
9756
+ case zod_v3.ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);
9757
+ case zod_v3.ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);
9758
+ case zod_v3.ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);
9759
+ case zod_v3.ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();
9760
+ case zod_v3.ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);
9761
+ case zod_v3.ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);
9762
+ case zod_v3.ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);
9763
+ case zod_v3.ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);
9764
+ case zod_v3.ZodFirstPartyTypeKind.ZodUnion:
9765
+ case zod_v3.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);
9766
+ case zod_v3.ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);
9767
+ case zod_v3.ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);
9768
+ case zod_v3.ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);
9769
+ case zod_v3.ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);
9770
+ case zod_v3.ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);
9771
+ case zod_v3.ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);
9772
+ case zod_v3.ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);
9773
+ case zod_v3.ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);
9774
+ case zod_v3.ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);
9775
+ case zod_v3.ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);
9776
+ case zod_v3.ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;
9777
+ case zod_v3.ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);
9778
+ case zod_v3.ZodFirstPartyTypeKind.ZodNaN:
9779
+ case zod_v3.ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);
9780
+ case zod_v3.ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);
9781
+ case zod_v3.ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);
9782
+ case zod_v3.ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);
9783
+ case zod_v3.ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);
9784
+ case zod_v3.ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);
9785
+ case zod_v3.ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);
9786
+ case zod_v3.ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);
9787
+ case zod_v3.ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);
9788
+ case zod_v3.ZodFirstPartyTypeKind.ZodFunction:
9789
+ case zod_v3.ZodFirstPartyTypeKind.ZodVoid:
9790
+ case zod_v3.ZodFirstPartyTypeKind.ZodSymbol: return void 0;
9791
+ default: return ((_) => void 0)(typeName);
9790
9792
  }
9791
9793
  };
9792
9794
 
9793
9795
  //#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
9796
+ //#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
9797
  function parseDef(def, refs, forceResolution = false) {
9796
9798
  const seenItem = refs.seen.get(def);
9797
9799
  if (refs.override) {
@@ -9842,7 +9844,7 @@ const addMeta = (def, refs, jsonSchema$1) => {
9842
9844
  };
9843
9845
 
9844
9846
  //#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
9847
+ //#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
9848
  const zodToJsonSchema = (schema, options) => {
9847
9849
  const refs = getRefs(options);
9848
9850
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name$3, schema$1]) => ({
@@ -9906,11 +9908,11 @@ const zodToJsonSchema = (schema, options) => {
9906
9908
  };
9907
9909
 
9908
9910
  //#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
9911
+ //#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
9912
  var esm_default = zodToJsonSchema;
9911
9913
 
9912
9914
  //#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
9915
+ //#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
9916
  var textStreamPart = {
9915
9917
  code: "0",
9916
9918
  name: "text",
@@ -11428,7 +11430,7 @@ var TraceAPI = function() {
11428
11430
  var trace = TraceAPI.getInstance();
11429
11431
 
11430
11432
  //#endregion
11431
- //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.72/node_modules/ai/dist/index.mjs
11433
+ //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.76/node_modules/ai/dist/index.mjs
11432
11434
  var __defProp = Object.defineProperty;
11433
11435
  var __export$1 = (target, all) => {
11434
11436
  for (var name17 in all) __defProp(target, name17, {
@@ -14065,7 +14067,7 @@ function trimStartOfStream() {
14065
14067
  var HANGING_STREAM_WARNING_TIME_MS = 15 * 1e3;
14066
14068
 
14067
14069
  //#endregion
14068
- //#region ../mcp-core/dist/callEmbeddedAgent-DDLo-17Q.js
14070
+ //#region ../mcp-core/dist/callEmbeddedAgent-CX8bB_WX.js
14069
14071
  /**
14070
14072
  * Call an embedded agent with tool call capture
14071
14073
  * This is the standard way to call embedded AI agents within MCP tools
@@ -19149,7 +19151,7 @@ Use this information to construct appropriate queries for the ${dataset} dataset
19149
19151
  }
19150
19152
 
19151
19153
  //#endregion
19152
- //#region ../mcp-core/dist/agent-bpoyT2ZL.js
19154
+ //#region ../mcp-core/dist/agent-DUcsM6ug.js
19153
19155
  const searchEventsAgentOutputSchema = zod.z.object({
19154
19156
  dataset: zod.z.enum([
19155
19157
  "spans",
@@ -19421,7 +19423,7 @@ function formatSpanResults(params) {
19421
19423
  }
19422
19424
 
19423
19425
  //#endregion
19424
- //#region ../mcp-core/dist/handler-DJTZOFfy.js
19426
+ //#region ../mcp-core/dist/handler-DJ0HK96y.js
19425
19427
  var handler_default = defineTool({
19426
19428
  name: "search_events",
19427
19429
  requiredSkills: [
@@ -19481,7 +19483,7 @@ var handler_default = defineTool({
19481
19483
  openWorldHint: true
19482
19484
  },
19483
19485
  async handler(params, context$1) {
19484
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19486
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19485
19487
  const organizationSlug = params.organizationSlug;
19486
19488
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19487
19489
  if (params.projectSlug) (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19562,7 +19564,7 @@ var handler_default = defineTool({
19562
19564
  });
19563
19565
 
19564
19566
  //#endregion
19565
- //#region ../mcp-core/dist/create-team-Z6r4JkRE.js
19567
+ //#region ../mcp-core/dist/create-team-BAdl8A5-.js
19566
19568
  var create_team_default = defineTool({
19567
19569
  name: "create_team",
19568
19570
  requiredSkills: ["project-management"],
@@ -19599,7 +19601,7 @@ var create_team_default = defineTool({
19599
19601
  openWorldHint: true
19600
19602
  },
19601
19603
  async handler(params, context$1) {
19602
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19604
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19603
19605
  const organizationSlug = params.organizationSlug;
19604
19606
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19605
19607
  const team = await apiService.createTeam({
@@ -19617,7 +19619,7 @@ var create_team_default = defineTool({
19617
19619
  });
19618
19620
 
19619
19621
  //#endregion
19620
- //#region ../mcp-core/dist/create-project-crr_ixMJ.js
19622
+ //#region ../mcp-core/dist/create-project-OSqZHO31.js
19621
19623
  var create_project_default = defineTool({
19622
19624
  name: "create_project",
19623
19625
  requiredSkills: ["project-management"],
@@ -19660,7 +19662,7 @@ var create_project_default = defineTool({
19660
19662
  openWorldHint: true
19661
19663
  },
19662
19664
  async handler(params, context$1) {
19663
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19665
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19664
19666
  const organizationSlug = params.organizationSlug;
19665
19667
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19666
19668
  (0, __sentry_core.setTag)("team.slug", params.teamSlug);
@@ -19694,7 +19696,7 @@ var create_project_default = defineTool({
19694
19696
  });
19695
19697
 
19696
19698
  //#endregion
19697
- //#region ../mcp-core/dist/update-project-DVURDZRG.js
19699
+ //#region ../mcp-core/dist/update-project-DUo5F94A.js
19698
19700
  var update_project_default = defineTool({
19699
19701
  name: "update_project",
19700
19702
  requiredSkills: ["project-management"],
@@ -19753,7 +19755,7 @@ var update_project_default = defineTool({
19753
19755
  openWorldHint: true
19754
19756
  },
19755
19757
  async handler(params, context$1) {
19756
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19758
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19757
19759
  const organizationSlug = params.organizationSlug;
19758
19760
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19759
19761
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19812,7 +19814,7 @@ var update_project_default = defineTool({
19812
19814
  });
19813
19815
 
19814
19816
  //#endregion
19815
- //#region ../mcp-core/dist/create-dsn-CqIOWiA_.js
19817
+ //#region ../mcp-core/dist/create-dsn-cwJCYVxO.js
19816
19818
  var create_dsn_default = defineTool({
19817
19819
  name: "create_dsn",
19818
19820
  requiredSkills: ["project-management"],
@@ -19853,7 +19855,7 @@ var create_dsn_default = defineTool({
19853
19855
  openWorldHint: true
19854
19856
  },
19855
19857
  async handler(params, context$1) {
19856
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19858
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19857
19859
  const organizationSlug = params.organizationSlug;
19858
19860
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19859
19861
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19872,7 +19874,7 @@ var create_dsn_default = defineTool({
19872
19874
  });
19873
19875
 
19874
19876
  //#endregion
19875
- //#region ../mcp-core/dist/find-dsns-BT30qIJi.js
19877
+ //#region ../mcp-core/dist/find-dsns-op9qb46s.js
19876
19878
  var find_dsns_default = defineTool({
19877
19879
  name: "find_dsns",
19878
19880
  requiredSkills: ["project-management"],
@@ -19898,7 +19900,7 @@ var find_dsns_default = defineTool({
19898
19900
  openWorldHint: true
19899
19901
  },
19900
19902
  async handler(params, context$1) {
19901
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19903
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19902
19904
  const organizationSlug = params.organizationSlug;
19903
19905
  (0, __sentry_core.setTag)("organization.slug", organizationSlug);
19904
19906
  (0, __sentry_core.setTag)("project.slug", params.projectSlug);
@@ -19973,7 +19975,7 @@ async function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, should
19973
19975
  }
19974
19976
 
19975
19977
  //#endregion
19976
- //#region ../mcp-core/dist/analyze-issue-with-seer-DFzhVutx.js
19978
+ //#region ../mcp-core/dist/analyze-issue-with-seer-Bn3h3z1Q.js
19977
19979
  var analyze_issue_with_seer_default = defineTool({
19978
19980
  name: "analyze_issue_with_seer",
19979
19981
  requiredSkills: ["seer"],
@@ -20032,7 +20034,7 @@ var analyze_issue_with_seer_default = defineTool({
20032
20034
  openWorldHint: true
20033
20035
  },
20034
20036
  async handler(params, context$1) {
20035
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20037
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20036
20038
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
20037
20039
  organizationSlug: params.organizationSlug,
20038
20040
  issueId: params.issueId,
@@ -20244,7 +20246,7 @@ var search_docs_default = defineTool({
20244
20246
  });
20245
20247
 
20246
20248
  //#endregion
20247
- //#region ../mcp-core/dist/get-doc-1R-f9w5O.js
20249
+ //#region ../mcp-core/dist/get-doc-CkdqvAbH.js
20248
20250
  var get_doc_default = defineTool({
20249
20251
  name: "get_doc",
20250
20252
  requiredSkills: ["docs"],
@@ -20543,7 +20545,7 @@ Always use the issueFields tool to discover available fields when needed.
20543
20545
  Use the whoami tool when you need to resolve 'me' references.`;
20544
20546
 
20545
20547
  //#endregion
20546
- //#region ../mcp-core/dist/agent-Dp98c6gn.js
20548
+ //#region ../mcp-core/dist/agent-BEGFNdJ3.js
20547
20549
  const searchIssuesAgentOutputSchema = zod.z.object({
20548
20550
  query: zod.z.string().describe("The Sentry issue search query"),
20549
20551
  sort: zod.z.enum([
@@ -20658,7 +20660,7 @@ function formatDate(dateString) {
20658
20660
  }
20659
20661
 
20660
20662
  //#endregion
20661
- //#region ../mcp-core/dist/handler-AE-i3IgX.js
20663
+ //#region ../mcp-core/dist/handler-BEqYQTaW.js
20662
20664
  var handler_default$1 = defineTool({
20663
20665
  name: "search_issues",
20664
20666
  requiredSkills: [
@@ -20716,7 +20718,7 @@ var handler_default$1 = defineTool({
20716
20718
  openWorldHint: true
20717
20719
  },
20718
20720
  async handler(params, context$1) {
20719
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20721
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20720
20722
  (0, __sentry_core.setTag)("organization.slug", params.organizationSlug);
20721
20723
  if (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) (0, __sentry_core.setTag)("project.id", params.projectSlugOrId);
20722
20724
  else (0, __sentry_core.setTag)("project.slug", params.projectSlugOrId);
@@ -20738,8 +20740,8 @@ var handler_default$1 = defineTool({
20738
20740
  const translatedQuery = agentResult.result;
20739
20741
  const issues = await apiService.listIssues({
20740
20742
  organizationSlug: params.organizationSlug,
20741
- projectSlug: params.projectSlugOrId,
20742
- query: translatedQuery.query,
20743
+ projectSlug: params.projectSlugOrId ?? void 0,
20744
+ query: translatedQuery.query ?? void 0,
20743
20745
  sortBy: translatedQuery.sort || "date",
20744
20746
  limit: params.limit
20745
20747
  });
@@ -20759,18 +20761,18 @@ var handler_default$1 = defineTool({
20759
20761
  output += formatIssueResults({
20760
20762
  issues,
20761
20763
  organizationSlug: params.organizationSlug,
20762
- projectSlugOrId: params.projectSlugOrId,
20764
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20763
20765
  query: translatedQuery.query,
20764
- regionUrl: params.regionUrl,
20766
+ regionUrl: params.regionUrl ?? void 0,
20765
20767
  naturalLanguageQuery: params.naturalLanguageQuery,
20766
20768
  skipHeader: true
20767
20769
  });
20768
20770
  } else output = formatIssueResults({
20769
20771
  issues,
20770
20772
  organizationSlug: params.organizationSlug,
20771
- projectSlugOrId: params.projectSlugOrId,
20773
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20772
20774
  query: translatedQuery.query,
20773
- regionUrl: params.regionUrl,
20775
+ regionUrl: params.regionUrl ?? void 0,
20774
20776
  naturalLanguageQuery: params.naturalLanguageQuery,
20775
20777
  skipHeader: false
20776
20778
  });
@@ -20798,7 +20800,7 @@ The user may include various parameters to pass to those tools in their prompt.
20798
20800
  You MUST return tool results directly without interpreting them.`;
20799
20801
 
20800
20802
  //#endregion
20801
- //#region ../mcp-core/dist/agent-DoJNlQyJ.js
20803
+ //#region ../mcp-core/dist/agent-BH2CU6gS.js
20802
20804
  /**
20803
20805
  * Output schema for the embedded agent.
20804
20806
  * The agent returns the final result string directly from its tool calls.
@@ -20973,7 +20975,7 @@ function getConstraintParametersToInject(constraints, toolInputSchema) {
20973
20975
  }
20974
20976
 
20975
20977
  //#endregion
20976
- //#region ../mcp-core/dist/server-CroFA_Gp.js
20978
+ //#region ../mcp-core/dist/server-8ny70iLt.js
20977
20979
  /**
20978
20980
  * Format tool calls into a readable trace
20979
20981
  */
@@ -21121,7 +21123,7 @@ var tools_default = {
21121
21123
  * return createMcpHandler(server, { route: "/mcp" })(request, env, ctx);
21122
21124
  * ```
21123
21125
  */
21124
- function buildServer({ context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21126
+ function buildServer({ context: context$1, agentMode = false, tools: customTools }) {
21125
21127
  const server$1 = new __modelcontextprotocol_sdk_server_mcp_js.McpServer({
21126
21128
  name: require_resolve.MCP_SERVER_NAME,
21127
21129
  version: require_stdio.LIB_VERSION
@@ -21129,7 +21131,6 @@ function buildServer({ context: context$1, onToolComplete, agentMode = false, to
21129
21131
  configureServer({
21130
21132
  server: server$1,
21131
21133
  context: context$1,
21132
- onToolComplete,
21133
21134
  agentMode,
21134
21135
  tools: customTools
21135
21136
  });
@@ -21144,7 +21145,7 @@ function buildServer({ context: context$1, onToolComplete, agentMode = false, to
21144
21145
  *
21145
21146
  * In agent mode, only the use_sentry tool is registered, bypassing authorization checks.
21146
21147
  */
21147
- function configureServer({ server: server$1, context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21148
+ function configureServer({ server: server$1, context: context$1, agentMode = false, tools: customTools }) {
21148
21149
  const toolsToRegister = agentMode ? { use_sentry: tools_default.use_sentry } : customTools ?? tools_default;
21149
21150
  const grantedSkills = context$1.grantedSkills ? new Set(context$1.grantedSkills) : void 0;
21150
21151
  const grantedScopes = context$1.grantedScopes ? new Set(context$1.grantedScopes) : void 0;
@@ -21203,43 +21204,39 @@ function configureServer({ server: server$1, context: context$1, onToolComplete,
21203
21204
  const constraintKeysToFilter = new Set(getConstraintKeysToFilter(context$1.constraints, tool$1.inputSchema));
21204
21205
  const filteredInputSchema = Object.fromEntries(Object.entries(tool$1.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));
21205
21206
  server$1.tool(tool$1.name, tool$1.description, filteredInputSchema, tool$1.annotations, async (params, extra) => {
21207
+ const activeSpan = (0, __sentry_core.getActiveSpan)();
21208
+ 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);
21211
+ }
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);
21206
21214
  try {
21207
- const activeSpan = (0, __sentry_core.getActiveSpan)();
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: [{
21223
+ 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) {
21208
21229
  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);
21230
+ activeSpan.setStatus({ code: 2 });
21231
+ activeSpan.recordException(error);
21211
21232
  }
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: [{
21233
+ return {
21234
+ content: [{
21223
21235
  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?.();
21236
+ text: await formatErrorForUser(error)
21237
+ }],
21238
+ isError: true
21239
+ };
21243
21240
  }
21244
21241
  });
21245
21242
  }