@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.js CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { ALL_SCOPES, ALL_SKILLS, DEFAULT_SCOPES, DEFAULT_SKILLS, MCP_SERVER_NAME, SENTRY_ALLOWED_REGION_DOMAINS, SENTRY_GUIDES, SKILLS, finalize, getIssueUrl, getIssuesSearchUrl, getTraceUrl, hasRequiredSkills, isSentryHost, isToolAllowed } from "./resolve-BCdS4js5.js";
3
- import { LIB_VERSION, USER_AGENT, startStdio } from "./stdio-232a22j4.js";
3
+ import { LIB_VERSION, USER_AGENT, startStdio } from "./stdio-Cp-EJZB9.js";
4
4
  import { RECOMMENDED_FIELDS, systemPrompt } from "./config-DtimzxvV-BItTrGiz.js";
5
5
  import { buildUsage } from "./usage-DMGbIpV-.js";
6
6
  import { merge, parseArgv, parseEnv } from "./parse-Dn9XeQSj.js";
7
- import { ZodFirstPartyTypeKind, z } from "zod";
7
+ import { z } from "zod";
8
8
  import util from "node:util";
9
9
  import { captureException, captureMessage, getActiveSpan, setTag, setUser, withScope, wrapMcpServerWithSentry } from "@sentry/core";
10
10
  import * as Sentry from "@sentry/node";
11
+ import { ZodFirstPartyTypeKind } from "zod/v3";
11
12
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
12
13
  import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
13
14
 
@@ -2315,7 +2316,7 @@ function createApiError(message, status, detail, responseBody) {
2315
2316
  }
2316
2317
 
2317
2318
  //#endregion
2318
- //#region ../mcp-core/dist/client-ywsSgZWL.js
2319
+ //#region ../mcp-core/dist/client-B9APZB0N.js
2319
2320
  /**
2320
2321
  * Mapping of common network error codes to user-friendly messages.
2321
2322
  * These help users understand and resolve connection issues.
@@ -3436,7 +3437,7 @@ function validateRegionUrl(regionUrl, baseHost) {
3436
3437
  }
3437
3438
 
3438
3439
  //#endregion
3439
- //#region ../mcp-core/dist/api-C-36gW41.js
3440
+ //#region ../mcp-core/dist/api-C49LlEqH.js
3440
3441
  /**
3441
3442
  * Create a Sentry API service from server context with optional region override
3442
3443
  * @param context - Server context containing host and access token
@@ -3457,7 +3458,7 @@ function apiServiceFromContext(context$1, opts = {}) {
3457
3458
  }
3458
3459
 
3459
3460
  //#endregion
3460
- //#region ../mcp-core/dist/whoami-Dme_5-Db.js
3461
+ //#region ../mcp-core/dist/whoami-BoraVlxR.js
3461
3462
  var whoami_default = defineTool({
3462
3463
  name: "whoami",
3463
3464
  description: [
@@ -3490,7 +3491,7 @@ var whoami_default = defineTool({
3490
3491
  });
3491
3492
 
3492
3493
  //#endregion
3493
- //#region ../mcp-core/dist/find-organizations-DaWlAPTI.js
3494
+ //#region ../mcp-core/dist/find-organizations-Df_7XcZh.js
3494
3495
  const RESULT_LIMIT$2 = 25;
3495
3496
  var find_organizations_default = defineTool({
3496
3497
  name: "find_organizations",
@@ -3513,7 +3514,7 @@ var find_organizations_default = defineTool({
3513
3514
  },
3514
3515
  async handler(params, context$1) {
3515
3516
  const apiService = apiServiceFromContext(context$1);
3516
- const organizations = await apiService.listOrganizations({ query: params.query });
3517
+ const organizations = await apiService.listOrganizations({ query: params.query ?? void 0 });
3517
3518
  let output = "# Organizations\n\n";
3518
3519
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3519
3520
  if (organizations.length === 0) {
@@ -3542,7 +3543,7 @@ var find_organizations_default = defineTool({
3542
3543
  });
3543
3544
 
3544
3545
  //#endregion
3545
- //#region ../mcp-core/dist/find-teams-DurHMQdf.js
3546
+ //#region ../mcp-core/dist/find-teams-Ci9--JWk.js
3546
3547
  const RESULT_LIMIT$1 = 25;
3547
3548
  var find_teams_default = defineTool({
3548
3549
  name: "find_teams",
@@ -3572,11 +3573,11 @@ var find_teams_default = defineTool({
3572
3573
  openWorldHint: true
3573
3574
  },
3574
3575
  async handler(params, context$1) {
3575
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3576
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3576
3577
  const organizationSlug = params.organizationSlug;
3577
3578
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3578
3579
  setTag("organization.slug", organizationSlug);
3579
- const teams = await apiService.listTeams(organizationSlug, { query: params.query });
3580
+ const teams = await apiService.listTeams(organizationSlug, { query: params.query ?? void 0 });
3580
3581
  let output = `# Teams in **${organizationSlug}**\n\n`;
3581
3582
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3582
3583
  if (teams.length === 0) {
@@ -3590,7 +3591,7 @@ var find_teams_default = defineTool({
3590
3591
  });
3591
3592
 
3592
3593
  //#endregion
3593
- //#region ../mcp-core/dist/find-projects-DT8-Ot8E.js
3594
+ //#region ../mcp-core/dist/find-projects-_xE0VUHG.js
3594
3595
  const RESULT_LIMIT = 25;
3595
3596
  var find_projects_default = defineTool({
3596
3597
  name: "find_projects",
@@ -3616,11 +3617,11 @@ var find_projects_default = defineTool({
3616
3617
  openWorldHint: true
3617
3618
  },
3618
3619
  async handler(params, context$1) {
3619
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3620
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3620
3621
  const organizationSlug = params.organizationSlug;
3621
3622
  if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
3622
3623
  setTag("organization.slug", organizationSlug);
3623
- const projects = await apiService.listProjects(organizationSlug, { query: params.query });
3624
+ const projects = await apiService.listProjects(organizationSlug, { query: params.query ?? void 0 });
3624
3625
  let output = `# Projects in **${organizationSlug}**\n\n`;
3625
3626
  if (params.query) output += `**Search query:** "${params.query}"\n\n`;
3626
3627
  if (projects.length === 0) {
@@ -3634,7 +3635,7 @@ var find_projects_default = defineTool({
3634
3635
  });
3635
3636
 
3636
3637
  //#endregion
3637
- //#region ../mcp-core/dist/find-releases-CH1SfYpB.js
3638
+ //#region ../mcp-core/dist/find-releases-B-2KNnj4.js
3638
3639
  var find_releases_default = defineTool({
3639
3640
  name: "find_releases",
3640
3641
  requiredSkills: ["inspect"],
@@ -3676,13 +3677,13 @@ var find_releases_default = defineTool({
3676
3677
  openWorldHint: true
3677
3678
  },
3678
3679
  async handler(params, context$1) {
3679
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
3680
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
3680
3681
  const organizationSlug = params.organizationSlug;
3681
3682
  setTag("organization.slug", organizationSlug);
3682
3683
  const releases = await apiService.listReleases({
3683
3684
  organizationSlug,
3684
- projectSlug: params.projectSlug,
3685
- query: params.query
3685
+ projectSlug: params.projectSlug ?? void 0,
3686
+ query: params.query ?? void 0
3686
3687
  });
3687
3688
  let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : ""}**\n\n`;
3688
3689
  if (releases.length === 0) {
@@ -3882,7 +3883,7 @@ function getOutputForAutofixStep(step) {
3882
3883
  }
3883
3884
 
3884
3885
  //#endregion
3885
- //#region ../mcp-core/dist/formatting-CBQAlru_.js
3886
+ //#region ../mcp-core/dist/formatting-CGRFosDy.js
3886
3887
  const LANGUAGE_EXTENSIONS = {
3887
3888
  ".java": "java",
3888
3889
  ".py": "python",
@@ -4800,6 +4801,12 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
4800
4801
  output += `**Users Impacted**: ${issue.userCount}\n`;
4801
4802
  output += `**Status**: ${issue.status}\n`;
4802
4803
  if (issue.substatus) output += `**Substatus**: ${issue.substatus}\n`;
4804
+ if (issue.assignedTo) if (typeof issue.assignedTo === "string") output += `**Assigned To**: ${issue.assignedTo}\n`;
4805
+ else {
4806
+ const assignee = issue.assignedTo;
4807
+ const type = assignee.type === "team" ? "Team" : "User";
4808
+ output += `**Assigned To**: ${assignee.name} (${type})\n`;
4809
+ }
4803
4810
  if (issue.issueType) output += `**Issue Type**: ${issue.issueType}\n`;
4804
4811
  if (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\n`;
4805
4812
  output += `**Platform**: ${issue.platform}\n`;
@@ -4872,7 +4879,7 @@ function enhanceNotFoundError(error, params) {
4872
4879
  }
4873
4880
 
4874
4881
  //#endregion
4875
- //#region ../mcp-core/dist/get-issue-details-Bj1LiaC2.js
4882
+ //#region ../mcp-core/dist/get-issue-details-Dkx3WdXu.js
4876
4883
  var get_issue_details_default = defineTool({
4877
4884
  name: "get_issue_details",
4878
4885
  requiredSkills: [
@@ -4934,7 +4941,7 @@ var get_issue_details_default = defineTool({
4934
4941
  openWorldHint: true
4935
4942
  },
4936
4943
  async handler(params, context$1) {
4937
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
4944
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
4938
4945
  if (params.eventId) {
4939
4946
  const orgSlug$1 = params.organizationSlug;
4940
4947
  const eventId = params.eventId;
@@ -5053,7 +5060,7 @@ function shouldFetchTraceForEvent(event) {
5053
5060
  }
5054
5061
 
5055
5062
  //#endregion
5056
- //#region ../mcp-core/dist/get-trace-details-DynWtF0W.js
5063
+ //#region ../mcp-core/dist/get-trace-details-f5XoKmIu.js
5057
5064
  const MAX_DEPTH = 2;
5058
5065
  const MINIMUM_DURATION_THRESHOLD_MS = 10;
5059
5066
  const MIN_MEANINGFUL_CHILD_DURATION = 5;
@@ -5102,7 +5109,7 @@ var get_trace_details_default = defineTool({
5102
5109
  },
5103
5110
  async handler(params, context$1) {
5104
5111
  if (!/^[0-9a-fA-F]{32}$/.test(params.traceId)) throw new UserInputError("Trace ID must be a 32-character hexadecimal string");
5105
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5112
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5106
5113
  setTag("organization.slug", params.organizationSlug);
5107
5114
  setTag("trace.id", params.traceId);
5108
5115
  const traceMeta = await apiService.getTraceMeta({
@@ -5352,7 +5359,7 @@ function formatTraceOutput({ organizationSlug, traceId, traceMeta, trace: trace$
5352
5359
  }
5353
5360
 
5354
5361
  //#endregion
5355
- //#region ../mcp-core/dist/get-event-attachment-DmIqKy4p.js
5362
+ //#region ../mcp-core/dist/get-event-attachment-B5GR2cWj.js
5356
5363
  var get_event_attachment_default = defineTool({
5357
5364
  name: "get_event_attachment",
5358
5365
  requiredSkills: ["inspect"],
@@ -5398,7 +5405,7 @@ var get_event_attachment_default = defineTool({
5398
5405
  openWorldHint: true
5399
5406
  },
5400
5407
  async handler(params, context$1) {
5401
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5408
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5402
5409
  setTag("organization.slug", params.organizationSlug);
5403
5410
  if (params.attachmentId) {
5404
5411
  const attachment = await apiService.getEventAttachment({
@@ -5423,7 +5430,6 @@ var get_event_attachment_default = defineTool({
5423
5430
  contentParts.push(image);
5424
5431
  } else {
5425
5432
  const resource = {
5426
- id: params.attachmentId,
5427
5433
  type: "resource",
5428
5434
  resource: {
5429
5435
  uri: `file://${attachment.filename}`,
@@ -5501,7 +5507,7 @@ function formatAssignedTo(assignedTo) {
5501
5507
  }
5502
5508
 
5503
5509
  //#endregion
5504
- //#region ../mcp-core/dist/update-issue-COCI-f3S.js
5510
+ //#region ../mcp-core/dist/update-issue-BKnQHYYL.js
5505
5511
  var update_issue_default = defineTool({
5506
5512
  name: "update_issue",
5507
5513
  requiredSkills: ["triage"],
@@ -5565,7 +5571,7 @@ var update_issue_default = defineTool({
5565
5571
  openWorldHint: true
5566
5572
  },
5567
5573
  async handler(params, context$1) {
5568
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
5574
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
5569
5575
  if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
5570
5576
  if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
5571
5577
  if (!params.status && !params.assignedTo) throw new UserInputError("At least one of `status` or `assignedTo` must be provided to update the issue");
@@ -5970,7 +5976,7 @@ var require_secure_json_parse = __commonJS({ "../../node_modules/.pnpm/secure-js
5970
5976
  } });
5971
5977
 
5972
5978
  //#endregion
5973
- //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.72/node_modules/@ai-sdk/provider-utils/dist/index.mjs
5979
+ //#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.76/node_modules/@ai-sdk/provider-utils/dist/index.mjs
5974
5980
  var import_secure_json_parse = __toESM(require_secure_json_parse(), 1);
5975
5981
  function combineHeaders(...headers) {
5976
5982
  return headers.reduce((combinedHeaders, currentHeaders) => ({
@@ -6461,7 +6467,7 @@ function withoutTrailingSlash(url) {
6461
6467
  }
6462
6468
 
6463
6469
  //#endregion
6464
- //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.72/node_modules/@ai-sdk/openai/dist/index.mjs
6470
+ //#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs
6465
6471
  function convertToOpenAIChatMessages({ prompt, useLegacyFunctionCalling = false, systemMessageMode = "system" }) {
6466
6472
  const messages = [];
6467
6473
  const warnings = [];
@@ -8774,7 +8780,7 @@ function createOpenAI(options = {}) {
8774
8780
  var openai = createOpenAI({ compatibility: "strict" });
8775
8781
 
8776
8782
  //#endregion
8777
- //#region ../mcp-core/dist/openai-provider-CxDJ8Xy2.js
8783
+ //#region ../mcp-core/dist/openai-provider-C18ibzKZ.js
8778
8784
  const DEFAULT_OPENAI_MODEL = "gpt-5";
8779
8785
  const VALID_REASONING_EFFORTS = [
8780
8786
  "low",
@@ -8817,7 +8823,7 @@ function getOpenAIModel(model) {
8817
8823
  }
8818
8824
 
8819
8825
  //#endregion
8820
- //#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
8826
+ //#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
8821
8827
  const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
8822
8828
  const defaultOptions = {
8823
8829
  name: void 0,
@@ -8852,7 +8858,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
8852
8858
  };
8853
8859
 
8854
8860
  //#endregion
8855
- //#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
8861
+ //#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
8856
8862
  const getRefs = (options) => {
8857
8863
  const _options = getDefaultOptions(options);
8858
8864
  const currentPath = _options.name !== void 0 ? [
@@ -8878,7 +8884,7 @@ const getRefs = (options) => {
8878
8884
  };
8879
8885
 
8880
8886
  //#endregion
8881
- //#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
8887
+ //#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
8882
8888
  function addErrorMessage(res, key, errorMessage, refs) {
8883
8889
  if (!refs?.errorMessages) return;
8884
8890
  if (errorMessage) res.errorMessage = {
@@ -8892,7 +8898,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
8892
8898
  }
8893
8899
 
8894
8900
  //#endregion
8895
- //#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
8901
+ //#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
8896
8902
  const getRelativePath = (pathA, pathB) => {
8897
8903
  let i = 0;
8898
8904
  for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
@@ -8900,7 +8906,7 @@ const getRelativePath = (pathA, pathB) => {
8900
8906
  };
8901
8907
 
8902
8908
  //#endregion
8903
- //#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
8909
+ //#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
8904
8910
  function parseAnyDef(refs) {
8905
8911
  if (refs.target !== "openAi") return {};
8906
8912
  const anyDefinitionPath = [
@@ -8913,7 +8919,7 @@ function parseAnyDef(refs) {
8913
8919
  }
8914
8920
 
8915
8921
  //#endregion
8916
- //#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
8922
+ //#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
8917
8923
  function parseArrayDef(def, refs) {
8918
8924
  const res = { type: "array" };
8919
8925
  if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
@@ -8930,7 +8936,7 @@ function parseArrayDef(def, refs) {
8930
8936
  }
8931
8937
 
8932
8938
  //#endregion
8933
- //#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
8939
+ //#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
8934
8940
  function parseBigintDef(def, refs) {
8935
8941
  const res = {
8936
8942
  type: "integer",
@@ -8962,25 +8968,25 @@ function parseBigintDef(def, refs) {
8962
8968
  }
8963
8969
 
8964
8970
  //#endregion
8965
- //#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
8971
+ //#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
8966
8972
  function parseBooleanDef() {
8967
8973
  return { type: "boolean" };
8968
8974
  }
8969
8975
 
8970
8976
  //#endregion
8971
- //#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
8977
+ //#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
8972
8978
  function parseBrandedDef(_def, refs) {
8973
8979
  return parseDef(_def.type._def, refs);
8974
8980
  }
8975
8981
 
8976
8982
  //#endregion
8977
- //#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
8983
+ //#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
8978
8984
  const parseCatchDef = (def, refs) => {
8979
8985
  return parseDef(def.innerType._def, refs);
8980
8986
  };
8981
8987
 
8982
8988
  //#endregion
8983
- //#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
8989
+ //#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
8984
8990
  function parseDateDef(def, refs, overrideDateStrategy) {
8985
8991
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
8986
8992
  if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
@@ -9015,7 +9021,7 @@ const integerDateParser = (def, refs) => {
9015
9021
  };
9016
9022
 
9017
9023
  //#endregion
9018
- //#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
9024
+ //#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
9019
9025
  function parseDefaultDef(_def, refs) {
9020
9026
  return {
9021
9027
  ...parseDef(_def.innerType._def, refs),
@@ -9024,13 +9030,13 @@ function parseDefaultDef(_def, refs) {
9024
9030
  }
9025
9031
 
9026
9032
  //#endregion
9027
- //#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
9033
+ //#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
9028
9034
  function parseEffectsDef(_def, refs) {
9029
9035
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
9030
9036
  }
9031
9037
 
9032
9038
  //#endregion
9033
- //#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
9039
+ //#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
9034
9040
  function parseEnumDef(def) {
9035
9041
  return {
9036
9042
  type: "string",
@@ -9039,7 +9045,7 @@ function parseEnumDef(def) {
9039
9045
  }
9040
9046
 
9041
9047
  //#endregion
9042
- //#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
9048
+ //#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
9043
9049
  const isJsonSchema7AllOfType = (type) => {
9044
9050
  if ("type" in type && type.type === "string") return false;
9045
9051
  return "allOf" in type;
@@ -9082,7 +9088,7 @@ function parseIntersectionDef(def, refs) {
9082
9088
  }
9083
9089
 
9084
9090
  //#endregion
9085
- //#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
9091
+ //#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
9086
9092
  function parseLiteralDef(def, refs) {
9087
9093
  const parsedType = typeof def.value;
9088
9094
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
@@ -9097,7 +9103,7 @@ function parseLiteralDef(def, refs) {
9097
9103
  }
9098
9104
 
9099
9105
  //#endregion
9100
- //#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
9106
+ //#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
9101
9107
  let emojiRegex = void 0;
9102
9108
  /**
9103
9109
  * Generated from the regular expressions found here as of 2024-05-22:
@@ -9231,9 +9237,7 @@ function parseStringDef(def, refs) {
9231
9237
  case "toLowerCase":
9232
9238
  case "toUpperCase":
9233
9239
  case "trim": break;
9234
- default:
9235
- /* c8 ignore next */
9236
- ((_) => {})(check);
9240
+ default: ((_) => {})(check);
9237
9241
  }
9238
9242
  return res;
9239
9243
  }
@@ -9353,7 +9357,7 @@ function stringifyRegExpWithFlags(regex, refs) {
9353
9357
  }
9354
9358
 
9355
9359
  //#endregion
9356
- //#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
9360
+ //#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
9357
9361
  function parseRecordDef(def, refs) {
9358
9362
  if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
9359
9363
  if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
@@ -9401,7 +9405,7 @@ function parseRecordDef(def, refs) {
9401
9405
  }
9402
9406
 
9403
9407
  //#endregion
9404
- //#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
9408
+ //#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
9405
9409
  function parseMapDef(def, refs) {
9406
9410
  if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
9407
9411
  const keys = parseDef(def.keyType._def, {
@@ -9435,7 +9439,7 @@ function parseMapDef(def, refs) {
9435
9439
  }
9436
9440
 
9437
9441
  //#endregion
9438
- //#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
9442
+ //#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
9439
9443
  function parseNativeEnumDef(def) {
9440
9444
  const object$1 = def.values;
9441
9445
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -9450,7 +9454,7 @@ function parseNativeEnumDef(def) {
9450
9454
  }
9451
9455
 
9452
9456
  //#endregion
9453
- //#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
9457
+ //#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
9454
9458
  function parseNeverDef(refs) {
9455
9459
  return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
9456
9460
  ...refs,
@@ -9459,7 +9463,7 @@ function parseNeverDef(refs) {
9459
9463
  }
9460
9464
 
9461
9465
  //#endregion
9462
- //#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
9466
+ //#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
9463
9467
  function parseNullDef(refs) {
9464
9468
  return refs.target === "openApi3" ? {
9465
9469
  enum: ["null"],
@@ -9468,7 +9472,7 @@ function parseNullDef(refs) {
9468
9472
  }
9469
9473
 
9470
9474
  //#endregion
9471
- //#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
9475
+ //#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
9472
9476
  const primitiveMappings = {
9473
9477
  ZodString: "string",
9474
9478
  ZodNumber: "number",
@@ -9528,7 +9532,7 @@ const asAnyOf = (def, refs) => {
9528
9532
  };
9529
9533
 
9530
9534
  //#endregion
9531
- //#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
9535
+ //#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
9532
9536
  function parseNullableDef(def, refs) {
9533
9537
  if ([
9534
9538
  "ZodString",
@@ -9569,7 +9573,7 @@ function parseNullableDef(def, refs) {
9569
9573
  }
9570
9574
 
9571
9575
  //#endregion
9572
- //#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
9576
+ //#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
9573
9577
  function parseNumberDef(def, refs) {
9574
9578
  const res = { type: "number" };
9575
9579
  if (!def.checks) return res;
@@ -9602,7 +9606,7 @@ function parseNumberDef(def, refs) {
9602
9606
  }
9603
9607
 
9604
9608
  //#endregion
9605
- //#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
9609
+ //#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
9606
9610
  function parseObjectDef(def, refs) {
9607
9611
  const forceOptionalIntoNullable = refs.target === "openAi";
9608
9612
  const result = {
@@ -9662,7 +9666,7 @@ function safeIsOptional(schema) {
9662
9666
  }
9663
9667
 
9664
9668
  //#endregion
9665
- //#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
9669
+ //#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
9666
9670
  const parseOptionalDef = (def, refs) => {
9667
9671
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
9668
9672
  const innerSchema = parseDef(def.innerType._def, {
@@ -9677,7 +9681,7 @@ const parseOptionalDef = (def, refs) => {
9677
9681
  };
9678
9682
 
9679
9683
  //#endregion
9680
- //#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
9684
+ //#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
9681
9685
  const parsePipelineDef = (def, refs) => {
9682
9686
  if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
9683
9687
  else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
@@ -9701,13 +9705,13 @@ const parsePipelineDef = (def, refs) => {
9701
9705
  };
9702
9706
 
9703
9707
  //#endregion
9704
- //#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
9708
+ //#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
9705
9709
  function parsePromiseDef(def, refs) {
9706
9710
  return parseDef(def.type._def, refs);
9707
9711
  }
9708
9712
 
9709
9713
  //#endregion
9710
- //#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
9714
+ //#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
9711
9715
  function parseSetDef(def, refs) {
9712
9716
  const items = parseDef(def.valueType._def, {
9713
9717
  ...refs,
@@ -9724,7 +9728,7 @@ function parseSetDef(def, refs) {
9724
9728
  }
9725
9729
 
9726
9730
  //#endregion
9727
- //#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
9731
+ //#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
9728
9732
  function parseTupleDef(def, refs) {
9729
9733
  if (def.rest) return {
9730
9734
  type: "array",
@@ -9758,25 +9762,25 @@ function parseTupleDef(def, refs) {
9758
9762
  }
9759
9763
 
9760
9764
  //#endregion
9761
- //#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
9765
+ //#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
9762
9766
  function parseUndefinedDef(refs) {
9763
9767
  return { not: parseAnyDef(refs) };
9764
9768
  }
9765
9769
 
9766
9770
  //#endregion
9767
- //#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
9771
+ //#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
9768
9772
  function parseUnknownDef(refs) {
9769
9773
  return parseAnyDef(refs);
9770
9774
  }
9771
9775
 
9772
9776
  //#endregion
9773
- //#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
9777
+ //#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
9774
9778
  const parseReadonlyDef = (def, refs) => {
9775
9779
  return parseDef(def.innerType._def, refs);
9776
9780
  };
9777
9781
 
9778
9782
  //#endregion
9779
- //#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
9783
+ //#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
9780
9784
  const selectParser = (def, typeName, refs) => {
9781
9785
  switch (typeName) {
9782
9786
  case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
@@ -9815,14 +9819,12 @@ const selectParser = (def, typeName, refs) => {
9815
9819
  case ZodFirstPartyTypeKind.ZodFunction:
9816
9820
  case ZodFirstPartyTypeKind.ZodVoid:
9817
9821
  case ZodFirstPartyTypeKind.ZodSymbol: return void 0;
9818
- default:
9819
- /* c8 ignore next */
9820
- return ((_) => void 0)(typeName);
9822
+ default: return ((_) => void 0)(typeName);
9821
9823
  }
9822
9824
  };
9823
9825
 
9824
9826
  //#endregion
9825
- //#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
9827
+ //#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
9826
9828
  function parseDef(def, refs, forceResolution = false) {
9827
9829
  const seenItem = refs.seen.get(def);
9828
9830
  if (refs.override) {
@@ -9873,7 +9875,7 @@ const addMeta = (def, refs, jsonSchema$1) => {
9873
9875
  };
9874
9876
 
9875
9877
  //#endregion
9876
- //#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
9878
+ //#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
9877
9879
  const zodToJsonSchema = (schema, options) => {
9878
9880
  const refs = getRefs(options);
9879
9881
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name$3, schema$1]) => ({
@@ -9937,11 +9939,11 @@ const zodToJsonSchema = (schema, options) => {
9937
9939
  };
9938
9940
 
9939
9941
  //#endregion
9940
- //#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
9942
+ //#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
9941
9943
  var esm_default = zodToJsonSchema;
9942
9944
 
9943
9945
  //#endregion
9944
- //#region ../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.72/node_modules/@ai-sdk/ui-utils/dist/index.mjs
9946
+ //#region ../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.76/node_modules/@ai-sdk/ui-utils/dist/index.mjs
9945
9947
  var textStreamPart = {
9946
9948
  code: "0",
9947
9949
  name: "text",
@@ -11459,7 +11461,7 @@ var TraceAPI = function() {
11459
11461
  var trace = TraceAPI.getInstance();
11460
11462
 
11461
11463
  //#endregion
11462
- //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.72/node_modules/ai/dist/index.mjs
11464
+ //#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.76/node_modules/ai/dist/index.mjs
11463
11465
  var __defProp = Object.defineProperty;
11464
11466
  var __export = (target, all) => {
11465
11467
  for (var name17 in all) __defProp(target, name17, {
@@ -14096,7 +14098,7 @@ function trimStartOfStream() {
14096
14098
  var HANGING_STREAM_WARNING_TIME_MS = 15 * 1e3;
14097
14099
 
14098
14100
  //#endregion
14099
- //#region ../mcp-core/dist/callEmbeddedAgent-DDLo-17Q.js
14101
+ //#region ../mcp-core/dist/callEmbeddedAgent-CX8bB_WX.js
14100
14102
  /**
14101
14103
  * Call an embedded agent with tool call capture
14102
14104
  * This is the standard way to call embedded AI agents within MCP tools
@@ -19180,7 +19182,7 @@ Use this information to construct appropriate queries for the ${dataset} dataset
19180
19182
  }
19181
19183
 
19182
19184
  //#endregion
19183
- //#region ../mcp-core/dist/agent-bpoyT2ZL.js
19185
+ //#region ../mcp-core/dist/agent-DUcsM6ug.js
19184
19186
  const searchEventsAgentOutputSchema = z.object({
19185
19187
  dataset: z.enum([
19186
19188
  "spans",
@@ -19452,7 +19454,7 @@ function formatSpanResults(params) {
19452
19454
  }
19453
19455
 
19454
19456
  //#endregion
19455
- //#region ../mcp-core/dist/handler-DJTZOFfy.js
19457
+ //#region ../mcp-core/dist/handler-DJ0HK96y.js
19456
19458
  var handler_default = defineTool({
19457
19459
  name: "search_events",
19458
19460
  requiredSkills: [
@@ -19512,7 +19514,7 @@ var handler_default = defineTool({
19512
19514
  openWorldHint: true
19513
19515
  },
19514
19516
  async handler(params, context$1) {
19515
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19517
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19516
19518
  const organizationSlug = params.organizationSlug;
19517
19519
  setTag("organization.slug", organizationSlug);
19518
19520
  if (params.projectSlug) setTag("project.slug", params.projectSlug);
@@ -19593,7 +19595,7 @@ var handler_default = defineTool({
19593
19595
  });
19594
19596
 
19595
19597
  //#endregion
19596
- //#region ../mcp-core/dist/create-team-Z6r4JkRE.js
19598
+ //#region ../mcp-core/dist/create-team-BAdl8A5-.js
19597
19599
  var create_team_default = defineTool({
19598
19600
  name: "create_team",
19599
19601
  requiredSkills: ["project-management"],
@@ -19630,7 +19632,7 @@ var create_team_default = defineTool({
19630
19632
  openWorldHint: true
19631
19633
  },
19632
19634
  async handler(params, context$1) {
19633
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19635
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19634
19636
  const organizationSlug = params.organizationSlug;
19635
19637
  setTag("organization.slug", organizationSlug);
19636
19638
  const team = await apiService.createTeam({
@@ -19648,7 +19650,7 @@ var create_team_default = defineTool({
19648
19650
  });
19649
19651
 
19650
19652
  //#endregion
19651
- //#region ../mcp-core/dist/create-project-crr_ixMJ.js
19653
+ //#region ../mcp-core/dist/create-project-OSqZHO31.js
19652
19654
  var create_project_default = defineTool({
19653
19655
  name: "create_project",
19654
19656
  requiredSkills: ["project-management"],
@@ -19691,7 +19693,7 @@ var create_project_default = defineTool({
19691
19693
  openWorldHint: true
19692
19694
  },
19693
19695
  async handler(params, context$1) {
19694
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19696
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19695
19697
  const organizationSlug = params.organizationSlug;
19696
19698
  setTag("organization.slug", organizationSlug);
19697
19699
  setTag("team.slug", params.teamSlug);
@@ -19725,7 +19727,7 @@ var create_project_default = defineTool({
19725
19727
  });
19726
19728
 
19727
19729
  //#endregion
19728
- //#region ../mcp-core/dist/update-project-DVURDZRG.js
19730
+ //#region ../mcp-core/dist/update-project-DUo5F94A.js
19729
19731
  var update_project_default = defineTool({
19730
19732
  name: "update_project",
19731
19733
  requiredSkills: ["project-management"],
@@ -19784,7 +19786,7 @@ var update_project_default = defineTool({
19784
19786
  openWorldHint: true
19785
19787
  },
19786
19788
  async handler(params, context$1) {
19787
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19789
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19788
19790
  const organizationSlug = params.organizationSlug;
19789
19791
  setTag("organization.slug", organizationSlug);
19790
19792
  setTag("project.slug", params.projectSlug);
@@ -19843,7 +19845,7 @@ var update_project_default = defineTool({
19843
19845
  });
19844
19846
 
19845
19847
  //#endregion
19846
- //#region ../mcp-core/dist/create-dsn-CqIOWiA_.js
19848
+ //#region ../mcp-core/dist/create-dsn-cwJCYVxO.js
19847
19849
  var create_dsn_default = defineTool({
19848
19850
  name: "create_dsn",
19849
19851
  requiredSkills: ["project-management"],
@@ -19884,7 +19886,7 @@ var create_dsn_default = defineTool({
19884
19886
  openWorldHint: true
19885
19887
  },
19886
19888
  async handler(params, context$1) {
19887
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19889
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19888
19890
  const organizationSlug = params.organizationSlug;
19889
19891
  setTag("organization.slug", organizationSlug);
19890
19892
  setTag("project.slug", params.projectSlug);
@@ -19903,7 +19905,7 @@ var create_dsn_default = defineTool({
19903
19905
  });
19904
19906
 
19905
19907
  //#endregion
19906
- //#region ../mcp-core/dist/find-dsns-BT30qIJi.js
19908
+ //#region ../mcp-core/dist/find-dsns-op9qb46s.js
19907
19909
  var find_dsns_default = defineTool({
19908
19910
  name: "find_dsns",
19909
19911
  requiredSkills: ["project-management"],
@@ -19929,7 +19931,7 @@ var find_dsns_default = defineTool({
19929
19931
  openWorldHint: true
19930
19932
  },
19931
19933
  async handler(params, context$1) {
19932
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
19934
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
19933
19935
  const organizationSlug = params.organizationSlug;
19934
19936
  setTag("organization.slug", organizationSlug);
19935
19937
  setTag("project.slug", params.projectSlug);
@@ -20004,7 +20006,7 @@ async function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, should
20004
20006
  }
20005
20007
 
20006
20008
  //#endregion
20007
- //#region ../mcp-core/dist/analyze-issue-with-seer-DFzhVutx.js
20009
+ //#region ../mcp-core/dist/analyze-issue-with-seer-Bn3h3z1Q.js
20008
20010
  var analyze_issue_with_seer_default = defineTool({
20009
20011
  name: "analyze_issue_with_seer",
20010
20012
  requiredSkills: ["seer"],
@@ -20063,7 +20065,7 @@ var analyze_issue_with_seer_default = defineTool({
20063
20065
  openWorldHint: true
20064
20066
  },
20065
20067
  async handler(params, context$1) {
20066
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20068
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20067
20069
  const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
20068
20070
  organizationSlug: params.organizationSlug,
20069
20071
  issueId: params.issueId,
@@ -20275,7 +20277,7 @@ var search_docs_default = defineTool({
20275
20277
  });
20276
20278
 
20277
20279
  //#endregion
20278
- //#region ../mcp-core/dist/get-doc-1R-f9w5O.js
20280
+ //#region ../mcp-core/dist/get-doc-CkdqvAbH.js
20279
20281
  var get_doc_default = defineTool({
20280
20282
  name: "get_doc",
20281
20283
  requiredSkills: ["docs"],
@@ -20574,7 +20576,7 @@ Always use the issueFields tool to discover available fields when needed.
20574
20576
  Use the whoami tool when you need to resolve 'me' references.`;
20575
20577
 
20576
20578
  //#endregion
20577
- //#region ../mcp-core/dist/agent-Dp98c6gn.js
20579
+ //#region ../mcp-core/dist/agent-BEGFNdJ3.js
20578
20580
  const searchIssuesAgentOutputSchema = z.object({
20579
20581
  query: z.string().describe("The Sentry issue search query"),
20580
20582
  sort: z.enum([
@@ -20689,7 +20691,7 @@ function formatDate(dateString) {
20689
20691
  }
20690
20692
 
20691
20693
  //#endregion
20692
- //#region ../mcp-core/dist/handler-AE-i3IgX.js
20694
+ //#region ../mcp-core/dist/handler-BEqYQTaW.js
20693
20695
  var handler_default$1 = defineTool({
20694
20696
  name: "search_issues",
20695
20697
  requiredSkills: [
@@ -20747,7 +20749,7 @@ var handler_default$1 = defineTool({
20747
20749
  openWorldHint: true
20748
20750
  },
20749
20751
  async handler(params, context$1) {
20750
- const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
20752
+ const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
20751
20753
  setTag("organization.slug", params.organizationSlug);
20752
20754
  if (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) setTag("project.id", params.projectSlugOrId);
20753
20755
  else setTag("project.slug", params.projectSlugOrId);
@@ -20769,8 +20771,8 @@ var handler_default$1 = defineTool({
20769
20771
  const translatedQuery = agentResult.result;
20770
20772
  const issues = await apiService.listIssues({
20771
20773
  organizationSlug: params.organizationSlug,
20772
- projectSlug: params.projectSlugOrId,
20773
- query: translatedQuery.query,
20774
+ projectSlug: params.projectSlugOrId ?? void 0,
20775
+ query: translatedQuery.query ?? void 0,
20774
20776
  sortBy: translatedQuery.sort || "date",
20775
20777
  limit: params.limit
20776
20778
  });
@@ -20790,18 +20792,18 @@ var handler_default$1 = defineTool({
20790
20792
  output += formatIssueResults({
20791
20793
  issues,
20792
20794
  organizationSlug: params.organizationSlug,
20793
- projectSlugOrId: params.projectSlugOrId,
20795
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20794
20796
  query: translatedQuery.query,
20795
- regionUrl: params.regionUrl,
20797
+ regionUrl: params.regionUrl ?? void 0,
20796
20798
  naturalLanguageQuery: params.naturalLanguageQuery,
20797
20799
  skipHeader: true
20798
20800
  });
20799
20801
  } else output = formatIssueResults({
20800
20802
  issues,
20801
20803
  organizationSlug: params.organizationSlug,
20802
- projectSlugOrId: params.projectSlugOrId,
20804
+ projectSlugOrId: params.projectSlugOrId ?? void 0,
20803
20805
  query: translatedQuery.query,
20804
- regionUrl: params.regionUrl,
20806
+ regionUrl: params.regionUrl ?? void 0,
20805
20807
  naturalLanguageQuery: params.naturalLanguageQuery,
20806
20808
  skipHeader: false
20807
20809
  });
@@ -20829,7 +20831,7 @@ The user may include various parameters to pass to those tools in their prompt.
20829
20831
  You MUST return tool results directly without interpreting them.`;
20830
20832
 
20831
20833
  //#endregion
20832
- //#region ../mcp-core/dist/agent-DoJNlQyJ.js
20834
+ //#region ../mcp-core/dist/agent-BH2CU6gS.js
20833
20835
  /**
20834
20836
  * Output schema for the embedded agent.
20835
20837
  * The agent returns the final result string directly from its tool calls.
@@ -21004,7 +21006,7 @@ function getConstraintParametersToInject(constraints, toolInputSchema) {
21004
21006
  }
21005
21007
 
21006
21008
  //#endregion
21007
- //#region ../mcp-core/dist/server-CroFA_Gp.js
21009
+ //#region ../mcp-core/dist/server-8ny70iLt.js
21008
21010
  /**
21009
21011
  * Format tool calls into a readable trace
21010
21012
  */
@@ -21152,7 +21154,7 @@ var tools_default = {
21152
21154
  * return createMcpHandler(server, { route: "/mcp" })(request, env, ctx);
21153
21155
  * ```
21154
21156
  */
21155
- function buildServer({ context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21157
+ function buildServer({ context: context$1, agentMode = false, tools: customTools }) {
21156
21158
  const server$1 = new McpServer({
21157
21159
  name: MCP_SERVER_NAME,
21158
21160
  version: LIB_VERSION
@@ -21160,7 +21162,6 @@ function buildServer({ context: context$1, onToolComplete, agentMode = false, to
21160
21162
  configureServer({
21161
21163
  server: server$1,
21162
21164
  context: context$1,
21163
- onToolComplete,
21164
21165
  agentMode,
21165
21166
  tools: customTools
21166
21167
  });
@@ -21175,7 +21176,7 @@ function buildServer({ context: context$1, onToolComplete, agentMode = false, to
21175
21176
  *
21176
21177
  * In agent mode, only the use_sentry tool is registered, bypassing authorization checks.
21177
21178
  */
21178
- function configureServer({ server: server$1, context: context$1, onToolComplete, agentMode = false, tools: customTools }) {
21179
+ function configureServer({ server: server$1, context: context$1, agentMode = false, tools: customTools }) {
21179
21180
  const toolsToRegister = agentMode ? { use_sentry: tools_default.use_sentry } : customTools ?? tools_default;
21180
21181
  const grantedSkills = context$1.grantedSkills ? new Set(context$1.grantedSkills) : void 0;
21181
21182
  const grantedScopes = context$1.grantedScopes ? new Set(context$1.grantedScopes) : void 0;
@@ -21234,43 +21235,39 @@ function configureServer({ server: server$1, context: context$1, onToolComplete,
21234
21235
  const constraintKeysToFilter = new Set(getConstraintKeysToFilter(context$1.constraints, tool$1.inputSchema));
21235
21236
  const filteredInputSchema = Object.fromEntries(Object.entries(tool$1.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));
21236
21237
  server$1.tool(tool$1.name, tool$1.description, filteredInputSchema, tool$1.annotations, async (params, extra) => {
21238
+ const activeSpan = getActiveSpan();
21239
+ if (activeSpan) {
21240
+ if (context$1.constraints.organizationSlug) activeSpan.setAttribute("sentry-mcp.constraint-organization", context$1.constraints.organizationSlug);
21241
+ if (context$1.constraints.projectSlug) activeSpan.setAttribute("sentry-mcp.constraint-project", context$1.constraints.projectSlug);
21242
+ }
21243
+ if (context$1.userId) setUser({ id: context$1.userId });
21244
+ if (context$1.clientId) setTag("client.id", context$1.clientId);
21237
21245
  try {
21238
- const activeSpan = getActiveSpan();
21246
+ const applicableConstraints = getConstraintParametersToInject(context$1.constraints, tool$1.inputSchema);
21247
+ const paramsWithConstraints = {
21248
+ ...params,
21249
+ ...applicableConstraints
21250
+ };
21251
+ const output = await tool$1.handler(paramsWithConstraints, context$1);
21252
+ if (activeSpan) activeSpan.setStatus({ code: 1 });
21253
+ if (typeof output === "string") return { content: [{
21254
+ type: "text",
21255
+ text: output
21256
+ }] };
21257
+ if (Array.isArray(output)) return { content: output };
21258
+ throw new Error(`Invalid tool output: ${output}`);
21259
+ } catch (error) {
21239
21260
  if (activeSpan) {
21240
- if (context$1.constraints.organizationSlug) activeSpan.setAttribute("sentry-mcp.constraint-organization", context$1.constraints.organizationSlug);
21241
- if (context$1.constraints.projectSlug) activeSpan.setAttribute("sentry-mcp.constraint-project", context$1.constraints.projectSlug);
21261
+ activeSpan.setStatus({ code: 2 });
21262
+ activeSpan.recordException(error);
21242
21263
  }
21243
- if (context$1.userId) setUser({ id: context$1.userId });
21244
- if (context$1.clientId) setTag("client.id", context$1.clientId);
21245
- try {
21246
- const applicableConstraints = getConstraintParametersToInject(context$1.constraints, tool$1.inputSchema);
21247
- const paramsWithConstraints = {
21248
- ...params,
21249
- ...applicableConstraints
21250
- };
21251
- const output = await tool$1.handler(paramsWithConstraints, context$1);
21252
- if (activeSpan) activeSpan.setStatus({ code: 1 });
21253
- if (typeof output === "string") return { content: [{
21264
+ return {
21265
+ content: [{
21254
21266
  type: "text",
21255
- text: output
21256
- }] };
21257
- if (Array.isArray(output)) return { content: output };
21258
- throw new Error(`Invalid tool output: ${output}`);
21259
- } catch (error) {
21260
- if (activeSpan) {
21261
- activeSpan.setStatus({ code: 2 });
21262
- activeSpan.recordException(error);
21263
- }
21264
- return {
21265
- content: [{
21266
- type: "text",
21267
- text: await formatErrorForUser(error)
21268
- }],
21269
- isError: true
21270
- };
21271
- }
21272
- } finally {
21273
- onToolComplete?.();
21267
+ text: await formatErrorForUser(error)
21268
+ }],
21269
+ isError: true
21270
+ };
21274
21271
  }
21275
21272
  });
21276
21273
  }