@sentry/mcp-server 0.23.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/parse.cjs +1 -1
- package/dist/cli/parse.d.cts +1 -1
- package/dist/cli/parse.d.cts.map +1 -1
- package/dist/cli/parse.d.ts +1 -1
- package/dist/cli/parse.d.ts.map +1 -1
- package/dist/cli/parse.js +1 -1
- package/dist/cli/resolve.cjs +1 -2
- package/dist/cli/resolve.d.cts +2 -3
- package/dist/cli/resolve.d.cts.map +1 -1
- package/dist/cli/resolve.d.ts +2 -3
- package/dist/cli/resolve.d.ts.map +1 -1
- package/dist/cli/resolve.js +2 -2
- package/dist/cli/types.d.cts +1 -1
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/usage.cjs +1 -1
- package/dist/cli/usage.d.cts +1 -2
- package/dist/cli/usage.d.cts.map +1 -1
- package/dist/cli/usage.d.ts +1 -2
- package/dist/cli/usage.d.ts.map +1 -1
- package/dist/cli/usage.js +1 -1
- package/dist/config-BEgU9ylR.js +3 -0
- package/dist/{config-DtimzxvV-D3ccpxhQ.cjs → config-BoFBjXRq-CGHqlnJ9.cjs} +296 -4
- package/dist/config-BoFBjXRq-CGHqlnJ9.cjs.map +1 -0
- package/dist/{config-DtimzxvV-BItTrGiz.js → config-BoFBjXRq-CMdBQOkQ.js} +291 -5
- package/dist/config-BoFBjXRq-CMdBQOkQ.js.map +1 -0
- package/dist/config-rZ982IEm.cjs +7 -0
- package/dist/index.cjs +482 -316
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +438 -272
- package/dist/index.js.map +1 -1
- package/dist/{parse-Dn9XeQSj.js → parse-46t_fITC.js} +2 -26
- package/dist/parse-46t_fITC.js.map +1 -0
- package/dist/{parse-By6nDBNs.cjs → parse-BjIH83SX.cjs} +2 -26
- package/dist/parse-BjIH83SX.cjs.map +1 -0
- package/dist/resolve-CdTP9riu.cjs +286 -0
- package/dist/resolve-CdTP9riu.cjs.map +1 -0
- package/dist/resolve-Cg3SH2zt.js +232 -0
- package/dist/resolve-Cg3SH2zt.js.map +1 -0
- package/dist/{stdio-aCI9XyaI.cjs → stdio-Cl-Ib8bu.cjs} +4 -4
- package/dist/{stdio-aCI9XyaI.cjs.map → stdio-Cl-Ib8bu.cjs.map} +1 -1
- package/dist/{stdio-232a22j4.js → stdio-CwqdTAhY.js} +4 -4
- package/dist/{stdio-232a22j4.js.map → stdio-CwqdTAhY.js.map} +1 -1
- package/dist/transports/stdio.cjs +1 -1
- package/dist/transports/stdio.js +1 -1
- package/dist/{types-CM88pHH_.d.ts → types-D5f00mg9.d.ts} +2 -11
- package/dist/types-D5f00mg9.d.ts.map +1 -0
- package/dist/{types-CnLRMjvf.d.cts → types-DpmAC3S8.d.cts} +2 -11
- package/dist/types-DpmAC3S8.d.cts.map +1 -0
- package/dist/{usage-DMGbIpV-.js → usage-BzYvqaru.js} +3 -11
- package/dist/usage-BzYvqaru.js.map +1 -0
- package/dist/{usage-iwGZsu3a.cjs → usage-DD58xBe3.cjs} +3 -11
- package/dist/usage-DD58xBe3.cjs.map +1 -0
- package/package.json +7 -6
- package/dist/config-Bs1p6XwV.js +0 -3
- package/dist/config-DFewJLVx.cjs +0 -6
- package/dist/config-DtimzxvV-BItTrGiz.js.map +0 -1
- package/dist/config-DtimzxvV-D3ccpxhQ.cjs.map +0 -1
- package/dist/parse-By6nDBNs.cjs.map +0 -1
- package/dist/parse-Dn9XeQSj.js.map +0 -1
- package/dist/resolve-BCdS4js5.js +0 -590
- package/dist/resolve-BCdS4js5.js.map +0 -1
- package/dist/resolve-BMmRdCFJ.cjs +0 -692
- package/dist/resolve-BMmRdCFJ.cjs.map +0 -1
- package/dist/types-CM88pHH_.d.ts.map +0 -1
- package/dist/types-CnLRMjvf.d.cts.map +0 -1
- package/dist/usage-DMGbIpV-.js.map +0 -1
- package/dist/usage-iwGZsu3a.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { LIB_VERSION, USER_AGENT, startStdio } from "./stdio-
|
|
4
|
-
import { RECOMMENDED_FIELDS, systemPrompt } from "./config-
|
|
5
|
-
import { buildUsage } from "./usage-
|
|
6
|
-
import { merge, parseArgv, parseEnv } from "./parse-
|
|
7
|
-
import {
|
|
2
|
+
import { ALL_SKILLS, SKILLS, finalize, getIssueUrl, getIssuesSearchUrl, getTraceUrl, isEnabledBySkills, isSentryHost } from "./resolve-Cg3SH2zt.js";
|
|
3
|
+
import { LIB_VERSION, USER_AGENT, startStdio } from "./stdio-CwqdTAhY.js";
|
|
4
|
+
import { RECOMMENDED_FIELDS, systemPrompt } from "./config-BoFBjXRq-CMdBQOkQ.js";
|
|
5
|
+
import { buildUsage } from "./usage-BzYvqaru.js";
|
|
6
|
+
import { merge, parseArgv, parseEnv } from "./parse-46t_fITC.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
8
|
import util from "node:util";
|
|
9
|
-
import { captureException, captureMessage, getActiveSpan, setTag, setUser, withScope, wrapMcpServerWithSentry } from "@sentry/core";
|
|
10
|
-
import
|
|
9
|
+
import { captureException, captureMessage, getActiveSpan, logger, setTag, setUser, withScope, wrapMcpServerWithSentry } from "@sentry/core";
|
|
10
|
+
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
11
11
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
12
|
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
|
|
13
|
+
import * as Sentry from "@sentry/node";
|
|
13
14
|
|
|
14
15
|
//#region rolldown:runtime
|
|
15
16
|
var __create = Object.create;
|
|
@@ -42,6 +43,182 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
42
43
|
enumerable: true
|
|
43
44
|
}) : target, mod));
|
|
44
45
|
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../mcp-core/dist/constants-D8axTonA.js
|
|
48
|
+
/**
|
|
49
|
+
* Constants for Sentry MCP server.
|
|
50
|
+
*
|
|
51
|
+
* Defines platform and framework combinations available in Sentry documentation.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* MCP Server identification
|
|
55
|
+
*/
|
|
56
|
+
const MCP_SERVER_NAME = "Sentry MCP";
|
|
57
|
+
/**
|
|
58
|
+
* Allowed region domains for sentry.io
|
|
59
|
+
* Only these specific domains are permitted when using Sentry's cloud service
|
|
60
|
+
* This is used to prevent SSRF attacks by restricting regionUrl to known domains
|
|
61
|
+
*/
|
|
62
|
+
const SENTRY_ALLOWED_REGION_DOMAINS = new Set([
|
|
63
|
+
"sentry.io",
|
|
64
|
+
"us.sentry.io",
|
|
65
|
+
"de.sentry.io"
|
|
66
|
+
]);
|
|
67
|
+
/**
|
|
68
|
+
* Common Sentry platforms that have documentation available
|
|
69
|
+
*/
|
|
70
|
+
const SENTRY_PLATFORMS_BASE = [
|
|
71
|
+
"javascript",
|
|
72
|
+
"python",
|
|
73
|
+
"java",
|
|
74
|
+
"dotnet",
|
|
75
|
+
"go",
|
|
76
|
+
"php",
|
|
77
|
+
"ruby",
|
|
78
|
+
"android",
|
|
79
|
+
"apple",
|
|
80
|
+
"unity",
|
|
81
|
+
"unreal",
|
|
82
|
+
"rust",
|
|
83
|
+
"elixir",
|
|
84
|
+
"kotlin",
|
|
85
|
+
"native",
|
|
86
|
+
"dart",
|
|
87
|
+
"godot",
|
|
88
|
+
"nintendo-switch",
|
|
89
|
+
"playstation",
|
|
90
|
+
"powershell",
|
|
91
|
+
"react-native",
|
|
92
|
+
"xbox"
|
|
93
|
+
];
|
|
94
|
+
/**
|
|
95
|
+
* Platform-specific frameworks that have Sentry guides
|
|
96
|
+
*/
|
|
97
|
+
const SENTRY_FRAMEWORKS = {
|
|
98
|
+
javascript: [
|
|
99
|
+
"nextjs",
|
|
100
|
+
"react",
|
|
101
|
+
"gatsby",
|
|
102
|
+
"remix",
|
|
103
|
+
"vue",
|
|
104
|
+
"angular",
|
|
105
|
+
"hono",
|
|
106
|
+
"svelte",
|
|
107
|
+
"express",
|
|
108
|
+
"fastify",
|
|
109
|
+
"astro",
|
|
110
|
+
"bun",
|
|
111
|
+
"capacitor",
|
|
112
|
+
"cloudflare",
|
|
113
|
+
"connect",
|
|
114
|
+
"cordova",
|
|
115
|
+
"deno",
|
|
116
|
+
"electron",
|
|
117
|
+
"ember",
|
|
118
|
+
"nuxt",
|
|
119
|
+
"solid",
|
|
120
|
+
"solidstart",
|
|
121
|
+
"sveltekit",
|
|
122
|
+
"tanstack-react",
|
|
123
|
+
"wasm",
|
|
124
|
+
"node",
|
|
125
|
+
"koa",
|
|
126
|
+
"nestjs",
|
|
127
|
+
"hapi"
|
|
128
|
+
],
|
|
129
|
+
python: [
|
|
130
|
+
"django",
|
|
131
|
+
"flask",
|
|
132
|
+
"fastapi",
|
|
133
|
+
"celery",
|
|
134
|
+
"tornado",
|
|
135
|
+
"pyramid",
|
|
136
|
+
"aiohttp",
|
|
137
|
+
"anthropic",
|
|
138
|
+
"airflow",
|
|
139
|
+
"aws-lambda",
|
|
140
|
+
"boto3",
|
|
141
|
+
"bottle",
|
|
142
|
+
"chalice",
|
|
143
|
+
"dramatiq",
|
|
144
|
+
"falcon",
|
|
145
|
+
"langchain",
|
|
146
|
+
"litestar",
|
|
147
|
+
"logging",
|
|
148
|
+
"loguru",
|
|
149
|
+
"openai",
|
|
150
|
+
"quart",
|
|
151
|
+
"ray",
|
|
152
|
+
"redis",
|
|
153
|
+
"rq",
|
|
154
|
+
"sanic",
|
|
155
|
+
"sqlalchemy",
|
|
156
|
+
"starlette"
|
|
157
|
+
],
|
|
158
|
+
dart: ["flutter"],
|
|
159
|
+
dotnet: [
|
|
160
|
+
"aspnetcore",
|
|
161
|
+
"maui",
|
|
162
|
+
"wpf",
|
|
163
|
+
"winforms",
|
|
164
|
+
"aspnet",
|
|
165
|
+
"aws-lambda",
|
|
166
|
+
"azure-functions",
|
|
167
|
+
"blazor-webassembly",
|
|
168
|
+
"entityframework",
|
|
169
|
+
"google-cloud-functions",
|
|
170
|
+
"extensions-logging",
|
|
171
|
+
"log4net",
|
|
172
|
+
"nlog",
|
|
173
|
+
"serilog",
|
|
174
|
+
"uwp",
|
|
175
|
+
"xamarin"
|
|
176
|
+
],
|
|
177
|
+
java: [
|
|
178
|
+
"spring",
|
|
179
|
+
"spring-boot",
|
|
180
|
+
"android",
|
|
181
|
+
"jul",
|
|
182
|
+
"log4j2",
|
|
183
|
+
"logback",
|
|
184
|
+
"servlet"
|
|
185
|
+
],
|
|
186
|
+
go: [
|
|
187
|
+
"echo",
|
|
188
|
+
"fasthttp",
|
|
189
|
+
"fiber",
|
|
190
|
+
"gin",
|
|
191
|
+
"http",
|
|
192
|
+
"iris",
|
|
193
|
+
"logrus",
|
|
194
|
+
"negroni",
|
|
195
|
+
"slog",
|
|
196
|
+
"zerolog"
|
|
197
|
+
],
|
|
198
|
+
php: ["laravel", "symfony"],
|
|
199
|
+
ruby: [
|
|
200
|
+
"delayed_job",
|
|
201
|
+
"rack",
|
|
202
|
+
"rails",
|
|
203
|
+
"resque",
|
|
204
|
+
"sidekiq"
|
|
205
|
+
],
|
|
206
|
+
android: ["kotlin"],
|
|
207
|
+
apple: [
|
|
208
|
+
"ios",
|
|
209
|
+
"macos",
|
|
210
|
+
"watchos",
|
|
211
|
+
"tvos",
|
|
212
|
+
"visionos"
|
|
213
|
+
],
|
|
214
|
+
kotlin: ["multiplatform"]
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* All valid guides for Sentry docs search filtering.
|
|
218
|
+
* A guide can be either a platform (e.g., 'javascript') or a platform/framework combination (e.g., 'javascript/nextjs').
|
|
219
|
+
*/
|
|
220
|
+
const SENTRY_GUIDES = [...SENTRY_PLATFORMS_BASE, ...Object.entries(SENTRY_FRAMEWORKS).flatMap(([platform, guides]) => guides.map((guide) => `${platform}/${guide}`))];
|
|
221
|
+
|
|
45
222
|
//#endregion
|
|
46
223
|
//#region ../mcp-core/dist/errors-BXmNwD2K.js
|
|
47
224
|
/**
|
|
@@ -67,7 +244,7 @@ var ConfigurationError = class extends Error {
|
|
|
67
244
|
};
|
|
68
245
|
|
|
69
246
|
//#endregion
|
|
70
|
-
//#region ../mcp-core/dist/slug-validation-
|
|
247
|
+
//#region ../mcp-core/dist/slug-validation-BdDL1fV5.js
|
|
71
248
|
/**
|
|
72
249
|
* Maximum reasonable length for a slug.
|
|
73
250
|
*/
|
|
@@ -156,7 +333,7 @@ function validateSlugOrId(val, ctx) {
|
|
|
156
333
|
}
|
|
157
334
|
|
|
158
335
|
//#endregion
|
|
159
|
-
//#region ../mcp-core/dist/schema-
|
|
336
|
+
//#region ../mcp-core/dist/schema-Bl7AGsln.js
|
|
160
337
|
const ParamOrganizationSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe("The organization's slug. You can find a existing list of organizations you have access to using the `find_organizations()` tool.");
|
|
161
338
|
const ParamTeamSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe("The team's slug. You can find a list of existing teams in an organization using the `find_teams()` tool.");
|
|
162
339
|
const ParamProjectSlug = z.string().toLowerCase().trim().superRefine(validateSlug).describe("The project's slug. You can find a list of existing projects in an organization using the `find_projects()` tool.");
|
|
@@ -189,7 +366,7 @@ const ParamEventId = z.string().trim().describe("The ID of the event.");
|
|
|
189
366
|
const ParamAttachmentId = z.string().trim().describe("The ID of the attachment to download.");
|
|
190
367
|
|
|
191
368
|
//#endregion
|
|
192
|
-
//#region ../mcp-core/dist/define-
|
|
369
|
+
//#region ../mcp-core/dist/define-vgYYpneQ.js
|
|
193
370
|
function defineTool(config) {
|
|
194
371
|
return config;
|
|
195
372
|
}
|
|
@@ -346,8 +523,8 @@ var LoggerImpl = class LoggerImpl$1 {
|
|
|
346
523
|
*/
|
|
347
524
|
resetDescendants() {
|
|
348
525
|
for (const child of Object.values(this.children)) {
|
|
349
|
-
const logger$
|
|
350
|
-
if (logger$
|
|
526
|
+
const logger$2 = child instanceof LoggerImpl$1 ? child : child.deref();
|
|
527
|
+
if (logger$2 != null) logger$2.resetDescendants();
|
|
351
528
|
}
|
|
352
529
|
this.reset();
|
|
353
530
|
}
|
|
@@ -511,8 +688,8 @@ var LoggerImpl = class LoggerImpl$1 {
|
|
|
511
688
|
var LoggerCtx = class LoggerCtx$1 {
|
|
512
689
|
logger;
|
|
513
690
|
properties;
|
|
514
|
-
constructor(logger$
|
|
515
|
-
this.logger = logger$
|
|
691
|
+
constructor(logger$2, properties) {
|
|
692
|
+
this.logger = logger$2;
|
|
516
693
|
this.properties = properties;
|
|
517
694
|
}
|
|
518
695
|
get category() {
|
|
@@ -1262,20 +1439,20 @@ function configureInternal(config, allowAsync) {
|
|
|
1262
1439
|
const categoryKey = Array.isArray(cfg$1.category) ? JSON.stringify(cfg$1.category) : JSON.stringify([cfg$1.category]);
|
|
1263
1440
|
if (configuredCategories.has(categoryKey)) throw new ConfigError(`Duplicate logger configuration for category: ${categoryKey}. Each category can only be configured once.`);
|
|
1264
1441
|
configuredCategories.add(categoryKey);
|
|
1265
|
-
const logger$
|
|
1442
|
+
const logger$2 = LoggerImpl.getLogger(cfg$1.category);
|
|
1266
1443
|
for (const sinkId of cfg$1.sinks ?? []) {
|
|
1267
1444
|
const sink = config.sinks[sinkId];
|
|
1268
1445
|
if (!sink) throw new ConfigError(`Sink not found: ${sinkId}.`);
|
|
1269
|
-
logger$
|
|
1446
|
+
logger$2.sinks.push(sink);
|
|
1270
1447
|
}
|
|
1271
|
-
logger$
|
|
1272
|
-
if (cfg$1.lowestLevel !== void 0) logger$
|
|
1448
|
+
logger$2.parentSinks = cfg$1.parentSinks ?? "inherit";
|
|
1449
|
+
if (cfg$1.lowestLevel !== void 0) logger$2.lowestLevel = cfg$1.lowestLevel;
|
|
1273
1450
|
for (const filterId of cfg$1.filters ?? []) {
|
|
1274
1451
|
const filter$1 = config.filters?.[filterId];
|
|
1275
1452
|
if (filter$1 === void 0) throw new ConfigError(`Filter not found: ${filterId}.`);
|
|
1276
|
-
logger$
|
|
1453
|
+
logger$2.filters.push(toFilter(filter$1));
|
|
1277
1454
|
}
|
|
1278
|
-
strongRefs.add(logger$
|
|
1455
|
+
strongRefs.add(logger$2);
|
|
1279
1456
|
}
|
|
1280
1457
|
LoggerImpl.getLogger().contextLocalStorage = config.contextLocalStorage;
|
|
1281
1458
|
for (const sink of Object.values(config.sinks)) {
|
|
@@ -1359,7 +1536,7 @@ var ConfigError = class extends Error {
|
|
|
1359
1536
|
};
|
|
1360
1537
|
|
|
1361
1538
|
//#endregion
|
|
1362
|
-
//#region ../mcp-core/dist/logging-
|
|
1539
|
+
//#region ../mcp-core/dist/logging-BK_g0p3a.js
|
|
1363
1540
|
const ROOT_LOG_CATEGORY = ["sentry", "mcp"];
|
|
1364
1541
|
let loggingConfigured = false;
|
|
1365
1542
|
function resolveLowestLevel() {
|
|
@@ -1376,12 +1553,12 @@ function resolveLowestLevel() {
|
|
|
1376
1553
|
* (creating Issues), this sink uses Sentry.logger.* methods to send data to the
|
|
1377
1554
|
* Logs product.
|
|
1378
1555
|
*
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1556
|
+
* This uses @sentry/core logger API which works across all platforms (Node.js,
|
|
1557
|
+
* Cloudflare Workers, etc.) as long as Sentry is initialized with the appropriate SDK.
|
|
1381
1558
|
*/
|
|
1382
1559
|
function createSentryLogsSink() {
|
|
1383
1560
|
return (record) => {
|
|
1384
|
-
if (!
|
|
1561
|
+
if (!logger) return;
|
|
1385
1562
|
let message = "";
|
|
1386
1563
|
for (let i = 0; i < record.message.length; i++) if (i % 2 === 0) message += record.message[i];
|
|
1387
1564
|
else {
|
|
@@ -1391,24 +1568,24 @@ function createSentryLogsSink() {
|
|
|
1391
1568
|
const attributes$73 = record.properties;
|
|
1392
1569
|
switch (record.level) {
|
|
1393
1570
|
case "trace":
|
|
1394
|
-
|
|
1571
|
+
logger.trace(message, attributes$73);
|
|
1395
1572
|
break;
|
|
1396
1573
|
case "debug":
|
|
1397
|
-
|
|
1574
|
+
logger.debug(message, attributes$73);
|
|
1398
1575
|
break;
|
|
1399
1576
|
case "info":
|
|
1400
|
-
|
|
1577
|
+
logger.info(message, attributes$73);
|
|
1401
1578
|
break;
|
|
1402
1579
|
case "warning":
|
|
1403
|
-
|
|
1580
|
+
logger.warn(message, attributes$73);
|
|
1404
1581
|
break;
|
|
1405
1582
|
case "error":
|
|
1406
|
-
|
|
1583
|
+
logger.error(message, attributes$73);
|
|
1407
1584
|
break;
|
|
1408
1585
|
case "fatal":
|
|
1409
|
-
|
|
1586
|
+
logger.fatal(message, attributes$73);
|
|
1410
1587
|
break;
|
|
1411
|
-
default:
|
|
1588
|
+
default: logger.info(message, attributes$73);
|
|
1412
1589
|
}
|
|
1413
1590
|
};
|
|
1414
1591
|
}
|
|
@@ -1445,8 +1622,8 @@ function ensureLoggingConfigured() {
|
|
|
1445
1622
|
function getLogger$1(scope, defaults) {
|
|
1446
1623
|
ensureLoggingConfigured();
|
|
1447
1624
|
const category = Array.isArray(scope) ? scope : [scope];
|
|
1448
|
-
const logger$
|
|
1449
|
-
return defaults ? logger$
|
|
1625
|
+
const logger$2 = getLogger([...ROOT_LOG_CATEGORY, ...category]);
|
|
1626
|
+
return defaults ? logger$2.with(defaults) : logger$2;
|
|
1450
1627
|
}
|
|
1451
1628
|
const ISSUE_LOGGER_SCOPE = ["runtime", "issues"];
|
|
1452
1629
|
function isRecord(value) {
|
|
@@ -1524,7 +1701,7 @@ function serializeError(value, depth = 0) {
|
|
|
1524
1701
|
}
|
|
1525
1702
|
return { message: coerceMessage(value) };
|
|
1526
1703
|
}
|
|
1527
|
-
const logger = getLogger$1([]);
|
|
1704
|
+
const logger$1 = getLogger$1([]);
|
|
1528
1705
|
const DEFAULT_LOGGER_SCOPE = [];
|
|
1529
1706
|
function buildLogProperties(level, options, serializedError) {
|
|
1530
1707
|
const properties = { severity: level };
|
|
@@ -1563,6 +1740,9 @@ function logWithLevel(level, value, contextsOrOptions) {
|
|
|
1563
1740
|
default: scopedLogger.info(message, () => properties);
|
|
1564
1741
|
}
|
|
1565
1742
|
}
|
|
1743
|
+
function logInfo(value, contextsOrOptions) {
|
|
1744
|
+
logWithLevel("info", value, contextsOrOptions);
|
|
1745
|
+
}
|
|
1566
1746
|
function logWarn(value, contextsOrOptions) {
|
|
1567
1747
|
logWithLevel("warning", value, contextsOrOptions);
|
|
1568
1748
|
}
|
|
@@ -1603,7 +1783,7 @@ function logIssue(error, contextsOrOptions, attachmentsArg) {
|
|
|
1603
1783
|
}
|
|
1604
1784
|
|
|
1605
1785
|
//#endregion
|
|
1606
|
-
//#region ../mcp-core/dist/schema-
|
|
1786
|
+
//#region ../mcp-core/dist/schema-BO1YtJIJ.js
|
|
1607
1787
|
/**
|
|
1608
1788
|
* Schema for Sentry API error responses.
|
|
1609
1789
|
*
|
|
@@ -2100,7 +2280,7 @@ const TraceIssueSchema = z.object({
|
|
|
2100
2280
|
const TraceSchema = z.array(z.union([TraceSpanSchema, TraceIssueSchema]));
|
|
2101
2281
|
|
|
2102
2282
|
//#endregion
|
|
2103
|
-
//#region ../mcp-core/dist/errors-
|
|
2283
|
+
//#region ../mcp-core/dist/errors-ZBQnDL3L.js
|
|
2104
2284
|
/**
|
|
2105
2285
|
* API Error Class Hierarchy
|
|
2106
2286
|
*
|
|
@@ -2315,7 +2495,7 @@ function createApiError(message, status, detail, responseBody) {
|
|
|
2315
2495
|
}
|
|
2316
2496
|
|
|
2317
2497
|
//#endregion
|
|
2318
|
-
//#region ../mcp-core/dist/client-
|
|
2498
|
+
//#region ../mcp-core/dist/client-DsM0pHqr.js
|
|
2319
2499
|
/**
|
|
2320
2500
|
* Mapping of common network error codes to user-friendly messages.
|
|
2321
2501
|
* These help users understand and resolve connection issues.
|
|
@@ -3404,7 +3584,7 @@ var SentryApiService = class {
|
|
|
3404
3584
|
};
|
|
3405
3585
|
|
|
3406
3586
|
//#endregion
|
|
3407
|
-
//#region ../mcp-core/dist/validate-region-url-
|
|
3587
|
+
//#region ../mcp-core/dist/validate-region-url-BL1kR9T7.js
|
|
3408
3588
|
/**
|
|
3409
3589
|
* Validates that a regionUrl is valid.
|
|
3410
3590
|
* Prevents SSRF attacks by only allowing the base host itself or domains from an allowlist.
|
|
@@ -3436,7 +3616,7 @@ function validateRegionUrl(regionUrl, baseHost) {
|
|
|
3436
3616
|
}
|
|
3437
3617
|
|
|
3438
3618
|
//#endregion
|
|
3439
|
-
//#region ../mcp-core/dist/api-
|
|
3619
|
+
//#region ../mcp-core/dist/api-DxBbW5xK.js
|
|
3440
3620
|
/**
|
|
3441
3621
|
* Create a Sentry API service from server context with optional region override
|
|
3442
3622
|
* @param context - Server context containing host and access token
|
|
@@ -3457,7 +3637,7 @@ function apiServiceFromContext(context$1, opts = {}) {
|
|
|
3457
3637
|
}
|
|
3458
3638
|
|
|
3459
3639
|
//#endregion
|
|
3460
|
-
//#region ../mcp-core/dist/whoami-
|
|
3640
|
+
//#region ../mcp-core/dist/whoami-Ri2i43vR.js
|
|
3461
3641
|
var whoami_default = defineTool({
|
|
3462
3642
|
name: "whoami",
|
|
3463
3643
|
description: [
|
|
@@ -3467,7 +3647,7 @@ var whoami_default = defineTool({
|
|
|
3467
3647
|
"- Get the user's name and email address."
|
|
3468
3648
|
].join("\n"),
|
|
3469
3649
|
inputSchema: {},
|
|
3470
|
-
|
|
3650
|
+
skills: ALL_SKILLS,
|
|
3471
3651
|
requiredScopes: [],
|
|
3472
3652
|
annotations: {
|
|
3473
3653
|
readOnlyHint: true,
|
|
@@ -3490,11 +3670,11 @@ var whoami_default = defineTool({
|
|
|
3490
3670
|
});
|
|
3491
3671
|
|
|
3492
3672
|
//#endregion
|
|
3493
|
-
//#region ../mcp-core/dist/find-organizations-
|
|
3673
|
+
//#region ../mcp-core/dist/find-organizations-Cf2YI972.js
|
|
3494
3674
|
const RESULT_LIMIT$2 = 25;
|
|
3495
3675
|
var find_organizations_default = defineTool({
|
|
3496
3676
|
name: "find_organizations",
|
|
3497
|
-
|
|
3677
|
+
skills: ALL_SKILLS,
|
|
3498
3678
|
requiredScopes: ["org:read"],
|
|
3499
3679
|
description: [
|
|
3500
3680
|
"Find organizations that the user has access to in Sentry.",
|
|
@@ -3513,7 +3693,7 @@ var find_organizations_default = defineTool({
|
|
|
3513
3693
|
},
|
|
3514
3694
|
async handler(params, context$1) {
|
|
3515
3695
|
const apiService = apiServiceFromContext(context$1);
|
|
3516
|
-
const organizations = await apiService.listOrganizations({ query: params.query });
|
|
3696
|
+
const organizations = await apiService.listOrganizations({ query: params.query ?? void 0 });
|
|
3517
3697
|
let output = "# Organizations\n\n";
|
|
3518
3698
|
if (params.query) output += `**Search query:** "${params.query}"\n\n`;
|
|
3519
3699
|
if (organizations.length === 0) {
|
|
@@ -3542,11 +3722,11 @@ var find_organizations_default = defineTool({
|
|
|
3542
3722
|
});
|
|
3543
3723
|
|
|
3544
3724
|
//#endregion
|
|
3545
|
-
//#region ../mcp-core/dist/find-teams-
|
|
3725
|
+
//#region ../mcp-core/dist/find-teams-C_HR4IHN.js
|
|
3546
3726
|
const RESULT_LIMIT$1 = 25;
|
|
3547
3727
|
var find_teams_default = defineTool({
|
|
3548
3728
|
name: "find_teams",
|
|
3549
|
-
|
|
3729
|
+
skills: [
|
|
3550
3730
|
"inspect",
|
|
3551
3731
|
"triage",
|
|
3552
3732
|
"project-management"
|
|
@@ -3572,11 +3752,11 @@ var find_teams_default = defineTool({
|
|
|
3572
3752
|
openWorldHint: true
|
|
3573
3753
|
},
|
|
3574
3754
|
async handler(params, context$1) {
|
|
3575
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
3755
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
3576
3756
|
const organizationSlug = params.organizationSlug;
|
|
3577
3757
|
if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
|
|
3578
3758
|
setTag("organization.slug", organizationSlug);
|
|
3579
|
-
const teams = await apiService.listTeams(organizationSlug, { query: params.query });
|
|
3759
|
+
const teams = await apiService.listTeams(organizationSlug, { query: params.query ?? void 0 });
|
|
3580
3760
|
let output = `# Teams in **${organizationSlug}**\n\n`;
|
|
3581
3761
|
if (params.query) output += `**Search query:** "${params.query}"\n\n`;
|
|
3582
3762
|
if (teams.length === 0) {
|
|
@@ -3590,11 +3770,11 @@ var find_teams_default = defineTool({
|
|
|
3590
3770
|
});
|
|
3591
3771
|
|
|
3592
3772
|
//#endregion
|
|
3593
|
-
//#region ../mcp-core/dist/find-projects-
|
|
3773
|
+
//#region ../mcp-core/dist/find-projects-DLZN7tox.js
|
|
3594
3774
|
const RESULT_LIMIT = 25;
|
|
3595
3775
|
var find_projects_default = defineTool({
|
|
3596
3776
|
name: "find_projects",
|
|
3597
|
-
|
|
3777
|
+
skills: ALL_SKILLS,
|
|
3598
3778
|
requiredScopes: ["project:read"],
|
|
3599
3779
|
description: [
|
|
3600
3780
|
"Find projects in Sentry.",
|
|
@@ -3616,11 +3796,11 @@ var find_projects_default = defineTool({
|
|
|
3616
3796
|
openWorldHint: true
|
|
3617
3797
|
},
|
|
3618
3798
|
async handler(params, context$1) {
|
|
3619
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
3799
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
3620
3800
|
const organizationSlug = params.organizationSlug;
|
|
3621
3801
|
if (!organizationSlug) throw new UserInputError("Organization slug is required. Please provide an organizationSlug parameter.");
|
|
3622
3802
|
setTag("organization.slug", organizationSlug);
|
|
3623
|
-
const projects = await apiService.listProjects(organizationSlug, { query: params.query });
|
|
3803
|
+
const projects = await apiService.listProjects(organizationSlug, { query: params.query ?? void 0 });
|
|
3624
3804
|
let output = `# Projects in **${organizationSlug}**\n\n`;
|
|
3625
3805
|
if (params.query) output += `**Search query:** "${params.query}"\n\n`;
|
|
3626
3806
|
if (projects.length === 0) {
|
|
@@ -3634,10 +3814,10 @@ var find_projects_default = defineTool({
|
|
|
3634
3814
|
});
|
|
3635
3815
|
|
|
3636
3816
|
//#endregion
|
|
3637
|
-
//#region ../mcp-core/dist/find-releases-
|
|
3817
|
+
//#region ../mcp-core/dist/find-releases-B5iKG6ZO.js
|
|
3638
3818
|
var find_releases_default = defineTool({
|
|
3639
3819
|
name: "find_releases",
|
|
3640
|
-
|
|
3820
|
+
skills: ["inspect"],
|
|
3641
3821
|
requiredScopes: ["project:read"],
|
|
3642
3822
|
description: [
|
|
3643
3823
|
"Find releases in Sentry.",
|
|
@@ -3676,13 +3856,13 @@ var find_releases_default = defineTool({
|
|
|
3676
3856
|
openWorldHint: true
|
|
3677
3857
|
},
|
|
3678
3858
|
async handler(params, context$1) {
|
|
3679
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
3859
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
3680
3860
|
const organizationSlug = params.organizationSlug;
|
|
3681
3861
|
setTag("organization.slug", organizationSlug);
|
|
3682
3862
|
const releases = await apiService.listReleases({
|
|
3683
3863
|
organizationSlug,
|
|
3684
|
-
projectSlug: params.projectSlug,
|
|
3685
|
-
query: params.query
|
|
3864
|
+
projectSlug: params.projectSlug ?? void 0,
|
|
3865
|
+
query: params.query ?? void 0
|
|
3686
3866
|
});
|
|
3687
3867
|
let output = `# Releases in **${organizationSlug}${params.projectSlug ? `/${params.projectSlug}` : ""}**\n\n`;
|
|
3688
3868
|
if (releases.length === 0) {
|
|
@@ -3725,7 +3905,7 @@ var find_releases_default = defineTool({
|
|
|
3725
3905
|
});
|
|
3726
3906
|
|
|
3727
3907
|
//#endregion
|
|
3728
|
-
//#region ../mcp-core/dist/issue-helpers-
|
|
3908
|
+
//#region ../mcp-core/dist/issue-helpers-DtCbXiRZ.js
|
|
3729
3909
|
/**
|
|
3730
3910
|
* Extracts the Sentry issue ID and organization slug from a full URL
|
|
3731
3911
|
*
|
|
@@ -3801,7 +3981,7 @@ function parseIssueParams({ issueUrl, issueId, organizationSlug }) {
|
|
|
3801
3981
|
}
|
|
3802
3982
|
|
|
3803
3983
|
//#endregion
|
|
3804
|
-
//#region ../mcp-core/dist/seer-
|
|
3984
|
+
//#region ../mcp-core/dist/seer-CSFgx4AP.js
|
|
3805
3985
|
const SEER_POLLING_INTERVAL = 5e3;
|
|
3806
3986
|
const SEER_TIMEOUT = 5 * 60 * 1e3;
|
|
3807
3987
|
const SEER_MAX_RETRIES = 3;
|
|
@@ -3882,7 +4062,7 @@ function getOutputForAutofixStep(step) {
|
|
|
3882
4062
|
}
|
|
3883
4063
|
|
|
3884
4064
|
//#endregion
|
|
3885
|
-
//#region ../mcp-core/dist/formatting-
|
|
4065
|
+
//#region ../mcp-core/dist/formatting-CbPBuuTP.js
|
|
3886
4066
|
const LANGUAGE_EXTENSIONS = {
|
|
3887
4067
|
".java": "java",
|
|
3888
4068
|
".py": "python",
|
|
@@ -4800,6 +4980,12 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
|
|
|
4800
4980
|
output += `**Users Impacted**: ${issue.userCount}\n`;
|
|
4801
4981
|
output += `**Status**: ${issue.status}\n`;
|
|
4802
4982
|
if (issue.substatus) output += `**Substatus**: ${issue.substatus}\n`;
|
|
4983
|
+
if (issue.assignedTo) if (typeof issue.assignedTo === "string") output += `**Assigned To**: ${issue.assignedTo}\n`;
|
|
4984
|
+
else {
|
|
4985
|
+
const assignee = issue.assignedTo;
|
|
4986
|
+
const type = assignee.type === "team" ? "Team" : "User";
|
|
4987
|
+
output += `**Assigned To**: ${assignee.name} (${type})\n`;
|
|
4988
|
+
}
|
|
4803
4989
|
if (issue.issueType) output += `**Issue Type**: ${issue.issueType}\n`;
|
|
4804
4990
|
if (issue.issueCategory) output += `**Issue Category**: ${issue.issueCategory}\n`;
|
|
4805
4991
|
output += `**Platform**: ${issue.platform}\n`;
|
|
@@ -4844,7 +5030,7 @@ function formatIssueOutput({ organizationSlug, issue, event, apiService, autofix
|
|
|
4844
5030
|
}
|
|
4845
5031
|
|
|
4846
5032
|
//#endregion
|
|
4847
|
-
//#region ../mcp-core/dist/enhance-error-
|
|
5033
|
+
//#region ../mcp-core/dist/enhance-error-BzwoJ7V0.js
|
|
4848
5034
|
/**
|
|
4849
5035
|
* Enhances a 404 error with parameter context to help users understand what went wrong.
|
|
4850
5036
|
* This is optional - tools can use this when they want to provide extra context.
|
|
@@ -4872,10 +5058,10 @@ function enhanceNotFoundError(error, params) {
|
|
|
4872
5058
|
}
|
|
4873
5059
|
|
|
4874
5060
|
//#endregion
|
|
4875
|
-
//#region ../mcp-core/dist/get-issue-details-
|
|
5061
|
+
//#region ../mcp-core/dist/get-issue-details-CzHzJZi2.js
|
|
4876
5062
|
var get_issue_details_default = defineTool({
|
|
4877
5063
|
name: "get_issue_details",
|
|
4878
|
-
|
|
5064
|
+
skills: [
|
|
4879
5065
|
"inspect",
|
|
4880
5066
|
"triage",
|
|
4881
5067
|
"seer"
|
|
@@ -4934,7 +5120,7 @@ var get_issue_details_default = defineTool({
|
|
|
4934
5120
|
openWorldHint: true
|
|
4935
5121
|
},
|
|
4936
5122
|
async handler(params, context$1) {
|
|
4937
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
5123
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
4938
5124
|
if (params.eventId) {
|
|
4939
5125
|
const orgSlug$1 = params.organizationSlug;
|
|
4940
5126
|
const eventId = params.eventId;
|
|
@@ -5053,14 +5239,14 @@ function shouldFetchTraceForEvent(event) {
|
|
|
5053
5239
|
}
|
|
5054
5240
|
|
|
5055
5241
|
//#endregion
|
|
5056
|
-
//#region ../mcp-core/dist/get-trace-details-
|
|
5242
|
+
//#region ../mcp-core/dist/get-trace-details-DGzLP_Mo.js
|
|
5057
5243
|
const MAX_DEPTH = 2;
|
|
5058
5244
|
const MINIMUM_DURATION_THRESHOLD_MS = 10;
|
|
5059
5245
|
const MIN_MEANINGFUL_CHILD_DURATION = 5;
|
|
5060
5246
|
const MIN_AVG_DURATION_MS = 5;
|
|
5061
5247
|
var get_trace_details_default = defineTool({
|
|
5062
5248
|
name: "get_trace_details",
|
|
5063
|
-
|
|
5249
|
+
skills: ["inspect"],
|
|
5064
5250
|
requiredScopes: ["event:read"],
|
|
5065
5251
|
description: [
|
|
5066
5252
|
"Get detailed information about a specific Sentry trace by ID.",
|
|
@@ -5102,7 +5288,7 @@ var get_trace_details_default = defineTool({
|
|
|
5102
5288
|
},
|
|
5103
5289
|
async handler(params, context$1) {
|
|
5104
5290
|
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 });
|
|
5291
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
5106
5292
|
setTag("organization.slug", params.organizationSlug);
|
|
5107
5293
|
setTag("trace.id", params.traceId);
|
|
5108
5294
|
const traceMeta = await apiService.getTraceMeta({
|
|
@@ -5352,10 +5538,10 @@ function formatTraceOutput({ organizationSlug, traceId, traceMeta, trace: trace$
|
|
|
5352
5538
|
}
|
|
5353
5539
|
|
|
5354
5540
|
//#endregion
|
|
5355
|
-
//#region ../mcp-core/dist/get-event-attachment-
|
|
5541
|
+
//#region ../mcp-core/dist/get-event-attachment-4_XbtsrW.js
|
|
5356
5542
|
var get_event_attachment_default = defineTool({
|
|
5357
5543
|
name: "get_event_attachment",
|
|
5358
|
-
|
|
5544
|
+
skills: ["inspect"],
|
|
5359
5545
|
requiredScopes: ["event:read"],
|
|
5360
5546
|
description: [
|
|
5361
5547
|
"Download attachments from a Sentry event.",
|
|
@@ -5398,7 +5584,7 @@ var get_event_attachment_default = defineTool({
|
|
|
5398
5584
|
openWorldHint: true
|
|
5399
5585
|
},
|
|
5400
5586
|
async handler(params, context$1) {
|
|
5401
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
5587
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
5402
5588
|
setTag("organization.slug", params.organizationSlug);
|
|
5403
5589
|
if (params.attachmentId) {
|
|
5404
5590
|
const attachment = await apiService.getEventAttachment({
|
|
@@ -5423,7 +5609,6 @@ var get_event_attachment_default = defineTool({
|
|
|
5423
5609
|
contentParts.push(image);
|
|
5424
5610
|
} else {
|
|
5425
5611
|
const resource = {
|
|
5426
|
-
id: params.attachmentId,
|
|
5427
5612
|
type: "resource",
|
|
5428
5613
|
resource: {
|
|
5429
5614
|
uri: `file://${attachment.filename}`,
|
|
@@ -5489,7 +5674,7 @@ var get_event_attachment_default = defineTool({
|
|
|
5489
5674
|
});
|
|
5490
5675
|
|
|
5491
5676
|
//#endregion
|
|
5492
|
-
//#region ../mcp-core/dist/formatting-
|
|
5677
|
+
//#region ../mcp-core/dist/formatting-DJFcfTJG.js
|
|
5493
5678
|
/**
|
|
5494
5679
|
* Helper function to format assignedTo field for display
|
|
5495
5680
|
*/
|
|
@@ -5501,10 +5686,10 @@ function formatAssignedTo(assignedTo) {
|
|
|
5501
5686
|
}
|
|
5502
5687
|
|
|
5503
5688
|
//#endregion
|
|
5504
|
-
//#region ../mcp-core/dist/update-issue-
|
|
5689
|
+
//#region ../mcp-core/dist/update-issue-BSKY4Du1.js
|
|
5505
5690
|
var update_issue_default = defineTool({
|
|
5506
5691
|
name: "update_issue",
|
|
5507
|
-
|
|
5692
|
+
skills: ["triage"],
|
|
5508
5693
|
requiredScopes: ["event:write"],
|
|
5509
5694
|
description: [
|
|
5510
5695
|
"Update an issue's status or assignment in Sentry. This allows you to resolve, ignore, or reassign issues.",
|
|
@@ -5565,7 +5750,7 @@ var update_issue_default = defineTool({
|
|
|
5565
5750
|
openWorldHint: true
|
|
5566
5751
|
},
|
|
5567
5752
|
async handler(params, context$1) {
|
|
5568
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
5753
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
5569
5754
|
if (!params.issueUrl && !params.issueId) throw new UserInputError("Either `issueId` or `issueUrl` must be provided");
|
|
5570
5755
|
if (!params.issueUrl && !params.organizationSlug) throw new UserInputError("`organizationSlug` is required when providing `issueId`");
|
|
5571
5756
|
if (!params.status && !params.assignedTo) throw new UserInputError("At least one of `status` or `assignedTo` must be provided to update the issue");
|
|
@@ -5970,7 +6155,7 @@ var require_secure_json_parse = __commonJS({ "../../node_modules/.pnpm/secure-js
|
|
|
5970
6155
|
} });
|
|
5971
6156
|
|
|
5972
6157
|
//#endregion
|
|
5973
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+provider-utils@2.2.8_zod@3.25.
|
|
6158
|
+
//#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
6159
|
var import_secure_json_parse = __toESM(require_secure_json_parse(), 1);
|
|
5975
6160
|
function combineHeaders(...headers) {
|
|
5976
6161
|
return headers.reduce((combinedHeaders, currentHeaders) => ({
|
|
@@ -6461,7 +6646,7 @@ function withoutTrailingSlash(url) {
|
|
|
6461
6646
|
}
|
|
6462
6647
|
|
|
6463
6648
|
//#endregion
|
|
6464
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.
|
|
6649
|
+
//#region ../../node_modules/.pnpm/@ai-sdk+openai@1.3.22_zod@3.25.76/node_modules/@ai-sdk/openai/dist/index.mjs
|
|
6465
6650
|
function convertToOpenAIChatMessages({ prompt, useLegacyFunctionCalling = false, systemMessageMode = "system" }) {
|
|
6466
6651
|
const messages = [];
|
|
6467
6652
|
const warnings = [];
|
|
@@ -8774,7 +8959,7 @@ function createOpenAI(options = {}) {
|
|
|
8774
8959
|
var openai = createOpenAI({ compatibility: "strict" });
|
|
8775
8960
|
|
|
8776
8961
|
//#endregion
|
|
8777
|
-
//#region ../mcp-core/dist/openai-provider-
|
|
8962
|
+
//#region ../mcp-core/dist/openai-provider-BwPDNx0z.js
|
|
8778
8963
|
const DEFAULT_OPENAI_MODEL = "gpt-5";
|
|
8779
8964
|
const VALID_REASONING_EFFORTS = [
|
|
8780
8965
|
"low",
|
|
@@ -8817,7 +9002,7 @@ function getOpenAIModel(model) {
|
|
|
8817
9002
|
}
|
|
8818
9003
|
|
|
8819
9004
|
//#endregion
|
|
8820
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9005
|
+
//#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
9006
|
const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
8822
9007
|
const defaultOptions = {
|
|
8823
9008
|
name: void 0,
|
|
@@ -8852,7 +9037,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
8852
9037
|
};
|
|
8853
9038
|
|
|
8854
9039
|
//#endregion
|
|
8855
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9040
|
+
//#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
9041
|
const getRefs = (options) => {
|
|
8857
9042
|
const _options = getDefaultOptions(options);
|
|
8858
9043
|
const currentPath = _options.name !== void 0 ? [
|
|
@@ -8878,7 +9063,7 @@ const getRefs = (options) => {
|
|
|
8878
9063
|
};
|
|
8879
9064
|
|
|
8880
9065
|
//#endregion
|
|
8881
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9066
|
+
//#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
9067
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
8883
9068
|
if (!refs?.errorMessages) return;
|
|
8884
9069
|
if (errorMessage) res.errorMessage = {
|
|
@@ -8892,7 +9077,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
8892
9077
|
}
|
|
8893
9078
|
|
|
8894
9079
|
//#endregion
|
|
8895
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9080
|
+
//#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
9081
|
const getRelativePath = (pathA, pathB) => {
|
|
8897
9082
|
let i = 0;
|
|
8898
9083
|
for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
|
|
@@ -8900,7 +9085,7 @@ const getRelativePath = (pathA, pathB) => {
|
|
|
8900
9085
|
};
|
|
8901
9086
|
|
|
8902
9087
|
//#endregion
|
|
8903
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9088
|
+
//#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
9089
|
function parseAnyDef(refs) {
|
|
8905
9090
|
if (refs.target !== "openAi") return {};
|
|
8906
9091
|
const anyDefinitionPath = [
|
|
@@ -8913,7 +9098,7 @@ function parseAnyDef(refs) {
|
|
|
8913
9098
|
}
|
|
8914
9099
|
|
|
8915
9100
|
//#endregion
|
|
8916
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9101
|
+
//#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
9102
|
function parseArrayDef(def, refs) {
|
|
8918
9103
|
const res = { type: "array" };
|
|
8919
9104
|
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
|
|
@@ -8930,7 +9115,7 @@ function parseArrayDef(def, refs) {
|
|
|
8930
9115
|
}
|
|
8931
9116
|
|
|
8932
9117
|
//#endregion
|
|
8933
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9118
|
+
//#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
9119
|
function parseBigintDef(def, refs) {
|
|
8935
9120
|
const res = {
|
|
8936
9121
|
type: "integer",
|
|
@@ -8962,25 +9147,25 @@ function parseBigintDef(def, refs) {
|
|
|
8962
9147
|
}
|
|
8963
9148
|
|
|
8964
9149
|
//#endregion
|
|
8965
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9150
|
+
//#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
9151
|
function parseBooleanDef() {
|
|
8967
9152
|
return { type: "boolean" };
|
|
8968
9153
|
}
|
|
8969
9154
|
|
|
8970
9155
|
//#endregion
|
|
8971
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9156
|
+
//#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
9157
|
function parseBrandedDef(_def, refs) {
|
|
8973
9158
|
return parseDef(_def.type._def, refs);
|
|
8974
9159
|
}
|
|
8975
9160
|
|
|
8976
9161
|
//#endregion
|
|
8977
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9162
|
+
//#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
9163
|
const parseCatchDef = (def, refs) => {
|
|
8979
9164
|
return parseDef(def.innerType._def, refs);
|
|
8980
9165
|
};
|
|
8981
9166
|
|
|
8982
9167
|
//#endregion
|
|
8983
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9168
|
+
//#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
9169
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
8985
9170
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
8986
9171
|
if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
|
|
@@ -9015,7 +9200,7 @@ const integerDateParser = (def, refs) => {
|
|
|
9015
9200
|
};
|
|
9016
9201
|
|
|
9017
9202
|
//#endregion
|
|
9018
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9203
|
+
//#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
9204
|
function parseDefaultDef(_def, refs) {
|
|
9020
9205
|
return {
|
|
9021
9206
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -9024,13 +9209,13 @@ function parseDefaultDef(_def, refs) {
|
|
|
9024
9209
|
}
|
|
9025
9210
|
|
|
9026
9211
|
//#endregion
|
|
9027
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9212
|
+
//#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
9213
|
function parseEffectsDef(_def, refs) {
|
|
9029
9214
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
9030
9215
|
}
|
|
9031
9216
|
|
|
9032
9217
|
//#endregion
|
|
9033
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9218
|
+
//#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
9219
|
function parseEnumDef(def) {
|
|
9035
9220
|
return {
|
|
9036
9221
|
type: "string",
|
|
@@ -9039,7 +9224,7 @@ function parseEnumDef(def) {
|
|
|
9039
9224
|
}
|
|
9040
9225
|
|
|
9041
9226
|
//#endregion
|
|
9042
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9227
|
+
//#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
9228
|
const isJsonSchema7AllOfType = (type) => {
|
|
9044
9229
|
if ("type" in type && type.type === "string") return false;
|
|
9045
9230
|
return "allOf" in type;
|
|
@@ -9082,7 +9267,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
9082
9267
|
}
|
|
9083
9268
|
|
|
9084
9269
|
//#endregion
|
|
9085
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9270
|
+
//#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
9271
|
function parseLiteralDef(def, refs) {
|
|
9087
9272
|
const parsedType = typeof def.value;
|
|
9088
9273
|
if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
|
|
@@ -9097,7 +9282,7 @@ function parseLiteralDef(def, refs) {
|
|
|
9097
9282
|
}
|
|
9098
9283
|
|
|
9099
9284
|
//#endregion
|
|
9100
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9285
|
+
//#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
9286
|
let emojiRegex = void 0;
|
|
9102
9287
|
/**
|
|
9103
9288
|
* Generated from the regular expressions found here as of 2024-05-22:
|
|
@@ -9231,9 +9416,7 @@ function parseStringDef(def, refs) {
|
|
|
9231
9416
|
case "toLowerCase":
|
|
9232
9417
|
case "toUpperCase":
|
|
9233
9418
|
case "trim": break;
|
|
9234
|
-
default:
|
|
9235
|
-
/* c8 ignore next */
|
|
9236
|
-
((_) => {})(check);
|
|
9419
|
+
default: ((_) => {})(check);
|
|
9237
9420
|
}
|
|
9238
9421
|
return res;
|
|
9239
9422
|
}
|
|
@@ -9353,7 +9536,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
9353
9536
|
}
|
|
9354
9537
|
|
|
9355
9538
|
//#endregion
|
|
9356
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9539
|
+
//#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
9540
|
function parseRecordDef(def, refs) {
|
|
9358
9541
|
if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
9359
9542
|
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
|
|
@@ -9401,7 +9584,7 @@ function parseRecordDef(def, refs) {
|
|
|
9401
9584
|
}
|
|
9402
9585
|
|
|
9403
9586
|
//#endregion
|
|
9404
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9587
|
+
//#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
9588
|
function parseMapDef(def, refs) {
|
|
9406
9589
|
if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
|
|
9407
9590
|
const keys = parseDef(def.keyType._def, {
|
|
@@ -9435,7 +9618,7 @@ function parseMapDef(def, refs) {
|
|
|
9435
9618
|
}
|
|
9436
9619
|
|
|
9437
9620
|
//#endregion
|
|
9438
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9621
|
+
//#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
9622
|
function parseNativeEnumDef(def) {
|
|
9440
9623
|
const object$1 = def.values;
|
|
9441
9624
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -9450,7 +9633,7 @@ function parseNativeEnumDef(def) {
|
|
|
9450
9633
|
}
|
|
9451
9634
|
|
|
9452
9635
|
//#endregion
|
|
9453
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9636
|
+
//#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
9637
|
function parseNeverDef(refs) {
|
|
9455
9638
|
return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
|
|
9456
9639
|
...refs,
|
|
@@ -9459,7 +9642,7 @@ function parseNeverDef(refs) {
|
|
|
9459
9642
|
}
|
|
9460
9643
|
|
|
9461
9644
|
//#endregion
|
|
9462
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9645
|
+
//#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
9646
|
function parseNullDef(refs) {
|
|
9464
9647
|
return refs.target === "openApi3" ? {
|
|
9465
9648
|
enum: ["null"],
|
|
@@ -9468,7 +9651,7 @@ function parseNullDef(refs) {
|
|
|
9468
9651
|
}
|
|
9469
9652
|
|
|
9470
9653
|
//#endregion
|
|
9471
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9654
|
+
//#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
9655
|
const primitiveMappings = {
|
|
9473
9656
|
ZodString: "string",
|
|
9474
9657
|
ZodNumber: "number",
|
|
@@ -9528,7 +9711,7 @@ const asAnyOf = (def, refs) => {
|
|
|
9528
9711
|
};
|
|
9529
9712
|
|
|
9530
9713
|
//#endregion
|
|
9531
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
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/nullable.js
|
|
9532
9715
|
function parseNullableDef(def, refs) {
|
|
9533
9716
|
if ([
|
|
9534
9717
|
"ZodString",
|
|
@@ -9569,7 +9752,7 @@ function parseNullableDef(def, refs) {
|
|
|
9569
9752
|
}
|
|
9570
9753
|
|
|
9571
9754
|
//#endregion
|
|
9572
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9755
|
+
//#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
9756
|
function parseNumberDef(def, refs) {
|
|
9574
9757
|
const res = { type: "number" };
|
|
9575
9758
|
if (!def.checks) return res;
|
|
@@ -9602,7 +9785,7 @@ function parseNumberDef(def, refs) {
|
|
|
9602
9785
|
}
|
|
9603
9786
|
|
|
9604
9787
|
//#endregion
|
|
9605
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9788
|
+
//#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
9789
|
function parseObjectDef(def, refs) {
|
|
9607
9790
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
9608
9791
|
const result = {
|
|
@@ -9662,7 +9845,7 @@ function safeIsOptional(schema) {
|
|
|
9662
9845
|
}
|
|
9663
9846
|
|
|
9664
9847
|
//#endregion
|
|
9665
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9848
|
+
//#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
9849
|
const parseOptionalDef = (def, refs) => {
|
|
9667
9850
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
|
|
9668
9851
|
const innerSchema = parseDef(def.innerType._def, {
|
|
@@ -9677,7 +9860,7 @@ const parseOptionalDef = (def, refs) => {
|
|
|
9677
9860
|
};
|
|
9678
9861
|
|
|
9679
9862
|
//#endregion
|
|
9680
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9863
|
+
//#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
9864
|
const parsePipelineDef = (def, refs) => {
|
|
9682
9865
|
if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
|
|
9683
9866
|
else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
|
|
@@ -9701,13 +9884,13 @@ const parsePipelineDef = (def, refs) => {
|
|
|
9701
9884
|
};
|
|
9702
9885
|
|
|
9703
9886
|
//#endregion
|
|
9704
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9887
|
+
//#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
9888
|
function parsePromiseDef(def, refs) {
|
|
9706
9889
|
return parseDef(def.type._def, refs);
|
|
9707
9890
|
}
|
|
9708
9891
|
|
|
9709
9892
|
//#endregion
|
|
9710
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9893
|
+
//#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
9894
|
function parseSetDef(def, refs) {
|
|
9712
9895
|
const items = parseDef(def.valueType._def, {
|
|
9713
9896
|
...refs,
|
|
@@ -9724,7 +9907,7 @@ function parseSetDef(def, refs) {
|
|
|
9724
9907
|
}
|
|
9725
9908
|
|
|
9726
9909
|
//#endregion
|
|
9727
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9910
|
+
//#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
9911
|
function parseTupleDef(def, refs) {
|
|
9729
9912
|
if (def.rest) return {
|
|
9730
9913
|
type: "array",
|
|
@@ -9758,25 +9941,25 @@ function parseTupleDef(def, refs) {
|
|
|
9758
9941
|
}
|
|
9759
9942
|
|
|
9760
9943
|
//#endregion
|
|
9761
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9944
|
+
//#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
9945
|
function parseUndefinedDef(refs) {
|
|
9763
9946
|
return { not: parseAnyDef(refs) };
|
|
9764
9947
|
}
|
|
9765
9948
|
|
|
9766
9949
|
//#endregion
|
|
9767
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9950
|
+
//#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
9951
|
function parseUnknownDef(refs) {
|
|
9769
9952
|
return parseAnyDef(refs);
|
|
9770
9953
|
}
|
|
9771
9954
|
|
|
9772
9955
|
//#endregion
|
|
9773
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9956
|
+
//#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
9957
|
const parseReadonlyDef = (def, refs) => {
|
|
9775
9958
|
return parseDef(def.innerType._def, refs);
|
|
9776
9959
|
};
|
|
9777
9960
|
|
|
9778
9961
|
//#endregion
|
|
9779
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
9962
|
+
//#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
9963
|
const selectParser = (def, typeName, refs) => {
|
|
9781
9964
|
switch (typeName) {
|
|
9782
9965
|
case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
|
|
@@ -9815,14 +9998,12 @@ const selectParser = (def, typeName, refs) => {
|
|
|
9815
9998
|
case ZodFirstPartyTypeKind.ZodFunction:
|
|
9816
9999
|
case ZodFirstPartyTypeKind.ZodVoid:
|
|
9817
10000
|
case ZodFirstPartyTypeKind.ZodSymbol: return void 0;
|
|
9818
|
-
default:
|
|
9819
|
-
/* c8 ignore next */
|
|
9820
|
-
return ((_) => void 0)(typeName);
|
|
10001
|
+
default: return ((_) => void 0)(typeName);
|
|
9821
10002
|
}
|
|
9822
10003
|
};
|
|
9823
10004
|
|
|
9824
10005
|
//#endregion
|
|
9825
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
10006
|
+
//#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
10007
|
function parseDef(def, refs, forceResolution = false) {
|
|
9827
10008
|
const seenItem = refs.seen.get(def);
|
|
9828
10009
|
if (refs.override) {
|
|
@@ -9873,7 +10054,7 @@ const addMeta = (def, refs, jsonSchema$1) => {
|
|
|
9873
10054
|
};
|
|
9874
10055
|
|
|
9875
10056
|
//#endregion
|
|
9876
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
10057
|
+
//#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
10058
|
const zodToJsonSchema = (schema, options) => {
|
|
9878
10059
|
const refs = getRefs(options);
|
|
9879
10060
|
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name$3, schema$1]) => ({
|
|
@@ -9937,11 +10118,11 @@ const zodToJsonSchema = (schema, options) => {
|
|
|
9937
10118
|
};
|
|
9938
10119
|
|
|
9939
10120
|
//#endregion
|
|
9940
|
-
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.
|
|
10121
|
+
//#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
10122
|
var esm_default = zodToJsonSchema;
|
|
9942
10123
|
|
|
9943
10124
|
//#endregion
|
|
9944
|
-
//#region ../../node_modules/.pnpm/@ai-sdk+ui-utils@1.2.11_zod@3.25.
|
|
10125
|
+
//#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
10126
|
var textStreamPart = {
|
|
9946
10127
|
code: "0",
|
|
9947
10128
|
name: "text",
|
|
@@ -10782,10 +10963,10 @@ var DiagComponentLogger = function() {
|
|
|
10782
10963
|
return DiagComponentLogger$1;
|
|
10783
10964
|
}();
|
|
10784
10965
|
function logProxy(funcName, namespace$73, args) {
|
|
10785
|
-
var logger$
|
|
10786
|
-
if (!logger$
|
|
10966
|
+
var logger$2 = getGlobal("diag");
|
|
10967
|
+
if (!logger$2) return;
|
|
10787
10968
|
args.unshift(namespace$73);
|
|
10788
|
-
return logger$
|
|
10969
|
+
return logger$2[funcName].apply(logger$2, __spreadArray$3([], __read$3(args), false));
|
|
10789
10970
|
}
|
|
10790
10971
|
|
|
10791
10972
|
//#endregion
|
|
@@ -10818,13 +10999,13 @@ var DiagLogLevel;
|
|
|
10818
10999
|
|
|
10819
11000
|
//#endregion
|
|
10820
11001
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
|
|
10821
|
-
function createLogLevelDiagLogger(maxLevel, logger$
|
|
11002
|
+
function createLogLevelDiagLogger(maxLevel, logger$2) {
|
|
10822
11003
|
if (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;
|
|
10823
11004
|
else if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;
|
|
10824
|
-
logger$
|
|
11005
|
+
logger$2 = logger$2 || {};
|
|
10825
11006
|
function _filterFunc(funcName, theLevel) {
|
|
10826
|
-
var theFunc = logger$
|
|
10827
|
-
if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger$
|
|
11007
|
+
var theFunc = logger$2[funcName];
|
|
11008
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger$2);
|
|
10828
11009
|
return function() {};
|
|
10829
11010
|
}
|
|
10830
11011
|
return {
|
|
@@ -10879,23 +11060,23 @@ var DiagAPI = function() {
|
|
|
10879
11060
|
return function() {
|
|
10880
11061
|
var args = [];
|
|
10881
11062
|
for (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
|
|
10882
|
-
var logger$
|
|
10883
|
-
if (!logger$
|
|
10884
|
-
return logger$
|
|
11063
|
+
var logger$2 = getGlobal("diag");
|
|
11064
|
+
if (!logger$2) return;
|
|
11065
|
+
return logger$2[funcName].apply(logger$2, __spreadArray$2([], __read$2(args), false));
|
|
10885
11066
|
};
|
|
10886
11067
|
}
|
|
10887
11068
|
var self = this;
|
|
10888
|
-
var setLogger = function(logger$
|
|
11069
|
+
var setLogger = function(logger$2, optionsOrLogLevel) {
|
|
10889
11070
|
var _a$2, _b, _c;
|
|
10890
11071
|
if (optionsOrLogLevel === void 0) optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
|
|
10891
|
-
if (logger$
|
|
11072
|
+
if (logger$2 === self) {
|
|
10892
11073
|
var err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
10893
11074
|
self.error((_a$2 = err.stack) !== null && _a$2 !== void 0 ? _a$2 : err.message);
|
|
10894
11075
|
return false;
|
|
10895
11076
|
}
|
|
10896
11077
|
if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
|
|
10897
11078
|
var oldLogger = getGlobal("diag");
|
|
10898
|
-
var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger$
|
|
11079
|
+
var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger$2);
|
|
10899
11080
|
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
10900
11081
|
var stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
|
|
10901
11082
|
oldLogger.warn("Current logger will be overwritten from " + stack);
|
|
@@ -11459,7 +11640,7 @@ var TraceAPI = function() {
|
|
|
11459
11640
|
var trace = TraceAPI.getInstance();
|
|
11460
11641
|
|
|
11461
11642
|
//#endregion
|
|
11462
|
-
//#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.
|
|
11643
|
+
//#region ../../node_modules/.pnpm/ai@4.3.16_react@19.1.0_zod@3.25.76/node_modules/ai/dist/index.mjs
|
|
11463
11644
|
var __defProp = Object.defineProperty;
|
|
11464
11645
|
var __export = (target, all) => {
|
|
11465
11646
|
for (var name17 in all) __defProp(target, name17, {
|
|
@@ -14096,7 +14277,7 @@ function trimStartOfStream() {
|
|
|
14096
14277
|
var HANGING_STREAM_WARNING_TIME_MS = 15 * 1e3;
|
|
14097
14278
|
|
|
14098
14279
|
//#endregion
|
|
14099
|
-
//#region ../mcp-core/dist/callEmbeddedAgent-
|
|
14280
|
+
//#region ../mcp-core/dist/callEmbeddedAgent-C4iLIZ6C.js
|
|
14100
14281
|
/**
|
|
14101
14282
|
* Call an embedded agent with tool call capture
|
|
14102
14283
|
* This is the standard way to call embedded AI agents within MCP tools
|
|
@@ -14115,6 +14296,10 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
|
|
|
14115
14296
|
maxSteps: 5,
|
|
14116
14297
|
temperature: 1,
|
|
14117
14298
|
experimental_output: output_exports.object({ schema }),
|
|
14299
|
+
experimental_telemetry: {
|
|
14300
|
+
isEnabled: true,
|
|
14301
|
+
functionId: "callEmbeddedAgent"
|
|
14302
|
+
},
|
|
14118
14303
|
providerOptions: { openai: {
|
|
14119
14304
|
structuredOutputs: false,
|
|
14120
14305
|
strictJsonSchema: false
|
|
@@ -14138,7 +14323,7 @@ async function callEmbeddedAgent({ system, prompt, tools, schema }) {
|
|
|
14138
14323
|
}
|
|
14139
14324
|
|
|
14140
14325
|
//#endregion
|
|
14141
|
-
//#region ../mcp-core/dist/utils-
|
|
14326
|
+
//#region ../mcp-core/dist/utils-wepw5Cmn.js
|
|
14142
14327
|
/**
|
|
14143
14328
|
* Standard response schema for all embedded agent tools.
|
|
14144
14329
|
* Tools return either an error message or the result data, never both.
|
|
@@ -14220,7 +14405,7 @@ function agentTool(config) {
|
|
|
14220
14405
|
}
|
|
14221
14406
|
|
|
14222
14407
|
//#endregion
|
|
14223
|
-
//#region ../mcp-core/dist/otel-semantics-
|
|
14408
|
+
//#region ../mcp-core/dist/otel-semantics-ji8CZiqz.js
|
|
14224
14409
|
var namespace$72 = "android";
|
|
14225
14410
|
var description$72 = "The Android platform on which the Android application is running.\n";
|
|
14226
14411
|
var attributes$72 = {
|
|
@@ -19066,7 +19251,7 @@ function createOtelLookupTool(options) {
|
|
|
19066
19251
|
}
|
|
19067
19252
|
|
|
19068
19253
|
//#endregion
|
|
19069
|
-
//#region ../mcp-core/dist/whoami-
|
|
19254
|
+
//#region ../mcp-core/dist/whoami-B-N3_K3B.js
|
|
19070
19255
|
/**
|
|
19071
19256
|
* Get the current authenticated user's information from Sentry API
|
|
19072
19257
|
*/
|
|
@@ -19095,7 +19280,7 @@ function createWhoamiTool(options) {
|
|
|
19095
19280
|
}
|
|
19096
19281
|
|
|
19097
19282
|
//#endregion
|
|
19098
|
-
//#region ../mcp-core/dist/utils-
|
|
19283
|
+
//#region ../mcp-core/dist/utils-Dehfm_qW.js
|
|
19099
19284
|
function getStringValue(event, key, defaultValue = "") {
|
|
19100
19285
|
const value = event[key];
|
|
19101
19286
|
return typeof value === "string" ? value : defaultValue;
|
|
@@ -19148,7 +19333,7 @@ function createDatasetAttributesTool(options) {
|
|
|
19148
19333
|
"logs"
|
|
19149
19334
|
]).describe("The dataset to query attributes for") }),
|
|
19150
19335
|
execute: async ({ dataset }) => {
|
|
19151
|
-
const { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS: RECOMMENDED_FIELDS$1, NUMERIC_FIELDS } = await import("./config-
|
|
19336
|
+
const { BASE_COMMON_FIELDS, DATASET_FIELDS, RECOMMENDED_FIELDS: RECOMMENDED_FIELDS$1, NUMERIC_FIELDS, DATASET_EXAMPLES } = await import("./config-BEgU9ylR.js");
|
|
19152
19337
|
const { attributes: customAttributes, fieldTypes } = await fetchCustomAttributes(apiService, organizationSlug, dataset, projectId);
|
|
19153
19338
|
const allFields = {
|
|
19154
19339
|
...BASE_COMMON_FIELDS,
|
|
@@ -19174,13 +19359,16 @@ ${Object.keys(allFieldTypes).length > 30 ? `\n... and ${Object.keys(allFieldType
|
|
|
19174
19359
|
|
|
19175
19360
|
IMPORTANT: Only use numeric aggregate functions (avg, sum, min, max, percentiles) with numeric fields. Use count() or count_unique() for non-numeric fields.
|
|
19176
19361
|
|
|
19177
|
-
|
|
19362
|
+
EXAMPLE QUERIES FOR ${dataset.toUpperCase()}:
|
|
19363
|
+
${DATASET_EXAMPLES[dataset].map((ex) => `- "${ex.description}" →\n ${JSON.stringify(ex.output)}`).join("\n\n")}
|
|
19364
|
+
|
|
19365
|
+
Use these examples as patterns for constructing your query.`;
|
|
19178
19366
|
}
|
|
19179
19367
|
});
|
|
19180
19368
|
}
|
|
19181
19369
|
|
|
19182
19370
|
//#endregion
|
|
19183
|
-
//#region ../mcp-core/dist/agent-
|
|
19371
|
+
//#region ../mcp-core/dist/agent-B24BDcpH.js
|
|
19184
19372
|
const searchEventsAgentOutputSchema = z.object({
|
|
19185
19373
|
dataset: z.enum([
|
|
19186
19374
|
"spans",
|
|
@@ -19234,7 +19422,7 @@ async function searchEventsAgent(options) {
|
|
|
19234
19422
|
}
|
|
19235
19423
|
|
|
19236
19424
|
//#endregion
|
|
19237
|
-
//#region ../mcp-core/dist/formatters-
|
|
19425
|
+
//#region ../mcp-core/dist/formatters-CBiThZnb.js
|
|
19238
19426
|
/**
|
|
19239
19427
|
* Format an explanation for how a natural language query was translated
|
|
19240
19428
|
*/
|
|
@@ -19256,12 +19444,12 @@ function formatErrorResults(params) {
|
|
|
19256
19444
|
output += `**View these results in Sentry**:\n${explorerUrl}\n`;
|
|
19257
19445
|
output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
|
|
19258
19446
|
if (eventData.length === 0) {
|
|
19259
|
-
|
|
19447
|
+
logInfo(`No error events found for query: ${naturalLanguageQuery}`, { extra: {
|
|
19260
19448
|
query: sentryQuery,
|
|
19261
19449
|
fields,
|
|
19262
19450
|
organizationSlug,
|
|
19263
19451
|
dataset: "errors"
|
|
19264
|
-
});
|
|
19452
|
+
} });
|
|
19265
19453
|
output += `No results found.\n\n`;
|
|
19266
19454
|
output += `Try being more specific or using different terms in your search.\n`;
|
|
19267
19455
|
return output;
|
|
@@ -19320,12 +19508,12 @@ function formatLogResults(params) {
|
|
|
19320
19508
|
output += `**View these results in Sentry**:\n${explorerUrl}\n`;
|
|
19321
19509
|
output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
|
|
19322
19510
|
if (eventData.length === 0) {
|
|
19323
|
-
|
|
19511
|
+
logInfo(`No log events found for query: ${naturalLanguageQuery}`, { extra: {
|
|
19324
19512
|
query: sentryQuery,
|
|
19325
19513
|
fields,
|
|
19326
19514
|
organizationSlug,
|
|
19327
19515
|
dataset: "logs"
|
|
19328
|
-
});
|
|
19516
|
+
} });
|
|
19329
19517
|
output += `No results found.\n\n`;
|
|
19330
19518
|
output += `Try being more specific or using different terms in your search.\n`;
|
|
19331
19519
|
return output;
|
|
@@ -19401,12 +19589,12 @@ function formatSpanResults(params) {
|
|
|
19401
19589
|
output += `**View these results in Sentry**:\n${explorerUrl}\n`;
|
|
19402
19590
|
output += `_Please share this link with the user to view the search results in their Sentry dashboard._\n\n`;
|
|
19403
19591
|
if (eventData.length === 0) {
|
|
19404
|
-
|
|
19592
|
+
logInfo(`No span events found for query: ${naturalLanguageQuery}`, { extra: {
|
|
19405
19593
|
query: sentryQuery,
|
|
19406
19594
|
fields,
|
|
19407
19595
|
organizationSlug,
|
|
19408
19596
|
dataset: "spans"
|
|
19409
|
-
});
|
|
19597
|
+
} });
|
|
19410
19598
|
output += `No results found.\n\n`;
|
|
19411
19599
|
output += `Try being more specific or using different terms in your search.\n`;
|
|
19412
19600
|
return output;
|
|
@@ -19452,10 +19640,10 @@ function formatSpanResults(params) {
|
|
|
19452
19640
|
}
|
|
19453
19641
|
|
|
19454
19642
|
//#endregion
|
|
19455
|
-
//#region ../mcp-core/dist/handler-
|
|
19643
|
+
//#region ../mcp-core/dist/handler-BV5deuNu.js
|
|
19456
19644
|
var handler_default = defineTool({
|
|
19457
19645
|
name: "search_events",
|
|
19458
|
-
|
|
19646
|
+
skills: [
|
|
19459
19647
|
"inspect",
|
|
19460
19648
|
"triage",
|
|
19461
19649
|
"seer"
|
|
@@ -19512,7 +19700,7 @@ var handler_default = defineTool({
|
|
|
19512
19700
|
openWorldHint: true
|
|
19513
19701
|
},
|
|
19514
19702
|
async handler(params, context$1) {
|
|
19515
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
19703
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19516
19704
|
const organizationSlug = params.organizationSlug;
|
|
19517
19705
|
setTag("organization.slug", organizationSlug);
|
|
19518
19706
|
if (params.projectSlug) setTag("project.slug", params.projectSlug);
|
|
@@ -19593,10 +19781,10 @@ var handler_default = defineTool({
|
|
|
19593
19781
|
});
|
|
19594
19782
|
|
|
19595
19783
|
//#endregion
|
|
19596
|
-
//#region ../mcp-core/dist/create-team-
|
|
19784
|
+
//#region ../mcp-core/dist/create-team-Dy96alMI.js
|
|
19597
19785
|
var create_team_default = defineTool({
|
|
19598
19786
|
name: "create_team",
|
|
19599
|
-
|
|
19787
|
+
skills: ["project-management"],
|
|
19600
19788
|
requiredScopes: ["team:write"],
|
|
19601
19789
|
description: [
|
|
19602
19790
|
"Create a new team in Sentry.",
|
|
@@ -19630,7 +19818,7 @@ var create_team_default = defineTool({
|
|
|
19630
19818
|
openWorldHint: true
|
|
19631
19819
|
},
|
|
19632
19820
|
async handler(params, context$1) {
|
|
19633
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
19821
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19634
19822
|
const organizationSlug = params.organizationSlug;
|
|
19635
19823
|
setTag("organization.slug", organizationSlug);
|
|
19636
19824
|
const team = await apiService.createTeam({
|
|
@@ -19648,10 +19836,10 @@ var create_team_default = defineTool({
|
|
|
19648
19836
|
});
|
|
19649
19837
|
|
|
19650
19838
|
//#endregion
|
|
19651
|
-
//#region ../mcp-core/dist/create-project-
|
|
19839
|
+
//#region ../mcp-core/dist/create-project-CgOCqPNP.js
|
|
19652
19840
|
var create_project_default = defineTool({
|
|
19653
19841
|
name: "create_project",
|
|
19654
|
-
|
|
19842
|
+
skills: ["project-management"],
|
|
19655
19843
|
requiredScopes: ["project:write", "team:read"],
|
|
19656
19844
|
description: [
|
|
19657
19845
|
"Create a new project in Sentry (includes DSN automatically).",
|
|
@@ -19691,7 +19879,7 @@ var create_project_default = defineTool({
|
|
|
19691
19879
|
openWorldHint: true
|
|
19692
19880
|
},
|
|
19693
19881
|
async handler(params, context$1) {
|
|
19694
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
19882
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19695
19883
|
const organizationSlug = params.organizationSlug;
|
|
19696
19884
|
setTag("organization.slug", organizationSlug);
|
|
19697
19885
|
setTag("team.slug", params.teamSlug);
|
|
@@ -19725,10 +19913,10 @@ var create_project_default = defineTool({
|
|
|
19725
19913
|
});
|
|
19726
19914
|
|
|
19727
19915
|
//#endregion
|
|
19728
|
-
//#region ../mcp-core/dist/update-project-
|
|
19916
|
+
//#region ../mcp-core/dist/update-project-CMtXKaXN.js
|
|
19729
19917
|
var update_project_default = defineTool({
|
|
19730
19918
|
name: "update_project",
|
|
19731
|
-
|
|
19919
|
+
skills: ["project-management"],
|
|
19732
19920
|
requiredScopes: ["project:write"],
|
|
19733
19921
|
description: [
|
|
19734
19922
|
"Update project settings in Sentry, such as name, slug, platform, and team assignment.",
|
|
@@ -19784,7 +19972,7 @@ var update_project_default = defineTool({
|
|
|
19784
19972
|
openWorldHint: true
|
|
19785
19973
|
},
|
|
19786
19974
|
async handler(params, context$1) {
|
|
19787
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
19975
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19788
19976
|
const organizationSlug = params.organizationSlug;
|
|
19789
19977
|
setTag("organization.slug", organizationSlug);
|
|
19790
19978
|
setTag("project.slug", params.projectSlug);
|
|
@@ -19843,10 +20031,10 @@ var update_project_default = defineTool({
|
|
|
19843
20031
|
});
|
|
19844
20032
|
|
|
19845
20033
|
//#endregion
|
|
19846
|
-
//#region ../mcp-core/dist/create-dsn-
|
|
20034
|
+
//#region ../mcp-core/dist/create-dsn-C-zvRMtE.js
|
|
19847
20035
|
var create_dsn_default = defineTool({
|
|
19848
20036
|
name: "create_dsn",
|
|
19849
|
-
|
|
20037
|
+
skills: ["project-management"],
|
|
19850
20038
|
requiredScopes: ["project:write"],
|
|
19851
20039
|
description: [
|
|
19852
20040
|
"Create an additional DSN for an EXISTING project.",
|
|
@@ -19884,7 +20072,7 @@ var create_dsn_default = defineTool({
|
|
|
19884
20072
|
openWorldHint: true
|
|
19885
20073
|
},
|
|
19886
20074
|
async handler(params, context$1) {
|
|
19887
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
20075
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19888
20076
|
const organizationSlug = params.organizationSlug;
|
|
19889
20077
|
setTag("organization.slug", organizationSlug);
|
|
19890
20078
|
setTag("project.slug", params.projectSlug);
|
|
@@ -19903,10 +20091,10 @@ var create_dsn_default = defineTool({
|
|
|
19903
20091
|
});
|
|
19904
20092
|
|
|
19905
20093
|
//#endregion
|
|
19906
|
-
//#region ../mcp-core/dist/find-dsns-
|
|
20094
|
+
//#region ../mcp-core/dist/find-dsns-sufkfAux.js
|
|
19907
20095
|
var find_dsns_default = defineTool({
|
|
19908
20096
|
name: "find_dsns",
|
|
19909
|
-
|
|
20097
|
+
skills: ["project-management"],
|
|
19910
20098
|
requiredScopes: ["project:read"],
|
|
19911
20099
|
description: [
|
|
19912
20100
|
"List all Sentry DSNs for a specific project.",
|
|
@@ -19929,7 +20117,7 @@ var find_dsns_default = defineTool({
|
|
|
19929
20117
|
openWorldHint: true
|
|
19930
20118
|
},
|
|
19931
20119
|
async handler(params, context$1) {
|
|
19932
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
20120
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
19933
20121
|
const organizationSlug = params.organizationSlug;
|
|
19934
20122
|
setTag("organization.slug", organizationSlug);
|
|
19935
20123
|
setTag("project.slug", params.projectSlug);
|
|
@@ -19954,7 +20142,7 @@ var find_dsns_default = defineTool({
|
|
|
19954
20142
|
});
|
|
19955
20143
|
|
|
19956
20144
|
//#endregion
|
|
19957
|
-
//#region ../mcp-core/dist/fetch-utils-
|
|
20145
|
+
//#region ../mcp-core/dist/fetch-utils-C6qSgZai.js
|
|
19958
20146
|
/**
|
|
19959
20147
|
* Fetch with timeout using AbortController
|
|
19960
20148
|
* @param url - The URL to fetch
|
|
@@ -20004,10 +20192,10 @@ async function retryWithBackoff(fn, { maxRetries = 3, initialDelay = 1e3, should
|
|
|
20004
20192
|
}
|
|
20005
20193
|
|
|
20006
20194
|
//#endregion
|
|
20007
|
-
//#region ../mcp-core/dist/analyze-issue-with-seer-
|
|
20195
|
+
//#region ../mcp-core/dist/analyze-issue-with-seer-jcYxRIL1.js
|
|
20008
20196
|
var analyze_issue_with_seer_default = defineTool({
|
|
20009
20197
|
name: "analyze_issue_with_seer",
|
|
20010
|
-
|
|
20198
|
+
skills: ["seer"],
|
|
20011
20199
|
requiredScopes: [],
|
|
20012
20200
|
description: [
|
|
20013
20201
|
"Use Seer to analyze production errors and get detailed root cause analysis with specific code fixes.",
|
|
@@ -20063,7 +20251,7 @@ var analyze_issue_with_seer_default = defineTool({
|
|
|
20063
20251
|
openWorldHint: true
|
|
20064
20252
|
},
|
|
20065
20253
|
async handler(params, context$1) {
|
|
20066
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
20254
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
20067
20255
|
const { organizationSlug: orgSlug, issueId: parsedIssueId } = parseIssueParams({
|
|
20068
20256
|
organizationSlug: params.organizationSlug,
|
|
20069
20257
|
issueId: params.issueId,
|
|
@@ -20192,10 +20380,10 @@ var analyze_issue_with_seer_default = defineTool({
|
|
|
20192
20380
|
});
|
|
20193
20381
|
|
|
20194
20382
|
//#endregion
|
|
20195
|
-
//#region ../mcp-core/dist/search-docs-
|
|
20383
|
+
//#region ../mcp-core/dist/search-docs-BzvTE9Na.js
|
|
20196
20384
|
var search_docs_default = defineTool({
|
|
20197
20385
|
name: "search_docs",
|
|
20198
|
-
|
|
20386
|
+
skills: ["docs"],
|
|
20199
20387
|
requiredScopes: [],
|
|
20200
20388
|
description: [
|
|
20201
20389
|
"Search Sentry documentation for SDK setup, instrumentation, and configuration guidance.",
|
|
@@ -20275,10 +20463,10 @@ var search_docs_default = defineTool({
|
|
|
20275
20463
|
});
|
|
20276
20464
|
|
|
20277
20465
|
//#endregion
|
|
20278
|
-
//#region ../mcp-core/dist/get-doc-
|
|
20466
|
+
//#region ../mcp-core/dist/get-doc-CImfwkht.js
|
|
20279
20467
|
var get_doc_default = defineTool({
|
|
20280
20468
|
name: "get_doc",
|
|
20281
|
-
|
|
20469
|
+
skills: ["docs"],
|
|
20282
20470
|
requiredScopes: [],
|
|
20283
20471
|
description: [
|
|
20284
20472
|
"Fetch the full markdown content of a Sentry documentation page.",
|
|
@@ -20352,7 +20540,7 @@ var get_doc_default = defineTool({
|
|
|
20352
20540
|
});
|
|
20353
20541
|
|
|
20354
20542
|
//#endregion
|
|
20355
|
-
//#region ../mcp-core/dist/dataset-fields-
|
|
20543
|
+
//#region ../mcp-core/dist/dataset-fields-nvbboMpe.js
|
|
20356
20544
|
/**
|
|
20357
20545
|
* Discover available fields for a dataset by querying Sentry's tags API
|
|
20358
20546
|
*/
|
|
@@ -20502,7 +20690,7 @@ function getCommonPatterns(dataset) {
|
|
|
20502
20690
|
}
|
|
20503
20691
|
|
|
20504
20692
|
//#endregion
|
|
20505
|
-
//#region ../mcp-core/dist/config-
|
|
20693
|
+
//#region ../mcp-core/dist/config-BFaJp4hW.js
|
|
20506
20694
|
/**
|
|
20507
20695
|
* Configuration for the search-issues agent
|
|
20508
20696
|
*/
|
|
@@ -20574,7 +20762,7 @@ Always use the issueFields tool to discover available fields when needed.
|
|
|
20574
20762
|
Use the whoami tool when you need to resolve 'me' references.`;
|
|
20575
20763
|
|
|
20576
20764
|
//#endregion
|
|
20577
|
-
//#region ../mcp-core/dist/agent-
|
|
20765
|
+
//#region ../mcp-core/dist/agent-4n2tvUk3.js
|
|
20578
20766
|
const searchIssuesAgentOutputSchema = z.object({
|
|
20579
20767
|
query: z.string().describe("The Sentry issue search query"),
|
|
20580
20768
|
sort: z.enum([
|
|
@@ -20608,7 +20796,7 @@ async function searchIssuesAgent(options) {
|
|
|
20608
20796
|
}
|
|
20609
20797
|
|
|
20610
20798
|
//#endregion
|
|
20611
|
-
//#region ../mcp-core/dist/formatters-
|
|
20799
|
+
//#region ../mcp-core/dist/formatters-W4LF85x9.js
|
|
20612
20800
|
/**
|
|
20613
20801
|
* Format an explanation for how a natural language query was translated
|
|
20614
20802
|
*/
|
|
@@ -20632,12 +20820,12 @@ function formatIssueResults(params) {
|
|
|
20632
20820
|
output += `⚠️ **IMPORTANT**: Display these issues as highlighted cards with status indicators, assignee info, and clickable Issue IDs.\n\n`;
|
|
20633
20821
|
}
|
|
20634
20822
|
if (issues.length === 0) {
|
|
20635
|
-
|
|
20823
|
+
logInfo(`No issues found for query: ${naturalLanguageQuery || query}`, { extra: {
|
|
20636
20824
|
query,
|
|
20637
20825
|
organizationSlug,
|
|
20638
20826
|
projectSlug: projectSlugOrId,
|
|
20639
20827
|
naturalLanguageQuery
|
|
20640
|
-
});
|
|
20828
|
+
} });
|
|
20641
20829
|
output += "No issues found matching your search criteria.\n\n";
|
|
20642
20830
|
output += "Try adjusting your search criteria or time range.";
|
|
20643
20831
|
return output;
|
|
@@ -20689,10 +20877,10 @@ function formatDate(dateString) {
|
|
|
20689
20877
|
}
|
|
20690
20878
|
|
|
20691
20879
|
//#endregion
|
|
20692
|
-
//#region ../mcp-core/dist/handler-
|
|
20880
|
+
//#region ../mcp-core/dist/handler-DqBNjidz.js
|
|
20693
20881
|
var handler_default$1 = defineTool({
|
|
20694
20882
|
name: "search_issues",
|
|
20695
|
-
|
|
20883
|
+
skills: [
|
|
20696
20884
|
"inspect",
|
|
20697
20885
|
"triage",
|
|
20698
20886
|
"seer"
|
|
@@ -20747,7 +20935,7 @@ var handler_default$1 = defineTool({
|
|
|
20747
20935
|
openWorldHint: true
|
|
20748
20936
|
},
|
|
20749
20937
|
async handler(params, context$1) {
|
|
20750
|
-
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl });
|
|
20938
|
+
const apiService = apiServiceFromContext(context$1, { regionUrl: params.regionUrl ?? void 0 });
|
|
20751
20939
|
setTag("organization.slug", params.organizationSlug);
|
|
20752
20940
|
if (params.projectSlugOrId) if (isNumericId(params.projectSlugOrId)) setTag("project.id", params.projectSlugOrId);
|
|
20753
20941
|
else setTag("project.slug", params.projectSlugOrId);
|
|
@@ -20769,8 +20957,8 @@ var handler_default$1 = defineTool({
|
|
|
20769
20957
|
const translatedQuery = agentResult.result;
|
|
20770
20958
|
const issues = await apiService.listIssues({
|
|
20771
20959
|
organizationSlug: params.organizationSlug,
|
|
20772
|
-
projectSlug: params.projectSlugOrId,
|
|
20773
|
-
query: translatedQuery.query,
|
|
20960
|
+
projectSlug: params.projectSlugOrId ?? void 0,
|
|
20961
|
+
query: translatedQuery.query ?? void 0,
|
|
20774
20962
|
sortBy: translatedQuery.sort || "date",
|
|
20775
20963
|
limit: params.limit
|
|
20776
20964
|
});
|
|
@@ -20790,18 +20978,18 @@ var handler_default$1 = defineTool({
|
|
|
20790
20978
|
output += formatIssueResults({
|
|
20791
20979
|
issues,
|
|
20792
20980
|
organizationSlug: params.organizationSlug,
|
|
20793
|
-
projectSlugOrId: params.projectSlugOrId,
|
|
20981
|
+
projectSlugOrId: params.projectSlugOrId ?? void 0,
|
|
20794
20982
|
query: translatedQuery.query,
|
|
20795
|
-
regionUrl: params.regionUrl,
|
|
20983
|
+
regionUrl: params.regionUrl ?? void 0,
|
|
20796
20984
|
naturalLanguageQuery: params.naturalLanguageQuery,
|
|
20797
20985
|
skipHeader: true
|
|
20798
20986
|
});
|
|
20799
20987
|
} else output = formatIssueResults({
|
|
20800
20988
|
issues,
|
|
20801
20989
|
organizationSlug: params.organizationSlug,
|
|
20802
|
-
projectSlugOrId: params.projectSlugOrId,
|
|
20990
|
+
projectSlugOrId: params.projectSlugOrId ?? void 0,
|
|
20803
20991
|
query: translatedQuery.query,
|
|
20804
|
-
regionUrl: params.regionUrl,
|
|
20992
|
+
regionUrl: params.regionUrl ?? void 0,
|
|
20805
20993
|
naturalLanguageQuery: params.naturalLanguageQuery,
|
|
20806
20994
|
skipHeader: false
|
|
20807
20995
|
});
|
|
@@ -20810,7 +20998,7 @@ var handler_default$1 = defineTool({
|
|
|
20810
20998
|
});
|
|
20811
20999
|
|
|
20812
21000
|
//#endregion
|
|
20813
|
-
//#region ../mcp-core/dist/config-
|
|
21001
|
+
//#region ../mcp-core/dist/config-Dh25cVhL.js
|
|
20814
21002
|
/**
|
|
20815
21003
|
* Configuration for the use_sentry embedded agent.
|
|
20816
21004
|
*
|
|
@@ -20829,7 +21017,7 @@ The user may include various parameters to pass to those tools in their prompt.
|
|
|
20829
21017
|
You MUST return tool results directly without interpreting them.`;
|
|
20830
21018
|
|
|
20831
21019
|
//#endregion
|
|
20832
|
-
//#region ../mcp-core/dist/agent-
|
|
21020
|
+
//#region ../mcp-core/dist/agent-bVTgqfc0.js
|
|
20833
21021
|
/**
|
|
20834
21022
|
* Output schema for the embedded agent.
|
|
20835
21023
|
* The agent returns the final result string directly from its tool calls.
|
|
@@ -20851,7 +21039,7 @@ async function useSentryAgent(options) {
|
|
|
20851
21039
|
}
|
|
20852
21040
|
|
|
20853
21041
|
//#endregion
|
|
20854
|
-
//#region ../mcp-core/dist/error-handling-
|
|
21042
|
+
//#region ../mcp-core/dist/error-handling-BVlYIE1J.js
|
|
20855
21043
|
/**
|
|
20856
21044
|
* Type guard to identify user input validation errors.
|
|
20857
21045
|
*/
|
|
@@ -20942,7 +21130,7 @@ async function formatErrorForUser(error) {
|
|
|
20942
21130
|
}
|
|
20943
21131
|
|
|
20944
21132
|
//#endregion
|
|
20945
|
-
//#region ../mcp-core/dist/constraint-helpers-
|
|
21133
|
+
//#region ../mcp-core/dist/constraint-helpers-0jgp7p3K.js
|
|
20946
21134
|
/**
|
|
20947
21135
|
* Determines which tool parameter keys should be filtered out of the schema
|
|
20948
21136
|
* because they will be injected from constraints.
|
|
@@ -21004,7 +21192,7 @@ function getConstraintParametersToInject(constraints, toolInputSchema) {
|
|
|
21004
21192
|
}
|
|
21005
21193
|
|
|
21006
21194
|
//#endregion
|
|
21007
|
-
//#region ../mcp-core/dist/server-
|
|
21195
|
+
//#region ../mcp-core/dist/server-DGF-NUWx.js
|
|
21008
21196
|
/**
|
|
21009
21197
|
* Format tool calls into a readable trace
|
|
21010
21198
|
*/
|
|
@@ -21025,7 +21213,7 @@ function formatToolCallTrace(toolCalls) {
|
|
|
21025
21213
|
}
|
|
21026
21214
|
var handler_default$2 = defineTool({
|
|
21027
21215
|
name: "use_sentry",
|
|
21028
|
-
|
|
21216
|
+
skills: [],
|
|
21029
21217
|
requiredScopes: [],
|
|
21030
21218
|
description: [
|
|
21031
21219
|
"Natural language interface to Sentry via an embedded AI agent.",
|
|
@@ -21119,7 +21307,7 @@ var tools_default = {
|
|
|
21119
21307
|
/**
|
|
21120
21308
|
* Creates and configures a complete MCP server with Sentry instrumentation.
|
|
21121
21309
|
*
|
|
21122
|
-
* The server is built with tools filtered based on the granted
|
|
21310
|
+
* The server is built with tools filtered based on the granted skills in the context.
|
|
21123
21311
|
* Context is captured in tool handler closures and passed directly to handlers.
|
|
21124
21312
|
*
|
|
21125
21313
|
* @example Usage with stdio transport
|
|
@@ -21152,7 +21340,7 @@ var tools_default = {
|
|
|
21152
21340
|
* return createMcpHandler(server, { route: "/mcp" })(request, env, ctx);
|
|
21153
21341
|
* ```
|
|
21154
21342
|
*/
|
|
21155
|
-
function buildServer({ context: context$1,
|
|
21343
|
+
function buildServer({ context: context$1, agentMode = false, tools: customTools }) {
|
|
21156
21344
|
const server$1 = new McpServer({
|
|
21157
21345
|
name: MCP_SERVER_NAME,
|
|
21158
21346
|
version: LIB_VERSION
|
|
@@ -21160,25 +21348,23 @@ function buildServer({ context: context$1, onToolComplete, agentMode = false, to
|
|
|
21160
21348
|
configureServer({
|
|
21161
21349
|
server: server$1,
|
|
21162
21350
|
context: context$1,
|
|
21163
|
-
onToolComplete,
|
|
21164
21351
|
agentMode,
|
|
21165
21352
|
tools: customTools
|
|
21166
21353
|
});
|
|
21167
21354
|
return wrapMcpServerWithSentry(server$1);
|
|
21168
21355
|
}
|
|
21169
21356
|
/**
|
|
21170
|
-
* Configures an MCP server with tools filtered by granted skills
|
|
21357
|
+
* Configures an MCP server with tools filtered by granted skills.
|
|
21171
21358
|
*
|
|
21172
21359
|
* Internal function used by buildServer(). Use buildServer() instead for most cases.
|
|
21173
|
-
* Tools are filtered at registration time based on grantedSkills
|
|
21174
|
-
*
|
|
21360
|
+
* Tools are filtered at registration time based on grantedSkills, and context is
|
|
21361
|
+
* captured in closures for tool handler execution.
|
|
21175
21362
|
*
|
|
21176
21363
|
* In agent mode, only the use_sentry tool is registered, bypassing authorization checks.
|
|
21177
21364
|
*/
|
|
21178
|
-
function configureServer({ server: server$1, context: context$1,
|
|
21365
|
+
function configureServer({ server: server$1, context: context$1, agentMode = false, tools: customTools }) {
|
|
21179
21366
|
const toolsToRegister = agentMode ? { use_sentry: tools_default.use_sentry } : customTools ?? tools_default;
|
|
21180
21367
|
const grantedSkills = context$1.grantedSkills ? new Set(context$1.grantedSkills) : void 0;
|
|
21181
|
-
const grantedScopes = context$1.grantedScopes ? new Set(context$1.grantedScopes) : void 0;
|
|
21182
21368
|
server$1.server.onerror = (error) => {
|
|
21183
21369
|
const transportLogOptions = {
|
|
21184
21370
|
loggerScope: ["server", "transport"],
|
|
@@ -21188,96 +21374,77 @@ function configureServer({ server: server$1, context: context$1, onToolComplete,
|
|
|
21188
21374
|
};
|
|
21189
21375
|
for (const [toolKey, tool$1] of Object.entries(toolsToRegister)) {
|
|
21190
21376
|
/**
|
|
21191
|
-
* Authorization
|
|
21192
|
-
*
|
|
21377
|
+
* Skills-Based Authorization
|
|
21378
|
+
* ==========================
|
|
21193
21379
|
*
|
|
21194
|
-
*
|
|
21195
|
-
*
|
|
21196
|
-
*
|
|
21380
|
+
* Tools are filtered at registration time based on grantedSkills.
|
|
21381
|
+
* Tool must have non-empty `skills` array to be exposed.
|
|
21382
|
+
* Empty `skills: []` means intentionally excluded from skills system.
|
|
21197
21383
|
*
|
|
21198
|
-
*
|
|
21199
|
-
*
|
|
21200
|
-
* ## Skills Mode (when grantedSkills is set):
|
|
21201
|
-
* - ONLY skills are checked (scopes are ignored)
|
|
21202
|
-
* - Tool must have non-empty `requiredSkills` array to be exposed
|
|
21203
|
-
* - Empty `requiredSkills: []` means intentionally excluded from skills system
|
|
21204
|
-
* - Authorization: `allowed = hasRequiredSkills(grantedSkills, tool.requiredSkills)`
|
|
21205
|
-
*
|
|
21206
|
-
* ## Scopes Mode (when grantedSkills is NOT set, but grantedScopes is set):
|
|
21207
|
-
* - Falls back to legacy scope checking
|
|
21208
|
-
* - Empty `requiredScopes: []` means no scopes required (always allowed)
|
|
21209
|
-
* - Authorization: `allowed = isToolAllowed(tool.requiredScopes, grantedScopes)`
|
|
21210
|
-
*
|
|
21211
|
-
* ## Tool Visibility:
|
|
21212
|
-
* - If not allowed by active authorization system: tool is NOT registered
|
|
21213
|
-
* - Only registered tools are visible to MCP clients
|
|
21384
|
+
* In agent mode, authorization is skipped - use_sentry handles it internally.
|
|
21214
21385
|
*
|
|
21215
21386
|
* ## Examples:
|
|
21216
21387
|
* ```typescript
|
|
21217
|
-
* // Tool
|
|
21218
|
-
* {
|
|
21388
|
+
* // Tool belongs to "triage" skill only:
|
|
21389
|
+
* { skills: ["triage"] }
|
|
21219
21390
|
*
|
|
21220
|
-
* // Tool
|
|
21221
|
-
* {
|
|
21391
|
+
* // Tool belongs to ALL skills (foundational tool like whoami):
|
|
21392
|
+
* { skills: ALL_SKILLS }
|
|
21222
21393
|
*
|
|
21223
21394
|
* // Tool excluded from skills system (like use_sentry in agent mode):
|
|
21224
|
-
* {
|
|
21395
|
+
* { skills: [] }
|
|
21225
21396
|
* ```
|
|
21226
21397
|
*/
|
|
21227
21398
|
let allowed = false;
|
|
21228
21399
|
if (agentMode) allowed = true;
|
|
21229
21400
|
else if (grantedSkills) {
|
|
21230
|
-
if (tool$1.
|
|
21231
|
-
}
|
|
21401
|
+
if (tool$1.skills && tool$1.skills.length > 0) allowed = isEnabledBySkills(grantedSkills, tool$1.skills);
|
|
21402
|
+
}
|
|
21232
21403
|
if (!allowed) continue;
|
|
21233
21404
|
if (toolKey === "find_organizations" && context$1.constraints.organizationSlug || toolKey === "find_projects" && context$1.constraints.projectSlug) continue;
|
|
21234
21405
|
const constraintKeysToFilter = new Set(getConstraintKeysToFilter(context$1.constraints, tool$1.inputSchema));
|
|
21235
21406
|
const filteredInputSchema = Object.fromEntries(Object.entries(tool$1.inputSchema).filter(([key]) => !constraintKeysToFilter.has(key)));
|
|
21236
21407
|
server$1.tool(tool$1.name, tool$1.description, filteredInputSchema, tool$1.annotations, async (params, extra) => {
|
|
21408
|
+
const activeSpan = getActiveSpan();
|
|
21409
|
+
if (activeSpan) {
|
|
21410
|
+
if (context$1.constraints.organizationSlug) activeSpan.setAttribute("sentry-mcp.constraint-organization", context$1.constraints.organizationSlug);
|
|
21411
|
+
if (context$1.constraints.projectSlug) activeSpan.setAttribute("sentry-mcp.constraint-project", context$1.constraints.projectSlug);
|
|
21412
|
+
}
|
|
21413
|
+
if (context$1.userId) setUser({ id: context$1.userId });
|
|
21414
|
+
if (context$1.clientId) setTag("client.id", context$1.clientId);
|
|
21237
21415
|
try {
|
|
21238
|
-
const
|
|
21416
|
+
const applicableConstraints = getConstraintParametersToInject(context$1.constraints, tool$1.inputSchema);
|
|
21417
|
+
const paramsWithConstraints = {
|
|
21418
|
+
...params,
|
|
21419
|
+
...applicableConstraints
|
|
21420
|
+
};
|
|
21421
|
+
const output = await tool$1.handler(paramsWithConstraints, context$1);
|
|
21422
|
+
if (activeSpan) activeSpan.setStatus({ code: 1 });
|
|
21423
|
+
if (typeof output === "string") return { content: [{
|
|
21424
|
+
type: "text",
|
|
21425
|
+
text: output
|
|
21426
|
+
}] };
|
|
21427
|
+
if (Array.isArray(output)) return { content: output };
|
|
21428
|
+
throw new Error(`Invalid tool output: ${output}`);
|
|
21429
|
+
} catch (error) {
|
|
21239
21430
|
if (activeSpan) {
|
|
21240
|
-
|
|
21241
|
-
|
|
21431
|
+
activeSpan.setStatus({ code: 2 });
|
|
21432
|
+
activeSpan.recordException(error);
|
|
21242
21433
|
}
|
|
21243
|
-
|
|
21244
|
-
|
|
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: [{
|
|
21434
|
+
return {
|
|
21435
|
+
content: [{
|
|
21254
21436
|
type: "text",
|
|
21255
|
-
text:
|
|
21256
|
-
}]
|
|
21257
|
-
|
|
21258
|
-
|
|
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?.();
|
|
21437
|
+
text: await formatErrorForUser(error)
|
|
21438
|
+
}],
|
|
21439
|
+
isError: true
|
|
21440
|
+
};
|
|
21274
21441
|
}
|
|
21275
21442
|
});
|
|
21276
21443
|
}
|
|
21277
21444
|
}
|
|
21278
21445
|
|
|
21279
21446
|
//#endregion
|
|
21280
|
-
//#region ../mcp-core/dist/sentry-
|
|
21447
|
+
//#region ../mcp-core/dist/sentry-Cim_ihS6.js
|
|
21281
21448
|
const SCRUB_PATTERNS = [
|
|
21282
21449
|
{
|
|
21283
21450
|
pattern: /\bsk-[a-zA-Z0-9]{48}\b/g,
|
|
@@ -21382,7 +21549,7 @@ function sentryBeforeSend(event, hint) {
|
|
|
21382
21549
|
//#region src/index.ts
|
|
21383
21550
|
const packageName = "@sentry/mcp-server";
|
|
21384
21551
|
const allSkills = Object.keys(SKILLS);
|
|
21385
|
-
const usageText = buildUsage(packageName,
|
|
21552
|
+
const usageText = buildUsage(packageName, allSkills);
|
|
21386
21553
|
function die(message) {
|
|
21387
21554
|
console.error(message);
|
|
21388
21555
|
console.error(usageText);
|
|
@@ -21451,7 +21618,6 @@ if (cli.agent) {
|
|
|
21451
21618
|
const SENTRY_TIMEOUT = 5e3;
|
|
21452
21619
|
const context = {
|
|
21453
21620
|
accessToken: cfg.accessToken,
|
|
21454
|
-
grantedScopes: cfg.finalScopes,
|
|
21455
21621
|
grantedSkills: cfg.finalSkills,
|
|
21456
21622
|
constraints: {
|
|
21457
21623
|
organizationSlug: cfg.organizationSlug ?? null,
|