@debugbundle/mcp 1.8.0 → 1.8.1
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/main.cjs +157 -40
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/main.cjs
CHANGED
|
@@ -65276,7 +65276,9 @@ var CaptureRuleEvaluationContextSchema = external_exports.object({
|
|
|
65276
65276
|
resource_url: CaptureRuleEvaluationUrlSchema.optional(),
|
|
65277
65277
|
request_url: CaptureRuleEvaluationUrlSchema.optional(),
|
|
65278
65278
|
status_code: external_exports.number().int().min(0).max(599).optional(),
|
|
65279
|
-
fingerprint: CaptureRuleFingerprintSchema.optional()
|
|
65279
|
+
fingerprint: CaptureRuleFingerprintSchema.optional(),
|
|
65280
|
+
// Server-derived prior versions keep installed exact-match rules effective.
|
|
65281
|
+
fingerprint_aliases: external_exports.array(CaptureRuleFingerprintSchema).max(2).optional()
|
|
65280
65282
|
});
|
|
65281
65283
|
function classifyCaptureRuleClientFromUserAgent(userAgent) {
|
|
65282
65284
|
if (userAgent === null || userAgent === void 0) {
|
|
@@ -70560,8 +70562,15 @@ function normalizeInstalledJavaEvent(candidate) {
|
|
|
70560
70562
|
};
|
|
70561
70563
|
}
|
|
70562
70564
|
|
|
70565
|
+
// ../../packages/event-normalizer/src/java-timer-message.ts
|
|
70566
|
+
var TIMER_DIAGNOSTIC = /^WFLYEJB002(?:0|2):[^\n]*\[id=[^\]\n]*\btimedObjectId=/;
|
|
70567
|
+
var JAVA_TIMER_DATE = /\b(previousRun|initialExpiration|nextExpiration)=((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s+(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{1,2}\s+\d{2}:\d{2}:\d{2}\s+[A-Za-z][A-Za-z0-9:+-]{0,15}\s+\d{4})\b/g;
|
|
70568
|
+
function normalizeJavaTimerMessage(message3) {
|
|
70569
|
+
return TIMER_DIAGNOSTIC.test(message3) ? message3.replace(JAVA_TIMER_DATE, "$1={dynamic}") : message3;
|
|
70570
|
+
}
|
|
70571
|
+
|
|
70563
70572
|
// ../../packages/event-normalizer/src/index.ts
|
|
70564
|
-
var FINGERPRINT_VERSION = "
|
|
70573
|
+
var FINGERPRINT_VERSION = "v2";
|
|
70565
70574
|
var PAYLOAD_ALLOWED_KEYS = {
|
|
70566
70575
|
backend_exception: /* @__PURE__ */ new Set([
|
|
70567
70576
|
"name",
|
|
@@ -70895,12 +70904,12 @@ function normalizeKnownDatabaseMessage(message3) {
|
|
|
70895
70904
|
}
|
|
70896
70905
|
return null;
|
|
70897
70906
|
}
|
|
70898
|
-
function normalizeMessage(message3) {
|
|
70907
|
+
function normalizeMessage(message3, version2) {
|
|
70899
70908
|
const knownDatabaseMessage = normalizeKnownDatabaseMessage(message3);
|
|
70900
70909
|
if (knownDatabaseMessage !== null) {
|
|
70901
70910
|
return knownDatabaseMessage;
|
|
70902
70911
|
}
|
|
70903
|
-
return collapseWhitespace(normalizeScalarTokens(message3));
|
|
70912
|
+
return collapseWhitespace(normalizeScalarTokens(version2 === "v1" ? message3 : normalizeJavaTimerMessage(message3)));
|
|
70904
70913
|
}
|
|
70905
70914
|
function normalizeRoute(path) {
|
|
70906
70915
|
if (path === null || path.length === 0) {
|
|
@@ -70990,14 +70999,14 @@ function stableJson(value) {
|
|
|
70990
70999
|
function validateEvent(candidate) {
|
|
70991
71000
|
return EventEnvelopeSchema.safeParse(normalizeCompatibleEventCandidate(candidate));
|
|
70992
71001
|
}
|
|
70993
|
-
function normalizeEvent(event) {
|
|
71002
|
+
function normalizeEvent(event, version2 = FINGERPRINT_VERSION) {
|
|
70994
71003
|
const redactedPayload = redact(event.payload).redacted;
|
|
70995
71004
|
if (event.event_type === "backend_exception") {
|
|
70996
71005
|
return {
|
|
70997
71006
|
event_type: event.event_type,
|
|
70998
71007
|
environment: event.service.environment,
|
|
70999
71008
|
error_type: event.payload.name,
|
|
71000
|
-
normalized_message: normalizeMessage(event.payload.message),
|
|
71009
|
+
normalized_message: normalizeMessage(event.payload.message, version2),
|
|
71001
71010
|
route_template: normalizeRoute(event.payload.request.path),
|
|
71002
71011
|
http_method: event.payload.request.method,
|
|
71003
71012
|
http_status: event.payload.response.status_code,
|
|
@@ -71029,7 +71038,7 @@ function normalizeEvent(event) {
|
|
|
71029
71038
|
event_type: event.event_type,
|
|
71030
71039
|
environment: event.service.environment,
|
|
71031
71040
|
error_type: null,
|
|
71032
|
-
normalized_message: normalizeMessage(event.payload.message),
|
|
71041
|
+
normalized_message: normalizeMessage(event.payload.message, version2),
|
|
71033
71042
|
route_template: null,
|
|
71034
71043
|
http_method: null,
|
|
71035
71044
|
http_status: null,
|
|
@@ -71048,7 +71057,7 @@ function normalizeEvent(event) {
|
|
|
71048
71057
|
event_type: event.event_type,
|
|
71049
71058
|
environment: event.service.environment,
|
|
71050
71059
|
error_type: event.payload.name,
|
|
71051
|
-
normalized_message: normalizeMessage(event.payload.message),
|
|
71060
|
+
normalized_message: normalizeMessage(event.payload.message, version2),
|
|
71052
71061
|
route_template: normalizeRoute(event.payload.route ?? null),
|
|
71053
71062
|
http_method: null,
|
|
71054
71063
|
http_status: null,
|
|
@@ -89169,6 +89178,54 @@ var ANALYTICS_BOOTSTRAP_STATEMENTS = [
|
|
|
89169
89178
|
`
|
|
89170
89179
|
];
|
|
89171
89180
|
|
|
89181
|
+
// ../../packages/storage/src/schema-migration-definition.ts
|
|
89182
|
+
var import_node_crypto7 = require("node:crypto");
|
|
89183
|
+
function defineStorageSchemaMigration(input2) {
|
|
89184
|
+
return {
|
|
89185
|
+
...input2,
|
|
89186
|
+
checksum: (0, import_node_crypto7.createHash)("sha256").update(JSON.stringify(input2)).digest("hex")
|
|
89187
|
+
};
|
|
89188
|
+
}
|
|
89189
|
+
|
|
89190
|
+
// ../../packages/storage/src/worker-job-schema.ts
|
|
89191
|
+
var WORKER_JOB_SCHEMA_STATEMENTS = [
|
|
89192
|
+
`CREATE TABLE IF NOT EXISTS worker_jobs (
|
|
89193
|
+
id text PRIMARY KEY,
|
|
89194
|
+
job_name text NOT NULL,
|
|
89195
|
+
project_id uuid REFERENCES projects(id) ON DELETE CASCADE,
|
|
89196
|
+
payload jsonb,
|
|
89197
|
+
depends_on text REFERENCES worker_jobs(id) ON DELETE RESTRICT,
|
|
89198
|
+
status text NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'running', 'completed', 'failed', 'skipped')),
|
|
89199
|
+
attempts integer NOT NULL DEFAULT 0 CHECK (attempts >= 0),
|
|
89200
|
+
operator_retries integer NOT NULL DEFAULT 0 CHECK (operator_retries >= 0),
|
|
89201
|
+
available_at timestamptz NOT NULL DEFAULT now(),
|
|
89202
|
+
lease_token uuid,
|
|
89203
|
+
lease_expires_at timestamptz,
|
|
89204
|
+
last_error_code text,
|
|
89205
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
89206
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
89207
|
+
expires_at timestamptz NOT NULL DEFAULT now() + interval '7 days',
|
|
89208
|
+
CHECK ((status = 'running') = (lease_token IS NOT NULL AND lease_expires_at IS NOT NULL)),
|
|
89209
|
+
CHECK (payload IS NULL OR jsonb_typeof(payload) = 'object')
|
|
89210
|
+
)`,
|
|
89211
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_pending_idx ON worker_jobs(job_name, available_at, created_at, id) WHERE status = 'pending'`,
|
|
89212
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_running_idx ON worker_jobs(lease_expires_at) WHERE status = 'running'`,
|
|
89213
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_expiry_idx ON worker_jobs(expires_at)`,
|
|
89214
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_project_idx ON worker_jobs(project_id)`,
|
|
89215
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_dependency_idx ON worker_jobs(depends_on) WHERE depends_on IS NOT NULL`,
|
|
89216
|
+
`CREATE INDEX IF NOT EXISTS worker_jobs_status_idx ON worker_jobs(status, created_at) WHERE status IN ('pending', 'running', 'failed')`
|
|
89217
|
+
];
|
|
89218
|
+
var WORKER_JOB_SCHEMA_MIGRATIONS = [
|
|
89219
|
+
defineStorageSchemaMigration({
|
|
89220
|
+
id: "202609130001_add_durable_worker_jobs",
|
|
89221
|
+
description: "Persist worker handoffs, bounded retries, and fenced processing leases",
|
|
89222
|
+
statements: WORKER_JOB_SCHEMA_STATEMENTS
|
|
89223
|
+
})
|
|
89224
|
+
];
|
|
89225
|
+
var WORKER_JOB_BOOTSTRAP_STATEMENTS = WORKER_JOB_SCHEMA_STATEMENTS.map(
|
|
89226
|
+
(statement) => statement.replaceAll(" IF NOT EXISTS", "")
|
|
89227
|
+
);
|
|
89228
|
+
|
|
89172
89229
|
// ../../packages/storage/src/openai-oauth-bootstrap-statements.ts
|
|
89173
89230
|
var OPENAI_OAUTH_BOOTSTRAP_STATEMENTS = [
|
|
89174
89231
|
`
|
|
@@ -90409,18 +90466,19 @@ var STORAGE_BOOTSTRAP_STATEMENTS2 = [
|
|
|
90409
90466
|
...STORAGE_BOOTSTRAP_STATEMENTS,
|
|
90410
90467
|
...OPENAI_OAUTH_BOOTSTRAP_STATEMENTS,
|
|
90411
90468
|
...AVAILABILITY_CHECK_BOOTSTRAP_STATEMENTS,
|
|
90412
|
-
...ANALYTICS_BOOTSTRAP_STATEMENTS
|
|
90469
|
+
...ANALYTICS_BOOTSTRAP_STATEMENTS,
|
|
90470
|
+
...WORKER_JOB_BOOTSTRAP_STATEMENTS
|
|
90413
90471
|
];
|
|
90414
90472
|
|
|
90415
90473
|
// ../../packages/storage/src/migrations.ts
|
|
90416
90474
|
var STORAGE_BOOTSTRAP_SQL = STORAGE_BOOTSTRAP_STATEMENTS2.join(";\n\n");
|
|
90417
90475
|
|
|
90418
90476
|
// ../../packages/storage/src/availability-check-schema-migrations.ts
|
|
90419
|
-
var
|
|
90477
|
+
var import_node_crypto8 = require("node:crypto");
|
|
90420
90478
|
function defineAvailabilityCheckStorageSchemaMigration(input2) {
|
|
90421
90479
|
return {
|
|
90422
90480
|
...input2,
|
|
90423
|
-
checksum: (0,
|
|
90481
|
+
checksum: (0, import_node_crypto8.createHash)("sha256").update(JSON.stringify(input2)).digest("hex")
|
|
90424
90482
|
};
|
|
90425
90483
|
}
|
|
90426
90484
|
var AVAILABILITY_CHECK_STORAGE_SCHEMA_MIGRATIONS = [
|
|
@@ -90664,11 +90722,11 @@ var AVAILABILITY_CHECK_STORAGE_SCHEMA_MIGRATIONS = [
|
|
|
90664
90722
|
];
|
|
90665
90723
|
|
|
90666
90724
|
// ../../packages/storage/src/analytics-schema-migrations.ts
|
|
90667
|
-
var
|
|
90725
|
+
var import_node_crypto9 = require("node:crypto");
|
|
90668
90726
|
function defineAnalyticsStorageSchemaMigration(input2) {
|
|
90669
90727
|
return {
|
|
90670
90728
|
...input2,
|
|
90671
|
-
checksum: (0,
|
|
90729
|
+
checksum: (0, import_node_crypto9.createHash)("sha256").update(JSON.stringify(input2)).digest("hex")
|
|
90672
90730
|
};
|
|
90673
90731
|
}
|
|
90674
90732
|
var analyticsAnalysisKindCheck2 = "('usage_summary', 'route_health', 'funnel_dropoff', 'journey_friction', 'feature_usage', 'incident_impact', 'deploy_comparison', 'conversion_path')";
|
|
@@ -91456,15 +91514,6 @@ var ANALYTICS_STORAGE_SCHEMA_MIGRATIONS = [
|
|
|
91456
91514
|
})
|
|
91457
91515
|
];
|
|
91458
91516
|
|
|
91459
|
-
// ../../packages/storage/src/schema-migration-definition.ts
|
|
91460
|
-
var import_node_crypto9 = require("node:crypto");
|
|
91461
|
-
function defineStorageSchemaMigration(input2) {
|
|
91462
|
-
return {
|
|
91463
|
-
...input2,
|
|
91464
|
-
checksum: (0, import_node_crypto9.createHash)("sha256").update(JSON.stringify(input2)).digest("hex")
|
|
91465
|
-
};
|
|
91466
|
-
}
|
|
91467
|
-
|
|
91468
91517
|
// ../../packages/storage/src/openai-oauth-schema-migrations.ts
|
|
91469
91518
|
var OPENAI_OAUTH_STORAGE_SCHEMA_MIGRATIONS = [
|
|
91470
91519
|
defineStorageSchemaMigration({
|
|
@@ -92560,7 +92609,8 @@ var STORAGE_SCHEMA_MIGRATIONS2 = [
|
|
|
92560
92609
|
...STORAGE_SCHEMA_MIGRATIONS,
|
|
92561
92610
|
...AVAILABILITY_CHECK_STORAGE_SCHEMA_MIGRATIONS,
|
|
92562
92611
|
...ANALYTICS_STORAGE_SCHEMA_MIGRATIONS,
|
|
92563
|
-
...OPENAI_OAUTH_STORAGE_SCHEMA_MIGRATIONS
|
|
92612
|
+
...OPENAI_OAUTH_STORAGE_SCHEMA_MIGRATIONS,
|
|
92613
|
+
...WORKER_JOB_SCHEMA_MIGRATIONS
|
|
92564
92614
|
].sort((left, right) => left.id.localeCompare(right.id));
|
|
92565
92615
|
|
|
92566
92616
|
// ../cli/src/ingest-command.ts
|
|
@@ -92572,6 +92622,18 @@ var import_node_crypto10 = require("node:crypto");
|
|
|
92572
92622
|
var import_promises5 = require("node:fs/promises");
|
|
92573
92623
|
var import_node_path6 = require("node:path");
|
|
92574
92624
|
|
|
92625
|
+
// ../../packages/bundle-engine/src/deployment-context.ts
|
|
92626
|
+
function selectScopedDeployments(input2) {
|
|
92627
|
+
const cutoff = Date.parse(input2.occurredAt);
|
|
92628
|
+
const configuredAt = Date.parse(input2.configuredDeployedAt ?? "");
|
|
92629
|
+
return input2.envelopes.filter(
|
|
92630
|
+
(event) => event.event_type === "deploy_metadata" && event.service.name === input2.service && event.service.environment === input2.environment && event.payload.environment === input2.environment && Date.parse(event.payload.deployed_at) <= cutoff && // A caller-provided workload history row can be newer than the raw window.
|
|
92631
|
+
(!(configuredAt <= cutoff) || Date.parse(event.payload.deployed_at) >= configuredAt)
|
|
92632
|
+
).sort(
|
|
92633
|
+
(left, right) => Date.parse(left.payload.deployed_at) - Date.parse(right.payload.deployed_at) || left.event_id.localeCompare(right.event_id)
|
|
92634
|
+
);
|
|
92635
|
+
}
|
|
92636
|
+
|
|
92575
92637
|
// ../../packages/bundle-engine/src/frontend-context.ts
|
|
92576
92638
|
function toIsoTimestamp(value) {
|
|
92577
92639
|
return new Date(value).toISOString();
|
|
@@ -92957,6 +93019,7 @@ function buildRequestContext(envelopes) {
|
|
|
92957
93019
|
if (exceptionEvent === null) {
|
|
92958
93020
|
return null;
|
|
92959
93021
|
}
|
|
93022
|
+
if (exceptionEvent.payload.request.method.toUpperCase() === "UNKNOWN") return null;
|
|
92960
93023
|
return {
|
|
92961
93024
|
version: 1,
|
|
92962
93025
|
method: exceptionEvent.payload.request.method,
|
|
@@ -93277,13 +93340,20 @@ function buildBundle(input2) {
|
|
|
93277
93340
|
const responseContext = buildResponseContext(sourceEnvelopes);
|
|
93278
93341
|
const logsContext = buildLogsContext(sourceEnvelopes);
|
|
93279
93342
|
const frontendContext = buildFrontendContext(sourceEnvelopes);
|
|
93343
|
+
const deploymentEnvelopes = selectScopedDeployments({
|
|
93344
|
+
envelopes: sourceEnvelopes,
|
|
93345
|
+
service: input2.incident.service_name,
|
|
93346
|
+
environment: input2.incident.environment,
|
|
93347
|
+
occurredAt: input2.bundleMetadata.source_occurred_at,
|
|
93348
|
+
configuredDeployedAt: input2.configuredDeploy?.deployed_at ?? null
|
|
93349
|
+
});
|
|
93280
93350
|
const deployContext = buildDeployContext(
|
|
93281
|
-
|
|
93351
|
+
deploymentEnvelopes,
|
|
93282
93352
|
input2.job.trigger,
|
|
93283
93353
|
input2.configuredDeploy
|
|
93284
93354
|
);
|
|
93285
93355
|
const runtimeContext = buildRuntimeContext(sourceEnvelopes);
|
|
93286
|
-
const gitContext = buildGitContext(
|
|
93356
|
+
const gitContext = buildGitContext(deploymentEnvelopes, input2.configuredDeploy);
|
|
93287
93357
|
const deviceContext = buildDeviceContext(sourceEnvelopes);
|
|
93288
93358
|
const dependenciesContext = buildDependenciesContext(
|
|
93289
93359
|
input2.incident,
|
|
@@ -93418,7 +93488,9 @@ function stableStringify(value) {
|
|
|
93418
93488
|
return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
93419
93489
|
}
|
|
93420
93490
|
if (value !== null && typeof value === "object") {
|
|
93421
|
-
const entries = Object.entries(value).sort(
|
|
93491
|
+
const entries = Object.entries(value).sort(
|
|
93492
|
+
([left], [right]) => left.localeCompare(right)
|
|
93493
|
+
);
|
|
93422
93494
|
return `{${entries.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableStringify(entryValue)}`).join(",")}}`;
|
|
93423
93495
|
}
|
|
93424
93496
|
return JSON.stringify(value);
|
|
@@ -93497,7 +93569,10 @@ function normalizeReplayJsonValue(value) {
|
|
|
93497
93569
|
}
|
|
93498
93570
|
if (value !== null && typeof value === "object") {
|
|
93499
93571
|
return Object.fromEntries(
|
|
93500
|
-
Object.entries(value).map(([key, entryValue]) => [
|
|
93572
|
+
Object.entries(value).map(([key, entryValue]) => [
|
|
93573
|
+
key,
|
|
93574
|
+
normalizeReplayJsonValue(entryValue)
|
|
93575
|
+
])
|
|
93501
93576
|
);
|
|
93502
93577
|
}
|
|
93503
93578
|
return value;
|
|
@@ -93518,7 +93593,10 @@ function normalizeReplayQueryValue(value) {
|
|
|
93518
93593
|
}
|
|
93519
93594
|
if (value !== null && typeof value === "object") {
|
|
93520
93595
|
return Object.fromEntries(
|
|
93521
|
-
sortRecordEntries(value).map(([key, entryValue]) => [
|
|
93596
|
+
sortRecordEntries(value).map(([key, entryValue]) => [
|
|
93597
|
+
key,
|
|
93598
|
+
normalizeReplayQueryValue(entryValue)
|
|
93599
|
+
])
|
|
93522
93600
|
);
|
|
93523
93601
|
}
|
|
93524
93602
|
return value;
|
|
@@ -93534,7 +93612,9 @@ function hasStructuredQueryAmbiguity(value) {
|
|
|
93534
93612
|
return value.some((item) => hasStructuredQueryAmbiguity(item));
|
|
93535
93613
|
}
|
|
93536
93614
|
if (value !== null && typeof value === "object") {
|
|
93537
|
-
return Object.values(value).some(
|
|
93615
|
+
return Object.values(value).some(
|
|
93616
|
+
(item) => hasStructuredQueryAmbiguity(item)
|
|
93617
|
+
);
|
|
93538
93618
|
}
|
|
93539
93619
|
return false;
|
|
93540
93620
|
}
|
|
@@ -93545,7 +93625,9 @@ function buildStructuredReplayQuery(query) {
|
|
|
93545
93625
|
return hasStructuredQueryAmbiguity(normalizedQuery) ? normalizedQuery : void 0;
|
|
93546
93626
|
}
|
|
93547
93627
|
function buildReplayHeaders(headers) {
|
|
93548
|
-
const entries = sortRecordEntries(headers).filter(([headerName]) => !DROPPED_REPLAY_HEADERS.has(headerName.toLowerCase())).map(
|
|
93628
|
+
const entries = sortRecordEntries(headers).filter(([headerName]) => !DROPPED_REPLAY_HEADERS.has(headerName.toLowerCase())).map(
|
|
93629
|
+
([headerName, headerValue]) => [headerName, normalizeHeaderValue(headerValue)]
|
|
93630
|
+
);
|
|
93549
93631
|
entries.sort(([left], [right]) => {
|
|
93550
93632
|
const leftPriority = REPLAY_HEADER_PRIORITY.indexOf(left.toLowerCase());
|
|
93551
93633
|
const rightPriority = REPLAY_HEADER_PRIORITY.indexOf(right.toLowerCase());
|
|
@@ -93571,7 +93653,9 @@ function expandHeaderValues(headers) {
|
|
|
93571
93653
|
});
|
|
93572
93654
|
}
|
|
93573
93655
|
function getHeaderValues(headers, headerName) {
|
|
93574
|
-
const matchedEntry = sortRecordEntries(headers).find(
|
|
93656
|
+
const matchedEntry = sortRecordEntries(headers).find(
|
|
93657
|
+
([candidateName]) => candidateName.toLowerCase() === headerName.toLowerCase()
|
|
93658
|
+
);
|
|
93575
93659
|
if (matchedEntry === void 0) {
|
|
93576
93660
|
return [];
|
|
93577
93661
|
}
|
|
@@ -93633,6 +93717,9 @@ function buildDeterministicRequestUrl(request) {
|
|
|
93633
93717
|
const protocol = typeof protoHeader === "string" && protoHeader.length > 0 ? protoHeader : "https";
|
|
93634
93718
|
const host = typeof forwardedHostHeader === "string" && forwardedHostHeader.length > 0 ? forwardedHostHeader : typeof hostHeader === "string" && hostHeader.length > 0 ? hostHeader : "example.invalid";
|
|
93635
93719
|
const url = new URL(request.path, `${protocol}://${host}`);
|
|
93720
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password) {
|
|
93721
|
+
throw new Error("request_url_invalid");
|
|
93722
|
+
}
|
|
93636
93723
|
for (const [key, rawValue] of sortRecordEntries(request.query)) {
|
|
93637
93724
|
if (Array.isArray(rawValue)) {
|
|
93638
93725
|
for (const item of rawValue) {
|
|
@@ -93656,22 +93743,52 @@ function buildReproduction(bundle) {
|
|
|
93656
93743
|
};
|
|
93657
93744
|
}
|
|
93658
93745
|
const method = request.method.toUpperCase();
|
|
93659
|
-
|
|
93746
|
+
if (!/^[A-Z][A-Z0-9_-]{0,31}$/.test(method) || method === "UNKNOWN") {
|
|
93747
|
+
return {
|
|
93748
|
+
possible: false,
|
|
93749
|
+
confidence: 0.1,
|
|
93750
|
+
reason: "request_method_unavailable",
|
|
93751
|
+
artifacts: null,
|
|
93752
|
+
feasibility_reference: null
|
|
93753
|
+
};
|
|
93754
|
+
}
|
|
93755
|
+
let url;
|
|
93756
|
+
try {
|
|
93757
|
+
url = buildDeterministicRequestUrl(request);
|
|
93758
|
+
} catch {
|
|
93759
|
+
return {
|
|
93760
|
+
possible: false,
|
|
93761
|
+
confidence: 0.1,
|
|
93762
|
+
reason: "request_url_invalid",
|
|
93763
|
+
artifacts: null,
|
|
93764
|
+
feasibility_reference: null
|
|
93765
|
+
};
|
|
93766
|
+
}
|
|
93660
93767
|
const replayHeaders = buildReplayHeaders(request.headers);
|
|
93661
93768
|
const contentType = getPrimaryContentType(replayHeaders);
|
|
93662
93769
|
const structuredReplayQuery = buildStructuredReplayQuery(request.query);
|
|
93663
|
-
const headerParts = expandHeaderValues(replayHeaders).map(
|
|
93664
|
-
|
|
93770
|
+
const headerParts = expandHeaderValues(replayHeaders).map(
|
|
93771
|
+
([headerName, headerValue]) => `${headerName}:${headerValue}`
|
|
93772
|
+
);
|
|
93773
|
+
const curlHeaderParts = headerParts.map(
|
|
93774
|
+
(header2) => `-H ${shellQuote(header2.replace(":", ": "))}`
|
|
93775
|
+
);
|
|
93665
93776
|
const requestBody = buildReplayBody(request.body, replayHeaders);
|
|
93666
93777
|
const jsonSpecBody = contentType === "application/json" ? request.body === void 0 ? null : normalizeReplayJsonValue(request.body) : typeof request.body === "string" ? requestBody : request.body === null || request.body === void 0 ? null : request.body;
|
|
93667
93778
|
const curlBodyPart = requestBody === null ? [] : [`--data-raw ${shellQuote(requestBody)}`];
|
|
93668
|
-
const curl = [`curl -X ${method} ${shellQuote(url)}`, ...curlHeaderParts, ...curlBodyPart].join(
|
|
93669
|
-
|
|
93779
|
+
const curl = [`curl -X ${method} ${shellQuote(url)}`, ...curlHeaderParts, ...curlBodyPart].join(
|
|
93780
|
+
" "
|
|
93781
|
+
);
|
|
93782
|
+
const httpieBase = [
|
|
93783
|
+
`http ${method} ${shellQuote(url)}`,
|
|
93784
|
+
...headerParts.map((header2) => shellQuote(header2))
|
|
93785
|
+
].join(" ");
|
|
93670
93786
|
const httpie = requestBody === null ? httpieBase : `printf '%s' ${shellQuote(requestBody)} | ${httpieBase}`;
|
|
93787
|
+
const hasRequestTarget = new URL(url).hostname !== "example.invalid";
|
|
93671
93788
|
return {
|
|
93672
|
-
possible:
|
|
93673
|
-
confidence: 0.8,
|
|
93674
|
-
reason: "request_context_available",
|
|
93789
|
+
possible: hasRequestTarget,
|
|
93790
|
+
confidence: hasRequestTarget ? 0.8 : 0.1,
|
|
93791
|
+
reason: hasRequestTarget ? "request_context_available" : "request_target_unavailable",
|
|
93675
93792
|
artifacts: {
|
|
93676
93793
|
curl,
|
|
93677
93794
|
httpie,
|
|
@@ -99915,7 +100032,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
99915
100032
|
var package_default = {
|
|
99916
100033
|
name: "@debugbundle/mcp",
|
|
99917
100034
|
mcpName: "com.debugbundle/mcp",
|
|
99918
|
-
version: "1.8.
|
|
100035
|
+
version: "1.8.1",
|
|
99919
100036
|
private: false,
|
|
99920
100037
|
description: "MCP server for runtime error reporting, incident response, health checks, debug bundles, and product analytics",
|
|
99921
100038
|
license: "Apache-2.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debugbundle/mcp",
|
|
3
3
|
"mcpName": "com.debugbundle/mcp",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "MCP server for runtime error reporting, incident response, health checks, debug bundles, and product analytics",
|
|
7
7
|
"license": "Apache-2.0",
|
package/server.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"source": "github",
|
|
9
9
|
"subfolder": "apps/mcp"
|
|
10
10
|
},
|
|
11
|
-
"version": "1.8.
|
|
11
|
+
"version": "1.8.1",
|
|
12
12
|
"packages": [
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
16
|
"identifier": "@debugbundle/mcp",
|
|
17
|
-
"version": "1.8.
|
|
17
|
+
"version": "1.8.1",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|