@mushi-mushi/mcp 0.29.1 → 0.30.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/server.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  TDD_TOOL_CATALOG,
5
5
  TOOL_CATALOG,
6
6
  routeUseMushiIntent
7
- } from "./chunk-6SHKBN6R.js";
7
+ } from "./chunk-MQFZGJ72.js";
8
8
  import {
9
9
  MUSHI_SERVER_METADATA
10
10
  } from "./chunk-FJRPC4VR.js";
@@ -12,7 +12,7 @@ import {
12
12
  DEPRECATED_TOOL_ALIASES,
13
13
  TOOL_FEATURE_MAP,
14
14
  toolMatchesFeatures
15
- } from "./chunk-7RWHDJPZ.js";
15
+ } from "./chunk-YOLJIBQR.js";
16
16
 
17
17
  // src/server.ts
18
18
  import { AsyncLocalStorage } from "async_hooks";
@@ -32,7 +32,7 @@ var MUSHI_DOCS_INDEX = [
32
32
  route: "/",
33
33
  markdown: "index.md",
34
34
  keywords: ["know", "ai-built", "app", "broke", "fix", "ready"],
35
- headings: ["The problem it solves", "A real example from our own sites", "What this is (and is not)", "Where it stands today", "This is what a diagnosis looks like", "See it in action", "Get started", "Install it in your app"],
35
+ headings: ["What it takes", "What this is (and is not)"],
36
36
  excerpt: "Your AI shipped it. Mushi tells you why it broke: a plain-English diagnosis and a ready fix in your editor. Open source, Sentry optional."
37
37
  },
38
38
  {
@@ -41,7 +41,7 @@ var MUSHI_DOCS_INDEX = [
41
41
  route: "/admin",
42
42
  markdown: "admin/index.md",
43
43
  keywords: ["admin", "console"],
44
- headings: ["Day-to-day", "Deeper surfaces"],
44
+ headings: ["See it", "Day-to-day", "Deeper surfaces"],
45
45
  excerpt: "Guide to the Mushi admin console \u2014 the reports inbox, fix drafts and PRs, plain-English queries, and a link to every deeper page of the console."
46
46
  },
47
47
  {
@@ -86,7 +86,7 @@ var MUSHI_DOCS_INDEX = [
86
86
  route: "/admin/billing",
87
87
  markdown: "admin/billing.md",
88
88
  keywords: ["admin", "billing"],
89
- headings: ["Reading your usage card", "Usage breakdown", "Predictability controls", "Upgrading your plan", "Changing plan", "Managing payment and invoices", "CLI parity", "Related docs"],
89
+ headings: ["Reading your usage card", "Usage breakdown", "Predictability controls", "Apps on your plan", "Upgrading your plan", "Changing plan", "Managing payment and invoices", "CLI parity"],
90
90
  excerpt: "The Billing page shows your diagnosis quota, usage alerts at 50% and 80%, your projected bill, and spend caps for your Mushi plan."
91
91
  },
92
92
  {
@@ -95,8 +95,8 @@ var MUSHI_DOCS_INDEX = [
95
95
  route: "/admin/checks",
96
96
  markdown: "admin/checks.md",
97
97
  keywords: ["admin", "checks"],
98
- headings: ["App checks", "AI quality"],
99
- excerpt: "The Checks page lists every automatic check on this app. Each card opens that check, with the same live count the sidebar shows."
98
+ headings: ["The checks", "App checks", "AI quality"],
99
+ excerpt: "The Checks page shows every automatic check on this app with its state, when it last ran and its open count, failing checks first."
100
100
  },
101
101
  {
102
102
  title: "CI runners",
@@ -104,7 +104,7 @@ var MUSHI_DOCS_INDEX = [
104
104
  route: "/admin/ci",
105
105
  markdown: "admin/ci.md",
106
106
  keywords: ["admin", "ci", "runners"],
107
- headings: ["Test machine or your code", "Queue and wait", "Runner map", "What would make fixes land sooner", "When nothing has reported in", "Related pages"],
107
+ headings: ["Spend less on CI", "How it reads your runs", "Test machine or your code", "Queue and wait", "Runner map", "What would make fixes land sooner", "Your real bill", "Cost advice that reads your workflows"],
108
108
  excerpt: "The console CI runners page shows where tests run, how long they wait for a machine, and whether a red check was your code or the test machine."
109
109
  },
110
110
  {
@@ -176,8 +176,8 @@ var MUSHI_DOCS_INDEX = [
176
176
  route: "/admin/dashboard",
177
177
  markdown: "admin/dashboard.md",
178
178
  keywords: ["admin", "dashboard"],
179
- headings: ["What to look for first", "Flow canvas", "KPI tiles (14-day window)", "Charts row (14 days)", "Triage queue", "Insights row", "Common tasks", "Morning check (2 minutes)"],
180
- excerpt: "The Mushi dashboard answers whether anything broke since your last release \u2014 new reports, overnight fix runs and pipeline health on one screen."
179
+ headings: ["App card", "Health lights", "Needs you", "Release", "Pages", "Access and details", "This week vs last week", "Recent activity"],
180
+ excerpt: "Home in the Mushi console shows how one app is doing \u2014 is it up, what needs you, what is shipping, which pages have bugs and who can reach it."
181
181
  },
182
182
  {
183
183
  title: "Design system",
@@ -279,13 +279,13 @@ var MUSHI_DOCS_INDEX = [
279
279
  excerpt: "The Knowledge graph page draws your project's bugs, components and fixes as an interactive graph, so you can see which areas cluster problems."
280
280
  },
281
281
  {
282
- title: "Integration health",
282
+ title: "Mushi health",
283
283
  url: docUrl("/admin/health"),
284
284
  route: "/admin/health",
285
285
  markdown: "admin/health.md",
286
- keywords: ["admin", "health", "integration"],
286
+ keywords: ["admin", "health"],
287
287
  headings: ["Time window", "LLM health summary", "Provider probes", "Cron job health", "Recent LLM calls log", "Recommended actions", "Related pages"],
288
- excerpt: "The Integration health page monitors Mushi's LLM pipelines, cron jobs and provider connections so you catch a degraded integration early."
288
+ excerpt: "The Mushi health page shows whether Mushi itself is working (its AI calls, background jobs and provider connections), so you catch a degraded integration early."
289
289
  },
290
290
  {
291
291
  title: "To-do",
@@ -320,7 +320,7 @@ var MUSHI_DOCS_INDEX = [
320
320
  route: "/admin/inventory",
321
321
  markdown: "admin/inventory.md",
322
322
  keywords: ["admin", "inventory", "user", "stories"],
323
- headings: ["What you see", "Run gates / Run crawler", "SDK-driven discovery", "Surface mode in the graph", "Five gates", "Watch your live site", "Synthetic monitor", "Spec traceability \u2014 every fix carries the originating Action"],
323
+ headings: ["What you see", "Check every action / Crawl the app", "SDK-driven discovery", "Surface mode in the graph", "Five gates", "Watch your live site", "Synthetic monitor", "Spec traceability \u2014 every fix carries the originating Action"],
324
324
  excerpt: "The User stories page manages your inventory.yaml \u2014 every page, action and story your app should have \u2014 and shows which of them the gates cover."
325
325
  },
326
326
  {
@@ -347,7 +347,7 @@ var MUSHI_DOCS_INDEX = [
347
347
  route: "/admin/lessons",
348
348
  markdown: "admin/lessons.md",
349
349
  keywords: ["admin", "lessons"],
350
- headings: ["The lifecycle: how a report becomes a rule", "Tab: Lessons", "When to retire a lesson", "Tab: Clusters", "Tab: Query Sim", "Common tasks", "Reviewing new candidates (weekly)", "After fixing a recurring bug"],
350
+ headings: ["The lifecycle: how a report becomes a rule", "Tab: Recurring patterns (?tab=clusters)", "Tab: Rules in use (?tab=lessons)", "When to retire a lesson", "Tab: Try a change (?tab=query)", "Common tasks", "Reviewing new patterns (weekly)", "After fixing a recurring bug"],
351
351
  excerpt: "The Lessons page turns repeat fixes into rules \u2014 when the same root cause keeps returning, Mushi records it so your editor sees it on the next PR."
352
352
  },
353
353
  {
@@ -404,6 +404,15 @@ var MUSHI_DOCS_INDEX = [
404
404
  headings: ["What you see", "Data source", "Related"],
405
405
  excerpt: "The Overview page is the organization-wide portfolio view \u2014 seven-day activity and open tickets for every connected project at a glance."
406
406
  },
407
+ {
408
+ title: "Pipeline",
409
+ url: docUrl("/admin/pipeline"),
410
+ route: "/admin/pipeline",
411
+ markdown: "admin/pipeline.md",
412
+ keywords: ["admin", "pipeline"],
413
+ headings: ["Stages", "Who opens fixes", "Stuck groups", "Release trains", "Intake and deploys", "Workers", "When a worker stops doing useful work", "Send to my local worker"],
414
+ excerpt: "The console Pipeline page shows every bug from report to deploy, where it is stuck and why, with one-click fixes."
415
+ },
407
416
  {
408
417
  title: "Portfolio",
409
418
  url: docUrl("/admin/portfolio"),
@@ -482,7 +491,7 @@ var MUSHI_DOCS_INDEX = [
482
491
  route: "/admin/releases",
483
492
  markdown: "admin/releases.md",
484
493
  keywords: ["admin", "releases"],
485
- headings: ["What it generates", "Creating a release", "Release automatically when you ship", "Release entry fields", "SDK surface", "Related pages"],
494
+ headings: ["What it generates", "Creating a release", "Release automatically when you ship", "Batch tab: what ships next", "Release entry fields", "SDK surface", "Related pages"],
486
495
  excerpt: "The Releases page drafts a changelog for each version from the fixes that shipped, crediting the users whose reports led to each fix."
487
496
  },
488
497
  {
@@ -545,7 +554,7 @@ var MUSHI_DOCS_INDEX = [
545
554
  route: "/admin/settings",
546
555
  markdown: "admin/settings.md",
547
556
  keywords: ["admin", "settings"],
548
- headings: ["Tabs", "General", "BYOK (API keys)", "Firecrawl", "Browserbase", "Health", "Dev tools", "Changing a key"],
557
+ headings: ["Tabs", "General", "BYOK (API keys)", "Firecrawl", "Browserbase", "Health", "Dev tools", "Display & sidebar"],
549
558
  excerpt: "The Settings page holds every project option \u2014 notifications, your own LLM keys, widget copy, Slack alerts and developer settings."
550
559
  },
551
560
  {
@@ -617,7 +626,7 @@ var MUSHI_DOCS_INDEX = [
617
626
  route: "/admin/ux-runs",
618
627
  markdown: "admin/ux-runs.md",
619
628
  keywords: ["admin", "ux-runs", "runs", "ux"],
620
- headings: ["Run in the cloud", "What you see", "File as bug", "Audit signed-in screens", "Where the changes are"],
629
+ headings: ["Run in the cloud", "What you see", "File as bug", "Audit signed-in screens", "First-time user test", "Where the changes are"],
621
630
  excerpt: "Each screen your coding agent worked on in a mushi ux run, with its plan, every attempt, before and after screenshots, and what was kept."
622
631
  },
623
632
  {
@@ -699,7 +708,7 @@ var MUSHI_DOCS_INDEX = [
699
708
  markdown: "cloud.md",
700
709
  keywords: ["cloud"],
701
710
  headings: ["Plans", "Sign-up flow", "Why metered on diagnoses", "Spend controls", "Self-hosting"],
702
- excerpt: "Hosted Mushi Mushi \u2014 bug reports, plain-English diagnoses, and fix dispatch without running servers. Free tier includes 50 diagnoses a month."
711
+ excerpt: "Hosted Mushi Mushi \u2014 bug reports, plain-English diagnoses, and fix dispatch without running servers. Free for one app with 100 diagnoses a month."
703
712
  },
704
713
  {
705
714
  title: "Compare",
@@ -744,7 +753,7 @@ var MUSHI_DOCS_INDEX = [
744
753
  markdown: "compare/sentry-vs-mushi.md",
745
754
  keywords: ["compare", "sentry-vs-mushi", "sentry"],
746
755
  headings: ["What each one is", "Side by side", "Where they overlap, and where they do not", "Running Mushi alongside Sentry", "Pick Sentry if", "Pick Mushi if", "Frequently asked questions"],
747
- excerpt: "Sentry vs Mushi Mushi in 2026 \u2014 what each captures, Sentry's free tier and Seer pricing next to Mushi's 50 free diagnoses a month, and running both."
756
+ excerpt: "Sentry vs Mushi Mushi in 2026 \u2014 what each captures, Sentry's free tier and Seer pricing next to Mushi's free plan (1 app, 100 diagnoses), and running both."
748
757
  },
749
758
  {
750
759
  title: "Concepts",
@@ -824,7 +833,7 @@ var MUSHI_DOCS_INDEX = [
824
833
  route: "/concepts/closed-loop",
825
834
  markdown: "concepts/closed-loop.md",
826
835
  keywords: ["concepts", "closed-loop", "closed", "loop", "evolution", "thesis"],
827
- headings: ["The NTSB moment software is missing", "Why the linear SDLC is the wrong unit", "Cumulative selection: why it works", "What the loop looks like in practice", "What this means for the roadmap"],
836
+ headings: ["What happens to a bug", "The NTSB moment software is missing", "Why the linear SDLC is the wrong unit", "Cumulative selection: why it works", "What the loop looks like in practice", "What this means for the roadmap"],
828
837
  excerpt: "The thesis behind Mushi \u2014 why AI-built apps need a closed loop from what users feel to a verified fix, and how capture, diagnosis and fixes connect."
829
838
  },
830
839
  {
@@ -962,6 +971,15 @@ var MUSHI_DOCS_INDEX = [
962
971
  headings: ["Choosing a Mode", "Bring Your Own Button", "Staying out of the way", "Smart Hide", "Native SDKs"],
963
972
  excerpt: "Choose where Mushi's bug-report button lives \u2014 corner stamp, edge tab, banner, your own button via attach, or fully manual \u2014 on web and mobile."
964
973
  },
974
+ {
975
+ title: "Sample diagnosis: Pay now does nothing on a phone",
976
+ url: docUrl("/demo/diagnosis"),
977
+ route: "/demo/diagnosis",
978
+ markdown: "demo/diagnosis.md",
979
+ keywords: ["demo", "diagnosis", "sample", "pay", "now", "does", "nothing", "phone"],
980
+ headings: ["Get this for your own app", "One the model wrote"],
981
+ excerpt: "A sample Mushi diagnosis you can read without signing up. A user's complaint, what the widget captured, the plain-English cause and the fix prompt."
982
+ },
965
983
  {
966
984
  title: "Cursor integration",
967
985
  url: docUrl("/integrations/cursor"),
@@ -1220,7 +1238,7 @@ var MUSHI_DOCS_INDEX = [
1220
1238
  route: "/plugins",
1221
1239
  markdown: "plugins/index.md",
1222
1240
  keywords: ["plugins", "plugin", "marketplace"],
1223
- headings: ["Available plugins", "Webhook delivery contract", "Build your own"],
1241
+ headings: ["Works with Sentry, or without it", "Available plugins", "Webhook delivery contract", "Build your own"],
1224
1242
  excerpt: "Send Mushi events to the tools you already use through HMAC-signed Standard Webhooks \u2014 12 first-party plugins and an SDK to build your own."
1225
1243
  },
1226
1244
  {
@@ -1229,8 +1247,8 @@ var MUSHI_DOCS_INDEX = [
1229
1247
  route: "/plugins/bugsnag",
1230
1248
  markdown: "plugins/bugsnag.md",
1231
1249
  keywords: ["plugins", "bugsnag"],
1232
- headings: ["Setup", "Package", "Events"],
1233
- excerpt: "Mirror Mushi bug reports into Bugsnag and close the Bugsnag error when the fix PR merges \u2014 install from the marketplace and map release stages."
1250
+ headings: ["Setup (self-hosted Mushi)", "Package", "Events"],
1251
+ excerpt: "Copy triaged Mushi bug reports into Bugsnag and mark the error fixed when Mushi applies a fix \u2014 a self-hosted plugin with a Data API token."
1234
1252
  },
1235
1253
  {
1236
1254
  title: "Building a plugin",
@@ -1247,8 +1265,8 @@ var MUSHI_DOCS_INDEX = [
1247
1265
  route: "/plugins/crashlytics",
1248
1266
  markdown: "plugins/crashlytics.md",
1249
1267
  keywords: ["plugins", "crashlytics"],
1250
- headings: ["Setup", "Package", "Events"],
1251
- excerpt: "Push Mushi mobile bug reports into Firebase Crashlytics issues and close them when fixes merge \u2014 service account setup and app ID mapping."
1268
+ headings: ["Setup (self-hosted Mushi)", "Package", "Events"],
1269
+ excerpt: "Flag fixed Mushi reports in Firebase Remote Config so your mobile app can hide stale crash notices \u2014 a self-hosted plugin with a Google access token."
1252
1270
  },
1253
1271
  {
1254
1272
  title: "Cursor Cloud Agent",
@@ -1256,7 +1274,7 @@ var MUSHI_DOCS_INDEX = [
1256
1274
  route: "/plugins/cursor-cloud",
1257
1275
  markdown: "plugins/cursor-cloud.md",
1258
1276
  keywords: ["plugins", "cursor-cloud", "cursor", "cloud", "agent"],
1259
- headings: ["Prerequisites", "Setup", "Behaviour", "Fixes view integration", "Common tasks", "Limiting dispatch to critical reports only", "Triggering manually", "Reviewing what the agent did"],
1277
+ headings: ["Prerequisites", "Setup", "Behaviour", "Fixes view integration", "Common tasks", "Which reports start an agent", "Triggering manually", "Reviewing what the agent did"],
1260
1278
  excerpt: "Dispatch a Cursor Cloud Agent automatically when a Mushi report qualifies \u2014 it investigates, drafts a fix and opens a PR that links back to Mushi."
1261
1279
  },
1262
1280
  {
@@ -1265,8 +1283,8 @@ var MUSHI_DOCS_INDEX = [
1265
1283
  route: "/plugins/discord",
1266
1284
  markdown: "plugins/discord.md",
1267
1285
  keywords: ["plugins", "discord"],
1268
- headings: ["Setup", "Package", "Events"],
1269
- excerpt: "Post Mushi report and fix events to a Discord channel through a webhook \u2014 create the webhook, install the plugin, and choose which events to send."
1286
+ headings: ["Setup (Mushi Cloud, no code)", "Self-hosted plugin"],
1287
+ excerpt: "Post Mushi report and fix events to a Discord channel \u2014 paste a channel webhook on the Integrations page, or run the self-hosted Discord plugin."
1270
1288
  },
1271
1289
  {
1272
1290
  title: "Webhook events",
@@ -1283,8 +1301,8 @@ var MUSHI_DOCS_INDEX = [
1283
1301
  route: "/plugins/github-issues",
1284
1302
  markdown: "plugins/github-issues.md",
1285
1303
  keywords: ["plugins", "github-issues", "github", "issues"],
1286
- headings: ["Setup", "Package", "Events"],
1287
- excerpt: "Open a labelled GitHub issue for every classified Mushi report, with a link back to the report \u2014 target repo, default labels and assignee settings."
1304
+ headings: ["Setup (Mushi Cloud, no code)", "Self-hosted plugin"],
1305
+ excerpt: "Open a GitHub issue for every triaged Mushi report and close it when the fix lands \u2014 set it up on the Integrations page, or self-host the plugin."
1288
1306
  },
1289
1307
  {
1290
1308
  title: "Jira Cloud",
@@ -1292,8 +1310,8 @@ var MUSHI_DOCS_INDEX = [
1292
1310
  route: "/plugins/jira",
1293
1311
  markdown: "plugins/jira.md",
1294
1312
  keywords: ["plugins", "jira", "cloud"],
1295
- headings: ["Setup", "Package", "Events"],
1296
- excerpt: "Two-way sync between Mushi reports and Jira Cloud issues \u2014 create issues on classification, sync status, and comment fix summaries when fixes land."
1313
+ headings: ["Setup (Mushi Cloud, no code)", "Self-hosted plugin"],
1314
+ excerpt: "Open Jira Cloud issues from Mushi bug reports and keep their status in step \u2014 set it up on the Integrations page, or self-host the Jira plugin."
1297
1315
  },
1298
1316
  {
1299
1317
  title: "Linear",
@@ -1301,8 +1319,8 @@ var MUSHI_DOCS_INDEX = [
1301
1319
  route: "/plugins/linear",
1302
1320
  markdown: "plugins/linear.md",
1303
1321
  keywords: ["plugins", "linear"],
1304
- headings: ["Setup", "Behaviour", "Label mapping example", "Troubleshooting"],
1305
- excerpt: "File a Linear issue automatically when Mushi classifies a bug report \u2014 create a Linear API key, install the plugin, and choose the team and filters."
1322
+ headings: ["Setup (self-run plugin)", "Behaviour", "Troubleshooting"],
1323
+ excerpt: "File Linear issues from Mushi bug reports \u2014 connect Linear on the Integrations page, or run the self-hosted Linear plugin with an API key and team id."
1306
1324
  },
1307
1325
  {
1308
1326
  title: "Microsoft Teams",
@@ -1310,8 +1328,8 @@ var MUSHI_DOCS_INDEX = [
1310
1328
  route: "/plugins/msteams",
1311
1329
  markdown: "plugins/msteams.md",
1312
1330
  keywords: ["plugins", "msteams", "microsoft", "teams"],
1313
- headings: ["Setup", "Package", "Events"],
1314
- excerpt: "Send Adaptive Cards to a Microsoft Teams channel when Mushi classifies a report or a fix lands \u2014 incoming webhook setup and severity filters."
1331
+ headings: ["Setup (Mushi Cloud, no code)", "Self-hosted plugin"],
1332
+ excerpt: "Send cards to a Microsoft Teams channel when Mushi triages a report or a fix lands \u2014 paste a webhook on the Integrations page, or self-host the plugin."
1315
1333
  },
1316
1334
  {
1317
1335
  title: "PagerDuty",
@@ -1319,8 +1337,8 @@ var MUSHI_DOCS_INDEX = [
1319
1337
  route: "/plugins/pagerduty",
1320
1338
  markdown: "plugins/pagerduty.md",
1321
1339
  keywords: ["plugins", "pagerduty"],
1322
- headings: ["Setup", "Behaviour", "Troubleshooting"],
1323
- excerpt: "Page your on-call rotation through PagerDuty when a P0 or P1 bug report lands in Mushi \u2014 Events API v2 integration key setup and filters."
1340
+ headings: ["Setup (self-run plugin)", "Behaviour", "Troubleshooting"],
1341
+ excerpt: "Page your on-call rotation through PagerDuty when Mushi triages a bug as critical, and resolve it when the fix lands \u2014 Events API v2 routing key setup."
1324
1342
  },
1325
1343
  {
1326
1344
  title: "Rollbar",
@@ -1328,8 +1346,8 @@ var MUSHI_DOCS_INDEX = [
1328
1346
  route: "/plugins/rollbar",
1329
1347
  markdown: "plugins/rollbar.md",
1330
1348
  keywords: ["plugins", "rollbar"],
1331
- headings: ["Setup", "Package", "Events"],
1332
- excerpt: "Mirror Mushi bug reports into Rollbar items and resolve them when fixes ship \u2014 access token, environment name, and dedup key mapping."
1349
+ headings: ["Setup (self-hosted Mushi)", "Package", "Events"],
1350
+ excerpt: "Copy triaged Mushi bug reports into Rollbar items and resolve them when fixes ship \u2014 a self-hosted plugin with an access token and project id."
1333
1351
  },
1334
1352
  {
1335
1353
  title: "Sentry",
@@ -1337,7 +1355,7 @@ var MUSHI_DOCS_INDEX = [
1337
1355
  route: "/plugins/sentry",
1338
1356
  markdown: "plugins/sentry.md",
1339
1357
  keywords: ["plugins", "sentry"],
1340
- headings: ["Route Sentry errors into Mushi (inbound)", "Setup (outbound plugin)", "Package", "Events"],
1358
+ headings: ["Route Sentry errors into Mushi (inbound)", "Copy Mushi reports into Sentry (outbound plugin)", "Package", "Events"],
1341
1359
  excerpt: "Two-way Sentry integration \u2014 Sentry errors flow into Mushi's queue, merging a Mushi fix resolves the Sentry issue, and critical reports mirror back."
1342
1360
  },
1343
1361
  {
@@ -1346,8 +1364,8 @@ var MUSHI_DOCS_INDEX = [
1346
1364
  route: "/plugins/slack",
1347
1365
  markdown: "plugins/slack.md",
1348
1366
  keywords: ["plugins", "slack", "app"],
1349
- headings: ["Setup", "What's on the card", "Acting from the channel", "Slash commands", "Package", "Events", "Troubleshooting"],
1350
- excerpt: "Triage Mushi bug reports from Slack \u2014 each classified report posts as a card with its root cause and buttons to dispatch a fix, resolve or dismiss."
1367
+ headings: ["Setup", "What's on the card", "Acting from the channel", "Slash commands", "Package", "What gets posted", "Troubleshooting"],
1368
+ excerpt: "Triage Mushi bug reports from Slack \u2014 add the app from the Integrations page, and each report posts as a card with buttons to fix, resolve or dismiss."
1351
1369
  },
1352
1370
  {
1353
1371
  title: "Zapier",
@@ -1355,17 +1373,17 @@ var MUSHI_DOCS_INDEX = [
1355
1373
  route: "/plugins/zapier",
1356
1374
  markdown: "plugins/zapier.md",
1357
1375
  keywords: ["plugins", "zapier"],
1358
- headings: ["Setup", "Signature verification in Zapier", "Common Zaps", "Troubleshooting"],
1376
+ headings: ["Setup (no server)", "Setup (with the relay package)", "Common Zaps", "Troubleshooting"],
1359
1377
  excerpt: "Send every Mushi event to Zapier and on to thousands of apps such as Notion, Google Sheets and HubSpot \u2014 Catch Hook setup and event filters."
1360
1378
  },
1361
1379
  {
1362
- title: "Pricing \u2014 free tier, Pro, and self-host",
1380
+ title: "Pricing \u2014 Free, Builder, Studio and self-host",
1363
1381
  url: docUrl("/pricing"),
1364
1382
  route: "/pricing",
1365
1383
  markdown: "pricing.md",
1366
- keywords: ["pricing", "free", "tier", "pro", "self-host"],
1367
- headings: ["Plans", "What counts as a diagnosis", "Pricing estimator", "Example bills", "Why diagnoses, not events", "BYOK and the self-host path", "Compared to Sentry + Seer", "Frequently asked questions"],
1368
- excerpt: "Mushi Mushi pricing \u2014 50 AI bug diagnoses a month free, no card. Open-source Sentry alternative you can self-host for free, or upgrade for teams."
1384
+ keywords: ["pricing", "free", "builder", "studio", "self-host"],
1385
+ headings: ["Plans", "What counts as a diagnosis", "Pricing estimator", "Example bills", "Why apps, not reports?", "Why diagnoses, not events", "Your own AI key and the self-host path", "Compared to Sentry + Seer"],
1386
+ excerpt: "Mushi Mushi pricing \u2014 free for one app and 100 AI bug diagnoses a month. Builder $29/mo for 3 apps, Studio $79/mo for 10. Free to self-host."
1369
1387
  },
1370
1388
  {
1371
1389
  title: "Quickstart \u2014 fix your first bug in 60 seconds",
@@ -1373,7 +1391,7 @@ var MUSHI_DOCS_INDEX = [
1373
1391
  route: "/quickstart",
1374
1392
  markdown: "quickstart/index.md",
1375
1393
  keywords: ["quickstart", "fix", "first", "bug", "60", "seconds", "choose", "stack"],
1376
- headings: ["What you need", "The fastest way: one command", "Start here (editor first)", "Pick your stack", "How do I install the SDK?", "Troubleshooting"],
1394
+ headings: ["Install", "Send your first report", "Get your first fix", "Pick your framework", "Where to start", "Keys and settings", "Troubleshooting"],
1377
1395
  excerpt: "Install Mushi with npx mushi-mushi, connect Cursor or Claude Code over MCP, and turn user bug reports into plain-English diagnoses with ready fixes."
1378
1396
  },
1379
1397
  {
@@ -1392,7 +1410,7 @@ var MUSHI_DOCS_INDEX = [
1392
1410
  markdown: "quickstart/angular.md",
1393
1411
  keywords: ["quickstart", "angular"],
1394
1412
  headings: [],
1395
- excerpt: "Add Mushi to an Angular 17+ app \u2014 register the Mushi service and error handler as factory providers so uncaught errors and user bug reports reach your queue."
1413
+ excerpt: "Add Mushi to an Angular 17+ app: one provideMushi() call registers the Mushi service and error handler, so uncaught errors and bug reports reach your queue."
1396
1414
  },
1397
1415
  {
1398
1416
  title: "Capacitor quickstart",
@@ -1409,7 +1427,7 @@ var MUSHI_DOCS_INDEX = [
1409
1427
  route: "/quickstart/cli-console-loop",
1410
1428
  markdown: "quickstart/cli-console-loop.md",
1411
1429
  keywords: ["quickstart", "cli-console-loop", "cli", "console", "loop", "setup"],
1412
- headings: ["Which CLI command?", "Browser sign-in flow (recommended)", "What happens in the terminal", "What happens in the browser", "How sign-in reliability works", "1. Run the wizard", "2. Approve in the browser", "3. Pick or create a project"],
1430
+ headings: ["Set up in five steps", "1. Run the wizard", "2. Approve in the browser", "3. Pick or create a project", "4. SDK installed", "5. Wire Cursor MCP (optional but recommended)", "Which CLI command?", "Browser sign-in flow (recommended)"],
1413
1431
  excerpt: "How npx mushi-mushi creates a project, mints an SDK key and installs the SDK through browser sign-in, and how to recover when the setup loop fails."
1414
1432
  },
1415
1433
  {
@@ -1427,7 +1445,7 @@ var MUSHI_DOCS_INDEX = [
1427
1445
  route: "/quickstart/incident-loop",
1428
1446
  markdown: "quickstart/incident-loop.md",
1429
1447
  keywords: ["quickstart", "incident-loop", "incident", "loop", "bug", "fix", "prompt"],
1430
- headings: ["No MCP? Copy the fix prompt", "Prerequisites", "Step 1 \u2014 Capture or pick a report", "Step 2 \u2014 Pull fix context", "Step 3 \u2014 Generate the fix prompt", "Step 4 \u2014 Paste and ship", "Troubleshooting", "See also"],
1448
+ headings: ["No MCP? Copy the fix prompt", "Before you start", "The loop", "Capture or pick a report", "Pull the fix context", "Get a deeper fix plan (optional)", "Paste and ship", "Troubleshooting"],
1431
1449
  excerpt: "Run npx mushi-mushi, ship, and turn your first user-reported bug into a plain-English diagnosis and a paste-ready fix for Cursor or Claude Code."
1432
1450
  },
1433
1451
  {
@@ -1439,13 +1457,31 @@ var MUSHI_DOCS_INDEX = [
1439
1457
  headings: ["Install (Swift Package Manager)", "Initialize", "Open the widget or submit a report", "Sentry"],
1440
1458
  excerpt: "Add Mushi's native Swift SDK to an iOS app with Swift Package Manager \u2014 shake-to-report, offline queue and device context. Preview build, not on CocoaPods yet."
1441
1459
  },
1460
+ {
1461
+ title: "Mushi in Lovable or Bolt",
1462
+ url: docUrl("/quickstart/lovable-bolt"),
1463
+ route: "/quickstart/lovable-bolt",
1464
+ markdown: "quickstart/lovable-bolt.md",
1465
+ keywords: ["quickstart", "lovable-bolt", "lovable", "bolt", "no", "terminal"],
1466
+ headings: ["Get your script tag", "Paste it into Lovable or Bolt", "Publish and send a test report", "Fix a real bug", "Read reports inside Lovable", "Where the key goes, and is it safe?", "Change how the button looks", "If nothing shows up"],
1467
+ excerpt: "Add Mushi to a Lovable or Bolt app without a terminal. Paste one script tag through your prompt, then read each bug's plain-English cause and fix prompt."
1468
+ },
1469
+ {
1470
+ title: "Ask Lovable why it broke",
1471
+ url: docUrl("/quickstart/lovable-mcp"),
1472
+ route: "/quickstart/lovable-mcp",
1473
+ markdown: "quickstart/lovable-mcp.md",
1474
+ keywords: ["quickstart", "lovable-mcp", "lovable", "mcp", "ask", "broke"],
1475
+ headings: ["Add Mushi to Lovable", "Open the custom MCP form", "Fill in the form", "Sign in and approve", "Ask Lovable", "Claude Code: one paste", "Cursor: one click", "Bolt"],
1476
+ excerpt: "Add Mushi to Lovable as an MCP connector in three steps; Lovable reads the plain-English diagnosis and fixes the bug. Claude Code and Cursor in one paste."
1477
+ },
1442
1478
  {
1443
1479
  title: "MCP server for bug fixing in Cursor & Claude Code",
1444
1480
  url: docUrl("/quickstart/mcp"),
1445
1481
  route: "/quickstart/mcp",
1446
1482
  markdown: "quickstart/mcp.md",
1447
1483
  keywords: ["quickstart", "mcp", "server", "bug", "fixing", "cursor", "claude", "code"],
1448
- headings: ["OAuth login (recommended \u2014 no keys to copy)", "One-liner setup (recommended)", "Claude Code plugin", "Smithery (hosted MCP)", "Manual setup: Cursor", "Manual setup: Claude Desktop", "Hosted Streamable HTTP transport (no subprocess)", "Available tools"],
1484
+ headings: ["Connect in three steps", "Add the Mushi server", "Sign in", "Ask your editor", "How sign-in works (OAuth, no keys to copy)", "One-liner setup (recommended)", "Claude Code plugin", "Smithery (hosted MCP)"],
1449
1485
  excerpt: "Set up the Mushi MCP server with npx mushi-mushi setup \u2014 read bug reports, get fix context, and dispatch fixes from Cursor, Claude Code, or Codex."
1450
1486
  },
1451
1487
  {
@@ -1554,7 +1590,7 @@ var MUSHI_DOCS_INDEX = [
1554
1590
  markdown: "sdks/angular.md",
1555
1591
  keywords: ["sdks", "angular", "@mushi-mushi/angular"],
1556
1592
  headings: ["API surface", "Setup (standalone bootstrap)", "Submitting a report", "Identifying users"],
1557
- excerpt: "API reference for @mushi-mushi/angular \u2014 MushiService, MushiErrorHandler and the MUSHI_CONFIG token, wired with factory providers in an Angular 17+ app."
1593
+ excerpt: "API reference for @mushi-mushi/angular \u2014 provideMushi(), MushiService, MushiErrorHandler and the MUSHI_CONFIG token in an Angular 17+ app."
1558
1594
  },
1559
1595
  {
1560
1596
  title: "In-SDK Ask assistant",
@@ -1598,7 +1634,7 @@ var MUSHI_DOCS_INDEX = [
1598
1634
  route: "/sdks/core",
1599
1635
  markdown: "sdks/core.md",
1600
1636
  keywords: ["sdks", "core", "@mushi-mushi/core"],
1601
- headings: ["Install", "API", "Mushi.init(config) (web) / MushiProvider (React Native)", "MushiWidgetConfig (selected keys)", "submitReport(input)", "flushOfflineQueueNow()", "PII scrubbing utilities (1.27+)", "Region resolution"],
1637
+ headings: ["Install", "API", "Mushi.init(config) (web) / MushiProvider (React Native)", "MushiWidgetConfig (selected keys)", "captureEvent(input)", "Offline queue", "PII scrubbing utilities (1.27+)", "Region resolution"],
1602
1638
  excerpt: "Reference for @mushi-mushi/core \u2014 the MushiConfig shape, widget options, PII scrubbing helpers and region resolution shared by every Mushi JavaScript SDK."
1603
1639
  },
1604
1640
  {
@@ -1607,7 +1643,7 @@ var MUSHI_DOCS_INDEX = [
1607
1643
  route: "/sdks/eslint-plugin",
1608
1644
  markdown: "sdks/eslint-plugin.md",
1609
1645
  keywords: ["sdks", "eslint-plugin", "eslint", "plugin", "eslint-plugin-mushi-mushi"],
1610
- headings: ["Install", "Recommended preset", "Rules", "mushi-mushi/no-dead-handler", "mushi-mushi/no-mock-leak", "Combining with the gates action"],
1646
+ headings: ["Install", "Turn on the two rules", "The recommended preset", "Rules", "mushi-mushi/no-dead-handler", "mushi-mushi/no-mock-leak", "In CI"],
1611
1647
  excerpt: "eslint-plugin-mushi-mushi flags empty event handlers and leftover mock data in production code \u2014 the no-dead-handler and no-mock-leak rules and preset."
1612
1648
  },
1613
1649
  {
@@ -1644,7 +1680,7 @@ var MUSHI_DOCS_INDEX = [
1644
1680
  markdown: "sdks/inventory-schema.md",
1645
1681
  keywords: ["sdks", "inventory-schema", "inventory", "schema", "@mushi-mushi/inventory-schema"],
1646
1682
  headings: ["Install", "What inventory.yaml looks like", "Programmatic use", "JSON Schema"],
1647
- excerpt: "The Zod schema, JSON Schema and TypeScript types for inventory.yaml \u2014 the contract that Mushi's gates, crawler, ESLint plugin and CLI all read."
1683
+ excerpt: "The Zod schema, JSON Schema and TypeScript types for inventory.yaml: your app's pages, the buttons and forms on each, what they do, and the tests that prove it."
1648
1684
  },
1649
1685
  {
1650
1686
  title: "MushiMushi (iOS)",
@@ -1670,7 +1706,7 @@ var MUSHI_DOCS_INDEX = [
1670
1706
  route: "/sdks/mcp",
1671
1707
  markdown: "sdks/mcp.md",
1672
1708
  keywords: ["sdks", "mcp", "bug", "report", "server", "cursor", "claude", "code", "@mushi-mushi/mcp"],
1673
- headings: ["Two transports", "Spec traceability for dispatchfix"],
1709
+ headings: ["Quick start", "Two transports", "Spec traceability for dispatchfix"],
1674
1710
  excerpt: "Reference for @mushi-mushi/mcp, the Mushi MCP server for Cursor, Claude Code, VS Code and Windsurf \u2014 stdio and hosted HTTP transports, scopes and setup."
1675
1711
  },
1676
1712
  {
@@ -1679,8 +1715,8 @@ var MUSHI_DOCS_INDEX = [
1679
1715
  route: "/sdks/mcp-ci",
1680
1716
  markdown: "sdks/mcp-ci.md",
1681
1717
  keywords: ["sdks", "mcp-ci", "mcp", "@mushi-mushi/mcp-ci"],
1682
- headings: ["Quick start", "Commands", "In your IDE", "Inputs"],
1683
- excerpt: "@mushi-mushi/mcp-ci is Mushi's GitHub Action \u2014 run the five-gate composite check on pull requests, draft inventory entries, and bootstrap crawler auth."
1718
+ headings: ["Quick start", "Gates on every PR", "Commands", "In your IDE", "Inputs", "Outputs"],
1719
+ excerpt: "@mushi-mushi/mcp-ci is Mushi's GitHub Action: fail a PR while reports wait for triage, dispatch a fix, run the pre-release gates and refresh crawler sign-in."
1684
1720
  },
1685
1721
  {
1686
1722
  title: "MCP tools reference",
@@ -1715,7 +1751,7 @@ var MUSHI_DOCS_INDEX = [
1715
1751
  route: "/sdks/node",
1716
1752
  markdown: "sdks/node.md",
1717
1753
  keywords: ["sdks", "node", "node.js", "server", "error", "reporting", "sdk", "@mushi-mushi/node"],
1718
- headings: ["Install", "Express", "Fastify", "Hono", "Process-level fallbacks", "Programmatic submit", "PII and credential scrubbing"],
1754
+ headings: ["Install", "Create a client", "Express", "Fastify", "Hono", "Process-level fallbacks", "Programmatic submit", "PII and credential scrubbing"],
1719
1755
  excerpt: "Report server errors from Node with @mushi-mushi/node \u2014 Express, Fastify and Hono error handlers that tag each report with route, request ID and user."
1720
1756
  },
1721
1757
  {
@@ -1725,7 +1761,7 @@ var MUSHI_DOCS_INDEX = [
1725
1761
  markdown: "sdks/plugin-sdk.md",
1726
1762
  keywords: ["sdks", "plugin-sdk", "plugin", "sdk", "@mushi-mushi/plugin-sdk"],
1727
1763
  headings: ["Install", "Express adapter", "Hono adapter", "Verify a signature manually", "Wire format", "See also"],
1728
- excerpt: "Build a Mushi plugin in TypeScript with @mushi-mushi/plugin-sdk \u2014 verify webhook signatures, dedupe deliveries and handle lifecycle events in Express."
1764
+ excerpt: "Build a Mushi plugin in TypeScript with @mushi-mushi/plugin-sdk \u2014 verify webhook signatures, dedupe deliveries and handle lifecycle events in Express or Hono."
1729
1765
  },
1730
1766
  {
1731
1767
  title: "SDK presets",
@@ -1781,6 +1817,15 @@ var MUSHI_DOCS_INDEX = [
1781
1817
  headings: ["API surface", "Setup", "Submitting a report"],
1782
1818
  excerpt: "Reference for @mushi-mushi/svelte \u2014 initMushi, getMushi and the SvelteKit error hooks that forward client and server errors to your Mushi queue."
1783
1819
  },
1820
+ {
1821
+ title: "@mushi-mushi/ux",
1822
+ url: docUrl("/sdks/ux"),
1823
+ route: "/sdks/ux",
1824
+ markdown: "sdks/ux.md",
1825
+ keywords: ["sdks", "ux", "@mushi-mushi/ux"],
1826
+ headings: ["Quick start", "From studio to merge", "What a run does", "Safety", "Agents", "Commands", "Audit and explore signed-in screens", "On GitHub Actions"],
1827
+ excerpt: "@mushi-mushi/ux runs your coding agent over each screen of your app, measures every change and keeps only the ones that help, on a branch you review."
1828
+ },
1784
1829
  {
1785
1830
  title: "@mushi-mushi/vue",
1786
1831
  url: docUrl("/sdks/vue"),
@@ -1796,8 +1841,8 @@ var MUSHI_DOCS_INDEX = [
1796
1841
  route: "/sdks/wasm-classifier",
1797
1842
  markdown: "sdks/wasm-classifier.md",
1798
1843
  keywords: ["sdks", "wasm-classifier", "wasm", "classifier", "@mushi-mushi/wasm-classifier"],
1799
- headings: [],
1800
- excerpt: "@mushi-mushi/wasm-classifier runs a small on-device model in the browser to drop junk bug reports before they reach your LLM, cutting classification cost."
1844
+ headings: ["Use it with the web SDK", "Call it directly", "ONNX backend (experimental)"],
1845
+ excerpt: "@mushi-mushi/wasm-classifier filters junk bug reports in the browser, before they reach the server or your LLM."
1801
1846
  },
1802
1847
  {
1803
1848
  title: "JavaScript bug reporting SDK for the browser",
@@ -3617,6 +3662,67 @@ function createMushiServer(config) {
3617
3662
  return jsonResult(await apiCall(`/v1/admin/ci/compare?${qs}`, void 0, { minTimeoutMs: 6e4 }));
3618
3663
  }
3619
3664
  );
3665
+ server.registerTool(
3666
+ "get_ci_bill",
3667
+ {
3668
+ title: titleOf("get_ci_bill"),
3669
+ description: descOf("get_ci_bill"),
3670
+ annotations: annotationsFor("get_ci_bill"),
3671
+ inputSchema: z.object({
3672
+ projectId: z.string().optional().describe("Project UUID \u2014 defaults to the server-configured project; omitted with an account-level key, every project you can read"),
3673
+ days: z.number().int().min(1).max(90).optional().describe("Window in days (default 30)")
3674
+ }),
3675
+ outputSchema: z.looseObject({
3676
+ window: z.unknown().optional(),
3677
+ previousWindow: z.unknown().optional(),
3678
+ provenance: z.string().optional().describe("measured: from GitHub's bill"),
3679
+ currency: z.string().optional(),
3680
+ available: z.boolean().optional(),
3681
+ repoScoped: z.boolean().optional().describe("Only your projects' repos: you are not a member of the organization"),
3682
+ unavailableReason: z.string().nullable().optional().describe("Why there is no bill, and how to connect one"),
3683
+ owners: z.array(z.looseObject({})).optional(),
3684
+ month: z.looseObject({}).optional().describe("This calendar month so far: grossUsd, discountUsd, netUsd"),
3685
+ totals: z.looseObject({}).optional(),
3686
+ previousTotals: z.looseObject({}).nullable().optional(),
3687
+ change: z.looseObject({}).nullable().optional(),
3688
+ windowComplete: z.boolean().optional(),
3689
+ byRepo: z.array(z.looseObject({})).optional(),
3690
+ bySku: z.array(z.looseObject({})).optional(),
3691
+ byDay: z.array(z.looseObject({})).optional(),
3692
+ dataThrough: z.string().nullable().optional(),
3693
+ agentShare: z.looseObject({}).nullable().optional().describe("Paid minutes on Mushi agent branches (estimated)")
3694
+ })
3695
+ },
3696
+ async (args) => {
3697
+ const pid = args.projectId ? await resolveProjectId(args.projectId) : projectId || void 0;
3698
+ const qs = new URLSearchParams({ days: String(args.days ?? 30) });
3699
+ if (pid) qs.set("project_id", pid);
3700
+ return jsonResult(await apiCall(`/v1/admin/ci/bill?${qs}`, void 0, { minTimeoutMs: 6e4 }));
3701
+ }
3702
+ );
3703
+ server.registerTool(
3704
+ "get_worker_status",
3705
+ {
3706
+ title: titleOf("get_worker_status"),
3707
+ description: descOf("get_worker_status"),
3708
+ annotations: annotationsFor("get_worker_status"),
3709
+ inputSchema: z.object({
3710
+ projectId: z.string().optional().describe("Project UUID \u2014 defaults to the server-configured project; omitted with an account-level key, every project you can read")
3711
+ }),
3712
+ outputSchema: z.looseObject({
3713
+ generatedAt: z.string().optional(),
3714
+ flags: z.array(z.looseObject({})).optional().describe("Worst first: what stops a worker, why, and the fix"),
3715
+ projects: z.array(z.looseObject({})).optional(),
3716
+ hosts: z.array(z.looseObject({})).optional(),
3717
+ lanes: z.array(z.looseObject({})).optional()
3718
+ })
3719
+ },
3720
+ async (args) => {
3721
+ const pid = args.projectId ? await resolveProjectId(args.projectId) : projectId || void 0;
3722
+ const qs = pid ? `?${new URLSearchParams({ projectId: pid })}` : "";
3723
+ return jsonResult(await apiCall(`/v1/admin/work/lanes${qs}`));
3724
+ }
3725
+ );
3620
3726
  server.registerTool(
3621
3727
  "request_ci_placement_change",
3622
3728
  {
@@ -3637,6 +3743,77 @@ function createMushiServer(config) {
3637
3743
  return jsonText(await apiCall("/v1/admin/ci/placement/requests", { method: "POST", body: JSON.stringify(body) }));
3638
3744
  }
3639
3745
  );
3746
+ server.registerTool(
3747
+ "open_ci_cost_fix",
3748
+ {
3749
+ title: titleOf("open_ci_cost_fix"),
3750
+ description: descOf("open_ci_cost_fix"),
3751
+ annotations: annotationsFor("open_ci_cost_fix"),
3752
+ inputSchema: z.object({
3753
+ projectId: z.string().optional().describe("Project UUID \u2014 defaults to the server-configured project"),
3754
+ repo: z.string().regex(/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/).describe("owner/repo, connected to the project"),
3755
+ workflowPath: z.string().max(200).regex(/^\.github\/workflows\/[A-Za-z0-9._/-]+\.ya?ml$/).describe("The workflow file, e.g. .github/workflows/ci.yml"),
3756
+ kind: z.enum(["add_concurrency", "skip_drafts", "weekly_cron", "ignore_docs_paths"]).describe("The fix (advice[].autofix.kind)")
3757
+ })
3758
+ },
3759
+ async (args) => {
3760
+ const pid = await resolveProjectId(args.projectId);
3761
+ const body = { projectId: pid, repo: args.repo, workflowPath: args.workflowPath, kind: args.kind };
3762
+ return jsonText(await apiCall("/v1/admin/ci/cost-fixes", { method: "POST", body: JSON.stringify(body) }));
3763
+ }
3764
+ );
3765
+ const COST_FIX_KIND = z.enum(["add_concurrency", "skip_drafts", "weekly_cron", "ignore_docs_paths"]);
3766
+ const WORKFLOW_PATH = z.string().max(200).regex(/^\.github\/workflows\/[A-Za-z0-9._/-]+\.ya?ml$/);
3767
+ server.registerTool(
3768
+ "preview_ci_cost_fix_rollout",
3769
+ {
3770
+ title: titleOf("preview_ci_cost_fix_rollout"),
3771
+ description: descOf("preview_ci_cost_fix_rollout"),
3772
+ annotations: annotationsFor("preview_ci_cost_fix_rollout"),
3773
+ inputSchema: z.object({
3774
+ projectId: z.string().optional().describe("Limit it to one app; omitted with an account-level key, every app you may change")
3775
+ })
3776
+ },
3777
+ async (args) => {
3778
+ const pid = args.projectId ? await resolveProjectId(args.projectId) : projectId || void 0;
3779
+ const qs = pid ? `?project_id=${encodeURIComponent(pid)}` : "";
3780
+ return jsonText(await apiCall(`/v1/admin/ci/cost-fix-rollout${qs}`, void 0, { minTimeoutMs: 6e4 }));
3781
+ }
3782
+ );
3783
+ server.registerTool(
3784
+ "apply_ci_cost_fix_rollout",
3785
+ {
3786
+ title: titleOf("apply_ci_cost_fix_rollout"),
3787
+ description: descOf("apply_ci_cost_fix_rollout"),
3788
+ annotations: annotationsFor("apply_ci_cost_fix_rollout"),
3789
+ inputSchema: z.object({
3790
+ repos: z.array(
3791
+ z.object({
3792
+ projectId: z.string().describe("The app the repo is connected to (preview repos[].projectId)"),
3793
+ repo: z.string().regex(/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/).describe("owner/repo"),
3794
+ items: z.array(z.object({ workflowPath: WORKFLOW_PATH, kind: COST_FIX_KIND })).min(1).max(20)
3795
+ })
3796
+ ).min(1).max(10).describe("One entry per repo: the ready items from preview_ci_cost_fix_rollout")
3797
+ })
3798
+ },
3799
+ async (args) => {
3800
+ return jsonText(await apiCall("/v1/admin/ci/cost-fix-rollout", { method: "POST", body: JSON.stringify({ repos: args.repos }) }, { minTimeoutMs: 6e4 }));
3801
+ }
3802
+ );
3803
+ server.registerTool(
3804
+ "get_ci_cost_fix_bundle",
3805
+ {
3806
+ title: titleOf("get_ci_cost_fix_bundle"),
3807
+ description: descOf("get_ci_cost_fix_bundle"),
3808
+ annotations: annotationsFor("get_ci_cost_fix_bundle"),
3809
+ inputSchema: z.object({
3810
+ bundleId: z.string().uuid().describe("results[].bundleId from apply_ci_cost_fix_rollout")
3811
+ })
3812
+ },
3813
+ async (args) => {
3814
+ return jsonText(await apiCall(`/v1/admin/ci/cost-fix-bundles/${encodeURIComponent(args.bundleId)}`));
3815
+ }
3816
+ );
3640
3817
  server.registerTool(
3641
3818
  "explain_finding",
3642
3819
  {
@@ -5846,13 +6023,19 @@ Be specific. No generic advice.`
5846
6023
  description: descOf("list_qa_story_runs", TDD_TOOL_CATALOG),
5847
6024
  annotations: annotationsFor("list_qa_story_runs", TDD_TOOL_CATALOG),
5848
6025
  inputSchema: z.object({
6026
+ // `project_id` is not a second field. registerTool wraps this schema
6027
+ // with acceptSnakeCaseAliases, which calls normalizeArgAliases
6028
+ // (arg-aliases.ts) and renames project_id to projectId before zod.
6029
+ projectId: z.string().optional().describe("Project UUID that owns the story. Defaults to the configured project. On an account connection, pass the project the story belongs to."),
5849
6030
  storyId: z.string().describe("QA story id (uuid)"),
5850
6031
  limit: z.number().int().min(1).max(50).optional().default(10).describe("Max runs to return (default 10)")
5851
6032
  })
5852
6033
  },
5853
- async ({ storyId, limit }) => {
6034
+ async ({ projectId: projectId2, storyId, limit }) => {
6035
+ const { projectId: pid, headers } = await projectScopeHeaders(projectId2);
5854
6036
  const data = await apiCall(
5855
- `/v1/admin/projects/${config.projectId}/qa-stories/${storyId}/runs?limit=${limit ?? 10}`
6037
+ `/v1/admin/projects/${pid}/qa-stories/${storyId}/runs?limit=${limit ?? 10}`,
6038
+ { headers }
5856
6039
  );
5857
6040
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
5858
6041
  }
@@ -5864,15 +6047,23 @@ Be specific. No generic advice.`
5864
6047
  description: descOf("get_qa_story_run", TDD_TOOL_CATALOG),
5865
6048
  annotations: annotationsFor("get_qa_story_run", TDD_TOOL_CATALOG),
5866
6049
  inputSchema: z.object({
6050
+ // `project_id` is not a second field. registerTool wraps this schema
6051
+ // with acceptSnakeCaseAliases, which calls normalizeArgAliases
6052
+ // (arg-aliases.ts) and renames project_id to projectId before zod.
6053
+ projectId: z.string().optional().describe(
6054
+ "Project UUID that owns the story. Defaults to the configured project. On an account connection, pass the project the story belongs to."
6055
+ ),
5867
6056
  storyId: z.string().describe("QA story id (uuid)"),
5868
6057
  runId: z.string().describe("Run id (uuid) to fetch detail for")
5869
6058
  })
5870
6059
  },
5871
- async ({ storyId, runId }) => {
6060
+ async ({ projectId: projectId2, storyId, runId }) => {
6061
+ const { projectId: pid, headers } = await projectScopeHeaders(projectId2);
5872
6062
  const data = await apiCall(
5873
- `/v1/admin/projects/${config.projectId}/qa-stories/${storyId}/runs?limit=50`
6063
+ `/v1/admin/projects/${pid}/qa-stories/${storyId}/runs?limit=50`,
6064
+ { headers }
5874
6065
  );
5875
- const run = data?.data?.runs?.find((r) => r.id === runId) ?? null;
6066
+ const run = data?.runs?.find((r) => r.id === runId) ?? null;
5876
6067
  if (!run) {
5877
6068
  throw new MushiApiError(
5878
6069
  404,