@debugbundle/mcp 0.1.7 → 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.
Files changed (2) hide show
  1. package/dist/main.cjs +288 -28
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -14776,8 +14776,9 @@ var GitHubDispatchDeliverySchema = external_exports.object({
14776
14776
  delivery_id: external_exports.string(),
14777
14777
  rule_id: external_exports.string(),
14778
14778
  rule_name: external_exports.string(),
14779
- incident_id: external_exports.string(),
14780
- incident_title: external_exports.string(),
14779
+ incident_id: external_exports.string().nullable(),
14780
+ improvement_id: external_exports.string().nullable(),
14781
+ target_title: external_exports.string(),
14781
14782
  status: external_exports.enum(["pending", "retrying", "delivered", "failed", "skipped"]),
14782
14783
  attempt_count: external_exports.number().int(),
14783
14784
  last_attempt_at: external_exports.string().nullable(),
@@ -15259,6 +15260,7 @@ var ImprovementSchema = external_exports.object({
15259
15260
  summary: external_exports.string(),
15260
15261
  occurrence_count: external_exports.number().int(),
15261
15262
  evidence: external_exports.record(external_exports.unknown()),
15263
+ related_incident_ids: external_exports.array(external_exports.string()),
15262
15264
  first_detected_at: external_exports.string(),
15263
15265
  last_detected_at: external_exports.string(),
15264
15266
  resolved_at: external_exports.string().nullable(),
@@ -15791,6 +15793,7 @@ var ProjectTokenSchema = external_exports.object({
15791
15793
  token_id: external_exports.string(),
15792
15794
  project_id: external_exports.string(),
15793
15795
  label: external_exports.string(),
15796
+ allowed_origins: external_exports.array(external_exports.string()).default([]),
15794
15797
  created_at: external_exports.string(),
15795
15798
  last_used_at: external_exports.string().nullable(),
15796
15799
  revoked_at: external_exports.string().nullable(),
@@ -15875,7 +15878,8 @@ function createTokenManagementApi(client) {
15875
15878
  path: `/v1/projects/${input.projectId}/tokens`,
15876
15879
  bearerToken: input.bearerToken,
15877
15880
  body: {
15878
- label: input.label
15881
+ label: input.label,
15882
+ ...input.allowedOrigins === void 0 ? {} : { allowed_origins: input.allowedOrigins }
15879
15883
  }
15880
15884
  })
15881
15885
  );
@@ -17123,6 +17127,25 @@ function buildSkill() {
17123
17127
  "",
17124
17128
  "Use DebugBundle before starting a fresh bug investigation.",
17125
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
+ "",
17126
17149
  "## Core Workflow",
17127
17150
  "",
17128
17151
  "1. Check DebugBundle incidents first to avoid re-investigating a known failure.",
@@ -17173,23 +17196,35 @@ function buildCliReference() {
17173
17196
  "## Setup",
17174
17197
  "",
17175
17198
  "- `debugbundle setup [--non-interactive] [--json]`",
17176
- "- `debugbundle doctor [--json]`",
17199
+ "- `debugbundle doctor [--check-relay] [--json]`",
17177
17200
  "- `debugbundle validate [--fix] [--json]`",
17178
17201
  "- `debugbundle ingest <file> --format <format> [--json]`",
17179
17202
  "- `debugbundle watch --log <file> --format <format> [--json]`",
17180
17203
  "- `debugbundle watch --cloud --log <file> --format <format> [--json]`",
17181
17204
  "- `debugbundle process [--preset <minimal|balanced|investigative>] [--json]`",
17205
+ "- `debugbundle clean [--events] [--bundles] [--all] [--older-than <Nd>] [--json]`",
17182
17206
  "",
17183
17207
  "## Investigation",
17184
17208
  "",
17185
- "- `debugbundle incidents`",
17186
- "- `debugbundle inspect <incident-id>`",
17187
- "- `debugbundle bundle <incident-id>`",
17188
- "- `debugbundle reproduce <incident-id>`",
17189
- "- `debugbundle resolve <incident-id>`",
17190
- "- `debugbundle reopen <incident-id>`",
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]`",
17191
17216
  "- `debugbundle analyze --type improvement --local`",
17192
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
+ "",
17193
17228
  "## Incident Hygiene",
17194
17229
  "",
17195
17230
  "Resolve incidents after a fix is verified or after an intentional smoke, dogfood, or verification incident has served its purpose.",
@@ -17221,6 +17256,17 @@ function buildMcpReference() {
17221
17256
  "",
17222
17257
  "Use the same incident-first workflow through MCP when an agent is operating in connected mode.",
17223
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
+ "",
17224
17270
  "- Prefer bundle retrieval tools before reading raw repository files.",
17225
17271
  "- Use MCP bundle access when the current issue originated in production.",
17226
17272
  "- Resolve fixed or intentionally generated incidents with `resolve_incident` so open incidents stay actionable.",
@@ -17244,8 +17290,12 @@ function buildBundleSchemaReference() {
17244
17290
  "Focus on:",
17245
17291
  "- `summary` for the failure synopsis and recommended action",
17246
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",
17247
17295
  "- `links.reproduction` for the generated reproduction artifact",
17248
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.",
17249
17299
  ""
17250
17300
  ].join("\n");
17251
17301
  }
@@ -17256,10 +17306,12 @@ function buildProfileEnrichmentReference() {
17256
17306
  "The setup profile is generated from static analysis and must be reviewed before agents rely on it for architecture decisions.",
17257
17307
  "",
17258
17308
  "Checklist:",
17259
- "- verify service kinds, frameworks, and runtime assumptions",
17260
- "- add critical paths and ownership notes",
17261
- "- confirm build, test, and lint workflows",
17262
- "- update `debugbundle.validation_status` to `agent-validated` when complete",
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",
17263
17315
  ""
17264
17316
  ].join("\n");
17265
17317
  }
@@ -17341,6 +17393,22 @@ function buildSkillEvals() {
17341
17393
  "Resolve verified or intentionally generated incidents after the workflow is complete.",
17342
17394
  "Leave unresolved incidents open when the failure is still live or unverified."
17343
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
+ ]
17344
17412
  }
17345
17413
  ]
17346
17414
  },
@@ -19430,6 +19498,164 @@ var STORAGE_SCHEMA_MIGRATIONS = [
19430
19498
  )
19431
19499
  `
19432
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'
19650
+ `
19651
+ ]
19652
+ }),
19653
+ defineStorageSchemaMigration({
19654
+ id: "202605220001_add_project_token_allowed_origins",
19655
+ description: "Add optional browser-origin allowlists to project ingestion tokens.",
19656
+ statements: [
19657
+ "ALTER TABLE project_tokens ADD COLUMN IF NOT EXISTS allowed_origins jsonb NOT NULL DEFAULT '[]'::jsonb"
19658
+ ]
19433
19659
  })
19434
19660
  ];
19435
19661
 
@@ -22231,53 +22457,62 @@ var import_node_path10 = require("node:path");
22231
22457
  var SUGGESTED_ACTIONS2 = [
22232
22458
  "Run debugbundle setup if .debugbundle/profile.json is missing.",
22233
22459
  "Run debugbundle profile validate for field-level profile errors.",
22234
- "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."
22235
22461
  ];
22236
22462
  var FIXABLE_FILES = [
22237
22463
  {
22238
22464
  name: "connection-config",
22239
22465
  filePath: CONNECTION_FILE_PATH,
22240
- buildContent: buildConnectionConfig
22466
+ buildContent: buildConnectionConfig,
22467
+ checkContent: false
22241
22468
  },
22242
22469
  {
22243
22470
  name: "agent-skill",
22244
22471
  filePath: SKILL_FILE_PATH,
22245
- buildContent: buildSkill
22472
+ buildContent: buildSkill,
22473
+ checkContent: true
22246
22474
  },
22247
22475
  {
22248
22476
  name: "cli-reference",
22249
22477
  filePath: CLI_REFERENCE_FILE_PATH,
22250
- buildContent: buildCliReference
22478
+ buildContent: buildCliReference,
22479
+ checkContent: true
22251
22480
  },
22252
22481
  {
22253
22482
  name: "mcp-reference",
22254
22483
  filePath: MCP_REFERENCE_FILE_PATH,
22255
- buildContent: buildMcpReference
22484
+ buildContent: buildMcpReference,
22485
+ checkContent: true
22256
22486
  },
22257
22487
  {
22258
22488
  name: "bundle-schema-reference",
22259
22489
  filePath: BUNDLE_SCHEMA_REFERENCE_FILE_PATH,
22260
- buildContent: buildBundleSchemaReference
22490
+ buildContent: buildBundleSchemaReference,
22491
+ checkContent: true
22261
22492
  },
22262
22493
  {
22263
22494
  name: "profile-enrichment-reference",
22264
22495
  filePath: PROFILE_ENRICHMENT_REFERENCE_FILE_PATH,
22265
- buildContent: buildProfileEnrichmentReference
22496
+ buildContent: buildProfileEnrichmentReference,
22497
+ checkContent: true
22266
22498
  },
22267
22499
  {
22268
22500
  name: "improvement-analysis-recipe",
22269
22501
  filePath: IMPROVEMENT_ANALYSIS_RECIPE_FILE_PATH,
22270
- buildContent: buildImprovementAnalysisRecipe
22502
+ buildContent: buildImprovementAnalysisRecipe,
22503
+ checkContent: true
22271
22504
  },
22272
22505
  {
22273
22506
  name: "performance-analysis-recipe",
22274
22507
  filePath: PERFORMANCE_ANALYSIS_RECIPE_FILE_PATH,
22275
- buildContent: buildPerformanceAnalysisRecipe
22508
+ buildContent: buildPerformanceAnalysisRecipe,
22509
+ checkContent: true
22276
22510
  },
22277
22511
  {
22278
22512
  name: "skill-evals",
22279
22513
  filePath: EVALS_FILE_PATH,
22280
- buildContent: buildSkillEvals
22514
+ buildContent: buildSkillEvals,
22515
+ checkContent: true
22281
22516
  }
22282
22517
  ];
22283
22518
  async function pathExists5(path, stat) {
@@ -22391,6 +22626,28 @@ async function validateCommand(input, dependencies = {}) {
22391
22626
  for (const fixableFile of FIXABLE_FILES) {
22392
22627
  const absoluteFilePath = (0, import_node_path10.join)(rootDirectory, fixableFile.filePath);
22393
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
+ }
22394
22651
  checks.push({
22395
22652
  name: fixableFile.name,
22396
22653
  status: "ok",
@@ -23961,11 +24218,13 @@ function createTokenMcpTools(api) {
23961
24218
  },
23962
24219
  async create_project_token(input) {
23963
24220
  try {
24221
+ const allowedOrigins = Array.isArray(input["allowedOrigins"]) ? input["allowedOrigins"].map((value) => String(value)) : void 0;
23964
24222
  return {
23965
24223
  token: await api.createProjectToken({
23966
24224
  bearerToken: String(input["bearerToken"]),
23967
24225
  projectId: String(input["projectId"]),
23968
- label: String(input["label"])
24226
+ label: String(input["label"]),
24227
+ ...allowedOrigins === void 0 ? {} : { allowedOrigins }
23969
24228
  })
23970
24229
  };
23971
24230
  } catch (error) {
@@ -25906,7 +26165,8 @@ var MCP_TOOL_CATALOG = [
25906
26165
  inputSchema: external_exports.object({
25907
26166
  bearerToken: external_exports.string(),
25908
26167
  projectId: external_exports.string(),
25909
- label: external_exports.string()
26168
+ label: external_exports.string(),
26169
+ allowedOrigins: external_exports.array(external_exports.string()).optional()
25910
26170
  })
25911
26171
  },
25912
26172
  {
@@ -26078,7 +26338,7 @@ var MCP_TOOL_CATALOG = [
26078
26338
  {
26079
26339
  name: "create_weekly_report_channel",
26080
26340
  group: "weekly_reports",
26081
- 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.",
26082
26342
  inputSchema: external_exports.object({
26083
26343
  bearerToken: external_exports.string(),
26084
26344
  projectId: external_exports.string(),
@@ -26091,7 +26351,7 @@ var MCP_TOOL_CATALOG = [
26091
26351
  {
26092
26352
  name: "update_weekly_report_channel",
26093
26353
  group: "weekly_reports",
26094
- 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.",
26095
26355
  inputSchema: external_exports.object({
26096
26356
  bearerToken: external_exports.string(),
26097
26357
  channelId: external_exports.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugbundle/mcp",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "description": "Model Context Protocol server for DebugBundle",
6
6
  "license": "AGPL-3.0-only",