@debugbundle/mcp 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.cjs CHANGED
@@ -15090,6 +15090,10 @@ function createGitHubManagementApi(client) {
15090
15090
 
15091
15091
  // ../../packages/project-management-client/src/index.ts
15092
15092
  var ProjectMetricsSchema = external_exports.object({
15093
+ open_incidents: external_exports.number().int().nonnegative().default(0),
15094
+ regressed_incidents: external_exports.number().int().nonnegative().default(0),
15095
+ opened_incidents_today: external_exports.number().int().nonnegative().default(0),
15096
+ opened_incidents_month: external_exports.number().int().nonnegative().default(0),
15093
15097
  monthly_bundle_requests: external_exports.number().int().nonnegative(),
15094
15098
  monthly_raw_ingested_events: external_exports.number().int().nonnegative(),
15095
15099
  retained_bundles: external_exports.number().int().nonnegative(),
@@ -15485,6 +15489,9 @@ function createRetrievalApi(client) {
15485
15489
  if (input.severity !== void 0) {
15486
15490
  query.set("severity", input.severity);
15487
15491
  }
15492
+ if (input.firstSeenAfter !== void 0) {
15493
+ query.set("first_seen_after", input.firstSeenAfter);
15494
+ }
15488
15495
  if (input.cursor !== void 0) {
15489
15496
  query.set("cursor", input.cursor);
15490
15497
  }
@@ -16477,6 +16484,113 @@ function createWeeklyReportApi(client) {
16477
16484
  var import_promises2 = require("node:fs/promises");
16478
16485
  var import_node_path2 = require("node:path");
16479
16486
 
16487
+ // ../../packages/shared-types/src/tier-capabilities.ts
16488
+ var TIER_CAPABILITIES = {
16489
+ free: {
16490
+ remote_probes: false,
16491
+ github_automation: false,
16492
+ slack_integration: false,
16493
+ cloud_improvement_bundles: false,
16494
+ shared_dashboards: false,
16495
+ member_invites: false,
16496
+ included_capacity_units: 1,
16497
+ max_members: 1,
16498
+ ingestion_rate_per_min: 1e3,
16499
+ retrieval_rate_per_min: 100,
16500
+ bundle_retention_days: 7,
16501
+ raw_event_retention_days: 7,
16502
+ // Allowance buckets (account-level pool, not per capacity unit)
16503
+ monthly_bundle_requests: 100,
16504
+ monthly_raw_ingested_events: 750,
16505
+ retained_bundle_cap: 50,
16506
+ monthly_remote_activations: 0,
16507
+ monthly_alert_deliveries: 25,
16508
+ monthly_webhook_deliveries: 100,
16509
+ availability_checks_per_project: 1,
16510
+ availability_check_min_interval_seconds: 300
16511
+ },
16512
+ solo: {
16513
+ remote_probes: true,
16514
+ github_automation: true,
16515
+ slack_integration: false,
16516
+ cloud_improvement_bundles: true,
16517
+ shared_dashboards: false,
16518
+ member_invites: false,
16519
+ included_capacity_units: 3,
16520
+ max_members: 1,
16521
+ ingestion_rate_per_min: 5e3,
16522
+ retrieval_rate_per_min: 300,
16523
+ bundle_retention_days: 30,
16524
+ raw_event_retention_days: 14,
16525
+ // Per-unit allowance (multiply by included and purchased capacity units)
16526
+ monthly_bundle_requests: 250,
16527
+ monthly_raw_ingested_events: 3500,
16528
+ retained_bundle_cap: 150,
16529
+ monthly_remote_activations: 25,
16530
+ monthly_alert_deliveries: 75,
16531
+ monthly_webhook_deliveries: 250,
16532
+ availability_checks_per_project: 5,
16533
+ availability_check_min_interval_seconds: 60
16534
+ },
16535
+ team: {
16536
+ remote_probes: true,
16537
+ github_automation: true,
16538
+ slack_integration: true,
16539
+ cloud_improvement_bundles: true,
16540
+ shared_dashboards: true,
16541
+ member_invites: true,
16542
+ included_capacity_units: 15,
16543
+ max_members: 1e3,
16544
+ ingestion_rate_per_min: 1e4,
16545
+ retrieval_rate_per_min: 500,
16546
+ bundle_retention_days: 90,
16547
+ raw_event_retention_days: 30,
16548
+ // Per-unit allowance (multiply by included and purchased capacity units)
16549
+ monthly_bundle_requests: 1e3,
16550
+ monthly_raw_ingested_events: 1e4,
16551
+ retained_bundle_cap: 400,
16552
+ monthly_remote_activations: 50,
16553
+ monthly_alert_deliveries: 300,
16554
+ monthly_webhook_deliveries: 1e3,
16555
+ availability_checks_per_project: 25,
16556
+ availability_check_min_interval_seconds: 30
16557
+ }
16558
+ };
16559
+ var SELFHOST_CAPABILITIES = {
16560
+ remote_probes: true,
16561
+ github_automation: true,
16562
+ slack_integration: true,
16563
+ cloud_improvement_bundles: true,
16564
+ shared_dashboards: true,
16565
+ member_invites: true,
16566
+ included_capacity_units: 1e6,
16567
+ max_members: 1e3,
16568
+ ingestion_rate_per_min: 1e6,
16569
+ retrieval_rate_per_min: 1e5,
16570
+ bundle_retention_days: 36500,
16571
+ raw_event_retention_days: 36500,
16572
+ monthly_bundle_requests: 1e9,
16573
+ monthly_raw_ingested_events: 1e9,
16574
+ retained_bundle_cap: 1e6,
16575
+ monthly_remote_activations: 1e6,
16576
+ monthly_alert_deliveries: 1e6,
16577
+ monthly_webhook_deliveries: 1e6,
16578
+ availability_checks_per_project: 1e6,
16579
+ availability_check_min_interval_seconds: 30
16580
+ };
16581
+ function isSelfHostMode() {
16582
+ return typeof process !== "undefined" && process.env["SELFHOST_MODE"] === "true";
16583
+ }
16584
+ function getTierCapabilities(plan) {
16585
+ if (isSelfHostMode()) {
16586
+ return SELFHOST_CAPABILITIES;
16587
+ }
16588
+ if (plan !== void 0 && plan in TIER_CAPABILITIES) {
16589
+ return TIER_CAPABILITIES[plan];
16590
+ }
16591
+ return TIER_CAPABILITIES.free;
16592
+ }
16593
+
16480
16594
  // ../../packages/shared-types/src/capture-policy.ts
16481
16595
  var EventClassValues = [
16482
16596
  "incident_signal",
@@ -16722,6 +16836,7 @@ function isRouteOnlyExternalProbe(normalizedRoute) {
16722
16836
  "/__debug__/render_panel",
16723
16837
  "/actuator",
16724
16838
  "/autodiscover/autodiscover.json",
16839
+ "/containers/json",
16725
16840
  "/developmentserver/metadatauploader",
16726
16841
  "/cpanel",
16727
16842
  "/favicon.ico",
@@ -19041,6 +19156,189 @@ function createProbeApi(httpClient) {
19041
19156
  };
19042
19157
  }
19043
19158
 
19159
+ // ../cli/src/health-check-commands.ts
19160
+ var HealthCheckApiError = class extends Error {
19161
+ status;
19162
+ code;
19163
+ constructor(status, code) {
19164
+ super(`health_check_api_error: ${status}:${code}`);
19165
+ this.name = "HealthCheckApiError";
19166
+ this.status = status;
19167
+ this.code = code;
19168
+ }
19169
+ };
19170
+ function toApiError6(status, body) {
19171
+ if (typeof body === "object" && body !== null && "error" in body && typeof body.error === "string") {
19172
+ return new HealthCheckApiError(status, body.error);
19173
+ }
19174
+ return new HealthCheckApiError(status, "unknown_error");
19175
+ }
19176
+ function buildCreateRequestBody(input) {
19177
+ const body = {
19178
+ name: input.name,
19179
+ url: input.url,
19180
+ method: input.method,
19181
+ expected_status_min: input.expectedStatusMin,
19182
+ expected_status_max: input.expectedStatusMax,
19183
+ timeout_ms: input.timeoutMs,
19184
+ interval_seconds: input.intervalSeconds,
19185
+ failure_threshold: input.failureThreshold,
19186
+ recovery_threshold: input.recoveryThreshold,
19187
+ enabled: input.enabled
19188
+ };
19189
+ if (input.environment !== void 0) {
19190
+ body["environment"] = input.environment;
19191
+ }
19192
+ if (input.serviceName !== void 0) {
19193
+ body["service_name"] = input.serviceName;
19194
+ }
19195
+ return body;
19196
+ }
19197
+ function buildUpdateRequestBody(input) {
19198
+ const body = {};
19199
+ if (input.name !== void 0) {
19200
+ body["name"] = input.name;
19201
+ }
19202
+ if (input.url !== void 0) {
19203
+ body["url"] = input.url;
19204
+ }
19205
+ if (input.method !== void 0) {
19206
+ body["method"] = input.method;
19207
+ }
19208
+ if (input.expectedStatusMin !== void 0) {
19209
+ body["expected_status_min"] = input.expectedStatusMin;
19210
+ }
19211
+ if (input.expectedStatusMax !== void 0) {
19212
+ body["expected_status_max"] = input.expectedStatusMax;
19213
+ }
19214
+ if (input.timeoutMs !== void 0) {
19215
+ body["timeout_ms"] = input.timeoutMs;
19216
+ }
19217
+ if (input.intervalSeconds !== void 0) {
19218
+ body["interval_seconds"] = input.intervalSeconds;
19219
+ }
19220
+ if (input.failureThreshold !== void 0) {
19221
+ body["failure_threshold"] = input.failureThreshold;
19222
+ }
19223
+ if (input.recoveryThreshold !== void 0) {
19224
+ body["recovery_threshold"] = input.recoveryThreshold;
19225
+ }
19226
+ if (input.environment !== void 0) {
19227
+ body["environment"] = input.environment;
19228
+ }
19229
+ if (input.serviceName !== void 0) {
19230
+ body["service_name"] = input.serviceName;
19231
+ }
19232
+ if (input.enabled !== void 0) {
19233
+ body["enabled"] = input.enabled;
19234
+ }
19235
+ return body;
19236
+ }
19237
+ function createHealthCheckApi(httpClient) {
19238
+ return {
19239
+ async listHealthChecks(input) {
19240
+ const limit = input.limit ?? 100;
19241
+ const response = await httpClient.request({
19242
+ method: "GET",
19243
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks?limit=${encodeURIComponent(String(limit))}`,
19244
+ bearerToken: input.bearerToken
19245
+ });
19246
+ if (response.status !== 200) {
19247
+ throw toApiError6(response.status, response.body);
19248
+ }
19249
+ return response.body;
19250
+ },
19251
+ async getHealthCheck(input) {
19252
+ const response = await httpClient.request({
19253
+ method: "GET",
19254
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/${encodeURIComponent(input.checkId)}`,
19255
+ bearerToken: input.bearerToken
19256
+ });
19257
+ if (response.status !== 200) {
19258
+ throw toApiError6(response.status, response.body);
19259
+ }
19260
+ return response.body;
19261
+ },
19262
+ async createHealthCheck(input) {
19263
+ const response = await httpClient.request({
19264
+ method: "POST",
19265
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks`,
19266
+ bearerToken: input.bearerToken,
19267
+ body: buildCreateRequestBody(input)
19268
+ });
19269
+ if (response.status !== 201) {
19270
+ throw toApiError6(response.status, response.body);
19271
+ }
19272
+ return response.body;
19273
+ },
19274
+ async updateHealthCheck(input) {
19275
+ const response = await httpClient.request({
19276
+ method: "PATCH",
19277
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/${encodeURIComponent(input.checkId)}`,
19278
+ bearerToken: input.bearerToken,
19279
+ body: buildUpdateRequestBody(input)
19280
+ });
19281
+ if (response.status !== 200) {
19282
+ throw toApiError6(response.status, response.body);
19283
+ }
19284
+ return response.body;
19285
+ },
19286
+ async deleteHealthCheck(input) {
19287
+ const response = await httpClient.request({
19288
+ method: "DELETE",
19289
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/${encodeURIComponent(input.checkId)}`,
19290
+ bearerToken: input.bearerToken
19291
+ });
19292
+ if (response.status !== 200) {
19293
+ throw toApiError6(response.status, response.body);
19294
+ }
19295
+ return response.body;
19296
+ },
19297
+ async testHealthCheck(input) {
19298
+ const response = await httpClient.request({
19299
+ method: "POST",
19300
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/test`,
19301
+ bearerToken: input.bearerToken,
19302
+ body: {
19303
+ url: input.url,
19304
+ method: input.method,
19305
+ expected_status_min: input.expectedStatusMin,
19306
+ expected_status_max: input.expectedStatusMax,
19307
+ timeout_ms: input.timeoutMs
19308
+ }
19309
+ });
19310
+ if (response.status !== 200) {
19311
+ throw toApiError6(response.status, response.body);
19312
+ }
19313
+ return response.body;
19314
+ },
19315
+ async listHealthCheckResults(input) {
19316
+ const limit = input.limit ?? 20;
19317
+ const response = await httpClient.request({
19318
+ method: "GET",
19319
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/${encodeURIComponent(input.checkId)}/results?limit=${encodeURIComponent(String(limit))}`,
19320
+ bearerToken: input.bearerToken
19321
+ });
19322
+ if (response.status !== 200) {
19323
+ throw toApiError6(response.status, response.body);
19324
+ }
19325
+ return response.body;
19326
+ },
19327
+ async listHealthCheckDailyRollups(input) {
19328
+ const limit = input.limit ?? 30;
19329
+ const response = await httpClient.request({
19330
+ method: "GET",
19331
+ path: `/v1/projects/${encodeURIComponent(input.projectId)}/availability-checks/${encodeURIComponent(input.checkId)}/daily-rollups?limit=${encodeURIComponent(String(limit))}`,
19332
+ bearerToken: input.bearerToken
19333
+ });
19334
+ if (response.status !== 200) {
19335
+ throw toApiError6(response.status, response.body);
19336
+ }
19337
+ return response.body;
19338
+ }
19339
+ };
19340
+ }
19341
+
19044
19342
  // ../cli/src/doctor-command.ts
19045
19343
  var import_promises4 = require("node:fs/promises");
19046
19344
  var import_node_path4 = require("node:path");
@@ -20095,7 +20393,7 @@ async function doctorCommand(input, dependencies = {}) {
20095
20393
  }
20096
20394
 
20097
20395
  // ../cli/src/verify-command.ts
20098
- var import_node_crypto6 = require("node:crypto");
20396
+ var import_node_crypto7 = require("node:crypto");
20099
20397
  var import_promises7 = require("node:fs/promises");
20100
20398
  var import_node_path9 = require("node:path");
20101
20399
 
@@ -20126,6 +20424,88 @@ var DebugbundleNdjsonStructuredEntrySchema = external_exports.object({
20126
20424
  service: external_exports.string().min(1)
20127
20425
  });
20128
20426
 
20427
+ // ../../packages/storage/src/account-analytics-store.ts
20428
+ var ACCOUNT_METRIC_KEYS = [
20429
+ "account_created",
20430
+ "account_deleted",
20431
+ "project_created",
20432
+ "project_deleted",
20433
+ "raw_events_accepted",
20434
+ "raw_events_rejected",
20435
+ "events_rejected_malformed",
20436
+ "events_rejected_rate_limited",
20437
+ "events_rejected_quota",
20438
+ "events_rejected_capture_policy",
20439
+ "events_rejected_capture_rule",
20440
+ "billable_events_counted",
20441
+ "incident_signal_events_counted",
20442
+ "context_signal_events_counted",
20443
+ "operational_signal_events_counted",
20444
+ "local_verification_events_accepted",
20445
+ "cloud_verification_events_accepted",
20446
+ "incidents_opened",
20447
+ "incidents_resolved",
20448
+ "incidents_reopened",
20449
+ "incidents_regressed",
20450
+ "incident_occurrences",
20451
+ "incident_occurrences_high_severity",
20452
+ "incident_occurrences_critical_severity",
20453
+ "incidents_auto_detected_spiking",
20454
+ "failure_bundles_created",
20455
+ "failure_bundles_updated",
20456
+ "failure_bundle_generations_failed",
20457
+ "improvement_bundles_created",
20458
+ "improvement_bundles_updated",
20459
+ "improvement_bundle_generations_failed",
20460
+ "reproductions_created",
20461
+ "reproductions_failed",
20462
+ "retention_bundle_owners_rotated",
20463
+ "improvements_opened",
20464
+ "improvements_resolved",
20465
+ "improvements_reopened",
20466
+ "improvements_snoozed",
20467
+ "recurring_incident_improvements_opened",
20468
+ "post_deploy_regression_improvements_opened",
20469
+ "slow_request_improvements_opened",
20470
+ "request_failure_improvements_opened",
20471
+ "warning_log_improvements_opened",
20472
+ "alert_deliveries_created",
20473
+ "alert_deliveries_delivered",
20474
+ "alert_deliveries_failed",
20475
+ "alert_email_digests_sent",
20476
+ "operational_emails_sent",
20477
+ "weekly_reports_sent",
20478
+ "weekly_reports_failed",
20479
+ "webhook_deliveries_created",
20480
+ "webhook_deliveries_delivered",
20481
+ "webhook_deliveries_failed",
20482
+ "webhooks_auto_disabled",
20483
+ "github_dispatches_created",
20484
+ "github_dispatches_delivered",
20485
+ "github_dispatches_failed",
20486
+ "github_dispatch_rules_created",
20487
+ "github_dispatch_rules_deleted",
20488
+ "remote_probe_activations_created",
20489
+ "remote_probe_activations_expired",
20490
+ "probe_events_accepted",
20491
+ "capture_rules_created",
20492
+ "capture_rules_deleted",
20493
+ "capture_policy_updates",
20494
+ "trial_started",
20495
+ "trial_converted",
20496
+ "trial_expired",
20497
+ "plan_upgraded",
20498
+ "plan_downgraded",
20499
+ "capacity_units_purchased",
20500
+ "capacity_units_reduced",
20501
+ "allowance_warning_emails_sent",
20502
+ "allowance_limit_emails_sent",
20503
+ "projects_existing_at_account_deletion",
20504
+ "open_incidents_existing_at_account_deletion",
20505
+ "open_improvements_existing_at_account_deletion"
20506
+ ];
20507
+ var AccountMetricKeySchema = external_exports.enum(ACCOUNT_METRIC_KEYS);
20508
+
20129
20509
  // ../../packages/storage/src/incident-context.ts
20130
20510
  function isRecord(value) {
20131
20511
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -20411,11 +20791,24 @@ function deriveIncidentReasonFromSourceEventTypes(eventTypes) {
20411
20791
  // ../../packages/auth/src/primitives.ts
20412
20792
  var import_argon2 = require("@node-rs/argon2");
20413
20793
 
20794
+ // ../../packages/auth/src/account-deletion-auth.ts
20795
+ var DEFAULT_ACCOUNT_DELETION_CODE_LIFETIME_MS = 1e3 * 60 * 10;
20796
+
20414
20797
  // ../../packages/auth/src/web-session-auth.ts
20415
20798
  var DEFAULT_SESSION_LIFETIME_MS = 1e3 * 60 * 60 * 24 * 7;
20416
20799
  var DEFAULT_EMAIL_AUTH_CODE_LIFETIME_MS = 1e3 * 60 * 10;
20417
20800
  var DEFAULT_GITHUB_OAUTH_STATE_LIFETIME_MS = 1e3 * 60 * 10;
20418
20801
 
20802
+ // ../../packages/storage/src/availability-check-store-helpers.ts
20803
+ var TIER_CAPABILITIES_SQL = {
20804
+ free_limit: getTierCapabilities("free").availability_checks_per_project,
20805
+ solo_limit: getTierCapabilities("solo").availability_checks_per_project,
20806
+ team_limit: getTierCapabilities("team").availability_checks_per_project,
20807
+ free_interval: getTierCapabilities("free").availability_check_min_interval_seconds,
20808
+ solo_interval: getTierCapabilities("solo").availability_check_min_interval_seconds,
20809
+ team_interval: getTierCapabilities("team").availability_check_min_interval_seconds
20810
+ };
20811
+
20419
20812
  // ../../packages/storage/src/auth-rate-limiter.ts
20420
20813
  var import_ioredis = __toESM(require_built3(), 1);
20421
20814
 
@@ -20433,8 +20826,131 @@ var import_ioredis3 = __toESM(require_built3(), 1);
20433
20826
  var import_ioredis4 = __toESM(require_built3(), 1);
20434
20827
  var DEFAULT_PROCESSING_TIMEOUT_MS = 5 * 60 * 1e3;
20435
20828
 
20436
- // ../../packages/storage/src/schema-migrations.ts
20437
- var import_node_crypto3 = require("node:crypto");
20829
+ // ../../packages/storage/src/availability-check-bootstrap-statements.ts
20830
+ var AVAILABILITY_CHECK_BOOTSTRAP_STATEMENTS = [
20831
+ `
20832
+ CREATE TABLE availability_checks (
20833
+ id uuid PRIMARY KEY,
20834
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
20835
+ created_by_user_id uuid REFERENCES users(id) ON DELETE SET NULL,
20836
+ name text NOT NULL,
20837
+ url text NOT NULL,
20838
+ method text NOT NULL CHECK (method IN ('GET', 'HEAD')),
20839
+ expected_status_min integer NOT NULL DEFAULT 200 CHECK (expected_status_min BETWEEN 100 AND 599),
20840
+ expected_status_max integer NOT NULL DEFAULT 399 CHECK (expected_status_max BETWEEN 100 AND 599),
20841
+ timeout_ms integer NOT NULL DEFAULT 5000 CHECK (timeout_ms BETWEEN 500 AND 5000),
20842
+ interval_seconds integer NOT NULL CHECK (interval_seconds >= 30),
20843
+ failure_threshold integer NOT NULL DEFAULT 3 CHECK (failure_threshold BETWEEN 1 AND 10),
20844
+ recovery_threshold integer NOT NULL DEFAULT 2 CHECK (recovery_threshold BETWEEN 1 AND 10),
20845
+ environment text NOT NULL DEFAULT 'production',
20846
+ service_name text,
20847
+ enabled boolean NOT NULL DEFAULT true,
20848
+ status text NOT NULL DEFAULT 'unknown' CHECK (status IN ('unknown', 'passing', 'failing')),
20849
+ consecutive_failures integer NOT NULL DEFAULT 0,
20850
+ consecutive_successes integer NOT NULL DEFAULT 0,
20851
+ linked_incident_id uuid REFERENCES incidents(id) ON DELETE SET NULL,
20852
+ last_checked_at timestamptz,
20853
+ next_check_at timestamptz,
20854
+ claimed_at timestamptz,
20855
+ last_result_status text CHECK (
20856
+ last_result_status IS NULL OR last_result_status IN (
20857
+ 'success',
20858
+ 'http_status_mismatch',
20859
+ 'timeout',
20860
+ 'dns_error',
20861
+ 'tls_error',
20862
+ 'connection_error',
20863
+ 'redirect_blocked',
20864
+ 'security_blocked',
20865
+ 'internal_error'
20866
+ )
20867
+ ),
20868
+ last_result_http_status integer,
20869
+ last_result_error_kind text,
20870
+ last_result_error_message text,
20871
+ last_result_duration_ms integer,
20872
+ deleted_at timestamptz,
20873
+ created_at timestamptz NOT NULL DEFAULT now(),
20874
+ updated_at timestamptz NOT NULL DEFAULT now()
20875
+ )
20876
+ `,
20877
+ `
20878
+ CREATE INDEX availability_checks_project_created_idx
20879
+ ON availability_checks (project_id, created_at DESC)
20880
+ `,
20881
+ `
20882
+ CREATE INDEX availability_checks_due_idx
20883
+ ON availability_checks (next_check_at, project_id)
20884
+ `,
20885
+ `
20886
+ CREATE INDEX availability_checks_claimed_idx
20887
+ ON availability_checks (claimed_at)
20888
+ `,
20889
+ `
20890
+ CREATE TABLE availability_check_results (
20891
+ id uuid PRIMARY KEY,
20892
+ check_id uuid NOT NULL REFERENCES availability_checks(id) ON DELETE CASCADE,
20893
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
20894
+ started_at timestamptz NOT NULL,
20895
+ completed_at timestamptz NOT NULL,
20896
+ duration_ms integer NOT NULL,
20897
+ status text NOT NULL CHECK (
20898
+ status IN (
20899
+ 'success',
20900
+ 'http_status_mismatch',
20901
+ 'timeout',
20902
+ 'dns_error',
20903
+ 'tls_error',
20904
+ 'connection_error',
20905
+ 'redirect_blocked',
20906
+ 'security_blocked',
20907
+ 'internal_error'
20908
+ )
20909
+ ),
20910
+ http_status integer,
20911
+ error_kind text,
20912
+ error_message text,
20913
+ redirect_count integer NOT NULL DEFAULT 0,
20914
+ checked_url_host text NOT NULL,
20915
+ checked_url_path text NOT NULL,
20916
+ final_url text NOT NULL,
20917
+ created_at timestamptz NOT NULL DEFAULT now()
20918
+ )
20919
+ `,
20920
+ `
20921
+ CREATE INDEX availability_check_results_check_started_idx
20922
+ ON availability_check_results (check_id, started_at DESC)
20923
+ `,
20924
+ `
20925
+ CREATE INDEX availability_check_results_project_started_idx
20926
+ ON availability_check_results (project_id, started_at DESC)
20927
+ `,
20928
+ `
20929
+ CREATE TABLE availability_check_daily_rollups (
20930
+ id uuid PRIMARY KEY,
20931
+ check_id uuid NOT NULL REFERENCES availability_checks(id) ON DELETE CASCADE,
20932
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
20933
+ day date NOT NULL,
20934
+ state text NOT NULL CHECK (state IN ('unknown', 'operational', 'degraded', 'down', 'paused')),
20935
+ total_checks integer NOT NULL DEFAULT 0,
20936
+ successful_checks integer NOT NULL DEFAULT 0,
20937
+ failed_checks integer NOT NULL DEFAULT 0,
20938
+ degraded_checks integer NOT NULL DEFAULT 0,
20939
+ avg_duration_ms integer,
20940
+ first_checked_at timestamptz,
20941
+ last_checked_at timestamptz,
20942
+ downtime_seconds integer NOT NULL DEFAULT 0,
20943
+ incident_ids uuid[] NOT NULL DEFAULT '{}'::uuid[],
20944
+ created_at timestamptz NOT NULL DEFAULT now(),
20945
+ updated_at timestamptz NOT NULL DEFAULT now(),
20946
+ UNIQUE (check_id, day)
20947
+ )
20948
+ `,
20949
+ `
20950
+ CREATE INDEX availability_check_daily_rollups_project_day_idx
20951
+ ON availability_check_daily_rollups (project_id, day DESC)
20952
+ `
20953
+ ];
20438
20954
 
20439
20955
  // ../../packages/storage/src/storage-bootstrap-statements.ts
20440
20956
  var STORAGE_BOOTSTRAP_STATEMENTS = [
@@ -20603,6 +21119,7 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
20603
21119
  user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
20604
21120
  organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
20605
21121
  session_token_hash text UNIQUE NOT NULL,
21122
+ auth_method text CHECK (auth_method IS NULL OR auth_method IN ('email_code', 'github_oauth')),
20606
21123
  created_at timestamptz NOT NULL DEFAULT now(),
20607
21124
  expires_at timestamptz NOT NULL,
20608
21125
  revoked_at timestamptz
@@ -20635,6 +21152,26 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
20635
21152
  CREATE INDEX email_auth_challenges_code_hash_idx
20636
21153
  ON email_auth_challenges (code_hash)
20637
21154
  `,
21155
+ `
21156
+ CREATE TABLE account_deletion_challenges (
21157
+ id uuid PRIMARY KEY,
21158
+ organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
21159
+ user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
21160
+ email text NOT NULL,
21161
+ code_hash text NOT NULL,
21162
+ created_at timestamptz NOT NULL DEFAULT now(),
21163
+ expires_at timestamptz NOT NULL,
21164
+ used_at timestamptz
21165
+ )
21166
+ `,
21167
+ `
21168
+ CREATE INDEX account_deletion_challenges_scope_idx
21169
+ ON account_deletion_challenges (organization_id, user_id, lower(email), created_at DESC)
21170
+ `,
21171
+ `
21172
+ CREATE INDEX account_deletion_challenges_code_hash_idx
21173
+ ON account_deletion_challenges (code_hash)
21174
+ `,
20638
21175
  `
20639
21176
  CREATE TABLE github_device_authorizations (
20640
21177
  id uuid PRIMARY KEY,
@@ -21345,6 +21882,103 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
21345
21882
  PRIMARY KEY (organization_id, period_starts_at)
21346
21883
  )
21347
21884
  `,
21885
+ `
21886
+ CREATE TABLE project_usage_counters (
21887
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
21888
+ period_starts_at timestamptz NOT NULL,
21889
+ raw_ingested_events integer NOT NULL DEFAULT 0,
21890
+ updated_at timestamptz NOT NULL DEFAULT now(),
21891
+ PRIMARY KEY (project_id, period_starts_at)
21892
+ )
21893
+ `,
21894
+ `
21895
+ CREATE TABLE account_analytics_accounts (
21896
+ analytics_account_id uuid PRIMARY KEY,
21897
+ organization_id uuid UNIQUE,
21898
+ organization_id_hash text NOT NULL UNIQUE,
21899
+ created_at timestamptz NOT NULL,
21900
+ first_seen_at timestamptz NOT NULL,
21901
+ metrics_collection_started_at timestamptz NOT NULL,
21902
+ backfilled_from_retained_rows_at timestamptz,
21903
+ deleted_at timestamptz,
21904
+ initial_plan text,
21905
+ latest_known_plan text,
21906
+ latest_capacity_units integer,
21907
+ account_deleted boolean NOT NULL DEFAULT false,
21908
+ metrics_schema_version integer NOT NULL DEFAULT 1,
21909
+ updated_at timestamptz NOT NULL DEFAULT now()
21910
+ )
21911
+ `,
21912
+ `
21913
+ CREATE TABLE account_metric_periods (
21914
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
21915
+ period_grain text NOT NULL CHECK (period_grain IN ('day', 'month', 'year', 'lifetime')),
21916
+ period_starts_at timestamptz NOT NULL,
21917
+ metric_key text NOT NULL,
21918
+ metric_value bigint NOT NULL DEFAULT 0,
21919
+ updated_at timestamptz NOT NULL DEFAULT now(),
21920
+ PRIMARY KEY (analytics_account_id, period_grain, period_starts_at, metric_key)
21921
+ )
21922
+ `,
21923
+ `
21924
+ CREATE INDEX account_metric_periods_grain_period_metric_idx
21925
+ ON account_metric_periods (period_grain, period_starts_at, metric_key)
21926
+ `,
21927
+ `
21928
+ CREATE INDEX account_metric_periods_account_grain_period_idx
21929
+ ON account_metric_periods (analytics_account_id, period_grain, period_starts_at)
21930
+ `,
21931
+ `
21932
+ CREATE TABLE account_metric_events (
21933
+ dedupe_key_hash text PRIMARY KEY,
21934
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
21935
+ metric_source text NOT NULL,
21936
+ occurred_at timestamptz NOT NULL,
21937
+ recorded_at timestamptz NOT NULL DEFAULT now(),
21938
+ metric_deltas jsonb NOT NULL
21939
+ )
21940
+ `,
21941
+ `
21942
+ CREATE TABLE account_payment_retention_records (
21943
+ id uuid PRIMARY KEY,
21944
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
21945
+ organization_id_hash text NOT NULL,
21946
+ provider text NOT NULL,
21947
+ plan text,
21948
+ billing_state text,
21949
+ stripe_customer_id text,
21950
+ stripe_subscription_id text,
21951
+ billing_period_starts_at timestamptz,
21952
+ billing_period_ends_at timestamptz,
21953
+ additional_capacity_units integer,
21954
+ last_billing_event_id text,
21955
+ account_deleted_at timestamptz NOT NULL,
21956
+ recorded_at timestamptz NOT NULL DEFAULT now(),
21957
+ updated_at timestamptz NOT NULL DEFAULT now(),
21958
+ UNIQUE (analytics_account_id, provider)
21959
+ )
21960
+ `,
21961
+ `
21962
+ CREATE INDEX account_payment_retention_records_provider_idx
21963
+ ON account_payment_retention_records (provider, account_deleted_at DESC)
21964
+ `,
21965
+ `
21966
+ CREATE TABLE account_payment_provider_events (
21967
+ provider_event_key text PRIMARY KEY,
21968
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
21969
+ organization_id_hash text NOT NULL,
21970
+ provider text NOT NULL,
21971
+ provider_event_id text NOT NULL,
21972
+ provider_event_type text NOT NULL,
21973
+ processed_at timestamptz NOT NULL,
21974
+ account_deleted_at timestamptz NOT NULL,
21975
+ recorded_at timestamptz NOT NULL DEFAULT now()
21976
+ )
21977
+ `,
21978
+ `
21979
+ CREATE UNIQUE INDEX account_payment_provider_events_provider_event_key
21980
+ ON account_payment_provider_events (provider, provider_event_id)
21981
+ `,
21348
21982
  `
21349
21983
  CREATE TABLE operational_email_deliveries (
21350
21984
  id uuid PRIMARY KEY,
@@ -21414,51 +22048,296 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
21414
22048
  `
21415
22049
  ];
21416
22050
 
22051
+ // ../../packages/storage/src/storage-bootstrap-all-statements.ts
22052
+ var STORAGE_BOOTSTRAP_STATEMENTS2 = [
22053
+ ...STORAGE_BOOTSTRAP_STATEMENTS,
22054
+ ...AVAILABILITY_CHECK_BOOTSTRAP_STATEMENTS
22055
+ ];
22056
+
21417
22057
  // ../../packages/storage/src/migrations.ts
21418
- var STORAGE_BOOTSTRAP_SQL = STORAGE_BOOTSTRAP_STATEMENTS.join(";\n\n");
22058
+ var STORAGE_BOOTSTRAP_SQL = STORAGE_BOOTSTRAP_STATEMENTS2.join(";\n\n");
21419
22059
 
21420
- // ../../packages/storage/src/schema-migrations.ts
21421
- function computeMigrationChecksum(input) {
21422
- return (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(input)).digest("hex");
21423
- }
21424
- function defineStorageSchemaMigration(input) {
22060
+ // ../../packages/storage/src/availability-check-schema-migrations.ts
22061
+ var import_node_crypto3 = require("node:crypto");
22062
+ function defineAvailabilityCheckStorageSchemaMigration(input) {
21425
22063
  return {
21426
22064
  ...input,
21427
- checksum: computeMigrationChecksum(input)
22065
+ checksum: (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(input)).digest("hex")
21428
22066
  };
21429
22067
  }
21430
- var STORAGE_SCHEMA_MIGRATIONS = [
21431
- defineStorageSchemaMigration({
21432
- id: "202605050001_add_auth_suspension_columns",
21433
- description: "Add organization and membership suspension timestamps used by auth gates.",
21434
- statements: [
21435
- "ALTER TABLE organizations ADD COLUMN IF NOT EXISTS suspended_at timestamptz",
21436
- "ALTER TABLE organization_members ADD COLUMN IF NOT EXISTS suspended_at timestamptz"
21437
- ]
21438
- }),
21439
- defineStorageSchemaMigration({
21440
- id: "202605120001_add_github_device_authorizations",
21441
- description: "Add persisted GitHub CLI bootstrap state for device-flow login.",
22068
+ var AVAILABILITY_CHECK_STORAGE_SCHEMA_MIGRATIONS = [
22069
+ defineAvailabilityCheckStorageSchemaMigration({
22070
+ id: "202606150001_add_availability_checks",
22071
+ description: "Add project-scoped availability checks, result history, and daily rollups.",
21442
22072
  statements: [
21443
22073
  `
21444
- CREATE TABLE IF NOT EXISTS github_device_authorizations (
22074
+ CREATE TABLE IF NOT EXISTS availability_checks (
21445
22075
  id uuid PRIMARY KEY,
21446
- device_code text NOT NULL UNIQUE,
21447
- user_code text NOT NULL,
21448
- verification_uri text NOT NULL,
22076
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
22077
+ created_by_user_id uuid REFERENCES users(id) ON DELETE SET NULL,
22078
+ name text NOT NULL,
22079
+ url text NOT NULL,
22080
+ method text NOT NULL,
22081
+ expected_status_min integer NOT NULL DEFAULT 200,
22082
+ expected_status_max integer NOT NULL DEFAULT 399,
22083
+ timeout_ms integer NOT NULL DEFAULT 5000,
21449
22084
  interval_seconds integer NOT NULL,
21450
- expires_at timestamptz NOT NULL,
21451
- accepted_terms_at timestamptz,
21452
- created_at timestamptz NOT NULL DEFAULT now(),
21453
- completed_at timestamptz,
22085
+ failure_threshold integer NOT NULL DEFAULT 3,
22086
+ recovery_threshold integer NOT NULL DEFAULT 2,
22087
+ environment text NOT NULL DEFAULT 'production',
22088
+ service_name text,
22089
+ enabled boolean NOT NULL DEFAULT true,
22090
+ status text NOT NULL DEFAULT 'unknown',
22091
+ consecutive_failures integer NOT NULL DEFAULT 0,
22092
+ consecutive_successes integer NOT NULL DEFAULT 0,
22093
+ linked_incident_id uuid REFERENCES incidents(id) ON DELETE SET NULL,
22094
+ last_checked_at timestamptz,
22095
+ next_check_at timestamptz,
21454
22096
  claimed_at timestamptz,
21455
- terminal_error text,
21456
- user_id uuid REFERENCES users(id) ON DELETE SET NULL,
21457
- organization_id uuid REFERENCES organizations(id) ON DELETE SET NULL
22097
+ last_result_status text,
22098
+ last_result_http_status integer,
22099
+ last_result_error_kind text,
22100
+ last_result_error_message text,
22101
+ last_result_duration_ms integer,
22102
+ deleted_at timestamptz,
22103
+ created_at timestamptz NOT NULL DEFAULT now(),
22104
+ updated_at timestamptz NOT NULL DEFAULT now()
21458
22105
  )
21459
22106
  `,
21460
22107
  `
21461
- CREATE INDEX IF NOT EXISTS github_device_authorizations_user_code_idx
22108
+ ALTER TABLE availability_checks
22109
+ DROP CONSTRAINT IF EXISTS availability_checks_method_check
22110
+ `,
22111
+ `
22112
+ ALTER TABLE availability_checks
22113
+ ADD CONSTRAINT availability_checks_method_check
22114
+ CHECK (method IN ('GET', 'HEAD'))
22115
+ `,
22116
+ `
22117
+ ALTER TABLE availability_checks
22118
+ DROP CONSTRAINT IF EXISTS availability_checks_expected_status_min_check
22119
+ `,
22120
+ `
22121
+ ALTER TABLE availability_checks
22122
+ ADD CONSTRAINT availability_checks_expected_status_min_check
22123
+ CHECK (expected_status_min BETWEEN 100 AND 599)
22124
+ `,
22125
+ `
22126
+ ALTER TABLE availability_checks
22127
+ DROP CONSTRAINT IF EXISTS availability_checks_expected_status_max_check
22128
+ `,
22129
+ `
22130
+ ALTER TABLE availability_checks
22131
+ ADD CONSTRAINT availability_checks_expected_status_max_check
22132
+ CHECK (expected_status_max BETWEEN 100 AND 599)
22133
+ `,
22134
+ `
22135
+ ALTER TABLE availability_checks
22136
+ DROP CONSTRAINT IF EXISTS availability_checks_timeout_ms_check
22137
+ `,
22138
+ `
22139
+ ALTER TABLE availability_checks
22140
+ ADD CONSTRAINT availability_checks_timeout_ms_check
22141
+ CHECK (timeout_ms BETWEEN 500 AND 5000)
22142
+ `,
22143
+ `
22144
+ ALTER TABLE availability_checks
22145
+ DROP CONSTRAINT IF EXISTS availability_checks_interval_seconds_check
22146
+ `,
22147
+ `
22148
+ ALTER TABLE availability_checks
22149
+ ADD CONSTRAINT availability_checks_interval_seconds_check
22150
+ CHECK (interval_seconds >= 30)
22151
+ `,
22152
+ `
22153
+ ALTER TABLE availability_checks
22154
+ DROP CONSTRAINT IF EXISTS availability_checks_failure_threshold_check
22155
+ `,
22156
+ `
22157
+ ALTER TABLE availability_checks
22158
+ ADD CONSTRAINT availability_checks_failure_threshold_check
22159
+ CHECK (failure_threshold BETWEEN 1 AND 10)
22160
+ `,
22161
+ `
22162
+ ALTER TABLE availability_checks
22163
+ DROP CONSTRAINT IF EXISTS availability_checks_recovery_threshold_check
22164
+ `,
22165
+ `
22166
+ ALTER TABLE availability_checks
22167
+ ADD CONSTRAINT availability_checks_recovery_threshold_check
22168
+ CHECK (recovery_threshold BETWEEN 1 AND 10)
22169
+ `,
22170
+ `
22171
+ ALTER TABLE availability_checks
22172
+ DROP CONSTRAINT IF EXISTS availability_checks_status_check
22173
+ `,
22174
+ `
22175
+ ALTER TABLE availability_checks
22176
+ ADD CONSTRAINT availability_checks_status_check
22177
+ CHECK (status IN ('unknown', 'passing', 'failing'))
22178
+ `,
22179
+ `
22180
+ ALTER TABLE availability_checks
22181
+ DROP CONSTRAINT IF EXISTS availability_checks_last_result_status_check
22182
+ `,
22183
+ `
22184
+ ALTER TABLE availability_checks
22185
+ ADD CONSTRAINT availability_checks_last_result_status_check
22186
+ CHECK (
22187
+ last_result_status IS NULL OR last_result_status IN (
22188
+ 'success',
22189
+ 'http_status_mismatch',
22190
+ 'timeout',
22191
+ 'dns_error',
22192
+ 'tls_error',
22193
+ 'connection_error',
22194
+ 'redirect_blocked',
22195
+ 'security_blocked',
22196
+ 'internal_error'
22197
+ )
22198
+ )
22199
+ `,
22200
+ `
22201
+ CREATE INDEX IF NOT EXISTS availability_checks_project_created_idx
22202
+ ON availability_checks (project_id, created_at DESC)
22203
+ `,
22204
+ `
22205
+ CREATE INDEX IF NOT EXISTS availability_checks_due_idx
22206
+ ON availability_checks (next_check_at, project_id)
22207
+ `,
22208
+ `
22209
+ CREATE INDEX IF NOT EXISTS availability_checks_claimed_idx
22210
+ ON availability_checks (claimed_at)
22211
+ `,
22212
+ `
22213
+ CREATE TABLE IF NOT EXISTS availability_check_results (
22214
+ id uuid PRIMARY KEY,
22215
+ check_id uuid NOT NULL REFERENCES availability_checks(id) ON DELETE CASCADE,
22216
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
22217
+ started_at timestamptz NOT NULL,
22218
+ completed_at timestamptz NOT NULL,
22219
+ duration_ms integer NOT NULL,
22220
+ status text NOT NULL,
22221
+ http_status integer,
22222
+ error_kind text,
22223
+ error_message text,
22224
+ redirect_count integer NOT NULL DEFAULT 0,
22225
+ checked_url_host text NOT NULL,
22226
+ checked_url_path text NOT NULL,
22227
+ final_url text NOT NULL,
22228
+ created_at timestamptz NOT NULL DEFAULT now()
22229
+ )
22230
+ `,
22231
+ `
22232
+ ALTER TABLE availability_check_results
22233
+ DROP CONSTRAINT IF EXISTS availability_check_results_status_check
22234
+ `,
22235
+ `
22236
+ ALTER TABLE availability_check_results
22237
+ ADD CONSTRAINT availability_check_results_status_check
22238
+ CHECK (
22239
+ status IN (
22240
+ 'success',
22241
+ 'http_status_mismatch',
22242
+ 'timeout',
22243
+ 'dns_error',
22244
+ 'tls_error',
22245
+ 'connection_error',
22246
+ 'redirect_blocked',
22247
+ 'security_blocked',
22248
+ 'internal_error'
22249
+ )
22250
+ )
22251
+ `,
22252
+ `
22253
+ CREATE INDEX IF NOT EXISTS availability_check_results_check_started_idx
22254
+ ON availability_check_results (check_id, started_at DESC)
22255
+ `,
22256
+ `
22257
+ CREATE INDEX IF NOT EXISTS availability_check_results_project_started_idx
22258
+ ON availability_check_results (project_id, started_at DESC)
22259
+ `,
22260
+ `
22261
+ CREATE TABLE IF NOT EXISTS availability_check_daily_rollups (
22262
+ id uuid PRIMARY KEY,
22263
+ check_id uuid NOT NULL REFERENCES availability_checks(id) ON DELETE CASCADE,
22264
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
22265
+ day date NOT NULL,
22266
+ state text NOT NULL,
22267
+ total_checks integer NOT NULL DEFAULT 0,
22268
+ successful_checks integer NOT NULL DEFAULT 0,
22269
+ failed_checks integer NOT NULL DEFAULT 0,
22270
+ degraded_checks integer NOT NULL DEFAULT 0,
22271
+ avg_duration_ms integer,
22272
+ first_checked_at timestamptz,
22273
+ last_checked_at timestamptz,
22274
+ downtime_seconds integer NOT NULL DEFAULT 0,
22275
+ incident_ids uuid[] NOT NULL DEFAULT '{}'::uuid[],
22276
+ created_at timestamptz NOT NULL DEFAULT now(),
22277
+ updated_at timestamptz NOT NULL DEFAULT now(),
22278
+ UNIQUE (check_id, day)
22279
+ )
22280
+ `,
22281
+ `
22282
+ ALTER TABLE availability_check_daily_rollups
22283
+ DROP CONSTRAINT IF EXISTS availability_check_daily_rollups_state_check
22284
+ `,
22285
+ `
22286
+ ALTER TABLE availability_check_daily_rollups
22287
+ ADD CONSTRAINT availability_check_daily_rollups_state_check
22288
+ CHECK (state IN ('unknown', 'operational', 'degraded', 'down', 'paused'))
22289
+ `,
22290
+ `
22291
+ CREATE INDEX IF NOT EXISTS availability_check_daily_rollups_project_day_idx
22292
+ ON availability_check_daily_rollups (project_id, day DESC)
22293
+ `
22294
+ ]
22295
+ })
22296
+ ];
22297
+
22298
+ // ../../packages/storage/src/schema-migrations-catalog.ts
22299
+ var import_node_crypto4 = require("node:crypto");
22300
+ function computeMigrationChecksum(input) {
22301
+ return (0, import_node_crypto4.createHash)("sha256").update(JSON.stringify(input)).digest("hex");
22302
+ }
22303
+ function defineStorageSchemaMigration(input) {
22304
+ return {
22305
+ ...input,
22306
+ checksum: computeMigrationChecksum(input)
22307
+ };
22308
+ }
22309
+ var STORAGE_SCHEMA_MIGRATIONS = [
22310
+ defineStorageSchemaMigration({
22311
+ id: "202605050001_add_auth_suspension_columns",
22312
+ description: "Add organization and membership suspension timestamps used by auth gates.",
22313
+ statements: [
22314
+ "ALTER TABLE organizations ADD COLUMN IF NOT EXISTS suspended_at timestamptz",
22315
+ "ALTER TABLE organization_members ADD COLUMN IF NOT EXISTS suspended_at timestamptz"
22316
+ ]
22317
+ }),
22318
+ defineStorageSchemaMigration({
22319
+ id: "202605120001_add_github_device_authorizations",
22320
+ description: "Add persisted GitHub CLI bootstrap state for device-flow login.",
22321
+ statements: [
22322
+ `
22323
+ CREATE TABLE IF NOT EXISTS github_device_authorizations (
22324
+ id uuid PRIMARY KEY,
22325
+ device_code text NOT NULL UNIQUE,
22326
+ user_code text NOT NULL,
22327
+ verification_uri text NOT NULL,
22328
+ interval_seconds integer NOT NULL,
22329
+ expires_at timestamptz NOT NULL,
22330
+ accepted_terms_at timestamptz,
22331
+ created_at timestamptz NOT NULL DEFAULT now(),
22332
+ completed_at timestamptz,
22333
+ claimed_at timestamptz,
22334
+ terminal_error text,
22335
+ user_id uuid REFERENCES users(id) ON DELETE SET NULL,
22336
+ organization_id uuid REFERENCES organizations(id) ON DELETE SET NULL
22337
+ )
22338
+ `,
22339
+ `
22340
+ CREATE INDEX IF NOT EXISTS github_device_authorizations_user_code_idx
21462
22341
  ON github_device_authorizations (user_code, created_at DESC)
21463
22342
  `,
21464
22343
  `
@@ -22113,15 +22992,182 @@ var STORAGE_SCHEMA_MIGRATIONS = [
22113
22992
  statements: [
22114
22993
  "ALTER TABLE capture_policies ADD COLUMN IF NOT EXISTS immediate_client_error_path_rules jsonb"
22115
22994
  ]
22995
+ }),
22996
+ defineStorageSchemaMigration({
22997
+ id: "202606100001_add_project_usage_counters",
22998
+ description: "Add durable project-level raw ingestion counters for project dashboard metrics.",
22999
+ statements: [
23000
+ `
23001
+ CREATE TABLE IF NOT EXISTS project_usage_counters (
23002
+ project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
23003
+ period_starts_at timestamptz NOT NULL,
23004
+ raw_ingested_events integer NOT NULL DEFAULT 0,
23005
+ updated_at timestamptz NOT NULL DEFAULT now(),
23006
+ PRIMARY KEY (project_id, period_starts_at)
23007
+ )
23008
+ `
23009
+ ]
23010
+ }),
23011
+ defineStorageSchemaMigration({
23012
+ id: "202606100002_add_account_deletion_challenges",
23013
+ description: "Add scoped OTP challenges for account deletion confirmation.",
23014
+ statements: [
23015
+ `
23016
+ CREATE TABLE IF NOT EXISTS account_deletion_challenges (
23017
+ id uuid PRIMARY KEY,
23018
+ organization_id uuid NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
23019
+ user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
23020
+ email text NOT NULL,
23021
+ code_hash text NOT NULL,
23022
+ created_at timestamptz NOT NULL DEFAULT now(),
23023
+ expires_at timestamptz NOT NULL,
23024
+ used_at timestamptz
23025
+ )
23026
+ `,
23027
+ `
23028
+ CREATE INDEX IF NOT EXISTS account_deletion_challenges_scope_idx
23029
+ ON account_deletion_challenges (organization_id, user_id, lower(email), created_at DESC)
23030
+ `,
23031
+ `
23032
+ CREATE INDEX IF NOT EXISTS account_deletion_challenges_code_hash_idx
23033
+ ON account_deletion_challenges (code_hash)
23034
+ `
23035
+ ]
23036
+ }),
23037
+ defineStorageSchemaMigration({
23038
+ id: "202606100003_add_account_analytics_and_payment_retention",
23039
+ description: "Add deletion-safe account analytics and payment retention ledgers.",
23040
+ statements: [
23041
+ `
23042
+ CREATE TABLE IF NOT EXISTS account_analytics_accounts (
23043
+ analytics_account_id uuid PRIMARY KEY,
23044
+ organization_id uuid UNIQUE,
23045
+ organization_id_hash text NOT NULL UNIQUE,
23046
+ created_at timestamptz NOT NULL,
23047
+ first_seen_at timestamptz NOT NULL,
23048
+ metrics_collection_started_at timestamptz NOT NULL,
23049
+ backfilled_from_retained_rows_at timestamptz,
23050
+ deleted_at timestamptz,
23051
+ initial_plan text,
23052
+ latest_known_plan text,
23053
+ latest_capacity_units integer,
23054
+ account_deleted boolean NOT NULL DEFAULT false,
23055
+ metrics_schema_version integer NOT NULL DEFAULT 1,
23056
+ updated_at timestamptz NOT NULL DEFAULT now()
23057
+ )
23058
+ `,
23059
+ `
23060
+ CREATE TABLE IF NOT EXISTS account_metric_periods (
23061
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
23062
+ period_grain text NOT NULL CHECK (period_grain IN ('day', 'month', 'year', 'lifetime')),
23063
+ period_starts_at timestamptz NOT NULL,
23064
+ metric_key text NOT NULL,
23065
+ metric_value bigint NOT NULL DEFAULT 0,
23066
+ updated_at timestamptz NOT NULL DEFAULT now(),
23067
+ PRIMARY KEY (analytics_account_id, period_grain, period_starts_at, metric_key)
23068
+ )
23069
+ `,
23070
+ `
23071
+ CREATE INDEX IF NOT EXISTS account_metric_periods_grain_period_metric_idx
23072
+ ON account_metric_periods (period_grain, period_starts_at, metric_key)
23073
+ `,
23074
+ `
23075
+ CREATE INDEX IF NOT EXISTS account_metric_periods_account_grain_period_idx
23076
+ ON account_metric_periods (analytics_account_id, period_grain, period_starts_at)
23077
+ `,
23078
+ `
23079
+ CREATE TABLE IF NOT EXISTS account_metric_events (
23080
+ dedupe_key_hash text PRIMARY KEY,
23081
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
23082
+ metric_source text NOT NULL,
23083
+ occurred_at timestamptz NOT NULL,
23084
+ recorded_at timestamptz NOT NULL DEFAULT now(),
23085
+ metric_deltas jsonb NOT NULL
23086
+ )
23087
+ `,
23088
+ `
23089
+ CREATE TABLE IF NOT EXISTS account_payment_retention_records (
23090
+ id uuid PRIMARY KEY,
23091
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
23092
+ organization_id_hash text NOT NULL,
23093
+ provider text NOT NULL,
23094
+ plan text,
23095
+ billing_state text,
23096
+ stripe_customer_id text,
23097
+ stripe_subscription_id text,
23098
+ billing_period_starts_at timestamptz,
23099
+ billing_period_ends_at timestamptz,
23100
+ additional_capacity_units integer,
23101
+ last_billing_event_id text,
23102
+ account_deleted_at timestamptz NOT NULL,
23103
+ recorded_at timestamptz NOT NULL DEFAULT now(),
23104
+ updated_at timestamptz NOT NULL DEFAULT now(),
23105
+ UNIQUE (analytics_account_id, provider)
23106
+ )
23107
+ `,
23108
+ `
23109
+ CREATE INDEX IF NOT EXISTS account_payment_retention_records_provider_idx
23110
+ ON account_payment_retention_records (provider, account_deleted_at DESC)
23111
+ `,
23112
+ `
23113
+ CREATE TABLE IF NOT EXISTS account_payment_provider_events (
23114
+ provider_event_key text PRIMARY KEY,
23115
+ analytics_account_id uuid NOT NULL REFERENCES account_analytics_accounts(analytics_account_id),
23116
+ organization_id_hash text NOT NULL,
23117
+ provider text NOT NULL,
23118
+ provider_event_id text NOT NULL,
23119
+ provider_event_type text NOT NULL,
23120
+ processed_at timestamptz NOT NULL,
23121
+ account_deleted_at timestamptz NOT NULL,
23122
+ recorded_at timestamptz NOT NULL DEFAULT now()
23123
+ )
23124
+ `,
23125
+ `
23126
+ CREATE UNIQUE INDEX IF NOT EXISTS account_payment_provider_events_provider_event_key
23127
+ ON account_payment_provider_events (provider, provider_event_id)
23128
+ `
23129
+ ]
23130
+ }),
23131
+ defineStorageSchemaMigration({
23132
+ id: "202606120001_add_session_auth_method",
23133
+ description: "Track the auth method used to create each browser session.",
23134
+ statements: [
23135
+ "ALTER TABLE sessions ADD COLUMN IF NOT EXISTS auth_method text",
23136
+ "ALTER TABLE sessions DROP CONSTRAINT IF EXISTS sessions_auth_method_check",
23137
+ `
23138
+ ALTER TABLE sessions
23139
+ ADD CONSTRAINT sessions_auth_method_check
23140
+ CHECK (auth_method IS NULL OR auth_method IN ('email_code', 'github_oauth'))
23141
+ `
23142
+ ]
23143
+ }),
23144
+ defineStorageSchemaMigration({
23145
+ id: "202606130001_retire_expired_project_invites",
23146
+ description: "Retire already-expired project invites so re-inviting the same email is unblocked.",
23147
+ statements: [
23148
+ `
23149
+ UPDATE project_invites
23150
+ SET canceled_at = expires_at
23151
+ WHERE accepted_at IS NULL
23152
+ AND canceled_at IS NULL
23153
+ AND expires_at <= now()
23154
+ `
23155
+ ]
22116
23156
  })
22117
23157
  ];
22118
23158
 
23159
+ // ../../packages/storage/src/schema-migrations.ts
23160
+ var STORAGE_SCHEMA_MIGRATIONS2 = [
23161
+ ...STORAGE_SCHEMA_MIGRATIONS,
23162
+ ...AVAILABILITY_CHECK_STORAGE_SCHEMA_MIGRATIONS
23163
+ ];
23164
+
22119
23165
  // ../cli/src/ingest-command.ts
22120
- var import_node_crypto5 = require("node:crypto");
23166
+ var import_node_crypto6 = require("node:crypto");
22121
23167
  var import_node_path7 = require("node:path");
22122
23168
 
22123
23169
  // ../cli/src/process-command.ts
22124
- var import_node_crypto4 = require("node:crypto");
23170
+ var import_node_crypto5 = require("node:crypto");
22125
23171
  var import_promises5 = require("node:fs/promises");
22126
23172
  var import_node_path6 = require("node:path");
22127
23173
 
@@ -23307,7 +24353,7 @@ function mergeAggregateGroup(aggregates) {
23307
24353
  });
23308
24354
  }
23309
24355
  function hashIdentifier(parts, prefix, length) {
23310
- const digest = (0, import_node_crypto4.createHash)("sha256").update(parts.join("\0")).digest("hex");
24356
+ const digest = (0, import_node_crypto5.createHash)("sha256").update(parts.join("\0")).digest("hex");
23311
24357
  return `${prefix}_${digest.slice(0, length)}`;
23312
24358
  }
23313
24359
  function deriveIncidentId(projectId, serviceName, environment, incidentFingerprint) {
@@ -23341,7 +24387,7 @@ function stableJson3(value) {
23341
24387
  return `{${keys.map((key) => `${JSON.stringify(key)}:${stableJson3(record[key])}`).join(",")}}`;
23342
24388
  }
23343
24389
  function buildRequestAnomalyFingerprint(input) {
23344
- return (0, import_node_crypto4.createHash)("sha256").update(
24390
+ return (0, import_node_crypto5.createHash)("sha256").update(
23345
24391
  stableJson3({
23346
24392
  kind: "request_status_anomaly",
23347
24393
  project_id: input.projectId,
@@ -23972,7 +25018,7 @@ function buildEventFileName(events, filePath) {
23972
25018
  const candidate = Date.parse(event.occurred_at);
23973
25019
  return Number.isFinite(candidate) && candidate > latest ? candidate : latest;
23974
25020
  }, 0);
23975
- const digest = (0, import_node_crypto5.createHash)("sha256").update([filePath, ...events.map((event) => event.event_id)].join("\0")).digest("hex").slice(0, 8);
25021
+ const digest = (0, import_node_crypto6.createHash)("sha256").update([filePath, ...events.map((event) => event.event_id)].join("\0")).digest("hex").slice(0, 8);
23976
25022
  return `${lastOccurredAt}-${digest}-${slugify(events[0]?.service.name ?? (0, import_node_path7.basename)(filePath))}.events.json`;
23977
25023
  }
23978
25024
  async function readProfile(rootDirectory, readFile) {
@@ -24185,7 +25231,7 @@ async function listLocalIncidents(input, dependencies) {
24185
25231
  return true;
24186
25232
  }
24187
25233
  return incident.status === input.status;
24188
- }).filter((incident) => input.severity === void 0 ? true : incident.severity === input.severity).sort(sortIncidentsDescending);
25234
+ }).filter((incident) => input.severity === void 0 ? true : incident.severity === input.severity).filter((incident) => input.firstSeenAfter === void 0 ? true : incident.first_seen_at >= input.firstSeenAfter).sort(sortIncidentsDescending);
24189
25235
  const startIndex = input.cursor === void 0 ? 0 : incidents.findIndex((incident) => buildCursor(incident) === input.cursor) + 1;
24190
25236
  const pagedIncidents = input.limit === void 0 ? incidents.slice(startIndex) : incidents.slice(startIndex, startIndex + input.limit);
24191
25237
  const hasMore = input.limit !== void 0 && startIndex + input.limit < incidents.length;
@@ -24381,7 +25427,7 @@ function cloudVerificationRunId(now) {
24381
25427
  return now.toISOString().replace(/[-:.TZ]/g, "").slice(0, 14);
24382
25428
  }
24383
25429
  function defaultCloudVerificationSuffix() {
24384
- return (0, import_node_crypto6.randomUUID)().replace(/-/g, "").slice(0, 12);
25430
+ return (0, import_node_crypto7.randomUUID)().replace(/-/g, "").slice(0, 12);
24385
25431
  }
24386
25432
  function normalizeCloudVerificationSuffix(suffix) {
24387
25433
  const normalized = suffix.toLowerCase().replace(/[^a-z0-9]/g, "").slice(0, 12);
@@ -26165,8 +27211,176 @@ function createProbeMcpTools(api) {
26165
27211
  };
26166
27212
  }
26167
27213
 
26168
- // src/project-tools.ts
27214
+ // src/health-check-tools.ts
26169
27215
  function mapMcpError11(error) {
27216
+ if (error instanceof HealthCheckApiError) {
27217
+ throw new Error(`mcp_tool_error:${error.code}`);
27218
+ }
27219
+ throw new Error("mcp_tool_error:unknown_error");
27220
+ }
27221
+ function createHealthCheckMcpTools(api) {
27222
+ return {
27223
+ async list_health_checks(input) {
27224
+ try {
27225
+ const requestInput = {
27226
+ bearerToken: String(input["bearerToken"]),
27227
+ projectId: String(input["projectId"])
27228
+ };
27229
+ if (typeof input["limit"] === "number") {
27230
+ requestInput.limit = input["limit"];
27231
+ }
27232
+ return await api.listHealthChecks(requestInput);
27233
+ } catch (error) {
27234
+ mapMcpError11(error);
27235
+ }
27236
+ },
27237
+ async get_health_check(input) {
27238
+ try {
27239
+ return await api.getHealthCheck({
27240
+ bearerToken: String(input["bearerToken"]),
27241
+ projectId: String(input["projectId"]),
27242
+ checkId: String(input["checkId"])
27243
+ });
27244
+ } catch (error) {
27245
+ mapMcpError11(error);
27246
+ }
27247
+ },
27248
+ async create_health_check(input) {
27249
+ try {
27250
+ const requestInput = {
27251
+ bearerToken: String(input["bearerToken"]),
27252
+ projectId: String(input["projectId"]),
27253
+ name: String(input["name"]),
27254
+ url: String(input["url"]),
27255
+ method: input["method"] === "HEAD" ? "HEAD" : "GET",
27256
+ expectedStatusMin: typeof input["expectedStatusMin"] === "number" ? input["expectedStatusMin"] : 200,
27257
+ expectedStatusMax: typeof input["expectedStatusMax"] === "number" ? input["expectedStatusMax"] : 399,
27258
+ timeoutMs: typeof input["timeoutMs"] === "number" ? input["timeoutMs"] : 5e3,
27259
+ intervalSeconds: Number(input["intervalSeconds"]),
27260
+ failureThreshold: typeof input["failureThreshold"] === "number" ? input["failureThreshold"] : 3,
27261
+ recoveryThreshold: typeof input["recoveryThreshold"] === "number" ? input["recoveryThreshold"] : 2,
27262
+ enabled: typeof input["enabled"] === "boolean" ? input["enabled"] : true
27263
+ };
27264
+ if (typeof input["environment"] === "string") {
27265
+ requestInput.environment = input["environment"];
27266
+ }
27267
+ if (typeof input["serviceName"] === "string" || input["serviceName"] === null) {
27268
+ requestInput.serviceName = input["serviceName"];
27269
+ }
27270
+ return await api.createHealthCheck(requestInput);
27271
+ } catch (error) {
27272
+ mapMcpError11(error);
27273
+ }
27274
+ },
27275
+ async update_health_check(input) {
27276
+ try {
27277
+ const requestInput = {
27278
+ bearerToken: String(input["bearerToken"]),
27279
+ projectId: String(input["projectId"]),
27280
+ checkId: String(input["checkId"])
27281
+ };
27282
+ if (typeof input["name"] === "string") {
27283
+ requestInput.name = input["name"];
27284
+ }
27285
+ if (typeof input["url"] === "string") {
27286
+ requestInput.url = input["url"];
27287
+ }
27288
+ if (input["method"] === "GET" || input["method"] === "HEAD") {
27289
+ requestInput.method = input["method"];
27290
+ }
27291
+ if (typeof input["expectedStatusMin"] === "number") {
27292
+ requestInput.expectedStatusMin = input["expectedStatusMin"];
27293
+ }
27294
+ if (typeof input["expectedStatusMax"] === "number") {
27295
+ requestInput.expectedStatusMax = input["expectedStatusMax"];
27296
+ }
27297
+ if (typeof input["timeoutMs"] === "number") {
27298
+ requestInput.timeoutMs = input["timeoutMs"];
27299
+ }
27300
+ if (typeof input["intervalSeconds"] === "number") {
27301
+ requestInput.intervalSeconds = input["intervalSeconds"];
27302
+ }
27303
+ if (typeof input["failureThreshold"] === "number") {
27304
+ requestInput.failureThreshold = input["failureThreshold"];
27305
+ }
27306
+ if (typeof input["recoveryThreshold"] === "number") {
27307
+ requestInput.recoveryThreshold = input["recoveryThreshold"];
27308
+ }
27309
+ if (typeof input["environment"] === "string") {
27310
+ requestInput.environment = input["environment"];
27311
+ }
27312
+ if (typeof input["serviceName"] === "string" || input["serviceName"] === null) {
27313
+ requestInput.serviceName = input["serviceName"];
27314
+ }
27315
+ if (typeof input["enabled"] === "boolean") {
27316
+ requestInput.enabled = input["enabled"];
27317
+ }
27318
+ return await api.updateHealthCheck(requestInput);
27319
+ } catch (error) {
27320
+ mapMcpError11(error);
27321
+ }
27322
+ },
27323
+ async delete_health_check(input) {
27324
+ try {
27325
+ return await api.deleteHealthCheck({
27326
+ bearerToken: String(input["bearerToken"]),
27327
+ projectId: String(input["projectId"]),
27328
+ checkId: String(input["checkId"])
27329
+ });
27330
+ } catch (error) {
27331
+ mapMcpError11(error);
27332
+ }
27333
+ },
27334
+ async test_health_check(input) {
27335
+ try {
27336
+ return await api.testHealthCheck({
27337
+ bearerToken: String(input["bearerToken"]),
27338
+ projectId: String(input["projectId"]),
27339
+ url: String(input["url"]),
27340
+ method: input["method"] === "HEAD" ? "HEAD" : "GET",
27341
+ expectedStatusMin: typeof input["expectedStatusMin"] === "number" ? input["expectedStatusMin"] : 200,
27342
+ expectedStatusMax: typeof input["expectedStatusMax"] === "number" ? input["expectedStatusMax"] : 399,
27343
+ timeoutMs: typeof input["timeoutMs"] === "number" ? input["timeoutMs"] : 5e3
27344
+ });
27345
+ } catch (error) {
27346
+ mapMcpError11(error);
27347
+ }
27348
+ },
27349
+ async list_health_check_results(input) {
27350
+ try {
27351
+ const requestInput = {
27352
+ bearerToken: String(input["bearerToken"]),
27353
+ projectId: String(input["projectId"]),
27354
+ checkId: String(input["checkId"])
27355
+ };
27356
+ if (typeof input["limit"] === "number") {
27357
+ requestInput.limit = input["limit"];
27358
+ }
27359
+ return await api.listHealthCheckResults(requestInput);
27360
+ } catch (error) {
27361
+ mapMcpError11(error);
27362
+ }
27363
+ },
27364
+ async list_health_check_daily_rollups(input) {
27365
+ try {
27366
+ const requestInput = {
27367
+ bearerToken: String(input["bearerToken"]),
27368
+ projectId: String(input["projectId"]),
27369
+ checkId: String(input["checkId"])
27370
+ };
27371
+ if (typeof input["limit"] === "number") {
27372
+ requestInput.limit = input["limit"];
27373
+ }
27374
+ return await api.listHealthCheckDailyRollups(requestInput);
27375
+ } catch (error) {
27376
+ mapMcpError11(error);
27377
+ }
27378
+ }
27379
+ };
27380
+ }
27381
+
27382
+ // src/project-tools.ts
27383
+ function mapMcpError12(error) {
26170
27384
  if (error instanceof ProjectManagementApiError) {
26171
27385
  throw new Error(`mcp_tool_error:${error.code}`);
26172
27386
  }
@@ -26184,7 +27398,7 @@ function createProjectMcpTools(api) {
26184
27398
  }
26185
27399
  return { projects: await api.listProjects(requestInput) };
26186
27400
  } catch (error) {
26187
- mapMcpError11(error);
27401
+ mapMcpError12(error);
26188
27402
  }
26189
27403
  },
26190
27404
  async create_project(input) {
@@ -26199,7 +27413,7 @@ function createProjectMcpTools(api) {
26199
27413
  }
26200
27414
  return { project: await api.createProject(requestInput) };
26201
27415
  } catch (error) {
26202
- mapMcpError11(error);
27416
+ mapMcpError12(error);
26203
27417
  }
26204
27418
  },
26205
27419
  async update_project(input) {
@@ -26219,7 +27433,7 @@ function createProjectMcpTools(api) {
26219
27433
  }
26220
27434
  return { project: await api.updateProject(requestInput) };
26221
27435
  } catch (error) {
26222
- mapMcpError11(error);
27436
+ mapMcpError12(error);
26223
27437
  }
26224
27438
  },
26225
27439
  async delete_project(input) {
@@ -26231,7 +27445,7 @@ function createProjectMcpTools(api) {
26231
27445
  })
26232
27446
  };
26233
27447
  } catch (error) {
26234
- mapMcpError11(error);
27448
+ mapMcpError12(error);
26235
27449
  }
26236
27450
  }
26237
27451
  };
@@ -26438,7 +27652,7 @@ async function persistCloudArtifact(directoryPath, fileName, payload, dependenci
26438
27652
  }
26439
27653
 
26440
27654
  // src/retrieval-tools.ts
26441
- function mapMcpError12(error) {
27655
+ function mapMcpError13(error) {
26442
27656
  if (error instanceof RetrievalApiError) {
26443
27657
  throw new Error(`mcp_tool_error:${error.code}`);
26444
27658
  }
@@ -26496,6 +27710,9 @@ function readIncidentListFilters(input) {
26496
27710
  if (typeof input["severity"] === "string") {
26497
27711
  requestInput.severity = input["severity"];
26498
27712
  }
27713
+ if (typeof input["firstSeenAfter"] === "string") {
27714
+ requestInput.firstSeenAfter = input["firstSeenAfter"];
27715
+ }
26499
27716
  if (typeof input["cursor"] === "string") {
26500
27717
  requestInput.cursor = input["cursor"];
26501
27718
  }
@@ -26516,6 +27733,7 @@ async function listAllCloudIncidents(input, api) {
26516
27733
  ...filters.service === void 0 ? {} : { service: filters.service },
26517
27734
  ...filters.status === void 0 ? {} : { status: filters.status },
26518
27735
  ...filters.severity === void 0 ? {} : { severity: filters.severity },
27736
+ ...filters.firstSeenAfter === void 0 ? {} : { firstSeenAfter: filters.firstSeenAfter },
26519
27737
  ...cursor === void 0 ? {} : { cursor }
26520
27738
  });
26521
27739
  incidents.push(...response.incidents.map((incident) => attachSourceToRecord(incident, "cloud")));
@@ -26577,7 +27795,8 @@ function createRetrievalMcpTools(api) {
26577
27795
  ...incidentFilters.environment === void 0 ? {} : { environment: incidentFilters.environment },
26578
27796
  ...incidentFilters.service === void 0 ? {} : { service: incidentFilters.service },
26579
27797
  ...incidentFilters.status === void 0 ? {} : { status: incidentFilters.status },
26580
- ...incidentFilters.severity === void 0 ? {} : { severity: incidentFilters.severity }
27798
+ ...incidentFilters.severity === void 0 ? {} : { severity: incidentFilters.severity },
27799
+ ...incidentFilters.firstSeenAfter === void 0 ? {} : { firstSeenAfter: incidentFilters.firstSeenAfter }
26581
27800
  });
26582
27801
  const cloudIncidents = await listAllCloudIncidents(input, {
26583
27802
  listIncidents: (requestInput2) => api.listIncidents(requestInput2)
@@ -26608,6 +27827,9 @@ function createRetrievalMcpTools(api) {
26608
27827
  if (incidentFilters.severity !== void 0) {
26609
27828
  requestInput.severity = incidentFilters.severity;
26610
27829
  }
27830
+ if (incidentFilters.firstSeenAfter !== void 0) {
27831
+ requestInput.firstSeenAfter = incidentFilters.firstSeenAfter;
27832
+ }
26611
27833
  if (incidentFilters.cursor !== void 0) {
26612
27834
  requestInput.cursor = incidentFilters.cursor;
26613
27835
  }
@@ -26620,7 +27842,7 @@ function createRetrievalMcpTools(api) {
26620
27842
  incidents: incidents.incidents.map((incident) => attachSourceToRecord(incident, "cloud"))
26621
27843
  };
26622
27844
  } catch (error) {
26623
- mapMcpError12(error);
27845
+ mapMcpError13(error);
26624
27846
  }
26625
27847
  },
26626
27848
  async get_incident(input) {
@@ -26655,7 +27877,7 @@ function createRetrievalMcpTools(api) {
26655
27877
  )
26656
27878
  };
26657
27879
  } catch (error) {
26658
- mapMcpError12(error);
27880
+ mapMcpError13(error);
26659
27881
  }
26660
27882
  },
26661
27883
  async get_incident_context(input) {
@@ -26684,7 +27906,7 @@ function createRetrievalMcpTools(api) {
26684
27906
  "cloud"
26685
27907
  );
26686
27908
  } catch (error) {
26687
- mapMcpError12(error);
27909
+ mapMcpError13(error);
26688
27910
  }
26689
27911
  },
26690
27912
  async resolve_incident(input) {
@@ -26729,7 +27951,7 @@ function createRetrievalMcpTools(api) {
26729
27951
  })()
26730
27952
  };
26731
27953
  } catch (error) {
26732
- mapMcpError12(error);
27954
+ mapMcpError13(error);
26733
27955
  }
26734
27956
  },
26735
27957
  async resolve_incidents(input) {
@@ -26790,7 +28012,7 @@ function createRetrievalMcpTools(api) {
26790
28012
  incidents: incidentIds.map((incidentId) => localIncidents.get(incidentId))
26791
28013
  };
26792
28014
  } catch (error) {
26793
- mapMcpError12(error);
28015
+ mapMcpError13(error);
26794
28016
  }
26795
28017
  },
26796
28018
  async reopen_incident(input) {
@@ -26835,7 +28057,7 @@ function createRetrievalMcpTools(api) {
26835
28057
  })()
26836
28058
  };
26837
28059
  } catch (error) {
26838
- mapMcpError12(error);
28060
+ mapMcpError13(error);
26839
28061
  }
26840
28062
  },
26841
28063
  async reopen_incidents(input) {
@@ -26896,7 +28118,7 @@ function createRetrievalMcpTools(api) {
26896
28118
  incidents: incidentIds.map((incidentId) => localIncidents.get(incidentId))
26897
28119
  };
26898
28120
  } catch (error) {
26899
- mapMcpError12(error);
28121
+ mapMcpError13(error);
26900
28122
  }
26901
28123
  },
26902
28124
  async get_bundle(input) {
@@ -26927,7 +28149,7 @@ function createRetrievalMcpTools(api) {
26927
28149
  }
26928
28150
  );
26929
28151
  } catch (error) {
26930
- mapMcpError12(error);
28152
+ mapMcpError13(error);
26931
28153
  }
26932
28154
  },
26933
28155
  async get_logs(input) {
@@ -26947,7 +28169,7 @@ function createRetrievalMcpTools(api) {
26947
28169
  }
26948
28170
  return await api.getLogs(requestInput);
26949
28171
  } catch (error) {
26950
- mapMcpError12(error);
28172
+ mapMcpError13(error);
26951
28173
  }
26952
28174
  },
26953
28175
  async get_reproduction(input) {
@@ -26978,14 +28200,14 @@ function createRetrievalMcpTools(api) {
26978
28200
  }
26979
28201
  );
26980
28202
  } catch (error) {
26981
- mapMcpError12(error);
28203
+ mapMcpError13(error);
26982
28204
  }
26983
28205
  }
26984
28206
  };
26985
28207
  }
26986
28208
 
26987
28209
  // src/services-tools.ts
26988
- function mapMcpError13(error) {
28210
+ function mapMcpError14(error) {
26989
28211
  if (error instanceof RetrievalApiError) {
26990
28212
  throw new Error(`mcp_tool_error:${error.code}`);
26991
28213
  }
@@ -27006,14 +28228,14 @@ function createServicesMcpTools(api) {
27006
28228
  services: await api.listServices(requestInput)
27007
28229
  };
27008
28230
  } catch (error) {
27009
- mapMcpError13(error);
28231
+ mapMcpError14(error);
27010
28232
  }
27011
28233
  }
27012
28234
  };
27013
28235
  }
27014
28236
 
27015
28237
  // src/setup-tools.ts
27016
- function mapMcpError14() {
28238
+ function mapMcpError15() {
27017
28239
  throw new Error("mcp_tool_error:unknown_error");
27018
28240
  }
27019
28241
  function parseJsonOutput2(output) {
@@ -27028,7 +28250,7 @@ async function runJsonCommand2(command) {
27028
28250
  const result = await command();
27029
28251
  return parseJsonOutput2(result.output);
27030
28252
  } catch {
27031
- mapMcpError14();
28253
+ mapMcpError15();
27032
28254
  }
27033
28255
  }
27034
28256
  function createSetupMcpTools(commands) {
@@ -27087,7 +28309,7 @@ function createSetupMcpTools(commands) {
27087
28309
  }
27088
28310
 
27089
28311
  // src/slack-tools.ts
27090
- function mapMcpError15(error) {
28312
+ function mapMcpError16(error) {
27091
28313
  if (error instanceof SlackApiError) {
27092
28314
  throw new Error(`mcp_tool_error:${error.code}`);
27093
28315
  }
@@ -27104,7 +28326,7 @@ function createSlackMcpTools(api) {
27104
28326
  })
27105
28327
  };
27106
28328
  } catch (error) {
27107
- mapMcpError15(error);
28329
+ mapMcpError16(error);
27108
28330
  }
27109
28331
  },
27110
28332
  async get_slack_connect_url(input) {
@@ -27117,7 +28339,7 @@ function createSlackMcpTools(api) {
27117
28339
  })
27118
28340
  };
27119
28341
  } catch (error) {
27120
- mapMcpError15(error);
28342
+ mapMcpError16(error);
27121
28343
  }
27122
28344
  },
27123
28345
  async test_slack_destination(input) {
@@ -27130,7 +28352,7 @@ function createSlackMcpTools(api) {
27130
28352
  })
27131
28353
  };
27132
28354
  } catch (error) {
27133
- mapMcpError15(error);
28355
+ mapMcpError16(error);
27134
28356
  }
27135
28357
  },
27136
28358
  async delete_slack_destination(input) {
@@ -27143,14 +28365,14 @@ function createSlackMcpTools(api) {
27143
28365
  })
27144
28366
  };
27145
28367
  } catch (error) {
27146
- mapMcpError15(error);
28368
+ mapMcpError16(error);
27147
28369
  }
27148
28370
  }
27149
28371
  };
27150
28372
  }
27151
28373
 
27152
28374
  // src/token-tools.ts
27153
- function mapMcpError16(error) {
28375
+ function mapMcpError17(error) {
27154
28376
  if (error instanceof TokenManagementApiError) {
27155
28377
  throw new Error(`mcp_tool_error:${error.code}`);
27156
28378
  }
@@ -27171,7 +28393,7 @@ function createTokenMcpTools(api) {
27171
28393
  tokens: await api.listProjectTokens(requestInput)
27172
28394
  };
27173
28395
  } catch (error) {
27174
- mapMcpError16(error);
28396
+ mapMcpError17(error);
27175
28397
  }
27176
28398
  },
27177
28399
  async create_project_token(input) {
@@ -27186,7 +28408,7 @@ function createTokenMcpTools(api) {
27186
28408
  })
27187
28409
  };
27188
28410
  } catch (error) {
27189
- mapMcpError16(error);
28411
+ mapMcpError17(error);
27190
28412
  }
27191
28413
  },
27192
28414
  async revoke_project_token(input) {
@@ -27199,7 +28421,7 @@ function createTokenMcpTools(api) {
27199
28421
  })
27200
28422
  };
27201
28423
  } catch (error) {
27202
- mapMcpError16(error);
28424
+ mapMcpError17(error);
27203
28425
  }
27204
28426
  },
27205
28427
  async list_member_tokens(input) {
@@ -27214,7 +28436,7 @@ function createTokenMcpTools(api) {
27214
28436
  tokens: await api.listMemberTokens(requestInput)
27215
28437
  };
27216
28438
  } catch (error) {
27217
- mapMcpError16(error);
28439
+ mapMcpError17(error);
27218
28440
  }
27219
28441
  },
27220
28442
  async create_member_token(input) {
@@ -27226,7 +28448,7 @@ function createTokenMcpTools(api) {
27226
28448
  })
27227
28449
  };
27228
28450
  } catch (error) {
27229
- mapMcpError16(error);
28451
+ mapMcpError17(error);
27230
28452
  }
27231
28453
  },
27232
28454
  async revoke_member_token(input) {
@@ -27238,14 +28460,14 @@ function createTokenMcpTools(api) {
27238
28460
  })
27239
28461
  };
27240
28462
  } catch (error) {
27241
- mapMcpError16(error);
28463
+ mapMcpError17(error);
27242
28464
  }
27243
28465
  }
27244
28466
  };
27245
28467
  }
27246
28468
 
27247
28469
  // src/webhook-tools.ts
27248
- function mapMcpError17(error) {
28470
+ function mapMcpError18(error) {
27249
28471
  if (error instanceof WebhookApiError) {
27250
28472
  throw new Error(`mcp_tool_error:${error.code}`);
27251
28473
  }
@@ -27266,7 +28488,7 @@ function createWebhookMcpTools(api) {
27266
28488
  webhooks: await api.listWebhooks(requestInput)
27267
28489
  };
27268
28490
  } catch (error) {
27269
- mapMcpError17(error);
28491
+ mapMcpError18(error);
27270
28492
  }
27271
28493
  },
27272
28494
  async create_webhook(input) {
@@ -27287,7 +28509,7 @@ function createWebhookMcpTools(api) {
27287
28509
  webhook: await api.createWebhook(requestInput)
27288
28510
  };
27289
28511
  } catch (error) {
27290
- mapMcpError17(error);
28512
+ mapMcpError18(error);
27291
28513
  }
27292
28514
  },
27293
28515
  async update_webhook(input) {
@@ -27313,7 +28535,7 @@ function createWebhookMcpTools(api) {
27313
28535
  webhook: await api.updateWebhook(requestInput)
27314
28536
  };
27315
28537
  } catch (error) {
27316
- mapMcpError17(error);
28538
+ mapMcpError18(error);
27317
28539
  }
27318
28540
  },
27319
28541
  async delete_webhook(input) {
@@ -27326,7 +28548,7 @@ function createWebhookMcpTools(api) {
27326
28548
  })
27327
28549
  };
27328
28550
  } catch (error) {
27329
- mapMcpError17(error);
28551
+ mapMcpError18(error);
27330
28552
  }
27331
28553
  },
27332
28554
  async test_webhook(input) {
@@ -27343,7 +28565,7 @@ function createWebhookMcpTools(api) {
27343
28565
  delivery: await api.testWebhook(requestInput)
27344
28566
  };
27345
28567
  } catch (error) {
27346
- mapMcpError17(error);
28568
+ mapMcpError18(error);
27347
28569
  }
27348
28570
  },
27349
28571
  async list_webhook_deliveries(input) {
@@ -27360,7 +28582,7 @@ function createWebhookMcpTools(api) {
27360
28582
  deliveries: await api.listWebhookDeliveries(requestInput)
27361
28583
  };
27362
28584
  } catch (error) {
27363
- mapMcpError17(error);
28585
+ mapMcpError18(error);
27364
28586
  }
27365
28587
  },
27366
28588
  async retry_webhook_delivery(input) {
@@ -27372,14 +28594,14 @@ function createWebhookMcpTools(api) {
27372
28594
  deliveryId: String(input["deliveryId"])
27373
28595
  });
27374
28596
  } catch (error) {
27375
- mapMcpError17(error);
28597
+ mapMcpError18(error);
27376
28598
  }
27377
28599
  }
27378
28600
  };
27379
28601
  }
27380
28602
 
27381
28603
  // src/weekly-report-tools.ts
27382
- function mapMcpError18(error) {
28604
+ function mapMcpError19(error) {
27383
28605
  if (error instanceof WeeklyReportApiError) {
27384
28606
  throw new Error(`mcp_tool_error:${error.code}`);
27385
28607
  }
@@ -27397,7 +28619,7 @@ function createWeeklyReportMcpTools(api) {
27397
28619
  })
27398
28620
  };
27399
28621
  } catch (error) {
27400
- mapMcpError18(error);
28622
+ mapMcpError19(error);
27401
28623
  }
27402
28624
  },
27403
28625
  async create_weekly_report_channel(input) {
@@ -27413,7 +28635,7 @@ function createWeeklyReportMcpTools(api) {
27413
28635
  })
27414
28636
  };
27415
28637
  } catch (error) {
27416
- mapMcpError18(error);
28638
+ mapMcpError19(error);
27417
28639
  }
27418
28640
  },
27419
28641
  async update_weekly_report_channel(input) {
@@ -27428,7 +28650,7 @@ function createWeeklyReportMcpTools(api) {
27428
28650
  })
27429
28651
  };
27430
28652
  } catch (error) {
27431
- mapMcpError18(error);
28653
+ mapMcpError19(error);
27432
28654
  }
27433
28655
  },
27434
28656
  async delete_weekly_report_channel(input) {
@@ -27440,7 +28662,7 @@ function createWeeklyReportMcpTools(api) {
27440
28662
  })
27441
28663
  };
27442
28664
  } catch (error) {
27443
- mapMcpError18(error);
28665
+ mapMcpError19(error);
27444
28666
  }
27445
28667
  }
27446
28668
  };
@@ -27509,6 +28731,7 @@ async function createDefaultMcpTools(input = {}) {
27509
28731
  ...createCapturePolicyMcpTools(createCapturePolicyApi(httpClient)),
27510
28732
  ...createImprovementSettingsMcpTools(createImprovementSettingsApi(httpClient)),
27511
28733
  ...createProbeMcpTools(createProbeApi(httpClient)),
28734
+ ...createHealthCheckMcpTools(createHealthCheckApi(httpClient)),
27512
28735
  ...createBillingMcpTools(createBillingApi(httpClient)),
27513
28736
  ...createMemberMcpTools(createMemberApi(httpClient)),
27514
28737
  ...createGitHubMcpTools(createGitHubManagementApi(httpClient))
@@ -28808,7 +30031,7 @@ var zodToJsonSchema = (schema, options) => {
28808
30031
  var package_default = {
28809
30032
  name: "@debugbundle/mcp",
28810
30033
  mcpName: "com.debugbundle/mcp",
28811
- version: "1.3.0",
30034
+ version: "1.5.0",
28812
30035
  private: false,
28813
30036
  description: "Model Context Protocol server for DebugBundle",
28814
30037
  license: "AGPL-3.0-only",
@@ -28844,6 +30067,156 @@ var package_default = {
28844
30067
  }
28845
30068
  };
28846
30069
 
30070
+ // src/health-check-tool-catalog.ts
30071
+ var HEALTH_CHECK_MCP_TOOL_CATALOG = [
30072
+ {
30073
+ name: "list_health_checks",
30074
+ group: "health_checks",
30075
+ description: "List hosted health checks for a project.",
30076
+ inputSchema: external_exports.object({
30077
+ bearerToken: external_exports.string(),
30078
+ projectId: external_exports.string(),
30079
+ limit: external_exports.number().optional()
30080
+ })
30081
+ },
30082
+ {
30083
+ name: "get_health_check",
30084
+ group: "health_checks",
30085
+ description: "Get one hosted health check by id.",
30086
+ inputSchema: external_exports.object({
30087
+ bearerToken: external_exports.string(),
30088
+ projectId: external_exports.string(),
30089
+ checkId: external_exports.string()
30090
+ })
30091
+ },
30092
+ {
30093
+ name: "create_health_check",
30094
+ group: "health_checks",
30095
+ description: "Create a hosted health check for a project.",
30096
+ inputSchema: external_exports.object({
30097
+ bearerToken: external_exports.string(),
30098
+ projectId: external_exports.string(),
30099
+ name: external_exports.string(),
30100
+ url: external_exports.string(),
30101
+ method: external_exports.enum(["GET", "HEAD"]).optional(),
30102
+ expectedStatusMin: external_exports.number().optional(),
30103
+ expectedStatusMax: external_exports.number().optional(),
30104
+ timeoutMs: external_exports.number().optional(),
30105
+ intervalSeconds: external_exports.number(),
30106
+ failureThreshold: external_exports.number().optional(),
30107
+ recoveryThreshold: external_exports.number().optional(),
30108
+ environment: external_exports.string().optional(),
30109
+ serviceName: external_exports.string().nullable().optional(),
30110
+ enabled: external_exports.boolean().optional()
30111
+ })
30112
+ },
30113
+ {
30114
+ name: "update_health_check",
30115
+ group: "health_checks",
30116
+ description: "Update a hosted health check.",
30117
+ inputSchema: external_exports.object({
30118
+ bearerToken: external_exports.string(),
30119
+ projectId: external_exports.string(),
30120
+ checkId: external_exports.string(),
30121
+ name: external_exports.string().optional(),
30122
+ url: external_exports.string().optional(),
30123
+ method: external_exports.enum(["GET", "HEAD"]).optional(),
30124
+ expectedStatusMin: external_exports.number().optional(),
30125
+ expectedStatusMax: external_exports.number().optional(),
30126
+ timeoutMs: external_exports.number().optional(),
30127
+ intervalSeconds: external_exports.number().optional(),
30128
+ failureThreshold: external_exports.number().optional(),
30129
+ recoveryThreshold: external_exports.number().optional(),
30130
+ environment: external_exports.string().optional(),
30131
+ serviceName: external_exports.string().nullable().optional(),
30132
+ enabled: external_exports.boolean().optional()
30133
+ })
30134
+ },
30135
+ {
30136
+ name: "delete_health_check",
30137
+ group: "health_checks",
30138
+ description: "Delete a hosted health check.",
30139
+ inputSchema: external_exports.object({
30140
+ bearerToken: external_exports.string(),
30141
+ projectId: external_exports.string(),
30142
+ checkId: external_exports.string()
30143
+ })
30144
+ },
30145
+ {
30146
+ name: "test_health_check",
30147
+ group: "health_checks",
30148
+ description: "Run a side-effect-free test for a hosted health-check target.",
30149
+ inputSchema: external_exports.object({
30150
+ bearerToken: external_exports.string(),
30151
+ projectId: external_exports.string(),
30152
+ url: external_exports.string(),
30153
+ method: external_exports.enum(["GET", "HEAD"]).optional(),
30154
+ expectedStatusMin: external_exports.number().optional(),
30155
+ expectedStatusMax: external_exports.number().optional(),
30156
+ timeoutMs: external_exports.number().optional()
30157
+ })
30158
+ },
30159
+ {
30160
+ name: "list_health_check_results",
30161
+ group: "health_checks",
30162
+ description: "List recent execution results for one hosted health check.",
30163
+ inputSchema: external_exports.object({
30164
+ bearerToken: external_exports.string(),
30165
+ projectId: external_exports.string(),
30166
+ checkId: external_exports.string(),
30167
+ limit: external_exports.number().optional()
30168
+ })
30169
+ },
30170
+ {
30171
+ name: "list_health_check_daily_rollups",
30172
+ group: "health_checks",
30173
+ description: "List retained per-day history for one hosted health check.",
30174
+ inputSchema: external_exports.object({
30175
+ bearerToken: external_exports.string(),
30176
+ projectId: external_exports.string(),
30177
+ checkId: external_exports.string(),
30178
+ limit: external_exports.number().optional()
30179
+ })
30180
+ }
30181
+ ];
30182
+
30183
+ // src/probe-tool-catalog.ts
30184
+ var PROBE_MCP_TOOL_CATALOG = [
30185
+ {
30186
+ name: "activate_probe",
30187
+ group: "probes",
30188
+ description: "Activate a remote probe on a project.",
30189
+ inputSchema: external_exports.object({
30190
+ bearerToken: external_exports.string(),
30191
+ projectId: external_exports.string(),
30192
+ labelPattern: external_exports.string(),
30193
+ service: external_exports.string().optional(),
30194
+ environment: external_exports.string().optional(),
30195
+ ttlSeconds: external_exports.number().optional(),
30196
+ triggerTtlSeconds: external_exports.number().optional()
30197
+ })
30198
+ },
30199
+ {
30200
+ name: "list_active_probes",
30201
+ group: "probes",
30202
+ description: "List active probe activations for a project.",
30203
+ inputSchema: external_exports.object({
30204
+ bearerToken: external_exports.string(),
30205
+ projectId: external_exports.string()
30206
+ })
30207
+ },
30208
+ {
30209
+ name: "deactivate_probe",
30210
+ group: "probes",
30211
+ description: "Deactivate a probe activation.",
30212
+ inputSchema: external_exports.object({
30213
+ bearerToken: external_exports.string(),
30214
+ projectId: external_exports.string(),
30215
+ activationId: external_exports.string()
30216
+ })
30217
+ }
30218
+ ];
30219
+
28847
30220
  // src/tool-catalog.ts
28848
30221
  var jsonObjectSchema = external_exports.record(external_exports.unknown());
28849
30222
  var optionalBearerTokenSchema = external_exports.string().optional();
@@ -28862,6 +30235,7 @@ var listIncidentsInputSchema = external_exports.object({
28862
30235
  service: external_exports.string().optional(),
28863
30236
  status: external_exports.string().optional(),
28864
30237
  severity: external_exports.string().optional(),
30238
+ firstSeenAfter: external_exports.string().optional(),
28865
30239
  cursor: external_exports.string().optional(),
28866
30240
  limit: external_exports.number().optional()
28867
30241
  });
@@ -29600,39 +30974,8 @@ var MCP_TOOL_CATALOG = [
29600
30974
  })
29601
30975
  })
29602
30976
  },
29603
- {
29604
- name: "activate_probe",
29605
- group: "probes",
29606
- description: "Activate a remote probe on a project.",
29607
- inputSchema: external_exports.object({
29608
- bearerToken: external_exports.string(),
29609
- projectId: external_exports.string(),
29610
- labelPattern: external_exports.string(),
29611
- service: external_exports.string().optional(),
29612
- environment: external_exports.string().optional(),
29613
- ttlSeconds: external_exports.number().optional(),
29614
- triggerTtlSeconds: external_exports.number().optional()
29615
- })
29616
- },
29617
- {
29618
- name: "list_active_probes",
29619
- group: "probes",
29620
- description: "List active probe activations for a project.",
29621
- inputSchema: external_exports.object({
29622
- bearerToken: external_exports.string(),
29623
- projectId: external_exports.string()
29624
- })
29625
- },
29626
- {
29627
- name: "deactivate_probe",
29628
- group: "probes",
29629
- description: "Deactivate a probe activation.",
29630
- inputSchema: external_exports.object({
29631
- bearerToken: external_exports.string(),
29632
- projectId: external_exports.string(),
29633
- activationId: external_exports.string()
29634
- })
29635
- },
30977
+ ...PROBE_MCP_TOOL_CATALOG,
30978
+ ...HEALTH_CHECK_MCP_TOOL_CATALOG,
29636
30979
  {
29637
30980
  name: "get_billing_summary",
29638
30981
  group: "billing",