@debugbundle/mcp 0.1.6 → 0.1.8
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 +1047 -146
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -14470,6 +14470,7 @@ var AlertConditionTypeSchema = external_exports.enum([
|
|
|
14470
14470
|
var AlertSchema = external_exports.object({
|
|
14471
14471
|
alert_id: external_exports.string(),
|
|
14472
14472
|
project_id: external_exports.string(),
|
|
14473
|
+
created_by_user_id: external_exports.string(),
|
|
14473
14474
|
service_id: external_exports.string().nullable(),
|
|
14474
14475
|
channel: AlertChannelSchema,
|
|
14475
14476
|
condition_type: AlertConditionTypeSchema,
|
|
@@ -14595,7 +14596,7 @@ function createAlertApi(client) {
|
|
|
14595
14596
|
return expectAlert(
|
|
14596
14597
|
client.request({
|
|
14597
14598
|
method: "PATCH",
|
|
14598
|
-
path: `/v1/alerts/${input.alertId}`,
|
|
14599
|
+
path: `/v1/alerts/${input.alertId}${buildQuery({ project_id: input.projectId })}`,
|
|
14599
14600
|
bearerToken: input.bearerToken,
|
|
14600
14601
|
body
|
|
14601
14602
|
})
|
|
@@ -14604,7 +14605,7 @@ function createAlertApi(client) {
|
|
|
14604
14605
|
async deleteAlert(input) {
|
|
14605
14606
|
const response = await client.request({
|
|
14606
14607
|
method: "DELETE",
|
|
14607
|
-
path: `/v1/alerts/${input.alertId}`,
|
|
14608
|
+
path: `/v1/alerts/${input.alertId}${buildQuery({ project_id: input.projectId })}`,
|
|
14608
14609
|
bearerToken: input.bearerToken
|
|
14609
14610
|
});
|
|
14610
14611
|
if (response.status < 200 || response.status >= 300) {
|
|
@@ -14643,9 +14644,9 @@ var BillingSummarySchema = external_exports.object({
|
|
|
14643
14644
|
monthly_raw_ingested_events: BillingUsageMetricSchema,
|
|
14644
14645
|
retained_bundle_cap: BillingUsageMetricSchema,
|
|
14645
14646
|
monthly_remote_activations: BillingUsageMetricSchema,
|
|
14646
|
-
monthly_alert_deliveries: BillingUsageMetricSchema
|
|
14647
|
-
|
|
14648
|
-
|
|
14647
|
+
monthly_alert_deliveries: BillingUsageMetricSchema,
|
|
14648
|
+
monthly_webhook_deliveries: BillingUsageMetricSchema
|
|
14649
|
+
}).strict()
|
|
14649
14650
|
}).strict();
|
|
14650
14651
|
var BillingSummaryResponseSchema = external_exports.object({
|
|
14651
14652
|
billing: BillingSummarySchema
|
|
@@ -14758,6 +14759,7 @@ var ProjectGitHubRepoSchema = external_exports.object({
|
|
|
14758
14759
|
var GitHubDispatchRuleSchema = external_exports.object({
|
|
14759
14760
|
rule_id: external_exports.string(),
|
|
14760
14761
|
project_id: external_exports.string(),
|
|
14762
|
+
created_by_user_id: external_exports.string(),
|
|
14761
14763
|
name: external_exports.string(),
|
|
14762
14764
|
enabled: external_exports.boolean(),
|
|
14763
14765
|
event_types: external_exports.array(external_exports.string().min(1)),
|
|
@@ -14774,9 +14776,10 @@ var GitHubDispatchDeliverySchema = external_exports.object({
|
|
|
14774
14776
|
delivery_id: external_exports.string(),
|
|
14775
14777
|
rule_id: external_exports.string(),
|
|
14776
14778
|
rule_name: external_exports.string(),
|
|
14777
|
-
incident_id: external_exports.string(),
|
|
14778
|
-
|
|
14779
|
-
|
|
14779
|
+
incident_id: external_exports.string().nullable(),
|
|
14780
|
+
improvement_id: external_exports.string().nullable(),
|
|
14781
|
+
target_title: external_exports.string(),
|
|
14782
|
+
status: external_exports.enum(["pending", "retrying", "delivered", "failed", "skipped"]),
|
|
14780
14783
|
attempt_count: external_exports.number().int(),
|
|
14781
14784
|
last_attempt_at: external_exports.string().nullable(),
|
|
14782
14785
|
last_error: external_exports.string().nullable(),
|
|
@@ -14913,19 +14916,21 @@ async function expectNoContent(responsePromise) {
|
|
|
14913
14916
|
function createGitHubManagementApi(client) {
|
|
14914
14917
|
return {
|
|
14915
14918
|
async getInstallation(input) {
|
|
14919
|
+
const query = input.projectId === void 0 ? "" : `?project_id=${encodeURIComponent(input.projectId)}`;
|
|
14916
14920
|
return expectInstallation(
|
|
14917
14921
|
client.request({
|
|
14918
14922
|
method: "GET",
|
|
14919
|
-
path:
|
|
14923
|
+
path: `/v1/github/installation${query}`,
|
|
14920
14924
|
bearerToken: input.bearerToken
|
|
14921
14925
|
})
|
|
14922
14926
|
);
|
|
14923
14927
|
},
|
|
14924
14928
|
async listRepositories(input) {
|
|
14929
|
+
const query = input.projectId === void 0 ? "" : `?project_id=${encodeURIComponent(input.projectId)}`;
|
|
14925
14930
|
return expectRepositories(
|
|
14926
14931
|
client.request({
|
|
14927
14932
|
method: "GET",
|
|
14928
|
-
path:
|
|
14933
|
+
path: `/v1/github/repositories${query}`,
|
|
14929
14934
|
bearerToken: input.bearerToken
|
|
14930
14935
|
})
|
|
14931
14936
|
);
|
|
@@ -15059,6 +15064,11 @@ var ProjectMetricsSchema = external_exports.object({
|
|
|
15059
15064
|
var ProjectRecordSchema = external_exports.object({
|
|
15060
15065
|
project_id: external_exports.string(),
|
|
15061
15066
|
organization_id: external_exports.string(),
|
|
15067
|
+
owner_user_id: external_exports.string(),
|
|
15068
|
+
owner_email: external_exports.string().email(),
|
|
15069
|
+
relationship: external_exports.enum(["owned", "shared"]),
|
|
15070
|
+
sharing_state: external_exports.enum(["private", "shared_by_you", "shared_with_you"]),
|
|
15071
|
+
effective_role: external_exports.enum(["owner", "admin", "member"]),
|
|
15062
15072
|
name: external_exports.string(),
|
|
15063
15073
|
slug: external_exports.string(),
|
|
15064
15074
|
environment_default: external_exports.string(),
|
|
@@ -15076,6 +15086,11 @@ var ProjectCreateResponseSchema = external_exports.object({
|
|
|
15076
15086
|
var DeletedProjectRecordSchema = external_exports.object({
|
|
15077
15087
|
project_id: external_exports.string(),
|
|
15078
15088
|
organization_id: external_exports.string(),
|
|
15089
|
+
owner_user_id: external_exports.string(),
|
|
15090
|
+
owner_email: external_exports.string().email(),
|
|
15091
|
+
relationship: external_exports.enum(["owned", "shared"]),
|
|
15092
|
+
sharing_state: external_exports.enum(["private", "shared_by_you", "shared_with_you"]),
|
|
15093
|
+
effective_role: external_exports.enum(["owner", "admin", "member"]),
|
|
15079
15094
|
name: external_exports.string(),
|
|
15080
15095
|
slug: external_exports.string(),
|
|
15081
15096
|
environment_default: external_exports.string(),
|
|
@@ -15226,6 +15241,35 @@ var IncidentSchema = external_exports.object({
|
|
|
15226
15241
|
matched_fields: external_exports.array(external_exports.string()),
|
|
15227
15242
|
incident_reason: IncidentReasonSchema.optional()
|
|
15228
15243
|
}).strict();
|
|
15244
|
+
var ImprovementSchema = external_exports.object({
|
|
15245
|
+
improvement_id: external_exports.string(),
|
|
15246
|
+
project_id: external_exports.string(),
|
|
15247
|
+
project_name: external_exports.string(),
|
|
15248
|
+
project_slug: external_exports.string(),
|
|
15249
|
+
service_id: external_exports.string().nullable(),
|
|
15250
|
+
service_name: external_exports.string(),
|
|
15251
|
+
service_runtime: external_exports.string().nullable(),
|
|
15252
|
+
service_framework: external_exports.string().nullable(),
|
|
15253
|
+
environment: external_exports.string(),
|
|
15254
|
+
kind: external_exports.enum(["warning_hotspot", "slow_request", "request_failure_pattern", "recurring_incident", "post_deploy_regression"]),
|
|
15255
|
+
status: external_exports.enum(["open", "resolved", "snoozed"]),
|
|
15256
|
+
severity: external_exports.enum(["low", "medium", "high", "critical"]),
|
|
15257
|
+
confidence: external_exports.number(),
|
|
15258
|
+
fingerprint: external_exports.string(),
|
|
15259
|
+
title: external_exports.string(),
|
|
15260
|
+
summary: external_exports.string(),
|
|
15261
|
+
occurrence_count: external_exports.number().int(),
|
|
15262
|
+
evidence: external_exports.record(external_exports.unknown()),
|
|
15263
|
+
related_incident_ids: external_exports.array(external_exports.string()),
|
|
15264
|
+
first_detected_at: external_exports.string(),
|
|
15265
|
+
last_detected_at: external_exports.string(),
|
|
15266
|
+
resolved_at: external_exports.string().nullable(),
|
|
15267
|
+
snoozed_until: external_exports.string().nullable(),
|
|
15268
|
+
bundle_generation_number: external_exports.number().int(),
|
|
15269
|
+
bundle_created_at: external_exports.string().nullable(),
|
|
15270
|
+
bundle_updated_at: external_exports.string().nullable(),
|
|
15271
|
+
bundle_failure_reason: external_exports.string().nullable()
|
|
15272
|
+
}).strict();
|
|
15229
15273
|
var ServiceSchema = external_exports.object({
|
|
15230
15274
|
service_id: external_exports.string(),
|
|
15231
15275
|
project_id: external_exports.string(),
|
|
@@ -15248,6 +15292,9 @@ var IncidentsResponseSchema = external_exports.object({
|
|
|
15248
15292
|
var IncidentResponseSchema = external_exports.object({
|
|
15249
15293
|
incident: IncidentSchema
|
|
15250
15294
|
}).strict();
|
|
15295
|
+
var ImprovementResponseSchema = external_exports.object({
|
|
15296
|
+
improvement: ImprovementSchema
|
|
15297
|
+
}).strict();
|
|
15251
15298
|
var IncidentContextArtifactSchema = external_exports.object({
|
|
15252
15299
|
status: external_exports.enum(["ready", "pending", "failed"]),
|
|
15253
15300
|
body: external_exports.unknown().optional(),
|
|
@@ -15318,6 +15365,10 @@ var IncidentContextSchema = external_exports.object({
|
|
|
15318
15365
|
var ServicesResponseSchema = external_exports.object({
|
|
15319
15366
|
services: external_exports.array(ServiceSchema)
|
|
15320
15367
|
}).strict();
|
|
15368
|
+
var ImprovementsResponseSchema = external_exports.object({
|
|
15369
|
+
improvements: external_exports.array(ImprovementSchema),
|
|
15370
|
+
next_cursor: external_exports.string().nullable().optional()
|
|
15371
|
+
}).strict();
|
|
15321
15372
|
var LogsResponseSchema = external_exports.object({
|
|
15322
15373
|
logs: external_exports.array(LogSchema),
|
|
15323
15374
|
next_cursor: external_exports.string().nullable().optional()
|
|
@@ -15516,6 +15567,108 @@ function createRetrievalApi(client) {
|
|
|
15516
15567
|
bearerToken: input.bearerToken
|
|
15517
15568
|
})
|
|
15518
15569
|
);
|
|
15570
|
+
},
|
|
15571
|
+
async listImprovements(input) {
|
|
15572
|
+
const query = new URLSearchParams();
|
|
15573
|
+
if (input.projectId !== void 0) {
|
|
15574
|
+
query.set("project_id", input.projectId);
|
|
15575
|
+
}
|
|
15576
|
+
if (input.environment !== void 0) {
|
|
15577
|
+
query.set("environment", input.environment);
|
|
15578
|
+
}
|
|
15579
|
+
if (input.service !== void 0) {
|
|
15580
|
+
query.set("service", input.service);
|
|
15581
|
+
}
|
|
15582
|
+
if (input.status !== void 0) {
|
|
15583
|
+
query.set("status", input.status);
|
|
15584
|
+
}
|
|
15585
|
+
if (input.severity !== void 0) {
|
|
15586
|
+
query.set("severity", input.severity);
|
|
15587
|
+
}
|
|
15588
|
+
if (input.kind !== void 0) {
|
|
15589
|
+
query.set("kind", input.kind);
|
|
15590
|
+
}
|
|
15591
|
+
if (input.cursor !== void 0) {
|
|
15592
|
+
query.set("cursor", input.cursor);
|
|
15593
|
+
}
|
|
15594
|
+
if (input.limit !== void 0) {
|
|
15595
|
+
query.set("limit", String(input.limit));
|
|
15596
|
+
}
|
|
15597
|
+
const path = query.size > 0 ? `/v1/improvements?${query.toString()}` : "/v1/improvements";
|
|
15598
|
+
const parsed = await expectParsed(
|
|
15599
|
+
client.request({
|
|
15600
|
+
method: "GET",
|
|
15601
|
+
path,
|
|
15602
|
+
bearerToken: input.bearerToken
|
|
15603
|
+
}),
|
|
15604
|
+
ImprovementsResponseSchema
|
|
15605
|
+
);
|
|
15606
|
+
return {
|
|
15607
|
+
improvements: parsed.improvements,
|
|
15608
|
+
next_cursor: parsed.next_cursor ?? null
|
|
15609
|
+
};
|
|
15610
|
+
},
|
|
15611
|
+
async getImprovement(input) {
|
|
15612
|
+
const parsed = await expectParsed(
|
|
15613
|
+
client.request({
|
|
15614
|
+
method: "GET",
|
|
15615
|
+
path: `/v1/improvements/${input.improvementId}`,
|
|
15616
|
+
bearerToken: input.bearerToken
|
|
15617
|
+
}),
|
|
15618
|
+
ImprovementResponseSchema
|
|
15619
|
+
);
|
|
15620
|
+
return parsed.improvement;
|
|
15621
|
+
},
|
|
15622
|
+
async resolveImprovement(input) {
|
|
15623
|
+
const parsed = await expectParsed(
|
|
15624
|
+
client.request({
|
|
15625
|
+
method: "POST",
|
|
15626
|
+
path: `/v1/improvements/${input.improvementId}/resolve`,
|
|
15627
|
+
bearerToken: input.bearerToken
|
|
15628
|
+
}),
|
|
15629
|
+
ImprovementResponseSchema
|
|
15630
|
+
);
|
|
15631
|
+
return parsed.improvement;
|
|
15632
|
+
},
|
|
15633
|
+
async reopenImprovement(input) {
|
|
15634
|
+
const parsed = await expectParsed(
|
|
15635
|
+
client.request({
|
|
15636
|
+
method: "POST",
|
|
15637
|
+
path: `/v1/improvements/${input.improvementId}/reopen`,
|
|
15638
|
+
bearerToken: input.bearerToken
|
|
15639
|
+
}),
|
|
15640
|
+
ImprovementResponseSchema
|
|
15641
|
+
);
|
|
15642
|
+
return parsed.improvement;
|
|
15643
|
+
},
|
|
15644
|
+
async snoozeImprovement(input) {
|
|
15645
|
+
const parsed = await expectParsed(
|
|
15646
|
+
client.request({
|
|
15647
|
+
method: "POST",
|
|
15648
|
+
path: `/v1/improvements/${input.improvementId}/snooze`,
|
|
15649
|
+
bearerToken: input.bearerToken,
|
|
15650
|
+
body: { snoozed_until: input.snoozedUntil }
|
|
15651
|
+
}),
|
|
15652
|
+
ImprovementResponseSchema
|
|
15653
|
+
);
|
|
15654
|
+
return parsed.improvement;
|
|
15655
|
+
},
|
|
15656
|
+
async getImprovementBundle(input) {
|
|
15657
|
+
return await expectParsed(
|
|
15658
|
+
client.request({
|
|
15659
|
+
method: "GET",
|
|
15660
|
+
path: `/v1/projects/${input.projectId}/improvements/${input.improvementId}/bundle`,
|
|
15661
|
+
bearerToken: input.bearerToken
|
|
15662
|
+
}),
|
|
15663
|
+
external_exports.union([
|
|
15664
|
+
PendingStatusSchema,
|
|
15665
|
+
BundleSchema,
|
|
15666
|
+
external_exports.object({
|
|
15667
|
+
status: external_exports.literal("failed"),
|
|
15668
|
+
reason: external_exports.string()
|
|
15669
|
+
}).strict()
|
|
15670
|
+
])
|
|
15671
|
+
);
|
|
15519
15672
|
}
|
|
15520
15673
|
};
|
|
15521
15674
|
}
|
|
@@ -15640,6 +15793,7 @@ var ProjectTokenSchema = external_exports.object({
|
|
|
15640
15793
|
token_id: external_exports.string(),
|
|
15641
15794
|
project_id: external_exports.string(),
|
|
15642
15795
|
label: external_exports.string(),
|
|
15796
|
+
allowed_origins: external_exports.array(external_exports.string()).default([]),
|
|
15643
15797
|
created_at: external_exports.string(),
|
|
15644
15798
|
last_used_at: external_exports.string().nullable(),
|
|
15645
15799
|
revoked_at: external_exports.string().nullable(),
|
|
@@ -15724,7 +15878,8 @@ function createTokenManagementApi(client) {
|
|
|
15724
15878
|
path: `/v1/projects/${input.projectId}/tokens`,
|
|
15725
15879
|
bearerToken: input.bearerToken,
|
|
15726
15880
|
body: {
|
|
15727
|
-
label: input.label
|
|
15881
|
+
label: input.label,
|
|
15882
|
+
...input.allowedOrigins === void 0 ? {} : { allowed_origins: input.allowedOrigins }
|
|
15728
15883
|
}
|
|
15729
15884
|
})
|
|
15730
15885
|
);
|
|
@@ -15849,6 +16004,7 @@ var WebhookFiltersSchema = external_exports.object({
|
|
|
15849
16004
|
var WebhookSchema = external_exports.object({
|
|
15850
16005
|
webhook_id: external_exports.string(),
|
|
15851
16006
|
project_id: external_exports.string(),
|
|
16007
|
+
created_by_user_id: external_exports.string(),
|
|
15852
16008
|
url: external_exports.string(),
|
|
15853
16009
|
events: external_exports.array(WebhookEventTypeSchema),
|
|
15854
16010
|
filters: WebhookFiltersSchema,
|
|
@@ -16019,7 +16175,7 @@ function createWebhookApi(client) {
|
|
|
16019
16175
|
return expectWebhook(
|
|
16020
16176
|
client.request({
|
|
16021
16177
|
method: "GET",
|
|
16022
|
-
path: `/v1/webhooks/${input.webhookId}`,
|
|
16178
|
+
path: `/v1/webhooks/${input.webhookId}${buildQuery3({ project_id: input.projectId })}`,
|
|
16023
16179
|
bearerToken: input.bearerToken
|
|
16024
16180
|
})
|
|
16025
16181
|
);
|
|
@@ -16041,7 +16197,7 @@ function createWebhookApi(client) {
|
|
|
16041
16197
|
return expectWebhook(
|
|
16042
16198
|
client.request({
|
|
16043
16199
|
method: "PATCH",
|
|
16044
|
-
path: `/v1/webhooks/${input.webhookId}`,
|
|
16200
|
+
path: `/v1/webhooks/${input.webhookId}${buildQuery3({ project_id: input.projectId })}`,
|
|
16045
16201
|
bearerToken: input.bearerToken,
|
|
16046
16202
|
body
|
|
16047
16203
|
})
|
|
@@ -16050,7 +16206,7 @@ function createWebhookApi(client) {
|
|
|
16050
16206
|
async deleteWebhook(input) {
|
|
16051
16207
|
const response = await client.request({
|
|
16052
16208
|
method: "DELETE",
|
|
16053
|
-
path: `/v1/webhooks/${input.webhookId}`,
|
|
16209
|
+
path: `/v1/webhooks/${input.webhookId}${buildQuery3({ project_id: input.projectId })}`,
|
|
16054
16210
|
bearerToken: input.bearerToken
|
|
16055
16211
|
});
|
|
16056
16212
|
if (response.status < 200 || response.status >= 300) {
|
|
@@ -16068,7 +16224,7 @@ function createWebhookApi(client) {
|
|
|
16068
16224
|
return expectWebhookTestDelivery(
|
|
16069
16225
|
client.request({
|
|
16070
16226
|
method: "POST",
|
|
16071
|
-
path: `/v1/webhooks/${input.webhookId}/test`,
|
|
16227
|
+
path: `/v1/webhooks/${input.webhookId}/test${buildQuery3({ project_id: input.projectId })}`,
|
|
16072
16228
|
bearerToken: input.bearerToken,
|
|
16073
16229
|
body
|
|
16074
16230
|
})
|
|
@@ -16078,7 +16234,7 @@ function createWebhookApi(client) {
|
|
|
16078
16234
|
return expectWebhookDeliveries(
|
|
16079
16235
|
client.request({
|
|
16080
16236
|
method: "GET",
|
|
16081
|
-
path: `/v1/webhooks/${input.webhookId}/deliveries${buildQuery3({ limit: input.limit })}`,
|
|
16237
|
+
path: `/v1/webhooks/${input.webhookId}/deliveries${buildQuery3({ project_id: input.projectId, limit: input.limit })}`,
|
|
16082
16238
|
bearerToken: input.bearerToken
|
|
16083
16239
|
})
|
|
16084
16240
|
);
|
|
@@ -16087,7 +16243,7 @@ function createWebhookApi(client) {
|
|
|
16087
16243
|
return expectRetryDelivery(
|
|
16088
16244
|
client.request({
|
|
16089
16245
|
method: "POST",
|
|
16090
|
-
path: `/v1/webhooks/${input.webhookId}/deliveries/${input.deliveryId}/retry`,
|
|
16246
|
+
path: `/v1/webhooks/${input.webhookId}/deliveries/${input.deliveryId}/retry${buildQuery3({ project_id: input.projectId })}`,
|
|
16091
16247
|
bearerToken: input.bearerToken,
|
|
16092
16248
|
body: {}
|
|
16093
16249
|
})
|
|
@@ -16298,6 +16454,7 @@ var CapturePolicyOverridesSchema = external_exports.object({
|
|
|
16298
16454
|
immediate_client_error_statuses: ImmediateClientErrorStatusesSchema.nullable()
|
|
16299
16455
|
});
|
|
16300
16456
|
var CapturePolicyResponseSchema = external_exports.object({
|
|
16457
|
+
access_mode: external_exports.enum(["manage", "preview"]),
|
|
16301
16458
|
policy: ResolvedCapturePolicySchema,
|
|
16302
16459
|
overrides: CapturePolicyOverridesSchema
|
|
16303
16460
|
});
|
|
@@ -16395,6 +16552,29 @@ function getRequestAnomalyThreshold(input) {
|
|
|
16395
16552
|
return null;
|
|
16396
16553
|
}
|
|
16397
16554
|
|
|
16555
|
+
// ../../packages/shared-types/src/improvement-settings.ts
|
|
16556
|
+
var ImprovementBundleSensitivityValues = [
|
|
16557
|
+
"high_confidence",
|
|
16558
|
+
"balanced",
|
|
16559
|
+
"verbose"
|
|
16560
|
+
];
|
|
16561
|
+
var ImprovementBundleSensitivitySchema = external_exports.enum(ImprovementBundleSensitivityValues);
|
|
16562
|
+
var ImprovementSettingsSchema = external_exports.object({
|
|
16563
|
+
automated_improvement_bundles_enabled: external_exports.boolean(),
|
|
16564
|
+
improvement_bundle_sensitivity: ImprovementBundleSensitivitySchema
|
|
16565
|
+
});
|
|
16566
|
+
var ImprovementSettingsResponseSchema = external_exports.object({
|
|
16567
|
+
access_mode: external_exports.enum(["manage", "preview"]),
|
|
16568
|
+
cloud_automation_available: external_exports.boolean(),
|
|
16569
|
+
settings: ImprovementSettingsSchema
|
|
16570
|
+
});
|
|
16571
|
+
var ImprovementSettingsUpdateSchema = external_exports.object({
|
|
16572
|
+
automated_improvement_bundles_enabled: external_exports.boolean().optional(),
|
|
16573
|
+
improvement_bundle_sensitivity: ImprovementBundleSensitivitySchema.optional()
|
|
16574
|
+
}).refine((input) => Object.keys(input).length > 0, {
|
|
16575
|
+
message: "At least one improvement settings field must be provided."
|
|
16576
|
+
});
|
|
16577
|
+
|
|
16398
16578
|
// ../../packages/shared-types/src/index.ts
|
|
16399
16579
|
function createUuidV4() {
|
|
16400
16580
|
const cryptoSource = globalThis.crypto;
|
|
@@ -16947,6 +17127,25 @@ function buildSkill() {
|
|
|
16947
17127
|
"",
|
|
16948
17128
|
"Use DebugBundle before starting a fresh bug investigation.",
|
|
16949
17129
|
"",
|
|
17130
|
+
"## Investigation Quickstart",
|
|
17131
|
+
"",
|
|
17132
|
+
"When the user reports a bug, runtime failure, production incident, regression, broken deploy, or unknown error, start here before reading arbitrary source files.",
|
|
17133
|
+
"",
|
|
17134
|
+
"1. Run `debugbundle doctor --json` to learn whether the project is local-only or connected and whether the local scaffold is healthy.",
|
|
17135
|
+
"2. List actionable failures with `debugbundle incidents --source local --status open --json` for local data, or `debugbundle incidents --source cloud --status open --json` when the issue came from a hosted environment.",
|
|
17136
|
+
"3. Inspect the chosen incident with `debugbundle inspect <incident-id> --source <local|cloud> --json` and `debugbundle explain <incident-id> --source <local|cloud> --json`.",
|
|
17137
|
+
"4. Fetch evidence before editing code: `debugbundle bundle <incident-id> --source <local|cloud> --json` and `debugbundle reproduce <incident-id> --source <local|cloud> --json`.",
|
|
17138
|
+
"5. If local SDK or relay events have landed but no bundle exists yet, run `debugbundle process --preset <minimal|balanced|investigative> --json` and then list incidents again.",
|
|
17139
|
+
"",
|
|
17140
|
+
"Key local paths:",
|
|
17141
|
+
"- `.debugbundle/profile.json` \u2014 project map, service paths, and validation state",
|
|
17142
|
+
"- `.debugbundle/local/connection.json` \u2014 local-only vs connected mode and environment delivery policy",
|
|
17143
|
+
"- `.debugbundle/local/events/` \u2014 raw local SDK, relay, ingest, and watch event batches",
|
|
17144
|
+
"- `.debugbundle/local/state.json` \u2014 local incident index, lifecycle state, and bundle paths",
|
|
17145
|
+
"- `.debugbundle/bundles/local/` \u2014 locally generated bundle artifacts",
|
|
17146
|
+
"- `.debugbundle/bundles/local/reproductions/` \u2014 local reproduction artifacts",
|
|
17147
|
+
"- `.debugbundle/bundles/cloud/` \u2014 explicitly fetched cloud artifact cache",
|
|
17148
|
+
"",
|
|
16950
17149
|
"## Core Workflow",
|
|
16951
17150
|
"",
|
|
16952
17151
|
"1. Check DebugBundle incidents first to avoid re-investigating a known failure.",
|
|
@@ -16997,23 +17196,35 @@ function buildCliReference() {
|
|
|
16997
17196
|
"## Setup",
|
|
16998
17197
|
"",
|
|
16999
17198
|
"- `debugbundle setup [--non-interactive] [--json]`",
|
|
17000
|
-
"- `debugbundle doctor [--json]`",
|
|
17199
|
+
"- `debugbundle doctor [--check-relay] [--json]`",
|
|
17001
17200
|
"- `debugbundle validate [--fix] [--json]`",
|
|
17002
17201
|
"- `debugbundle ingest <file> --format <format> [--json]`",
|
|
17003
17202
|
"- `debugbundle watch --log <file> --format <format> [--json]`",
|
|
17004
17203
|
"- `debugbundle watch --cloud --log <file> --format <format> [--json]`",
|
|
17005
17204
|
"- `debugbundle process [--preset <minimal|balanced|investigative>] [--json]`",
|
|
17205
|
+
"- `debugbundle clean [--events] [--bundles] [--all] [--older-than <Nd>] [--json]`",
|
|
17006
17206
|
"",
|
|
17007
17207
|
"## Investigation",
|
|
17008
17208
|
"",
|
|
17009
|
-
"- `debugbundle incidents`",
|
|
17010
|
-
"- `debugbundle inspect <incident-id
|
|
17011
|
-
"- `debugbundle
|
|
17012
|
-
"- `debugbundle
|
|
17013
|
-
"- `debugbundle
|
|
17014
|
-
"- `debugbundle
|
|
17209
|
+
"- `debugbundle incidents [--source <local|cloud>] [--project-id <id>] [--environment <name>] [--service <name>] [--status <status>] [--severity <severity>] [--cursor <cursor>] [--limit <n>] [--json]`",
|
|
17210
|
+
"- `debugbundle inspect <incident-id> [--source <local|cloud>] [--json]`",
|
|
17211
|
+
"- `debugbundle explain <incident-id> [--source <local|cloud>] [--json]`",
|
|
17212
|
+
"- `debugbundle bundle <incident-id> [--source <local|cloud>] [--json]`",
|
|
17213
|
+
"- `debugbundle reproduce <incident-id> [--source <local|cloud>] [--json]`",
|
|
17214
|
+
"- `debugbundle resolve <incident-id> [--source <local|cloud>] [--json]`",
|
|
17215
|
+
"- `debugbundle reopen <incident-id> [--source <local|cloud>] [--json]`",
|
|
17015
17216
|
"- `debugbundle analyze --type improvement --local`",
|
|
17016
17217
|
"",
|
|
17218
|
+
"## Operational Paths",
|
|
17219
|
+
"",
|
|
17220
|
+
"- `.debugbundle/profile.json` \u2014 committed project map and agent validation state",
|
|
17221
|
+
"- `.debugbundle/local/connection.json` \u2014 committed delivery policy and cloud connection metadata",
|
|
17222
|
+
"- `.debugbundle/local/events/` \u2014 gitignored raw local event batches",
|
|
17223
|
+
"- `.debugbundle/local/state.json` \u2014 gitignored local incident index and lifecycle state",
|
|
17224
|
+
"- `.debugbundle/bundles/local/` \u2014 gitignored local bundle artifacts",
|
|
17225
|
+
"- `.debugbundle/bundles/local/reproductions/` \u2014 gitignored local reproduction artifacts",
|
|
17226
|
+
"- `.debugbundle/bundles/cloud/` \u2014 gitignored cache for explicitly fetched cloud artifacts",
|
|
17227
|
+
"",
|
|
17017
17228
|
"## Incident Hygiene",
|
|
17018
17229
|
"",
|
|
17019
17230
|
"Resolve incidents after a fix is verified or after an intentional smoke, dogfood, or verification incident has served its purpose.",
|
|
@@ -17045,6 +17256,17 @@ function buildMcpReference() {
|
|
|
17045
17256
|
"",
|
|
17046
17257
|
"Use the same incident-first workflow through MCP when an agent is operating in connected mode.",
|
|
17047
17258
|
"",
|
|
17259
|
+
"## Investigation Tools",
|
|
17260
|
+
"",
|
|
17261
|
+
"- `doctor` \u2014 validate local profile, connection config, auth state, and setup health.",
|
|
17262
|
+
"- `list_incidents` \u2014 list local, cloud, or connected combined incidents; pass `source`, `status`, `environment`, `service`, `severity`, `cursor`, and `limit` when needed.",
|
|
17263
|
+
"- `get_incident` \u2014 fetch incident metadata by incident id.",
|
|
17264
|
+
"- `get_incident_context` \u2014 fetch deterministic explanation context for triage.",
|
|
17265
|
+
"- `get_bundle` \u2014 fetch the full debug bundle before proposing a fix.",
|
|
17266
|
+
"- `get_reproduction` \u2014 fetch reproduction guidance before editing code.",
|
|
17267
|
+
"- `resolve_incident` / `reopen_incident` \u2014 update lifecycle state after validation.",
|
|
17268
|
+
"- `analyze` \u2014 run local agent-oriented analysis from local bundles and skill schemas.",
|
|
17269
|
+
"",
|
|
17048
17270
|
"- Prefer bundle retrieval tools before reading raw repository files.",
|
|
17049
17271
|
"- Use MCP bundle access when the current issue originated in production.",
|
|
17050
17272
|
"- Resolve fixed or intentionally generated incidents with `resolve_incident` so open incidents stay actionable.",
|
|
@@ -17068,8 +17290,12 @@ function buildBundleSchemaReference() {
|
|
|
17068
17290
|
"Focus on:",
|
|
17069
17291
|
"- `summary` for the failure synopsis and recommended action",
|
|
17070
17292
|
"- `service` and `environment` for routing to the right code path",
|
|
17293
|
+
"- `context.error`, `context.request`, `context.response`, `context.logs`, `context.frontend`, `context.runtime`, `context.git`, `context.dependencies`, and `context.probe_data` for supporting evidence",
|
|
17294
|
+
"- `reproduction` for confidence, commands, and manual steps",
|
|
17071
17295
|
"- `links.reproduction` for the generated reproduction artifact",
|
|
17072
17296
|
"- `metadata.source` for whether the bundle came from local or cloud data",
|
|
17297
|
+
"",
|
|
17298
|
+
"Treat the bundle as the source of truth for the failure report. Use repository reads to confirm and patch the implicated code paths, not to rediscover incident context from scratch.",
|
|
17073
17299
|
""
|
|
17074
17300
|
].join("\n");
|
|
17075
17301
|
}
|
|
@@ -17080,10 +17306,12 @@ function buildProfileEnrichmentReference() {
|
|
|
17080
17306
|
"The setup profile is generated from static analysis and must be reviewed before agents rely on it for architecture decisions.",
|
|
17081
17307
|
"",
|
|
17082
17308
|
"Checklist:",
|
|
17083
|
-
"- verify
|
|
17084
|
-
"-
|
|
17085
|
-
"-
|
|
17086
|
-
"-
|
|
17309
|
+
"- verify `project.primary_languages`, `project.package_managers`, and `project.deployment_targets`",
|
|
17310
|
+
"- verify each service `kind`, `runtime`, `framework`, `paths`, `owns_routes`, and `depends_on` value against the repository",
|
|
17311
|
+
"- add critical paths for ingestion, processing, retrieval, SDK capture, auth, billing, and any project-specific high-risk workflows",
|
|
17312
|
+
"- confirm `repo.generated_paths` and `repo.do_not_edit_paths` match the local scaffold",
|
|
17313
|
+
"- confirm build, test, lint, and install workflows in `developer_workflows`",
|
|
17314
|
+
"- update `debugbundle.last_reviewed_at` and set `debugbundle.validation_status` to `agent-validated` when complete",
|
|
17087
17315
|
""
|
|
17088
17316
|
].join("\n");
|
|
17089
17317
|
}
|
|
@@ -17165,6 +17393,22 @@ function buildSkillEvals() {
|
|
|
17165
17393
|
"Resolve verified or intentionally generated incidents after the workflow is complete.",
|
|
17166
17394
|
"Leave unresolved incidents open when the failure is still live or unverified."
|
|
17167
17395
|
]
|
|
17396
|
+
},
|
|
17397
|
+
{
|
|
17398
|
+
name: "artifact_path_discovery",
|
|
17399
|
+
prompt: "The user reports an unknown local runtime error. Confirm the skill tells the agent which DebugBundle paths and commands to inspect first.",
|
|
17400
|
+
expected_behavior: [
|
|
17401
|
+
"Run doctor and list local open incidents before broad source exploration.",
|
|
17402
|
+
"Use .debugbundle/local/state.json, .debugbundle/bundles/local/, and reproduction artifact paths as the local evidence map."
|
|
17403
|
+
]
|
|
17404
|
+
},
|
|
17405
|
+
{
|
|
17406
|
+
name: "connected_incident_fetch",
|
|
17407
|
+
prompt: "The user says a production incident fired in the hosted DebugBundle project. Confirm the skill points the agent to the cloud retrieval path.",
|
|
17408
|
+
expected_behavior: [
|
|
17409
|
+
"List cloud open incidents or use MCP list_incidents with source cloud.",
|
|
17410
|
+
"Fetch inspect, context, bundle, and reproduction artifacts before editing code."
|
|
17411
|
+
]
|
|
17168
17412
|
}
|
|
17169
17413
|
]
|
|
17170
17414
|
},
|
|
@@ -17661,6 +17905,57 @@ function createCapturePolicyApi(httpClient) {
|
|
|
17661
17905
|
};
|
|
17662
17906
|
}
|
|
17663
17907
|
|
|
17908
|
+
// ../cli/src/improvement-settings-commands.ts
|
|
17909
|
+
var ImprovementSettingsApiError = class extends Error {
|
|
17910
|
+
status;
|
|
17911
|
+
constructor(status, message) {
|
|
17912
|
+
super(message);
|
|
17913
|
+
this.name = "ImprovementSettingsApiError";
|
|
17914
|
+
this.status = status;
|
|
17915
|
+
}
|
|
17916
|
+
};
|
|
17917
|
+
function toApiError2(status, body, fallback) {
|
|
17918
|
+
if (typeof body === "object" && body !== null && "error" in body && typeof body.error === "string") {
|
|
17919
|
+
return new ImprovementSettingsApiError(status, body.error);
|
|
17920
|
+
}
|
|
17921
|
+
return new ImprovementSettingsApiError(status, fallback);
|
|
17922
|
+
}
|
|
17923
|
+
function createImprovementSettingsApi(httpClient) {
|
|
17924
|
+
return {
|
|
17925
|
+
async getImprovementSettings(input) {
|
|
17926
|
+
const response = await httpClient.request({
|
|
17927
|
+
method: "GET",
|
|
17928
|
+
path: `/v1/projects/${encodeURIComponent(input.projectId)}/improvement-settings`,
|
|
17929
|
+
bearerToken: input.bearerToken
|
|
17930
|
+
});
|
|
17931
|
+
if (response.status !== 200) {
|
|
17932
|
+
throw toApiError2(response.status, response.body, "Failed to get improvement settings.");
|
|
17933
|
+
}
|
|
17934
|
+
const parsed = ImprovementSettingsResponseSchema.safeParse(response.body);
|
|
17935
|
+
if (!parsed.success) {
|
|
17936
|
+
throw new ImprovementSettingsApiError(500, "Invalid improvement settings response.");
|
|
17937
|
+
}
|
|
17938
|
+
return parsed.data;
|
|
17939
|
+
},
|
|
17940
|
+
async updateImprovementSettings(input) {
|
|
17941
|
+
const response = await httpClient.request({
|
|
17942
|
+
method: "PATCH",
|
|
17943
|
+
path: `/v1/projects/${encodeURIComponent(input.projectId)}/improvement-settings`,
|
|
17944
|
+
bearerToken: input.bearerToken,
|
|
17945
|
+
body: input.update
|
|
17946
|
+
});
|
|
17947
|
+
if (response.status !== 200) {
|
|
17948
|
+
throw toApiError2(response.status, response.body, "Failed to update improvement settings.");
|
|
17949
|
+
}
|
|
17950
|
+
const parsed = ImprovementSettingsResponseSchema.safeParse(response.body);
|
|
17951
|
+
if (!parsed.success) {
|
|
17952
|
+
throw new ImprovementSettingsApiError(500, "Invalid improvement settings response.");
|
|
17953
|
+
}
|
|
17954
|
+
return parsed.data;
|
|
17955
|
+
}
|
|
17956
|
+
};
|
|
17957
|
+
}
|
|
17958
|
+
|
|
17664
17959
|
// ../cli/src/member-commands.ts
|
|
17665
17960
|
var MemberApiError = class extends Error {
|
|
17666
17961
|
status;
|
|
@@ -17672,7 +17967,7 @@ var MemberApiError = class extends Error {
|
|
|
17672
17967
|
this.code = code;
|
|
17673
17968
|
}
|
|
17674
17969
|
};
|
|
17675
|
-
function
|
|
17970
|
+
function toApiError3(status, body) {
|
|
17676
17971
|
if (typeof body === "object" && body !== null && "error" in body && typeof body.error === "string") {
|
|
17677
17972
|
return new MemberApiError(status, body.error);
|
|
17678
17973
|
}
|
|
@@ -17683,68 +17978,68 @@ function createMemberApi(httpClient) {
|
|
|
17683
17978
|
async listMembers(input) {
|
|
17684
17979
|
const response = await httpClient.request({
|
|
17685
17980
|
method: "GET",
|
|
17686
|
-
path:
|
|
17981
|
+
path: `/v1/projects/${input.projectId}/members`,
|
|
17687
17982
|
bearerToken: input.bearerToken
|
|
17688
17983
|
});
|
|
17689
17984
|
if (response.status !== 200) {
|
|
17690
|
-
throw
|
|
17985
|
+
throw toApiError3(response.status, response.body);
|
|
17691
17986
|
}
|
|
17692
17987
|
return response.body;
|
|
17693
17988
|
},
|
|
17694
17989
|
async listInvites(input) {
|
|
17695
17990
|
const response = await httpClient.request({
|
|
17696
17991
|
method: "GET",
|
|
17697
|
-
path:
|
|
17992
|
+
path: `/v1/projects/${input.projectId}/invites`,
|
|
17698
17993
|
bearerToken: input.bearerToken
|
|
17699
17994
|
});
|
|
17700
17995
|
if (response.status !== 200) {
|
|
17701
|
-
throw
|
|
17996
|
+
throw toApiError3(response.status, response.body);
|
|
17702
17997
|
}
|
|
17703
17998
|
return response.body;
|
|
17704
17999
|
},
|
|
17705
18000
|
async inviteMember(input) {
|
|
17706
18001
|
const response = await httpClient.request({
|
|
17707
18002
|
method: "POST",
|
|
17708
|
-
path:
|
|
18003
|
+
path: `/v1/projects/${input.projectId}/invite`,
|
|
17709
18004
|
bearerToken: input.bearerToken,
|
|
17710
18005
|
body: { email: input.email, role: input.role }
|
|
17711
18006
|
});
|
|
17712
18007
|
if (response.status !== 201) {
|
|
17713
|
-
throw
|
|
18008
|
+
throw toApiError3(response.status, response.body);
|
|
17714
18009
|
}
|
|
17715
18010
|
return response.body;
|
|
17716
18011
|
},
|
|
17717
18012
|
async cancelInvite(input) {
|
|
17718
18013
|
const response = await httpClient.request({
|
|
17719
18014
|
method: "DELETE",
|
|
17720
|
-
path: `/v1/
|
|
18015
|
+
path: `/v1/projects/${input.projectId}/invites/${input.inviteId}`,
|
|
17721
18016
|
bearerToken: input.bearerToken
|
|
17722
18017
|
});
|
|
17723
18018
|
if (response.status !== 200) {
|
|
17724
|
-
throw
|
|
18019
|
+
throw toApiError3(response.status, response.body);
|
|
17725
18020
|
}
|
|
17726
18021
|
return response.body;
|
|
17727
18022
|
},
|
|
17728
18023
|
async updateMemberRole(input) {
|
|
17729
18024
|
const response = await httpClient.request({
|
|
17730
18025
|
method: "PATCH",
|
|
17731
|
-
path: `/v1/
|
|
18026
|
+
path: `/v1/projects/${input.projectId}/members/${input.userId}`,
|
|
17732
18027
|
bearerToken: input.bearerToken,
|
|
17733
18028
|
body: { role: input.role }
|
|
17734
18029
|
});
|
|
17735
18030
|
if (response.status !== 200) {
|
|
17736
|
-
throw
|
|
18031
|
+
throw toApiError3(response.status, response.body);
|
|
17737
18032
|
}
|
|
17738
18033
|
return response.body;
|
|
17739
18034
|
},
|
|
17740
18035
|
async removeMember(input) {
|
|
17741
18036
|
const response = await httpClient.request({
|
|
17742
18037
|
method: "DELETE",
|
|
17743
|
-
path: `/v1/
|
|
18038
|
+
path: `/v1/projects/${input.projectId}/members/${input.userId}`,
|
|
17744
18039
|
bearerToken: input.bearerToken
|
|
17745
18040
|
});
|
|
17746
18041
|
if (response.status !== 200) {
|
|
17747
|
-
throw
|
|
18042
|
+
throw toApiError3(response.status, response.body);
|
|
17748
18043
|
}
|
|
17749
18044
|
return response.body;
|
|
17750
18045
|
}
|
|
@@ -17762,7 +18057,7 @@ var ProbeApiError = class extends Error {
|
|
|
17762
18057
|
this.code = code;
|
|
17763
18058
|
}
|
|
17764
18059
|
};
|
|
17765
|
-
function
|
|
18060
|
+
function toApiError4(status, body) {
|
|
17766
18061
|
if (typeof body === "object" && body !== null && "error" in body && typeof body.error === "string") {
|
|
17767
18062
|
return new ProbeApiError(status, body.error);
|
|
17768
18063
|
}
|
|
@@ -17793,7 +18088,7 @@ function createProbeApi(httpClient) {
|
|
|
17793
18088
|
body
|
|
17794
18089
|
});
|
|
17795
18090
|
if (response.status !== 201) {
|
|
17796
|
-
throw
|
|
18091
|
+
throw toApiError4(response.status, response.body);
|
|
17797
18092
|
}
|
|
17798
18093
|
return response.body;
|
|
17799
18094
|
},
|
|
@@ -17804,7 +18099,7 @@ function createProbeApi(httpClient) {
|
|
|
17804
18099
|
bearerToken: input.bearerToken
|
|
17805
18100
|
});
|
|
17806
18101
|
if (response.status !== 200) {
|
|
17807
|
-
throw
|
|
18102
|
+
throw toApiError4(response.status, response.body);
|
|
17808
18103
|
}
|
|
17809
18104
|
return response.body;
|
|
17810
18105
|
},
|
|
@@ -17816,7 +18111,7 @@ function createProbeApi(httpClient) {
|
|
|
17816
18111
|
body: { activation_id: input.activationId }
|
|
17817
18112
|
});
|
|
17818
18113
|
if (response.status !== 200) {
|
|
17819
|
-
throw
|
|
18114
|
+
throw toApiError4(response.status, response.body);
|
|
17820
18115
|
}
|
|
17821
18116
|
return response.body;
|
|
17822
18117
|
}
|
|
@@ -19017,16 +19312,349 @@ var STORAGE_SCHEMA_MIGRATIONS = [
|
|
|
19017
19312
|
)
|
|
19018
19313
|
`,
|
|
19019
19314
|
`
|
|
19020
|
-
CREATE INDEX IF NOT EXISTS slack_destinations_org_active_idx
|
|
19021
|
-
ON slack_destinations (organization_id, is_active, created_at)
|
|
19315
|
+
CREATE INDEX IF NOT EXISTS slack_destinations_org_active_idx
|
|
19316
|
+
ON slack_destinations (organization_id, is_active, created_at)
|
|
19317
|
+
`
|
|
19318
|
+
]
|
|
19319
|
+
}),
|
|
19320
|
+
defineStorageSchemaMigration({
|
|
19321
|
+
id: "202605140001_add_capture_policy_immediate_client_error_statuses",
|
|
19322
|
+
description: "Add nullable immediate client error status overrides to capture policies.",
|
|
19323
|
+
statements: [
|
|
19324
|
+
"ALTER TABLE capture_policies ADD COLUMN IF NOT EXISTS immediate_client_error_statuses jsonb"
|
|
19325
|
+
]
|
|
19326
|
+
}),
|
|
19327
|
+
defineStorageSchemaMigration({
|
|
19328
|
+
id: "202605150001_add_user_avatar_columns",
|
|
19329
|
+
description: "Add cached user avatar metadata for GitHub and Gravatar profile images.",
|
|
19330
|
+
statements: [
|
|
19331
|
+
"ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_source text",
|
|
19332
|
+
"ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_object_key text",
|
|
19333
|
+
"ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_content_type text",
|
|
19334
|
+
"ALTER TABLE users ADD COLUMN IF NOT EXISTS avatar_updated_at timestamptz"
|
|
19335
|
+
]
|
|
19336
|
+
}),
|
|
19337
|
+
defineStorageSchemaMigration({
|
|
19338
|
+
id: "202605170001_add_alert_email_digest_queue",
|
|
19339
|
+
description: "Add queued email alert digests and digest items for fixed-window alert batching.",
|
|
19340
|
+
statements: [
|
|
19341
|
+
`
|
|
19342
|
+
CREATE TABLE IF NOT EXISTS alert_email_digests (
|
|
19343
|
+
id uuid PRIMARY KEY,
|
|
19344
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
19345
|
+
recipient text NOT NULL,
|
|
19346
|
+
status text NOT NULL,
|
|
19347
|
+
next_attempt_at timestamptz,
|
|
19348
|
+
claimed_at timestamptz,
|
|
19349
|
+
last_error text,
|
|
19350
|
+
delivered_at timestamptz,
|
|
19351
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19352
|
+
updated_at timestamptz NOT NULL DEFAULT now()
|
|
19353
|
+
)
|
|
19354
|
+
`,
|
|
19355
|
+
`
|
|
19356
|
+
CREATE UNIQUE INDEX IF NOT EXISTS alert_email_digests_project_recipient_pending_idx
|
|
19357
|
+
ON alert_email_digests (project_id, recipient)
|
|
19358
|
+
WHERE status = 'pending' AND claimed_at IS NULL
|
|
19359
|
+
`,
|
|
19360
|
+
`
|
|
19361
|
+
CREATE INDEX IF NOT EXISTS alert_email_digests_status_next_attempt_idx
|
|
19362
|
+
ON alert_email_digests (status, next_attempt_at)
|
|
19363
|
+
`,
|
|
19364
|
+
`
|
|
19365
|
+
CREATE TABLE IF NOT EXISTS alert_email_digest_items (
|
|
19366
|
+
id uuid PRIMARY KEY,
|
|
19367
|
+
digest_id uuid NOT NULL REFERENCES alert_email_digests(id) ON DELETE CASCADE,
|
|
19368
|
+
alert_id uuid NOT NULL REFERENCES alert_rules(id) ON DELETE CASCADE,
|
|
19369
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
19370
|
+
incident_id uuid NOT NULL REFERENCES incidents(id) ON DELETE CASCADE,
|
|
19371
|
+
condition_type text NOT NULL,
|
|
19372
|
+
dedupe_key text NOT NULL,
|
|
19373
|
+
payload jsonb NOT NULL,
|
|
19374
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19375
|
+
UNIQUE (alert_id, incident_id, dedupe_key)
|
|
19376
|
+
)
|
|
19377
|
+
`,
|
|
19378
|
+
`
|
|
19379
|
+
CREATE INDEX IF NOT EXISTS alert_email_digest_items_digest_created_idx
|
|
19380
|
+
ON alert_email_digest_items (digest_id, created_at ASC)
|
|
19381
|
+
`
|
|
19382
|
+
]
|
|
19383
|
+
}),
|
|
19384
|
+
defineStorageSchemaMigration({
|
|
19385
|
+
id: "202605180001_add_skipped_github_dispatch_status",
|
|
19386
|
+
description: "Allow GitHub dispatch delivery history to record rate-limited skips without retrying them.",
|
|
19387
|
+
statements: [
|
|
19388
|
+
"ALTER TABLE github_dispatch_deliveries DROP CONSTRAINT IF EXISTS github_dispatch_deliveries_status_check",
|
|
19389
|
+
"ALTER TABLE github_dispatch_deliveries ADD CONSTRAINT github_dispatch_deliveries_status_check CHECK (status IN ('pending', 'retrying', 'delivered', 'failed', 'skipped'))"
|
|
19390
|
+
]
|
|
19391
|
+
}),
|
|
19392
|
+
defineStorageSchemaMigration({
|
|
19393
|
+
id: "202605180002_add_project_improvement_settings",
|
|
19394
|
+
description: "Add project-level automated improvement settings columns.",
|
|
19395
|
+
statements: [
|
|
19396
|
+
"ALTER TABLE projects ADD COLUMN IF NOT EXISTS automated_improvement_bundles_enabled boolean NOT NULL DEFAULT true",
|
|
19397
|
+
"ALTER TABLE projects ADD COLUMN IF NOT EXISTS improvement_bundle_sensitivity text NOT NULL DEFAULT 'balanced'",
|
|
19398
|
+
`
|
|
19399
|
+
ALTER TABLE projects
|
|
19400
|
+
DROP CONSTRAINT IF EXISTS projects_improvement_bundle_sensitivity_check
|
|
19401
|
+
`,
|
|
19402
|
+
`
|
|
19403
|
+
ALTER TABLE projects
|
|
19404
|
+
ADD CONSTRAINT projects_improvement_bundle_sensitivity_check
|
|
19405
|
+
CHECK (improvement_bundle_sensitivity IN ('high_confidence', 'balanced', 'verbose'))
|
|
19406
|
+
`
|
|
19407
|
+
]
|
|
19408
|
+
}),
|
|
19409
|
+
defineStorageSchemaMigration({
|
|
19410
|
+
id: "202605180003_add_improvement_opportunities_and_bundle_generation_shape",
|
|
19411
|
+
description: "Add hosted improvement opportunity storage and allow bundle generations to reference improvements directly.",
|
|
19412
|
+
statements: [
|
|
19413
|
+
`
|
|
19414
|
+
CREATE TABLE IF NOT EXISTS improvement_opportunities (
|
|
19415
|
+
id uuid PRIMARY KEY,
|
|
19416
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
19417
|
+
service_id uuid REFERENCES services(id) ON DELETE SET NULL,
|
|
19418
|
+
service_name text NOT NULL,
|
|
19419
|
+
environment text NOT NULL DEFAULT 'production',
|
|
19420
|
+
kind text NOT NULL,
|
|
19421
|
+
status text NOT NULL DEFAULT 'open',
|
|
19422
|
+
severity text NOT NULL,
|
|
19423
|
+
confidence numeric NOT NULL,
|
|
19424
|
+
fingerprint text NOT NULL,
|
|
19425
|
+
title text NOT NULL,
|
|
19426
|
+
summary text NOT NULL,
|
|
19427
|
+
occurrence_count integer NOT NULL DEFAULT 1,
|
|
19428
|
+
evidence jsonb NOT NULL,
|
|
19429
|
+
first_detected_at timestamptz NOT NULL,
|
|
19430
|
+
last_detected_at timestamptz NOT NULL,
|
|
19431
|
+
last_source_event_id uuid,
|
|
19432
|
+
related_incident_ids uuid[] NOT NULL DEFAULT '{}',
|
|
19433
|
+
bundle_generation_number integer NOT NULL DEFAULT 0,
|
|
19434
|
+
bundle_created_at timestamptz,
|
|
19435
|
+
bundle_updated_at timestamptz,
|
|
19436
|
+
bundle_source_event_id uuid,
|
|
19437
|
+
bundle_failure_reason text,
|
|
19438
|
+
resolved_at timestamptz,
|
|
19439
|
+
resolved_by_user_id uuid REFERENCES users(id) ON DELETE SET NULL,
|
|
19440
|
+
snoozed_until timestamptz,
|
|
19441
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19442
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19443
|
+
UNIQUE (project_id, fingerprint)
|
|
19444
|
+
)
|
|
19445
|
+
`,
|
|
19446
|
+
`
|
|
19447
|
+
CREATE INDEX IF NOT EXISTS improvement_opportunities_project_status_detected_idx
|
|
19448
|
+
ON improvement_opportunities (project_id, status, last_detected_at DESC)
|
|
19449
|
+
`,
|
|
19450
|
+
`
|
|
19451
|
+
CREATE INDEX IF NOT EXISTS improvement_opportunities_project_kind_detected_idx
|
|
19452
|
+
ON improvement_opportunities (project_id, kind, last_detected_at DESC)
|
|
19453
|
+
`,
|
|
19454
|
+
`
|
|
19455
|
+
CREATE INDEX IF NOT EXISTS improvement_opportunities_project_service_env_idx
|
|
19456
|
+
ON improvement_opportunities (project_id, service_id, environment)
|
|
19457
|
+
`,
|
|
19458
|
+
`
|
|
19459
|
+
CREATE TABLE IF NOT EXISTS improvement_opportunity_events (
|
|
19460
|
+
improvement_opportunity_id uuid NOT NULL REFERENCES improvement_opportunities(id) ON DELETE CASCADE,
|
|
19461
|
+
event_id uuid NOT NULL,
|
|
19462
|
+
event_type text NOT NULL,
|
|
19463
|
+
occurred_at timestamptz NOT NULL,
|
|
19464
|
+
PRIMARY KEY (improvement_opportunity_id, event_id)
|
|
19465
|
+
)
|
|
19466
|
+
`,
|
|
19467
|
+
`
|
|
19468
|
+
CREATE INDEX IF NOT EXISTS improvement_opportunity_events_detected_idx
|
|
19469
|
+
ON improvement_opportunity_events (improvement_opportunity_id, occurred_at DESC, event_id DESC)
|
|
19470
|
+
`,
|
|
19471
|
+
"ALTER TABLE bundle_generations ALTER COLUMN incident_id DROP NOT NULL",
|
|
19472
|
+
"ALTER TABLE bundle_generations ADD COLUMN IF NOT EXISTS improvement_opportunity_id uuid REFERENCES improvement_opportunities(id) ON DELETE CASCADE",
|
|
19473
|
+
"ALTER TABLE bundle_generations DROP CONSTRAINT IF EXISTS bundle_generations_incident_id_source_event_id_key",
|
|
19474
|
+
"DROP INDEX IF EXISTS bundle_generations_incident_source_idx",
|
|
19475
|
+
"DROP INDEX IF EXISTS bundle_generations_improvement_source_idx",
|
|
19476
|
+
`
|
|
19477
|
+
CREATE UNIQUE INDEX IF NOT EXISTS bundle_generations_incident_source_idx
|
|
19478
|
+
ON bundle_generations (incident_id, source_event_id)
|
|
19479
|
+
WHERE incident_id IS NOT NULL
|
|
19480
|
+
`,
|
|
19481
|
+
`
|
|
19482
|
+
CREATE UNIQUE INDEX IF NOT EXISTS bundle_generations_improvement_source_idx
|
|
19483
|
+
ON bundle_generations (improvement_opportunity_id, source_event_id)
|
|
19484
|
+
WHERE improvement_opportunity_id IS NOT NULL
|
|
19485
|
+
`,
|
|
19486
|
+
"DROP INDEX IF EXISTS bundle_generations_improvement_generation_idx",
|
|
19487
|
+
`
|
|
19488
|
+
CREATE INDEX IF NOT EXISTS bundle_generations_improvement_generation_idx
|
|
19489
|
+
ON bundle_generations (improvement_opportunity_id, generation_number DESC)
|
|
19490
|
+
WHERE improvement_opportunity_id IS NOT NULL
|
|
19491
|
+
`,
|
|
19492
|
+
"ALTER TABLE bundle_generations DROP CONSTRAINT IF EXISTS bundle_generations_owner_check",
|
|
19493
|
+
`
|
|
19494
|
+
ALTER TABLE bundle_generations
|
|
19495
|
+
ADD CONSTRAINT bundle_generations_owner_check CHECK (
|
|
19496
|
+
(incident_id IS NOT NULL AND improvement_opportunity_id IS NULL AND bundle_type = 'failure')
|
|
19497
|
+
OR (incident_id IS NULL AND improvement_opportunity_id IS NOT NULL AND bundle_type = 'improvement')
|
|
19498
|
+
)
|
|
19499
|
+
`
|
|
19500
|
+
]
|
|
19501
|
+
}),
|
|
19502
|
+
defineStorageSchemaMigration({
|
|
19503
|
+
id: "202605180004_add_operational_email_deliveries",
|
|
19504
|
+
description: "Add durable operational email delivery queue with retries and dedupe.",
|
|
19505
|
+
statements: [
|
|
19506
|
+
`
|
|
19507
|
+
CREATE TABLE IF NOT EXISTS operational_email_deliveries (
|
|
19508
|
+
id uuid PRIMARY KEY,
|
|
19509
|
+
organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
|
|
19510
|
+
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
19511
|
+
kind text NOT NULL,
|
|
19512
|
+
dedupe_key text NOT NULL,
|
|
19513
|
+
payload jsonb NOT NULL DEFAULT '{}'::jsonb,
|
|
19514
|
+
status text NOT NULL DEFAULT 'pending',
|
|
19515
|
+
attempt_count integer NOT NULL DEFAULT 0,
|
|
19516
|
+
next_attempt_at timestamptz,
|
|
19517
|
+
last_error text,
|
|
19518
|
+
delivered_at timestamptz,
|
|
19519
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19520
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19521
|
+
UNIQUE (organization_id, kind, dedupe_key)
|
|
19522
|
+
)
|
|
19523
|
+
`,
|
|
19524
|
+
`
|
|
19525
|
+
ALTER TABLE operational_email_deliveries
|
|
19526
|
+
DROP CONSTRAINT IF EXISTS operational_email_deliveries_kind_check
|
|
19527
|
+
`,
|
|
19528
|
+
`
|
|
19529
|
+
ALTER TABLE operational_email_deliveries
|
|
19530
|
+
ADD CONSTRAINT operational_email_deliveries_kind_check
|
|
19531
|
+
CHECK (kind IN ('webhook_auto_disabled', 'allowance_warning_80', 'allowance_limit_reached', 'retention_rotation_notice'))
|
|
19532
|
+
`,
|
|
19533
|
+
`
|
|
19534
|
+
ALTER TABLE operational_email_deliveries
|
|
19535
|
+
DROP CONSTRAINT IF EXISTS operational_email_deliveries_status_check
|
|
19536
|
+
`,
|
|
19537
|
+
`
|
|
19538
|
+
ALTER TABLE operational_email_deliveries
|
|
19539
|
+
ADD CONSTRAINT operational_email_deliveries_status_check
|
|
19540
|
+
CHECK (status IN ('pending', 'retrying', 'delivered', 'failed'))
|
|
19541
|
+
`,
|
|
19542
|
+
`
|
|
19543
|
+
CREATE INDEX IF NOT EXISTS operational_email_deliveries_status_next_attempt_idx
|
|
19544
|
+
ON operational_email_deliveries (status, next_attempt_at, created_at)
|
|
19545
|
+
`
|
|
19546
|
+
]
|
|
19547
|
+
}),
|
|
19548
|
+
defineStorageSchemaMigration({
|
|
19549
|
+
id: "202605180005_add_github_improvement_dispatch_targets",
|
|
19550
|
+
description: "Allow GitHub dispatch deliveries to target either incidents or hosted improvements.",
|
|
19551
|
+
statements: [
|
|
19552
|
+
"ALTER TABLE github_dispatch_deliveries ALTER COLUMN incident_id DROP NOT NULL",
|
|
19553
|
+
"ALTER TABLE github_dispatch_deliveries RENAME COLUMN incident_fingerprint TO target_fingerprint",
|
|
19554
|
+
"ALTER TABLE github_dispatch_deliveries ADD COLUMN IF NOT EXISTS improvement_opportunity_id uuid REFERENCES improvement_opportunities(id) ON DELETE CASCADE",
|
|
19555
|
+
"DROP INDEX IF EXISTS github_dispatch_deliveries_rule_dedupe_key_idx",
|
|
19556
|
+
`
|
|
19557
|
+
CREATE UNIQUE INDEX IF NOT EXISTS github_dispatch_deliveries_rule_dedupe_key_idx
|
|
19558
|
+
ON github_dispatch_deliveries (rule_id, target_fingerprint, dedupe_key)
|
|
19559
|
+
`,
|
|
19560
|
+
"ALTER TABLE github_dispatch_deliveries DROP CONSTRAINT IF EXISTS github_dispatch_deliveries_check",
|
|
19561
|
+
`
|
|
19562
|
+
ALTER TABLE github_dispatch_deliveries
|
|
19563
|
+
ADD CONSTRAINT github_dispatch_deliveries_check CHECK (
|
|
19564
|
+
(incident_id IS NOT NULL AND improvement_opportunity_id IS NULL)
|
|
19565
|
+
OR (incident_id IS NULL AND improvement_opportunity_id IS NOT NULL)
|
|
19566
|
+
)
|
|
19567
|
+
`
|
|
19568
|
+
]
|
|
19569
|
+
}),
|
|
19570
|
+
defineStorageSchemaMigration({
|
|
19571
|
+
id: "202605180006_add_missing_bundle_and_creator_columns",
|
|
19572
|
+
description: "Backfill creator ownership columns and incident bundle tracking columns that existed only in bootstrap schema.",
|
|
19573
|
+
statements: [
|
|
19574
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_generation_number integer NOT NULL DEFAULT 0",
|
|
19575
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_created_at timestamptz",
|
|
19576
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_updated_at timestamptz",
|
|
19577
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_source_event_id uuid",
|
|
19578
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_source_occurred_at timestamptz",
|
|
19579
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_trigger text",
|
|
19580
|
+
"ALTER TABLE incidents ADD COLUMN IF NOT EXISTS bundle_failure_reason text",
|
|
19581
|
+
"ALTER TABLE alert_rules ADD COLUMN IF NOT EXISTS created_by_user_id uuid",
|
|
19582
|
+
`
|
|
19583
|
+
UPDATE alert_rules ar
|
|
19584
|
+
SET created_by_user_id = p.owner_user_id
|
|
19585
|
+
FROM projects p
|
|
19586
|
+
WHERE ar.project_id = p.id
|
|
19587
|
+
AND ar.created_by_user_id IS NULL
|
|
19588
|
+
`,
|
|
19589
|
+
"ALTER TABLE alert_rules DROP CONSTRAINT IF EXISTS alert_rules_created_by_user_id_fkey",
|
|
19590
|
+
`
|
|
19591
|
+
ALTER TABLE alert_rules
|
|
19592
|
+
ADD CONSTRAINT alert_rules_created_by_user_id_fkey
|
|
19593
|
+
FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
19594
|
+
`,
|
|
19595
|
+
"ALTER TABLE alert_rules ALTER COLUMN created_by_user_id SET NOT NULL",
|
|
19596
|
+
"ALTER TABLE agent_webhooks ADD COLUMN IF NOT EXISTS created_by_user_id uuid",
|
|
19597
|
+
`
|
|
19598
|
+
UPDATE agent_webhooks aw
|
|
19599
|
+
SET created_by_user_id = p.owner_user_id
|
|
19600
|
+
FROM projects p
|
|
19601
|
+
WHERE aw.project_id = p.id
|
|
19602
|
+
AND aw.created_by_user_id IS NULL
|
|
19603
|
+
`,
|
|
19604
|
+
"ALTER TABLE agent_webhooks DROP CONSTRAINT IF EXISTS agent_webhooks_created_by_user_id_fkey",
|
|
19605
|
+
`
|
|
19606
|
+
ALTER TABLE agent_webhooks
|
|
19607
|
+
ADD CONSTRAINT agent_webhooks_created_by_user_id_fkey
|
|
19608
|
+
FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
19609
|
+
`,
|
|
19610
|
+
"ALTER TABLE agent_webhooks ALTER COLUMN created_by_user_id SET NOT NULL",
|
|
19611
|
+
"ALTER TABLE github_dispatch_rules ADD COLUMN IF NOT EXISTS created_by_user_id uuid",
|
|
19612
|
+
`
|
|
19613
|
+
UPDATE github_dispatch_rules gdr
|
|
19614
|
+
SET created_by_user_id = p.owner_user_id
|
|
19615
|
+
FROM projects p
|
|
19616
|
+
WHERE gdr.project_id = p.id
|
|
19617
|
+
AND gdr.created_by_user_id IS NULL
|
|
19618
|
+
`,
|
|
19619
|
+
"ALTER TABLE github_dispatch_rules DROP CONSTRAINT IF EXISTS github_dispatch_rules_created_by_user_id_fkey",
|
|
19620
|
+
`
|
|
19621
|
+
ALTER TABLE github_dispatch_rules
|
|
19622
|
+
ADD CONSTRAINT github_dispatch_rules_created_by_user_id_fkey
|
|
19623
|
+
FOREIGN KEY (created_by_user_id) REFERENCES users(id) ON DELETE CASCADE
|
|
19624
|
+
`,
|
|
19625
|
+
"ALTER TABLE github_dispatch_rules ALTER COLUMN created_by_user_id SET NOT NULL"
|
|
19626
|
+
]
|
|
19627
|
+
}),
|
|
19628
|
+
defineStorageSchemaMigration({
|
|
19629
|
+
id: "202605200001_limit_weekly_report_email_channel_per_project",
|
|
19630
|
+
description: "Keep weekly email reports singular per project.",
|
|
19631
|
+
statements: [
|
|
19632
|
+
`
|
|
19633
|
+
DELETE FROM weekly_report_channels
|
|
19634
|
+
WHERE id IN (
|
|
19635
|
+
SELECT id
|
|
19636
|
+
FROM (
|
|
19637
|
+
SELECT
|
|
19638
|
+
id,
|
|
19639
|
+
row_number() OVER (PARTITION BY project_id ORDER BY created_at ASC, id ASC) AS row_number
|
|
19640
|
+
FROM weekly_report_channels
|
|
19641
|
+
WHERE channel = 'email'
|
|
19642
|
+
) ranked
|
|
19643
|
+
WHERE ranked.row_number > 1
|
|
19644
|
+
)
|
|
19645
|
+
`,
|
|
19646
|
+
`
|
|
19647
|
+
CREATE UNIQUE INDEX IF NOT EXISTS weekly_report_channels_project_email_unique_idx
|
|
19648
|
+
ON weekly_report_channels (project_id)
|
|
19649
|
+
WHERE channel = 'email'
|
|
19022
19650
|
`
|
|
19023
19651
|
]
|
|
19024
19652
|
}),
|
|
19025
19653
|
defineStorageSchemaMigration({
|
|
19026
|
-
id: "
|
|
19027
|
-
description: "Add
|
|
19654
|
+
id: "202605220001_add_project_token_allowed_origins",
|
|
19655
|
+
description: "Add optional browser-origin allowlists to project ingestion tokens.",
|
|
19028
19656
|
statements: [
|
|
19029
|
-
"ALTER TABLE
|
|
19657
|
+
"ALTER TABLE project_tokens ADD COLUMN IF NOT EXISTS allowed_origins jsonb NOT NULL DEFAULT '[]'::jsonb"
|
|
19030
19658
|
]
|
|
19031
19659
|
})
|
|
19032
19660
|
];
|
|
@@ -21829,53 +22457,62 @@ var import_node_path10 = require("node:path");
|
|
|
21829
22457
|
var SUGGESTED_ACTIONS2 = [
|
|
21830
22458
|
"Run debugbundle setup if .debugbundle/profile.json is missing.",
|
|
21831
22459
|
"Run debugbundle profile validate for field-level profile errors.",
|
|
21832
|
-
"Run debugbundle validate --fix to recreate missing local DebugBundle stubs when safe."
|
|
22460
|
+
"Run debugbundle validate --fix to recreate missing or stale local DebugBundle stubs when safe."
|
|
21833
22461
|
];
|
|
21834
22462
|
var FIXABLE_FILES = [
|
|
21835
22463
|
{
|
|
21836
22464
|
name: "connection-config",
|
|
21837
22465
|
filePath: CONNECTION_FILE_PATH,
|
|
21838
|
-
buildContent: buildConnectionConfig
|
|
22466
|
+
buildContent: buildConnectionConfig,
|
|
22467
|
+
checkContent: false
|
|
21839
22468
|
},
|
|
21840
22469
|
{
|
|
21841
22470
|
name: "agent-skill",
|
|
21842
22471
|
filePath: SKILL_FILE_PATH,
|
|
21843
|
-
buildContent: buildSkill
|
|
22472
|
+
buildContent: buildSkill,
|
|
22473
|
+
checkContent: true
|
|
21844
22474
|
},
|
|
21845
22475
|
{
|
|
21846
22476
|
name: "cli-reference",
|
|
21847
22477
|
filePath: CLI_REFERENCE_FILE_PATH,
|
|
21848
|
-
buildContent: buildCliReference
|
|
22478
|
+
buildContent: buildCliReference,
|
|
22479
|
+
checkContent: true
|
|
21849
22480
|
},
|
|
21850
22481
|
{
|
|
21851
22482
|
name: "mcp-reference",
|
|
21852
22483
|
filePath: MCP_REFERENCE_FILE_PATH,
|
|
21853
|
-
buildContent: buildMcpReference
|
|
22484
|
+
buildContent: buildMcpReference,
|
|
22485
|
+
checkContent: true
|
|
21854
22486
|
},
|
|
21855
22487
|
{
|
|
21856
22488
|
name: "bundle-schema-reference",
|
|
21857
22489
|
filePath: BUNDLE_SCHEMA_REFERENCE_FILE_PATH,
|
|
21858
|
-
buildContent: buildBundleSchemaReference
|
|
22490
|
+
buildContent: buildBundleSchemaReference,
|
|
22491
|
+
checkContent: true
|
|
21859
22492
|
},
|
|
21860
22493
|
{
|
|
21861
22494
|
name: "profile-enrichment-reference",
|
|
21862
22495
|
filePath: PROFILE_ENRICHMENT_REFERENCE_FILE_PATH,
|
|
21863
|
-
buildContent: buildProfileEnrichmentReference
|
|
22496
|
+
buildContent: buildProfileEnrichmentReference,
|
|
22497
|
+
checkContent: true
|
|
21864
22498
|
},
|
|
21865
22499
|
{
|
|
21866
22500
|
name: "improvement-analysis-recipe",
|
|
21867
22501
|
filePath: IMPROVEMENT_ANALYSIS_RECIPE_FILE_PATH,
|
|
21868
|
-
buildContent: buildImprovementAnalysisRecipe
|
|
22502
|
+
buildContent: buildImprovementAnalysisRecipe,
|
|
22503
|
+
checkContent: true
|
|
21869
22504
|
},
|
|
21870
22505
|
{
|
|
21871
22506
|
name: "performance-analysis-recipe",
|
|
21872
22507
|
filePath: PERFORMANCE_ANALYSIS_RECIPE_FILE_PATH,
|
|
21873
|
-
buildContent: buildPerformanceAnalysisRecipe
|
|
22508
|
+
buildContent: buildPerformanceAnalysisRecipe,
|
|
22509
|
+
checkContent: true
|
|
21874
22510
|
},
|
|
21875
22511
|
{
|
|
21876
22512
|
name: "skill-evals",
|
|
21877
22513
|
filePath: EVALS_FILE_PATH,
|
|
21878
|
-
buildContent: buildSkillEvals
|
|
22514
|
+
buildContent: buildSkillEvals,
|
|
22515
|
+
checkContent: true
|
|
21879
22516
|
}
|
|
21880
22517
|
];
|
|
21881
22518
|
async function pathExists5(path, stat) {
|
|
@@ -21989,6 +22626,28 @@ async function validateCommand(input, dependencies = {}) {
|
|
|
21989
22626
|
for (const fixableFile of FIXABLE_FILES) {
|
|
21990
22627
|
const absoluteFilePath = (0, import_node_path10.join)(rootDirectory, fixableFile.filePath);
|
|
21991
22628
|
if (await pathExists5(absoluteFilePath, stat)) {
|
|
22629
|
+
if (fixableFile.checkContent) {
|
|
22630
|
+
const currentContents = await readFile(absoluteFilePath);
|
|
22631
|
+
const expectedContents = fixableFile.buildContent();
|
|
22632
|
+
if (currentContents !== expectedContents) {
|
|
22633
|
+
if (input.fix === true) {
|
|
22634
|
+
await writeFile(absoluteFilePath, expectedContents);
|
|
22635
|
+
checks.push({
|
|
22636
|
+
name: fixableFile.name,
|
|
22637
|
+
status: "ok",
|
|
22638
|
+
message: `Updated stale ${fixableFile.filePath}`
|
|
22639
|
+
});
|
|
22640
|
+
continue;
|
|
22641
|
+
}
|
|
22642
|
+
autoFixAvailable = true;
|
|
22643
|
+
checks.push({
|
|
22644
|
+
name: fixableFile.name,
|
|
22645
|
+
status: "warning",
|
|
22646
|
+
message: `Stale ${fixableFile.filePath}; run debugbundle validate --fix to refresh it.`
|
|
22647
|
+
});
|
|
22648
|
+
continue;
|
|
22649
|
+
}
|
|
22650
|
+
}
|
|
21992
22651
|
checks.push({
|
|
21993
22652
|
name: fixableFile.name,
|
|
21994
22653
|
status: "ok",
|
|
@@ -22074,6 +22733,7 @@ function createAlertMcpTools(api) {
|
|
|
22074
22733
|
try {
|
|
22075
22734
|
const requestInput = {
|
|
22076
22735
|
bearerToken: String(input["bearerToken"]),
|
|
22736
|
+
projectId: String(input["projectId"]),
|
|
22077
22737
|
alertId: String(input["alertId"])
|
|
22078
22738
|
};
|
|
22079
22739
|
if (typeof input["serviceId"] === "string") {
|
|
@@ -22108,6 +22768,7 @@ function createAlertMcpTools(api) {
|
|
|
22108
22768
|
return {
|
|
22109
22769
|
alert: await api.deleteAlert({
|
|
22110
22770
|
bearerToken: String(input["bearerToken"]),
|
|
22771
|
+
projectId: String(input["projectId"]),
|
|
22111
22772
|
alertId: String(input["alertId"])
|
|
22112
22773
|
})
|
|
22113
22774
|
};
|
|
@@ -22255,8 +22916,11 @@ function createGitHubMcpTools(api) {
|
|
|
22255
22916
|
async get_github_status(input) {
|
|
22256
22917
|
try {
|
|
22257
22918
|
const bearerToken = String(input["bearerToken"]);
|
|
22258
|
-
const installation = await api.getInstallation({ bearerToken });
|
|
22259
22919
|
const projectId = typeof input["projectId"] === "string" ? input["projectId"] : void 0;
|
|
22920
|
+
const installation = await api.getInstallation({
|
|
22921
|
+
bearerToken,
|
|
22922
|
+
...projectId === void 0 ? {} : { projectId }
|
|
22923
|
+
});
|
|
22260
22924
|
const repo = projectId === void 0 || api.getProjectRepo === void 0 ? void 0 : await api.getProjectRepo({ bearerToken, projectId });
|
|
22261
22925
|
return repo === void 0 ? { installation } : { installation, repo };
|
|
22262
22926
|
} catch (error) {
|
|
@@ -22267,7 +22931,8 @@ function createGitHubMcpTools(api) {
|
|
|
22267
22931
|
try {
|
|
22268
22932
|
return {
|
|
22269
22933
|
repositories: await api.listRepositories({
|
|
22270
|
-
bearerToken: String(input["bearerToken"])
|
|
22934
|
+
bearerToken: String(input["bearerToken"]),
|
|
22935
|
+
...typeof input["projectId"] === "string" ? { projectId: input["projectId"] } : {}
|
|
22271
22936
|
})
|
|
22272
22937
|
};
|
|
22273
22938
|
} catch (error) {
|
|
@@ -22403,8 +23068,134 @@ function createGitHubMcpTools(api) {
|
|
|
22403
23068
|
};
|
|
22404
23069
|
}
|
|
22405
23070
|
|
|
22406
|
-
// src/
|
|
23071
|
+
// src/improvement-tools.ts
|
|
22407
23072
|
function mapMcpError6(error) {
|
|
23073
|
+
if (error instanceof RetrievalApiError) {
|
|
23074
|
+
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23075
|
+
}
|
|
23076
|
+
throw new Error("mcp_tool_error:unknown_error");
|
|
23077
|
+
}
|
|
23078
|
+
function requireBearerToken(input) {
|
|
23079
|
+
const bearerToken = input["bearerToken"];
|
|
23080
|
+
if (typeof bearerToken !== "string" || bearerToken.length === 0) {
|
|
23081
|
+
throw new RetrievalApiError(401, "auth_required");
|
|
23082
|
+
}
|
|
23083
|
+
return bearerToken;
|
|
23084
|
+
}
|
|
23085
|
+
function readString2(input, key) {
|
|
23086
|
+
const value = input[key];
|
|
23087
|
+
return typeof value === "string" ? value : "";
|
|
23088
|
+
}
|
|
23089
|
+
function createImprovementMcpTools(api) {
|
|
23090
|
+
return {
|
|
23091
|
+
async list_improvements(input) {
|
|
23092
|
+
try {
|
|
23093
|
+
return await api.listImprovements({
|
|
23094
|
+
bearerToken: requireBearerToken(input),
|
|
23095
|
+
...typeof input["projectId"] === "string" ? { projectId: input["projectId"] } : {},
|
|
23096
|
+
...typeof input["environment"] === "string" ? { environment: input["environment"] } : {},
|
|
23097
|
+
...typeof input["service"] === "string" ? { service: input["service"] } : {},
|
|
23098
|
+
...typeof input["status"] === "string" ? { status: input["status"] } : {},
|
|
23099
|
+
...typeof input["severity"] === "string" ? { severity: input["severity"] } : {},
|
|
23100
|
+
...typeof input["kind"] === "string" ? { kind: input["kind"] } : {},
|
|
23101
|
+
...typeof input["cursor"] === "string" ? { cursor: input["cursor"] } : {},
|
|
23102
|
+
...typeof input["limit"] === "number" ? { limit: input["limit"] } : {}
|
|
23103
|
+
});
|
|
23104
|
+
} catch (error) {
|
|
23105
|
+
mapMcpError6(error);
|
|
23106
|
+
}
|
|
23107
|
+
},
|
|
23108
|
+
async get_improvement(input) {
|
|
23109
|
+
try {
|
|
23110
|
+
return await api.getImprovement({
|
|
23111
|
+
bearerToken: requireBearerToken(input),
|
|
23112
|
+
improvementId: readString2(input, "improvementId")
|
|
23113
|
+
});
|
|
23114
|
+
} catch (error) {
|
|
23115
|
+
mapMcpError6(error);
|
|
23116
|
+
}
|
|
23117
|
+
},
|
|
23118
|
+
async get_improvement_bundle(input) {
|
|
23119
|
+
try {
|
|
23120
|
+
return await api.getImprovementBundle({
|
|
23121
|
+
bearerToken: requireBearerToken(input),
|
|
23122
|
+
projectId: readString2(input, "projectId"),
|
|
23123
|
+
improvementId: readString2(input, "improvementId")
|
|
23124
|
+
});
|
|
23125
|
+
} catch (error) {
|
|
23126
|
+
mapMcpError6(error);
|
|
23127
|
+
}
|
|
23128
|
+
},
|
|
23129
|
+
async resolve_improvement(input) {
|
|
23130
|
+
try {
|
|
23131
|
+
return await api.resolveImprovement({
|
|
23132
|
+
bearerToken: requireBearerToken(input),
|
|
23133
|
+
improvementId: readString2(input, "improvementId")
|
|
23134
|
+
});
|
|
23135
|
+
} catch (error) {
|
|
23136
|
+
mapMcpError6(error);
|
|
23137
|
+
}
|
|
23138
|
+
},
|
|
23139
|
+
async reopen_improvement(input) {
|
|
23140
|
+
try {
|
|
23141
|
+
return await api.reopenImprovement({
|
|
23142
|
+
bearerToken: requireBearerToken(input),
|
|
23143
|
+
improvementId: readString2(input, "improvementId")
|
|
23144
|
+
});
|
|
23145
|
+
} catch (error) {
|
|
23146
|
+
mapMcpError6(error);
|
|
23147
|
+
}
|
|
23148
|
+
},
|
|
23149
|
+
async snooze_improvement(input) {
|
|
23150
|
+
try {
|
|
23151
|
+
return await api.snoozeImprovement({
|
|
23152
|
+
bearerToken: requireBearerToken(input),
|
|
23153
|
+
improvementId: readString2(input, "improvementId"),
|
|
23154
|
+
snoozedUntil: readString2(input, "snoozedUntil")
|
|
23155
|
+
});
|
|
23156
|
+
} catch (error) {
|
|
23157
|
+
mapMcpError6(error);
|
|
23158
|
+
}
|
|
23159
|
+
}
|
|
23160
|
+
};
|
|
23161
|
+
}
|
|
23162
|
+
|
|
23163
|
+
// src/improvement-settings-tools.ts
|
|
23164
|
+
function mapMcpError7(error) {
|
|
23165
|
+
if (error instanceof ImprovementSettingsApiError) {
|
|
23166
|
+
throw new Error(`mcp_tool_error:${error.message}`);
|
|
23167
|
+
}
|
|
23168
|
+
throw new Error("mcp_tool_error:unknown_error");
|
|
23169
|
+
}
|
|
23170
|
+
function createImprovementSettingsMcpTools(api) {
|
|
23171
|
+
return {
|
|
23172
|
+
async get_improvement_settings(input) {
|
|
23173
|
+
try {
|
|
23174
|
+
return await api.getImprovementSettings({
|
|
23175
|
+
bearerToken: String(input["bearerToken"]),
|
|
23176
|
+
projectId: String(input["projectId"])
|
|
23177
|
+
});
|
|
23178
|
+
} catch (error) {
|
|
23179
|
+
mapMcpError7(error);
|
|
23180
|
+
}
|
|
23181
|
+
},
|
|
23182
|
+
async update_improvement_settings(input) {
|
|
23183
|
+
try {
|
|
23184
|
+
const update = typeof input["update"] === "object" && input["update"] !== null ? input["update"] : {};
|
|
23185
|
+
return await api.updateImprovementSettings({
|
|
23186
|
+
bearerToken: String(input["bearerToken"]),
|
|
23187
|
+
projectId: String(input["projectId"]),
|
|
23188
|
+
update
|
|
23189
|
+
});
|
|
23190
|
+
} catch (error) {
|
|
23191
|
+
mapMcpError7(error);
|
|
23192
|
+
}
|
|
23193
|
+
}
|
|
23194
|
+
};
|
|
23195
|
+
}
|
|
23196
|
+
|
|
23197
|
+
// src/member-tools.ts
|
|
23198
|
+
function mapMcpError8(error) {
|
|
22408
23199
|
if (error instanceof MemberApiError) {
|
|
22409
23200
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
22410
23201
|
}
|
|
@@ -22412,71 +23203,77 @@ function mapMcpError6(error) {
|
|
|
22412
23203
|
}
|
|
22413
23204
|
function createMemberMcpTools(api) {
|
|
22414
23205
|
return {
|
|
22415
|
-
async
|
|
23206
|
+
async list_project_members(input) {
|
|
22416
23207
|
try {
|
|
22417
23208
|
return await api.listMembers({
|
|
22418
|
-
bearerToken: String(input["bearerToken"])
|
|
23209
|
+
bearerToken: String(input["bearerToken"]),
|
|
23210
|
+
projectId: String(input["projectId"])
|
|
22419
23211
|
});
|
|
22420
23212
|
} catch (error) {
|
|
22421
|
-
|
|
23213
|
+
mapMcpError8(error);
|
|
22422
23214
|
}
|
|
22423
23215
|
},
|
|
22424
|
-
async
|
|
23216
|
+
async list_project_member_invites(input) {
|
|
22425
23217
|
try {
|
|
22426
23218
|
return await api.listInvites({
|
|
22427
|
-
bearerToken: String(input["bearerToken"])
|
|
23219
|
+
bearerToken: String(input["bearerToken"]),
|
|
23220
|
+
projectId: String(input["projectId"])
|
|
22428
23221
|
});
|
|
22429
23222
|
} catch (error) {
|
|
22430
|
-
|
|
23223
|
+
mapMcpError8(error);
|
|
22431
23224
|
}
|
|
22432
23225
|
},
|
|
22433
|
-
async
|
|
23226
|
+
async invite_project_member(input) {
|
|
22434
23227
|
try {
|
|
22435
23228
|
return await api.inviteMember({
|
|
22436
23229
|
bearerToken: String(input["bearerToken"]),
|
|
23230
|
+
projectId: String(input["projectId"]),
|
|
22437
23231
|
email: String(input["email"]),
|
|
22438
23232
|
role: String(input["role"])
|
|
22439
23233
|
});
|
|
22440
23234
|
} catch (error) {
|
|
22441
|
-
|
|
23235
|
+
mapMcpError8(error);
|
|
22442
23236
|
}
|
|
22443
23237
|
},
|
|
22444
|
-
async
|
|
23238
|
+
async cancel_project_member_invite(input) {
|
|
22445
23239
|
try {
|
|
22446
23240
|
return await api.cancelInvite({
|
|
22447
23241
|
bearerToken: String(input["bearerToken"]),
|
|
23242
|
+
projectId: String(input["projectId"]),
|
|
22448
23243
|
inviteId: String(input["inviteId"])
|
|
22449
23244
|
});
|
|
22450
23245
|
} catch (error) {
|
|
22451
|
-
|
|
23246
|
+
mapMcpError8(error);
|
|
22452
23247
|
}
|
|
22453
23248
|
},
|
|
22454
|
-
async
|
|
23249
|
+
async update_project_member_role(input) {
|
|
22455
23250
|
try {
|
|
22456
23251
|
return await api.updateMemberRole({
|
|
22457
23252
|
bearerToken: String(input["bearerToken"]),
|
|
23253
|
+
projectId: String(input["projectId"]),
|
|
22458
23254
|
userId: String(input["userId"]),
|
|
22459
23255
|
role: String(input["role"])
|
|
22460
23256
|
});
|
|
22461
23257
|
} catch (error) {
|
|
22462
|
-
|
|
23258
|
+
mapMcpError8(error);
|
|
22463
23259
|
}
|
|
22464
23260
|
},
|
|
22465
|
-
async
|
|
23261
|
+
async remove_project_member(input) {
|
|
22466
23262
|
try {
|
|
22467
23263
|
return await api.removeMember({
|
|
22468
23264
|
bearerToken: String(input["bearerToken"]),
|
|
23265
|
+
projectId: String(input["projectId"]),
|
|
22469
23266
|
userId: String(input["userId"])
|
|
22470
23267
|
});
|
|
22471
23268
|
} catch (error) {
|
|
22472
|
-
|
|
23269
|
+
mapMcpError8(error);
|
|
22473
23270
|
}
|
|
22474
23271
|
}
|
|
22475
23272
|
};
|
|
22476
23273
|
}
|
|
22477
23274
|
|
|
22478
23275
|
// src/probe-tools.ts
|
|
22479
|
-
function
|
|
23276
|
+
function mapMcpError9(error) {
|
|
22480
23277
|
if (error instanceof ProbeApiError) {
|
|
22481
23278
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
22482
23279
|
}
|
|
@@ -22505,7 +23302,7 @@ function createProbeMcpTools(api) {
|
|
|
22505
23302
|
}
|
|
22506
23303
|
return await api.activateProbe(requestInput);
|
|
22507
23304
|
} catch (error) {
|
|
22508
|
-
|
|
23305
|
+
mapMcpError9(error);
|
|
22509
23306
|
}
|
|
22510
23307
|
},
|
|
22511
23308
|
async list_active_probes(input) {
|
|
@@ -22515,7 +23312,7 @@ function createProbeMcpTools(api) {
|
|
|
22515
23312
|
projectId: String(input["projectId"])
|
|
22516
23313
|
});
|
|
22517
23314
|
} catch (error) {
|
|
22518
|
-
|
|
23315
|
+
mapMcpError9(error);
|
|
22519
23316
|
}
|
|
22520
23317
|
},
|
|
22521
23318
|
async deactivate_probe(input) {
|
|
@@ -22526,14 +23323,14 @@ function createProbeMcpTools(api) {
|
|
|
22526
23323
|
activationId: String(input["activationId"])
|
|
22527
23324
|
});
|
|
22528
23325
|
} catch (error) {
|
|
22529
|
-
|
|
23326
|
+
mapMcpError9(error);
|
|
22530
23327
|
}
|
|
22531
23328
|
}
|
|
22532
23329
|
};
|
|
22533
23330
|
}
|
|
22534
23331
|
|
|
22535
23332
|
// src/project-tools.ts
|
|
22536
|
-
function
|
|
23333
|
+
function mapMcpError10(error) {
|
|
22537
23334
|
if (error instanceof ProjectManagementApiError) {
|
|
22538
23335
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
22539
23336
|
}
|
|
@@ -22551,7 +23348,7 @@ function createProjectMcpTools(api) {
|
|
|
22551
23348
|
}
|
|
22552
23349
|
return { projects: await api.listProjects(requestInput) };
|
|
22553
23350
|
} catch (error) {
|
|
22554
|
-
|
|
23351
|
+
mapMcpError10(error);
|
|
22555
23352
|
}
|
|
22556
23353
|
},
|
|
22557
23354
|
async create_project(input) {
|
|
@@ -22566,7 +23363,7 @@ function createProjectMcpTools(api) {
|
|
|
22566
23363
|
}
|
|
22567
23364
|
return { project: await api.createProject(requestInput) };
|
|
22568
23365
|
} catch (error) {
|
|
22569
|
-
|
|
23366
|
+
mapMcpError10(error);
|
|
22570
23367
|
}
|
|
22571
23368
|
},
|
|
22572
23369
|
async update_project(input) {
|
|
@@ -22586,7 +23383,7 @@ function createProjectMcpTools(api) {
|
|
|
22586
23383
|
}
|
|
22587
23384
|
return { project: await api.updateProject(requestInput) };
|
|
22588
23385
|
} catch (error) {
|
|
22589
|
-
|
|
23386
|
+
mapMcpError10(error);
|
|
22590
23387
|
}
|
|
22591
23388
|
},
|
|
22592
23389
|
async delete_project(input) {
|
|
@@ -22598,7 +23395,7 @@ function createProjectMcpTools(api) {
|
|
|
22598
23395
|
})
|
|
22599
23396
|
};
|
|
22600
23397
|
} catch (error) {
|
|
22601
|
-
|
|
23398
|
+
mapMcpError10(error);
|
|
22602
23399
|
}
|
|
22603
23400
|
}
|
|
22604
23401
|
};
|
|
@@ -22805,7 +23602,7 @@ async function persistCloudArtifact(directoryPath, fileName, payload, dependenci
|
|
|
22805
23602
|
}
|
|
22806
23603
|
|
|
22807
23604
|
// src/retrieval-tools.ts
|
|
22808
|
-
function
|
|
23605
|
+
function mapMcpError11(error) {
|
|
22809
23606
|
if (error instanceof RetrievalApiError) {
|
|
22810
23607
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
22811
23608
|
}
|
|
@@ -22987,7 +23784,7 @@ function createRetrievalMcpTools(api) {
|
|
|
22987
23784
|
incidents: incidents.incidents.map((incident) => attachSourceToRecord(incident, "cloud"))
|
|
22988
23785
|
};
|
|
22989
23786
|
} catch (error) {
|
|
22990
|
-
|
|
23787
|
+
mapMcpError11(error);
|
|
22991
23788
|
}
|
|
22992
23789
|
},
|
|
22993
23790
|
async get_incident(input) {
|
|
@@ -23022,7 +23819,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23022
23819
|
)
|
|
23023
23820
|
};
|
|
23024
23821
|
} catch (error) {
|
|
23025
|
-
|
|
23822
|
+
mapMcpError11(error);
|
|
23026
23823
|
}
|
|
23027
23824
|
},
|
|
23028
23825
|
async get_incident_context(input) {
|
|
@@ -23051,7 +23848,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23051
23848
|
"cloud"
|
|
23052
23849
|
);
|
|
23053
23850
|
} catch (error) {
|
|
23054
|
-
|
|
23851
|
+
mapMcpError11(error);
|
|
23055
23852
|
}
|
|
23056
23853
|
},
|
|
23057
23854
|
async resolve_incident(input) {
|
|
@@ -23096,7 +23893,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23096
23893
|
})()
|
|
23097
23894
|
};
|
|
23098
23895
|
} catch (error) {
|
|
23099
|
-
|
|
23896
|
+
mapMcpError11(error);
|
|
23100
23897
|
}
|
|
23101
23898
|
},
|
|
23102
23899
|
async reopen_incident(input) {
|
|
@@ -23141,7 +23938,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23141
23938
|
})()
|
|
23142
23939
|
};
|
|
23143
23940
|
} catch (error) {
|
|
23144
|
-
|
|
23941
|
+
mapMcpError11(error);
|
|
23145
23942
|
}
|
|
23146
23943
|
},
|
|
23147
23944
|
async get_bundle(input) {
|
|
@@ -23172,7 +23969,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23172
23969
|
}
|
|
23173
23970
|
);
|
|
23174
23971
|
} catch (error) {
|
|
23175
|
-
|
|
23972
|
+
mapMcpError11(error);
|
|
23176
23973
|
}
|
|
23177
23974
|
},
|
|
23178
23975
|
async get_logs(input) {
|
|
@@ -23192,7 +23989,7 @@ function createRetrievalMcpTools(api) {
|
|
|
23192
23989
|
}
|
|
23193
23990
|
return await api.getLogs(requestInput);
|
|
23194
23991
|
} catch (error) {
|
|
23195
|
-
|
|
23992
|
+
mapMcpError11(error);
|
|
23196
23993
|
}
|
|
23197
23994
|
},
|
|
23198
23995
|
async get_reproduction(input) {
|
|
@@ -23223,14 +24020,14 @@ function createRetrievalMcpTools(api) {
|
|
|
23223
24020
|
}
|
|
23224
24021
|
);
|
|
23225
24022
|
} catch (error) {
|
|
23226
|
-
|
|
24023
|
+
mapMcpError11(error);
|
|
23227
24024
|
}
|
|
23228
24025
|
}
|
|
23229
24026
|
};
|
|
23230
24027
|
}
|
|
23231
24028
|
|
|
23232
24029
|
// src/services-tools.ts
|
|
23233
|
-
function
|
|
24030
|
+
function mapMcpError12(error) {
|
|
23234
24031
|
if (error instanceof RetrievalApiError) {
|
|
23235
24032
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23236
24033
|
}
|
|
@@ -23251,14 +24048,14 @@ function createServicesMcpTools(api) {
|
|
|
23251
24048
|
services: await api.listServices(requestInput)
|
|
23252
24049
|
};
|
|
23253
24050
|
} catch (error) {
|
|
23254
|
-
|
|
24051
|
+
mapMcpError12(error);
|
|
23255
24052
|
}
|
|
23256
24053
|
}
|
|
23257
24054
|
};
|
|
23258
24055
|
}
|
|
23259
24056
|
|
|
23260
24057
|
// src/setup-tools.ts
|
|
23261
|
-
function
|
|
24058
|
+
function mapMcpError13() {
|
|
23262
24059
|
throw new Error("mcp_tool_error:unknown_error");
|
|
23263
24060
|
}
|
|
23264
24061
|
function parseJsonOutput2(output) {
|
|
@@ -23273,7 +24070,7 @@ async function runJsonCommand2(command) {
|
|
|
23273
24070
|
const result = await command();
|
|
23274
24071
|
return parseJsonOutput2(result.output);
|
|
23275
24072
|
} catch {
|
|
23276
|
-
|
|
24073
|
+
mapMcpError13();
|
|
23277
24074
|
}
|
|
23278
24075
|
}
|
|
23279
24076
|
function createSetupMcpTools(commands) {
|
|
@@ -23332,7 +24129,7 @@ function createSetupMcpTools(commands) {
|
|
|
23332
24129
|
}
|
|
23333
24130
|
|
|
23334
24131
|
// src/slack-tools.ts
|
|
23335
|
-
function
|
|
24132
|
+
function mapMcpError14(error) {
|
|
23336
24133
|
if (error instanceof SlackApiError) {
|
|
23337
24134
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23338
24135
|
}
|
|
@@ -23349,7 +24146,7 @@ function createSlackMcpTools(api) {
|
|
|
23349
24146
|
})
|
|
23350
24147
|
};
|
|
23351
24148
|
} catch (error) {
|
|
23352
|
-
|
|
24149
|
+
mapMcpError14(error);
|
|
23353
24150
|
}
|
|
23354
24151
|
},
|
|
23355
24152
|
async get_slack_connect_url(input) {
|
|
@@ -23362,7 +24159,7 @@ function createSlackMcpTools(api) {
|
|
|
23362
24159
|
})
|
|
23363
24160
|
};
|
|
23364
24161
|
} catch (error) {
|
|
23365
|
-
|
|
24162
|
+
mapMcpError14(error);
|
|
23366
24163
|
}
|
|
23367
24164
|
},
|
|
23368
24165
|
async test_slack_destination(input) {
|
|
@@ -23375,7 +24172,7 @@ function createSlackMcpTools(api) {
|
|
|
23375
24172
|
})
|
|
23376
24173
|
};
|
|
23377
24174
|
} catch (error) {
|
|
23378
|
-
|
|
24175
|
+
mapMcpError14(error);
|
|
23379
24176
|
}
|
|
23380
24177
|
},
|
|
23381
24178
|
async delete_slack_destination(input) {
|
|
@@ -23388,14 +24185,14 @@ function createSlackMcpTools(api) {
|
|
|
23388
24185
|
})
|
|
23389
24186
|
};
|
|
23390
24187
|
} catch (error) {
|
|
23391
|
-
|
|
24188
|
+
mapMcpError14(error);
|
|
23392
24189
|
}
|
|
23393
24190
|
}
|
|
23394
24191
|
};
|
|
23395
24192
|
}
|
|
23396
24193
|
|
|
23397
24194
|
// src/token-tools.ts
|
|
23398
|
-
function
|
|
24195
|
+
function mapMcpError15(error) {
|
|
23399
24196
|
if (error instanceof TokenManagementApiError) {
|
|
23400
24197
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23401
24198
|
}
|
|
@@ -23416,20 +24213,22 @@ function createTokenMcpTools(api) {
|
|
|
23416
24213
|
tokens: await api.listProjectTokens(requestInput)
|
|
23417
24214
|
};
|
|
23418
24215
|
} catch (error) {
|
|
23419
|
-
|
|
24216
|
+
mapMcpError15(error);
|
|
23420
24217
|
}
|
|
23421
24218
|
},
|
|
23422
24219
|
async create_project_token(input) {
|
|
23423
24220
|
try {
|
|
24221
|
+
const allowedOrigins = Array.isArray(input["allowedOrigins"]) ? input["allowedOrigins"].map((value) => String(value)) : void 0;
|
|
23424
24222
|
return {
|
|
23425
24223
|
token: await api.createProjectToken({
|
|
23426
24224
|
bearerToken: String(input["bearerToken"]),
|
|
23427
24225
|
projectId: String(input["projectId"]),
|
|
23428
|
-
label: String(input["label"])
|
|
24226
|
+
label: String(input["label"]),
|
|
24227
|
+
...allowedOrigins === void 0 ? {} : { allowedOrigins }
|
|
23429
24228
|
})
|
|
23430
24229
|
};
|
|
23431
24230
|
} catch (error) {
|
|
23432
|
-
|
|
24231
|
+
mapMcpError15(error);
|
|
23433
24232
|
}
|
|
23434
24233
|
},
|
|
23435
24234
|
async revoke_project_token(input) {
|
|
@@ -23442,7 +24241,7 @@ function createTokenMcpTools(api) {
|
|
|
23442
24241
|
})
|
|
23443
24242
|
};
|
|
23444
24243
|
} catch (error) {
|
|
23445
|
-
|
|
24244
|
+
mapMcpError15(error);
|
|
23446
24245
|
}
|
|
23447
24246
|
},
|
|
23448
24247
|
async list_member_tokens(input) {
|
|
@@ -23457,7 +24256,7 @@ function createTokenMcpTools(api) {
|
|
|
23457
24256
|
tokens: await api.listMemberTokens(requestInput)
|
|
23458
24257
|
};
|
|
23459
24258
|
} catch (error) {
|
|
23460
|
-
|
|
24259
|
+
mapMcpError15(error);
|
|
23461
24260
|
}
|
|
23462
24261
|
},
|
|
23463
24262
|
async create_member_token(input) {
|
|
@@ -23469,7 +24268,7 @@ function createTokenMcpTools(api) {
|
|
|
23469
24268
|
})
|
|
23470
24269
|
};
|
|
23471
24270
|
} catch (error) {
|
|
23472
|
-
|
|
24271
|
+
mapMcpError15(error);
|
|
23473
24272
|
}
|
|
23474
24273
|
},
|
|
23475
24274
|
async revoke_member_token(input) {
|
|
@@ -23481,14 +24280,14 @@ function createTokenMcpTools(api) {
|
|
|
23481
24280
|
})
|
|
23482
24281
|
};
|
|
23483
24282
|
} catch (error) {
|
|
23484
|
-
|
|
24283
|
+
mapMcpError15(error);
|
|
23485
24284
|
}
|
|
23486
24285
|
}
|
|
23487
24286
|
};
|
|
23488
24287
|
}
|
|
23489
24288
|
|
|
23490
24289
|
// src/webhook-tools.ts
|
|
23491
|
-
function
|
|
24290
|
+
function mapMcpError16(error) {
|
|
23492
24291
|
if (error instanceof WebhookApiError) {
|
|
23493
24292
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23494
24293
|
}
|
|
@@ -23509,7 +24308,7 @@ function createWebhookMcpTools(api) {
|
|
|
23509
24308
|
webhooks: await api.listWebhooks(requestInput)
|
|
23510
24309
|
};
|
|
23511
24310
|
} catch (error) {
|
|
23512
|
-
|
|
24311
|
+
mapMcpError16(error);
|
|
23513
24312
|
}
|
|
23514
24313
|
},
|
|
23515
24314
|
async create_webhook(input) {
|
|
@@ -23530,13 +24329,14 @@ function createWebhookMcpTools(api) {
|
|
|
23530
24329
|
webhook: await api.createWebhook(requestInput)
|
|
23531
24330
|
};
|
|
23532
24331
|
} catch (error) {
|
|
23533
|
-
|
|
24332
|
+
mapMcpError16(error);
|
|
23534
24333
|
}
|
|
23535
24334
|
},
|
|
23536
24335
|
async update_webhook(input) {
|
|
23537
24336
|
try {
|
|
23538
24337
|
const requestInput = {
|
|
23539
24338
|
bearerToken: String(input["bearerToken"]),
|
|
24339
|
+
projectId: String(input["projectId"]),
|
|
23540
24340
|
webhookId: String(input["webhookId"])
|
|
23541
24341
|
};
|
|
23542
24342
|
if (typeof input["url"] === "string") {
|
|
@@ -23555,7 +24355,7 @@ function createWebhookMcpTools(api) {
|
|
|
23555
24355
|
webhook: await api.updateWebhook(requestInput)
|
|
23556
24356
|
};
|
|
23557
24357
|
} catch (error) {
|
|
23558
|
-
|
|
24358
|
+
mapMcpError16(error);
|
|
23559
24359
|
}
|
|
23560
24360
|
},
|
|
23561
24361
|
async delete_webhook(input) {
|
|
@@ -23563,17 +24363,19 @@ function createWebhookMcpTools(api) {
|
|
|
23563
24363
|
return {
|
|
23564
24364
|
webhook: await api.deleteWebhook({
|
|
23565
24365
|
bearerToken: String(input["bearerToken"]),
|
|
24366
|
+
projectId: String(input["projectId"]),
|
|
23566
24367
|
webhookId: String(input["webhookId"])
|
|
23567
24368
|
})
|
|
23568
24369
|
};
|
|
23569
24370
|
} catch (error) {
|
|
23570
|
-
|
|
24371
|
+
mapMcpError16(error);
|
|
23571
24372
|
}
|
|
23572
24373
|
},
|
|
23573
24374
|
async test_webhook(input) {
|
|
23574
24375
|
try {
|
|
23575
24376
|
const requestInput = {
|
|
23576
24377
|
bearerToken: String(input["bearerToken"]),
|
|
24378
|
+
projectId: String(input["projectId"]),
|
|
23577
24379
|
webhookId: String(input["webhookId"])
|
|
23578
24380
|
};
|
|
23579
24381
|
if (input["eventType"] === "verification.passed" || input["eventType"] === "verification.failed") {
|
|
@@ -23583,13 +24385,14 @@ function createWebhookMcpTools(api) {
|
|
|
23583
24385
|
delivery: await api.testWebhook(requestInput)
|
|
23584
24386
|
};
|
|
23585
24387
|
} catch (error) {
|
|
23586
|
-
|
|
24388
|
+
mapMcpError16(error);
|
|
23587
24389
|
}
|
|
23588
24390
|
},
|
|
23589
24391
|
async list_webhook_deliveries(input) {
|
|
23590
24392
|
try {
|
|
23591
24393
|
const requestInput = {
|
|
23592
24394
|
bearerToken: String(input["bearerToken"]),
|
|
24395
|
+
projectId: String(input["projectId"]),
|
|
23593
24396
|
webhookId: String(input["webhookId"])
|
|
23594
24397
|
};
|
|
23595
24398
|
if (typeof input["limit"] === "number") {
|
|
@@ -23599,25 +24402,26 @@ function createWebhookMcpTools(api) {
|
|
|
23599
24402
|
deliveries: await api.listWebhookDeliveries(requestInput)
|
|
23600
24403
|
};
|
|
23601
24404
|
} catch (error) {
|
|
23602
|
-
|
|
24405
|
+
mapMcpError16(error);
|
|
23603
24406
|
}
|
|
23604
24407
|
},
|
|
23605
24408
|
async retry_webhook_delivery(input) {
|
|
23606
24409
|
try {
|
|
23607
24410
|
return await api.retryWebhookDelivery({
|
|
23608
24411
|
bearerToken: String(input["bearerToken"]),
|
|
24412
|
+
projectId: String(input["projectId"]),
|
|
23609
24413
|
webhookId: String(input["webhookId"]),
|
|
23610
24414
|
deliveryId: String(input["deliveryId"])
|
|
23611
24415
|
});
|
|
23612
24416
|
} catch (error) {
|
|
23613
|
-
|
|
24417
|
+
mapMcpError16(error);
|
|
23614
24418
|
}
|
|
23615
24419
|
}
|
|
23616
24420
|
};
|
|
23617
24421
|
}
|
|
23618
24422
|
|
|
23619
24423
|
// src/weekly-report-tools.ts
|
|
23620
|
-
function
|
|
24424
|
+
function mapMcpError17(error) {
|
|
23621
24425
|
if (error instanceof WeeklyReportApiError) {
|
|
23622
24426
|
throw new Error(`mcp_tool_error:${error.code}`);
|
|
23623
24427
|
}
|
|
@@ -23635,7 +24439,7 @@ function createWeeklyReportMcpTools(api) {
|
|
|
23635
24439
|
})
|
|
23636
24440
|
};
|
|
23637
24441
|
} catch (error) {
|
|
23638
|
-
|
|
24442
|
+
mapMcpError17(error);
|
|
23639
24443
|
}
|
|
23640
24444
|
},
|
|
23641
24445
|
async create_weekly_report_channel(input) {
|
|
@@ -23651,7 +24455,7 @@ function createWeeklyReportMcpTools(api) {
|
|
|
23651
24455
|
})
|
|
23652
24456
|
};
|
|
23653
24457
|
} catch (error) {
|
|
23654
|
-
|
|
24458
|
+
mapMcpError17(error);
|
|
23655
24459
|
}
|
|
23656
24460
|
},
|
|
23657
24461
|
async update_weekly_report_channel(input) {
|
|
@@ -23666,7 +24470,7 @@ function createWeeklyReportMcpTools(api) {
|
|
|
23666
24470
|
})
|
|
23667
24471
|
};
|
|
23668
24472
|
} catch (error) {
|
|
23669
|
-
|
|
24473
|
+
mapMcpError17(error);
|
|
23670
24474
|
}
|
|
23671
24475
|
},
|
|
23672
24476
|
async delete_weekly_report_channel(input) {
|
|
@@ -23678,7 +24482,7 @@ function createWeeklyReportMcpTools(api) {
|
|
|
23678
24482
|
})
|
|
23679
24483
|
};
|
|
23680
24484
|
} catch (error) {
|
|
23681
|
-
|
|
24485
|
+
mapMcpError17(error);
|
|
23682
24486
|
}
|
|
23683
24487
|
}
|
|
23684
24488
|
};
|
|
@@ -23726,6 +24530,7 @@ async function createDefaultMcpTools(input = {}) {
|
|
|
23726
24530
|
...retrievalApi,
|
|
23727
24531
|
getLogs: (requestInput) => retrievalApi.listLogs(requestInput)
|
|
23728
24532
|
}),
|
|
24533
|
+
...createImprovementMcpTools(retrievalApi),
|
|
23729
24534
|
...createServicesMcpTools(retrievalApi),
|
|
23730
24535
|
...createTokenMcpTools(createTokenManagementApi(httpClient)),
|
|
23731
24536
|
...createWebhookMcpTools(createWebhookApi(httpClient)),
|
|
@@ -23734,6 +24539,7 @@ async function createDefaultMcpTools(input = {}) {
|
|
|
23734
24539
|
...createAlertMcpTools(createAlertApi(httpClient)),
|
|
23735
24540
|
...createProjectMcpTools(createProjectManagementApi(httpClient)),
|
|
23736
24541
|
...createCapturePolicyMcpTools(createCapturePolicyApi(httpClient)),
|
|
24542
|
+
...createImprovementSettingsMcpTools(createImprovementSettingsApi(httpClient)),
|
|
23737
24543
|
...createProbeMcpTools(createProbeApi(httpClient)),
|
|
23738
24544
|
...createBillingMcpTools(createBillingApi(httpClient)),
|
|
23739
24545
|
...createMemberMcpTools(createMemberApi(httpClient)),
|
|
@@ -25056,6 +25862,10 @@ var incidentLookupInputSchema = external_exports.object({
|
|
|
25056
25862
|
source: sourceSchema,
|
|
25057
25863
|
incidentId: external_exports.string()
|
|
25058
25864
|
});
|
|
25865
|
+
var improvementLookupInputSchema = external_exports.object({
|
|
25866
|
+
bearerToken: external_exports.string(),
|
|
25867
|
+
improvementId: external_exports.string()
|
|
25868
|
+
});
|
|
25059
25869
|
var MCP_TOOL_CATALOG = [
|
|
25060
25870
|
{
|
|
25061
25871
|
name: "doctor",
|
|
@@ -25169,10 +25979,64 @@ var MCP_TOOL_CATALOG = [
|
|
|
25169
25979
|
limit: external_exports.number().optional()
|
|
25170
25980
|
})
|
|
25171
25981
|
},
|
|
25982
|
+
{
|
|
25983
|
+
name: "list_improvements",
|
|
25984
|
+
group: "improvements",
|
|
25985
|
+
description: "List hosted improvement opportunities for the current workspace or a specific project.",
|
|
25986
|
+
inputSchema: external_exports.object({
|
|
25987
|
+
bearerToken: external_exports.string(),
|
|
25988
|
+
projectId: external_exports.string().optional(),
|
|
25989
|
+
environment: external_exports.string().optional(),
|
|
25990
|
+
service: external_exports.string().optional(),
|
|
25991
|
+
status: external_exports.string().optional(),
|
|
25992
|
+
severity: external_exports.string().optional(),
|
|
25993
|
+
kind: external_exports.string().optional(),
|
|
25994
|
+
cursor: external_exports.string().optional(),
|
|
25995
|
+
limit: external_exports.number().optional()
|
|
25996
|
+
})
|
|
25997
|
+
},
|
|
25998
|
+
{
|
|
25999
|
+
name: "get_improvement",
|
|
26000
|
+
group: "improvements",
|
|
26001
|
+
description: "Fetch a single hosted improvement opportunity by id.",
|
|
26002
|
+
inputSchema: improvementLookupInputSchema
|
|
26003
|
+
},
|
|
26004
|
+
{
|
|
26005
|
+
name: "get_improvement_bundle",
|
|
26006
|
+
group: "improvements",
|
|
26007
|
+
description: "Fetch the hosted improvement bundle artifact for a project improvement opportunity.",
|
|
26008
|
+
inputSchema: external_exports.object({
|
|
26009
|
+
bearerToken: external_exports.string(),
|
|
26010
|
+
projectId: external_exports.string(),
|
|
26011
|
+
improvementId: external_exports.string()
|
|
26012
|
+
})
|
|
26013
|
+
},
|
|
26014
|
+
{
|
|
26015
|
+
name: "resolve_improvement",
|
|
26016
|
+
group: "improvements",
|
|
26017
|
+
description: "Resolve a hosted improvement opportunity.",
|
|
26018
|
+
inputSchema: improvementLookupInputSchema
|
|
26019
|
+
},
|
|
26020
|
+
{
|
|
26021
|
+
name: "reopen_improvement",
|
|
26022
|
+
group: "improvements",
|
|
26023
|
+
description: "Reopen a hosted improvement opportunity.",
|
|
26024
|
+
inputSchema: improvementLookupInputSchema
|
|
26025
|
+
},
|
|
26026
|
+
{
|
|
26027
|
+
name: "snooze_improvement",
|
|
26028
|
+
group: "improvements",
|
|
26029
|
+
description: "Snooze a hosted improvement opportunity until an ISO8601 timestamp.",
|
|
26030
|
+
inputSchema: external_exports.object({
|
|
26031
|
+
bearerToken: external_exports.string(),
|
|
26032
|
+
improvementId: external_exports.string(),
|
|
26033
|
+
snoozedUntil: external_exports.string()
|
|
26034
|
+
})
|
|
26035
|
+
},
|
|
25172
26036
|
{
|
|
25173
26037
|
name: "get_github_status",
|
|
25174
26038
|
group: "github",
|
|
25175
|
-
description: "Get the
|
|
26039
|
+
description: "Get the project GitHub App installation status and optional project repo assignment.",
|
|
25176
26040
|
inputSchema: external_exports.object({
|
|
25177
26041
|
bearerToken: external_exports.string(),
|
|
25178
26042
|
projectId: external_exports.string().optional()
|
|
@@ -25181,9 +26045,10 @@ var MCP_TOOL_CATALOG = [
|
|
|
25181
26045
|
{
|
|
25182
26046
|
name: "list_github_repositories",
|
|
25183
26047
|
group: "github",
|
|
25184
|
-
description: "List repositories available to the
|
|
26048
|
+
description: "List repositories available to the project GitHub App installation for owner/admin callers.",
|
|
25185
26049
|
inputSchema: external_exports.object({
|
|
25186
|
-
bearerToken: external_exports.string()
|
|
26050
|
+
bearerToken: external_exports.string(),
|
|
26051
|
+
projectId: external_exports.string().optional()
|
|
25187
26052
|
})
|
|
25188
26053
|
},
|
|
25189
26054
|
{
|
|
@@ -25249,7 +26114,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25249
26114
|
inputSchema: external_exports.object({
|
|
25250
26115
|
bearerToken: external_exports.string(),
|
|
25251
26116
|
projectId: external_exports.string(),
|
|
25252
|
-
status: external_exports.enum(["pending", "retrying", "delivered", "failed"]).optional(),
|
|
26117
|
+
status: external_exports.enum(["pending", "retrying", "delivered", "failed", "skipped"]).optional(),
|
|
25253
26118
|
limit: external_exports.number().optional()
|
|
25254
26119
|
})
|
|
25255
26120
|
},
|
|
@@ -25300,7 +26165,8 @@ var MCP_TOOL_CATALOG = [
|
|
|
25300
26165
|
inputSchema: external_exports.object({
|
|
25301
26166
|
bearerToken: external_exports.string(),
|
|
25302
26167
|
projectId: external_exports.string(),
|
|
25303
|
-
label: external_exports.string()
|
|
26168
|
+
label: external_exports.string(),
|
|
26169
|
+
allowedOrigins: external_exports.array(external_exports.string()).optional()
|
|
25304
26170
|
})
|
|
25305
26171
|
},
|
|
25306
26172
|
{
|
|
@@ -25369,6 +26235,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25369
26235
|
description: "Update a webhook endpoint.",
|
|
25370
26236
|
inputSchema: external_exports.object({
|
|
25371
26237
|
bearerToken: external_exports.string(),
|
|
26238
|
+
projectId: external_exports.string(),
|
|
25372
26239
|
webhookId: external_exports.string(),
|
|
25373
26240
|
url: external_exports.string().optional(),
|
|
25374
26241
|
events: external_exports.array(external_exports.string()).optional(),
|
|
@@ -25382,6 +26249,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25382
26249
|
description: "Delete a webhook endpoint.",
|
|
25383
26250
|
inputSchema: external_exports.object({
|
|
25384
26251
|
bearerToken: external_exports.string(),
|
|
26252
|
+
projectId: external_exports.string(),
|
|
25385
26253
|
webhookId: external_exports.string()
|
|
25386
26254
|
})
|
|
25387
26255
|
},
|
|
@@ -25391,6 +26259,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25391
26259
|
description: "Queue a synthetic webhook delivery.",
|
|
25392
26260
|
inputSchema: external_exports.object({
|
|
25393
26261
|
bearerToken: external_exports.string(),
|
|
26262
|
+
projectId: external_exports.string(),
|
|
25394
26263
|
webhookId: external_exports.string(),
|
|
25395
26264
|
eventType: verificationEventTypeSchema.optional()
|
|
25396
26265
|
})
|
|
@@ -25401,6 +26270,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25401
26270
|
description: "List deliveries for a webhook endpoint.",
|
|
25402
26271
|
inputSchema: external_exports.object({
|
|
25403
26272
|
bearerToken: external_exports.string(),
|
|
26273
|
+
projectId: external_exports.string(),
|
|
25404
26274
|
webhookId: external_exports.string(),
|
|
25405
26275
|
limit: external_exports.number().optional()
|
|
25406
26276
|
})
|
|
@@ -25411,6 +26281,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25411
26281
|
description: "Retry a webhook delivery.",
|
|
25412
26282
|
inputSchema: external_exports.object({
|
|
25413
26283
|
bearerToken: external_exports.string(),
|
|
26284
|
+
projectId: external_exports.string(),
|
|
25414
26285
|
webhookId: external_exports.string(),
|
|
25415
26286
|
deliveryId: external_exports.string()
|
|
25416
26287
|
})
|
|
@@ -25467,7 +26338,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25467
26338
|
{
|
|
25468
26339
|
name: "create_weekly_report_channel",
|
|
25469
26340
|
group: "weekly_reports",
|
|
25470
|
-
description: "Create a weekly report delivery channel.",
|
|
26341
|
+
description: "Create a weekly report delivery channel. Email channel config supports up to 3 recipients in config.to.",
|
|
25471
26342
|
inputSchema: external_exports.object({
|
|
25472
26343
|
bearerToken: external_exports.string(),
|
|
25473
26344
|
projectId: external_exports.string(),
|
|
@@ -25480,7 +26351,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25480
26351
|
{
|
|
25481
26352
|
name: "update_weekly_report_channel",
|
|
25482
26353
|
group: "weekly_reports",
|
|
25483
|
-
description: "Update a weekly report delivery channel.",
|
|
26354
|
+
description: "Update a weekly report delivery channel. Email channel config supports up to 3 recipients in config.to.",
|
|
25484
26355
|
inputSchema: external_exports.object({
|
|
25485
26356
|
bearerToken: external_exports.string(),
|
|
25486
26357
|
channelId: external_exports.string(),
|
|
@@ -25529,6 +26400,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25529
26400
|
description: "Update an alert rule.",
|
|
25530
26401
|
inputSchema: external_exports.object({
|
|
25531
26402
|
bearerToken: external_exports.string(),
|
|
26403
|
+
projectId: external_exports.string(),
|
|
25532
26404
|
alertId: external_exports.string(),
|
|
25533
26405
|
serviceId: external_exports.string().nullable().optional(),
|
|
25534
26406
|
channel: external_exports.string().optional(),
|
|
@@ -25544,6 +26416,7 @@ var MCP_TOOL_CATALOG = [
|
|
|
25544
26416
|
description: "Delete an alert rule.",
|
|
25545
26417
|
inputSchema: external_exports.object({
|
|
25546
26418
|
bearerToken: external_exports.string(),
|
|
26419
|
+
projectId: external_exports.string(),
|
|
25547
26420
|
alertId: external_exports.string()
|
|
25548
26421
|
})
|
|
25549
26422
|
},
|
|
@@ -25614,6 +26487,28 @@ var MCP_TOOL_CATALOG = [
|
|
|
25614
26487
|
})
|
|
25615
26488
|
})
|
|
25616
26489
|
},
|
|
26490
|
+
{
|
|
26491
|
+
name: "get_improvement_settings",
|
|
26492
|
+
group: "improvement_settings",
|
|
26493
|
+
description: "Get automated improvement settings for a project.",
|
|
26494
|
+
inputSchema: external_exports.object({
|
|
26495
|
+
bearerToken: external_exports.string(),
|
|
26496
|
+
projectId: external_exports.string()
|
|
26497
|
+
})
|
|
26498
|
+
},
|
|
26499
|
+
{
|
|
26500
|
+
name: "update_improvement_settings",
|
|
26501
|
+
group: "improvement_settings",
|
|
26502
|
+
description: "Update automated improvement settings for a project.",
|
|
26503
|
+
inputSchema: external_exports.object({
|
|
26504
|
+
bearerToken: external_exports.string(),
|
|
26505
|
+
projectId: external_exports.string(),
|
|
26506
|
+
update: external_exports.object({
|
|
26507
|
+
automated_improvement_bundles_enabled: external_exports.boolean().optional(),
|
|
26508
|
+
improvement_bundle_sensitivity: external_exports.enum(["high_confidence", "balanced", "verbose"]).optional()
|
|
26509
|
+
})
|
|
26510
|
+
})
|
|
26511
|
+
},
|
|
25617
26512
|
{
|
|
25618
26513
|
name: "activate_probe",
|
|
25619
26514
|
group: "probes",
|
|
@@ -25682,56 +26577,62 @@ var MCP_TOOL_CATALOG = [
|
|
|
25682
26577
|
})
|
|
25683
26578
|
},
|
|
25684
26579
|
{
|
|
25685
|
-
name: "
|
|
26580
|
+
name: "list_project_members",
|
|
25686
26581
|
group: "members",
|
|
25687
|
-
description: "List
|
|
26582
|
+
description: "List members for a project.",
|
|
25688
26583
|
inputSchema: external_exports.object({
|
|
25689
|
-
bearerToken: external_exports.string()
|
|
26584
|
+
bearerToken: external_exports.string(),
|
|
26585
|
+
projectId: external_exports.string()
|
|
25690
26586
|
})
|
|
25691
26587
|
},
|
|
25692
26588
|
{
|
|
25693
|
-
name: "
|
|
26589
|
+
name: "list_project_member_invites",
|
|
25694
26590
|
group: "members",
|
|
25695
|
-
description: "List pending
|
|
26591
|
+
description: "List pending invites for a project.",
|
|
25696
26592
|
inputSchema: external_exports.object({
|
|
25697
|
-
bearerToken: external_exports.string()
|
|
26593
|
+
bearerToken: external_exports.string(),
|
|
26594
|
+
projectId: external_exports.string()
|
|
25698
26595
|
})
|
|
25699
26596
|
},
|
|
25700
26597
|
{
|
|
25701
|
-
name: "
|
|
26598
|
+
name: "invite_project_member",
|
|
25702
26599
|
group: "members",
|
|
25703
|
-
description: "Invite a
|
|
26600
|
+
description: "Invite a collaborator to a project.",
|
|
25704
26601
|
inputSchema: external_exports.object({
|
|
25705
26602
|
bearerToken: external_exports.string(),
|
|
26603
|
+
projectId: external_exports.string(),
|
|
25706
26604
|
email: external_exports.string(),
|
|
25707
26605
|
role: external_exports.string()
|
|
25708
26606
|
})
|
|
25709
26607
|
},
|
|
25710
26608
|
{
|
|
25711
|
-
name: "
|
|
26609
|
+
name: "cancel_project_member_invite",
|
|
25712
26610
|
group: "members",
|
|
25713
|
-
description: "Cancel a pending
|
|
26611
|
+
description: "Cancel a pending project invite.",
|
|
25714
26612
|
inputSchema: external_exports.object({
|
|
25715
26613
|
bearerToken: external_exports.string(),
|
|
26614
|
+
projectId: external_exports.string(),
|
|
25716
26615
|
inviteId: external_exports.string()
|
|
25717
26616
|
})
|
|
25718
26617
|
},
|
|
25719
26618
|
{
|
|
25720
|
-
name: "
|
|
26619
|
+
name: "update_project_member_role",
|
|
25721
26620
|
group: "members",
|
|
25722
|
-
description: "Update the role of
|
|
26621
|
+
description: "Update the role of a project collaborator.",
|
|
25723
26622
|
inputSchema: external_exports.object({
|
|
25724
26623
|
bearerToken: external_exports.string(),
|
|
26624
|
+
projectId: external_exports.string(),
|
|
25725
26625
|
userId: external_exports.string(),
|
|
25726
26626
|
role: external_exports.string()
|
|
25727
26627
|
})
|
|
25728
26628
|
},
|
|
25729
26629
|
{
|
|
25730
|
-
name: "
|
|
26630
|
+
name: "remove_project_member",
|
|
25731
26631
|
group: "members",
|
|
25732
|
-
description: "Remove a
|
|
26632
|
+
description: "Remove a collaborator from a project.",
|
|
25733
26633
|
inputSchema: external_exports.object({
|
|
25734
26634
|
bearerToken: external_exports.string(),
|
|
26635
|
+
projectId: external_exports.string(),
|
|
25735
26636
|
userId: external_exports.string()
|
|
25736
26637
|
})
|
|
25737
26638
|
},
|