@muggleai/works 5.32.0-staging.287 → 5.32.0-staging.289

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.
@@ -9,7 +9,7 @@
9
9
  "name": "muggleai",
10
10
  "source": "./plugin",
11
11
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
12
- "version": "5.32.0-staging.287"
12
+ "version": "5.32.0-staging.289"
13
13
  }
14
14
  ]
15
15
  }
@@ -1,4 +1,4 @@
1
- import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-AEJM2CBK.js';
1
+ import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-WZKHFEBL.js';
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js';
4
4
  import { v4 } from 'uuid';
@@ -379,6 +379,104 @@ var PROGRESS_STATUS_LABELS = {
379
379
  ["passed" /* Passed */]: "\u2705 Passed",
380
380
  ["failed" /* Failed */]: "\u274C Failed"
381
381
  };
382
+ var StepSchema = z.object({
383
+ stepIndex: z.number().int().nonnegative(),
384
+ action: z.string().min(1),
385
+ description: z.string().min(1).optional(),
386
+ screenshotUrl: z.string().url(),
387
+ afterScreenshotUrl: z.string().url().optional()
388
+ });
389
+ var RunSummaryVerdictStatusEnum = /* @__PURE__ */ ((RunSummaryVerdictStatusEnum2) => {
390
+ RunSummaryVerdictStatusEnum2["Success"] = "success";
391
+ RunSummaryVerdictStatusEnum2["BugDetected"] = "bug_detected";
392
+ RunSummaryVerdictStatusEnum2["GoalUnachievable"] = "goal_unachievable";
393
+ return RunSummaryVerdictStatusEnum2;
394
+ })(RunSummaryVerdictStatusEnum || {});
395
+ var RecordedRunSummarySchema = z.object({
396
+ isRecorded: z.literal(true),
397
+ headline: z.string().min(1),
398
+ status: z.nativeEnum(RunSummaryVerdictStatusEnum).optional(),
399
+ verdict: z.string().min(1).optional(),
400
+ blockingIssues: z.string().min(1).optional(),
401
+ screenshotUrl: z.string().url().optional()
402
+ });
403
+ var MissingRunSummarySchema = z.object({
404
+ isRecorded: z.literal(false)
405
+ });
406
+ var RunSummarySchema = z.discriminatedUnion("isRecorded", [RecordedRunSummarySchema, MissingRunSummarySchema]);
407
+ var TEST_SHORT_ID_FIELDS = {
408
+ testCaseShortId: z.string().min(1).optional(),
409
+ replayShortId: z.string().min(1).optional()
410
+ };
411
+ var RUN_SETTINGS_FIELDS = {
412
+ runSettingsId: z.string().min(1).optional(),
413
+ resolutionLabel: z.string().min(1).optional()
414
+ };
415
+ var PassedTestSchema = z.object({
416
+ name: z.string().min(1),
417
+ testCaseId: z.string().min(1),
418
+ testScriptId: z.string().min(1).optional(),
419
+ ...TEST_SHORT_ID_FIELDS,
420
+ ...RUN_SETTINGS_FIELDS,
421
+ runId: z.string().min(1),
422
+ viewUrl: z.string().url(),
423
+ status: z.literal("passed"),
424
+ steps: z.array(StepSchema),
425
+ useCaseName: z.string().min(1).optional(),
426
+ description: z.string().min(1).optional(),
427
+ endingScreenshotUrl: z.string().url().optional(),
428
+ endingScreenshotCaption: z.string().min(1).optional(),
429
+ runSummary: RunSummarySchema.optional()
430
+ });
431
+ var FailedTestSchema = z.object({
432
+ name: z.string().min(1),
433
+ testCaseId: z.string().min(1),
434
+ testScriptId: z.string().min(1).optional(),
435
+ ...TEST_SHORT_ID_FIELDS,
436
+ ...RUN_SETTINGS_FIELDS,
437
+ runId: z.string().min(1),
438
+ viewUrl: z.string().url(),
439
+ status: z.literal("failed"),
440
+ steps: z.array(StepSchema),
441
+ failureStepIndex: z.number().int().nonnegative(),
442
+ error: z.string().min(1),
443
+ // A run of the same test case on the PR's base the author says failed too; build-pr-section verifies it before
444
+ // the walkthrough credits it.
445
+ baselineRunId: z.string().min(1).optional(),
446
+ artifactsDir: z.string().min(1).optional(),
447
+ useCaseName: z.string().min(1).optional(),
448
+ description: z.string().min(1).optional(),
449
+ endingScreenshotUrl: z.string().url().optional(),
450
+ endingScreenshotCaption: z.string().min(1).optional(),
451
+ runSummary: RunSummarySchema.optional()
452
+ });
453
+ var InconclusiveTestSchema = z.object({
454
+ name: z.string().min(1),
455
+ testCaseId: z.string().min(1),
456
+ testScriptId: z.string().min(1).optional(),
457
+ ...TEST_SHORT_ID_FIELDS,
458
+ ...RUN_SETTINGS_FIELDS,
459
+ runId: z.string().min(1),
460
+ viewUrl: z.string().url(),
461
+ status: z.literal("inconclusive"),
462
+ steps: z.array(StepSchema),
463
+ reason: z.string().min(1),
464
+ artifactsDir: z.string().min(1).optional(),
465
+ useCaseName: z.string().min(1).optional(),
466
+ description: z.string().min(1).optional(),
467
+ endingScreenshotUrl: z.string().url().optional(),
468
+ endingScreenshotCaption: z.string().min(1).optional(),
469
+ runSummary: RunSummarySchema.optional()
470
+ });
471
+ var TestResultSchema = z.discriminatedUnion("status", [
472
+ PassedTestSchema,
473
+ FailedTestSchema,
474
+ InconclusiveTestSchema
475
+ ]);
476
+ var E2eReportSchema = z.object({
477
+ projectId: z.string().min(1),
478
+ tests: z.array(TestResultSchema)
479
+ });
382
480
 
383
481
  // src/cli/pr-section/constants.ts
384
482
  var DETAIL_IMAGE_WIDTH = 720;
@@ -388,6 +486,13 @@ var STEP_LIST_HEAD_COUNT = 12;
388
486
  var STEP_LIST_TAIL_COUNT = 8;
389
487
  var STEP_ELEMENT_ID_SUFFIX = /\s*with element id (?:\[\d+\]|#\d+)/g;
390
488
  var STEP_SCREENSHOT_MARKER = "\u{1F4F7}";
489
+ var RUN_SUMMARY_MARKER = "\u{1F3C1}";
490
+ var RUN_SUMMARY_VERDICT_STATUS_LABELS = {
491
+ ["success" /* Success */]: "\u2705 Success",
492
+ ["bug_detected" /* BugDetected */]: "\u274C Bug detected",
493
+ ["goal_unachievable" /* GoalUnachievable */]: "\u26A0\uFE0F Goal unachievable"
494
+ };
495
+ var MISSING_RUN_SUMMARY_TEXT = "\u26A0\uFE0F **No summary step** \u2014 the run ended before it summarized its result; open the run on Muggle AI for its last state.";
391
496
  var TEST_DETAILS_DIVIDER = "---";
392
497
  var SHORT_ID_LABEL_SEPARATOR = " \xB7 ";
393
498
  var TEST_DETAILS_ANCHOR_PREFIX = "muggle-test-";
@@ -598,83 +703,6 @@ function buildE2eResultRecord(latestTests) {
598
703
  unpassed
599
704
  };
600
705
  }
601
- var StepSchema = z.object({
602
- stepIndex: z.number().int().nonnegative(),
603
- action: z.string().min(1),
604
- description: z.string().min(1).optional(),
605
- screenshotUrl: z.string().url(),
606
- afterScreenshotUrl: z.string().url().optional()
607
- });
608
- var TEST_SHORT_ID_FIELDS = {
609
- testCaseShortId: z.string().min(1).optional(),
610
- replayShortId: z.string().min(1).optional()
611
- };
612
- var RUN_SETTINGS_FIELDS = {
613
- runSettingsId: z.string().min(1).optional(),
614
- resolutionLabel: z.string().min(1).optional()
615
- };
616
- var PassedTestSchema = z.object({
617
- name: z.string().min(1),
618
- testCaseId: z.string().min(1),
619
- testScriptId: z.string().min(1).optional(),
620
- ...TEST_SHORT_ID_FIELDS,
621
- ...RUN_SETTINGS_FIELDS,
622
- runId: z.string().min(1),
623
- viewUrl: z.string().url(),
624
- status: z.literal("passed"),
625
- steps: z.array(StepSchema),
626
- useCaseName: z.string().min(1).optional(),
627
- description: z.string().min(1).optional(),
628
- endingScreenshotUrl: z.string().url().optional(),
629
- endingScreenshotCaption: z.string().min(1).optional()
630
- });
631
- var FailedTestSchema = z.object({
632
- name: z.string().min(1),
633
- testCaseId: z.string().min(1),
634
- testScriptId: z.string().min(1).optional(),
635
- ...TEST_SHORT_ID_FIELDS,
636
- ...RUN_SETTINGS_FIELDS,
637
- runId: z.string().min(1),
638
- viewUrl: z.string().url(),
639
- status: z.literal("failed"),
640
- steps: z.array(StepSchema),
641
- failureStepIndex: z.number().int().nonnegative(),
642
- error: z.string().min(1),
643
- // A run of the same test case on the PR's base the author says failed too; build-pr-section verifies it before
644
- // the walkthrough credits it.
645
- baselineRunId: z.string().min(1).optional(),
646
- artifactsDir: z.string().min(1).optional(),
647
- useCaseName: z.string().min(1).optional(),
648
- description: z.string().min(1).optional(),
649
- endingScreenshotUrl: z.string().url().optional(),
650
- endingScreenshotCaption: z.string().min(1).optional()
651
- });
652
- var InconclusiveTestSchema = z.object({
653
- name: z.string().min(1),
654
- testCaseId: z.string().min(1),
655
- testScriptId: z.string().min(1).optional(),
656
- ...TEST_SHORT_ID_FIELDS,
657
- ...RUN_SETTINGS_FIELDS,
658
- runId: z.string().min(1),
659
- viewUrl: z.string().url(),
660
- status: z.literal("inconclusive"),
661
- steps: z.array(StepSchema),
662
- reason: z.string().min(1),
663
- artifactsDir: z.string().min(1).optional(),
664
- useCaseName: z.string().min(1).optional(),
665
- description: z.string().min(1).optional(),
666
- endingScreenshotUrl: z.string().url().optional(),
667
- endingScreenshotCaption: z.string().min(1).optional()
668
- });
669
- var TestResultSchema = z.discriminatedUnion("status", [
670
- PassedTestSchema,
671
- FailedTestSchema,
672
- InconclusiveTestSchema
673
- ]);
674
- var E2eReportSchema = z.object({
675
- projectId: z.string().min(1),
676
- tests: z.array(TestResultSchema)
677
- });
678
706
 
679
707
  // src/cli/pr-section/render.ts
680
708
  function walkthroughEntryKey(identity) {
@@ -758,9 +786,10 @@ function defaultEndingCaption(test) {
758
786
  return "Final page after the test completed";
759
787
  }
760
788
  function endingFrame(test) {
761
- if (test.endingScreenshotUrl) {
789
+ const explicitUrl = test.endingScreenshotUrl ?? recordedRunSummary(test.runSummary)?.screenshotUrl;
790
+ if (explicitUrl) {
762
791
  return {
763
- url: test.endingScreenshotUrl,
792
+ url: explicitUrl,
764
793
  caption: test.endingScreenshotCaption ?? defaultEndingCaption(test)
765
794
  };
766
795
  }
@@ -773,11 +802,17 @@ function endingFrame(test) {
773
802
  caption: test.endingScreenshotCaption ?? defaultEndingCaption(test)
774
803
  };
775
804
  }
805
+ function recordedRunSummary(runSummary) {
806
+ return runSummary?.isRecorded ? runSummary : null;
807
+ }
776
808
  function screenshotImage(url, displayWidth, alt) {
777
809
  return `<img src="${url}" width="${displayWidth}" alt="${escapeHtmlAttribute(alt)}">`;
778
810
  }
811
+ function singleLine(text) {
812
+ return text.replace(/\s*\n\s*/g, " ");
813
+ }
779
814
  function tableCell(s) {
780
- return s.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
815
+ return singleLine(s).replace(/\|/g, "\\|");
781
816
  }
782
817
  function stepText(step) {
783
818
  return escapeHtml((step.description ?? step.action).replace(STEP_ELEMENT_ID_SUFFIX, ""));
@@ -884,7 +919,7 @@ function renderTestDetails(entry, testNumber, screenshotDetail = "before-and-aft
884
919
  const { test } = entry;
885
920
  const lines = [`<a name="${testAnchor(test)}"></a>`, "", `#### ${statusEmoji(test)} ${testNumber}. ${testLabel(test)}`, ""];
886
921
  if (test.description && !isSameText(test.description, test.name)) {
887
- lines.push(`_${test.description.replace(/\s*\n\s*/g, " ")}_`, "");
922
+ lines.push(`_${singleLine(test.description)}_`, "");
888
923
  }
889
924
  lines.push(...renderResultTable(entry));
890
925
  const steps = renderSteps(test, screenshotDetail);
@@ -905,6 +940,9 @@ function testAnchor(identity) {
905
940
  }
906
941
  function stepsToggleLabel(test, screenshotDetail) {
907
942
  const count = test.steps.length;
943
+ if (count === 0) {
944
+ return "<kbd>Show the run summary</kbd>";
945
+ }
908
946
  const stepCount = `${count} ${count === 1 ? "step" : "steps"}`;
909
947
  return screenshotDetail === "none" /* None */ ? `<kbd>Show ${stepCount}</kbd>` : `<kbd>Show ${stepCount} and screenshots</kbd>`;
910
948
  }
@@ -933,9 +971,43 @@ function renderStepScreenshots(step, position, screenshotDetail) {
933
971
  `| ${screenshotImage(step.screenshotUrl, STEP_PAIR_IMAGE_WIDTH, `Step ${position} before`)} | ${screenshotImage(step.afterScreenshotUrl, STEP_PAIR_IMAGE_WIDTH, `Step ${position} after`)} |`
934
972
  ];
935
973
  }
974
+ function runSummaryLabel(runSummary) {
975
+ const statusLabel = runSummary.status ? `${RUN_SUMMARY_VERDICT_STATUS_LABELS[runSummary.status]} \u2014 ` : "";
976
+ return `${RUN_SUMMARY_MARKER} Summary \xB7 ${statusLabel}${escapeHtml(singleLine(runSummary.headline))}`;
977
+ }
978
+ function runSummaryVerdictLines(runSummary) {
979
+ const labelledTexts = [
980
+ ["Verdict", runSummary.verdict],
981
+ ["Blocking issues", runSummary.blockingIssues]
982
+ ];
983
+ return labelledTexts.filter((labelled) => Boolean(labelled[1])).map(([label, text]) => `**${label}:** ${escapeHtml(singleLine(text))}`);
984
+ }
985
+ function renderRunSummaryRow(runSummary, screenshotDetail) {
986
+ if (!runSummary) {
987
+ return null;
988
+ }
989
+ const isTextOnly = screenshotDetail === "none" /* None */;
990
+ if (!runSummary.isRecorded) {
991
+ return isTextOnly ? `- ${MISSING_RUN_SUMMARY_TEXT}` : `
992
+ ${MISSING_RUN_SUMMARY_TEXT}`;
993
+ }
994
+ const verdictLines = runSummaryVerdictLines(runSummary);
995
+ if (isTextOnly) {
996
+ return [`- ${runSummaryLabel(runSummary)}`, ...verdictLines.map((line) => ` - ${line}`)].join("\n");
997
+ }
998
+ const blocks = runSummary.screenshotUrl ? [...verdictLines, screenshotImage(runSummary.screenshotUrl, STEP_IMAGE_WIDTH, "Run summary")] : verdictLines;
999
+ if (blocks.length === 0) {
1000
+ return `
1001
+ ${runSummaryLabel(runSummary)}`;
1002
+ }
1003
+ const body = blocks.flatMap((block, i) => i === 0 ? [block] : ["", block]);
1004
+ return [`<details><summary>${runSummaryLabel(runSummary)}</summary>`, ...indented(body), "</details>"].join("\n");
1005
+ }
936
1006
  function renderSteps(test, screenshotDetail) {
937
1007
  const { steps } = test;
938
- if (steps.length === 0) {
1008
+ const summaryRow = renderRunSummaryRow(test.runSummary, screenshotDetail);
1009
+ const summaryRows = summaryRow ? [summaryRow] : [];
1010
+ if (steps.length === 0 && summaryRows.length === 0) {
939
1011
  return null;
940
1012
  }
941
1013
  const isTextOnly = screenshotDetail === "none" /* None */;
@@ -946,7 +1018,7 @@ function renderSteps(test, screenshotDetail) {
946
1018
  ].join("\n");
947
1019
  const heading = isTextOnly ? ["**Steps**", ""] : ["**Steps** \u2014 click a step to see its screenshots", ""];
948
1020
  if (steps.length <= STEP_LIST_ELISION_THRESHOLD) {
949
- return [...heading, ...steps.map((step, i) => collapsible(step, i + 1))];
1021
+ return [...heading, ...steps.map((step, i) => collapsible(step, i + 1)), ...summaryRows];
950
1022
  }
951
1023
  const tailStart = steps.length - STEP_LIST_TAIL_COUNT;
952
1024
  const hidden = tailStart - STEP_LIST_HEAD_COUNT;
@@ -956,7 +1028,8 @@ function renderSteps(test, screenshotDetail) {
956
1028
  "",
957
1029
  `_\u2026 ${hidden} more ${hidden === 1 ? "step" : "steps"} \u2014 ${dashboardLink(test)}_`,
958
1030
  "",
959
- ...steps.slice(tailStart).map((step, i) => collapsible(step, tailStart + i + 1))
1031
+ ...steps.slice(tailStart).map((step, i) => collapsible(step, tailStart + i + 1)),
1032
+ ...summaryRows
960
1033
  ];
961
1034
  }
962
1035
  function renderResultTable(entry) {
@@ -1106,6 +1179,10 @@ function collectGsUrls(report) {
1106
1179
  if (test.endingScreenshotUrl && isGsUrl(test.endingScreenshotUrl)) {
1107
1180
  seen.add(test.endingScreenshotUrl);
1108
1181
  }
1182
+ const runSummaryScreenshotUrl = test.runSummary?.isRecorded ? test.runSummary.screenshotUrl : void 0;
1183
+ if (runSummaryScreenshotUrl && isGsUrl(runSummaryScreenshotUrl)) {
1184
+ seen.add(runSummaryScreenshotUrl);
1185
+ }
1109
1186
  }
1110
1187
  return Array.from(seen);
1111
1188
  }
@@ -1156,6 +1233,12 @@ function remapTest(test, urlMap) {
1156
1233
  remapped.endingScreenshotUrl = resolved;
1157
1234
  }
1158
1235
  }
1236
+ if (test.runSummary?.isRecorded && test.runSummary.screenshotUrl) {
1237
+ const resolved = urlMap.get(test.runSummary.screenshotUrl);
1238
+ if (resolved) {
1239
+ remapped.runSummary = { ...test.runSummary, screenshotUrl: resolved };
1240
+ }
1241
+ }
1159
1242
  return remapped;
1160
1243
  }
1161
1244
  async function resolveGsScreenshotUrls(report, opts) {
@@ -1165,7 +1248,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1165
1248
  if (gsUrls.length === 0) {
1166
1249
  return report;
1167
1250
  }
1168
- const mcps = await import('./src-KNX6CG4Z.js');
1251
+ const mcps = await import('./src-KF6RSLGQ.js');
1169
1252
  const credentials = await mcps.getCallerCredentialsAsync();
1170
1253
  if (!credentials.bearerToken && !credentials.apiKey) {
1171
1254
  stderrWrite(
@@ -3069,6 +3069,13 @@ var RunEnvironmentInputSchema = RunEnvironmentSchema.optional().describe(
3069
3069
  "Environment lane for the run: 'local' (developer localhost) or 'remote' (deployed). Selects which versioned runSettings/credentials lane the cloud resolves. Omit for remote (default)."
3070
3070
  );
3071
3071
 
3072
+ // packages/mcps/src/shared/llm-tier-types.ts
3073
+ var LlmTierEnum = /* @__PURE__ */ ((LlmTierEnum2) => {
3074
+ LlmTierEnum2["Standard"] = "standard";
3075
+ LlmTierEnum2["Light"] = "light";
3076
+ return LlmTierEnum2;
3077
+ })(LlmTierEnum || {});
3078
+
3072
3079
  // packages/mcps/src/mcp/local/services/display-resolution-constants.ts
3073
3080
  var DISPLAY_PARAMS_BY_RESOLUTION = {
3074
3081
  ["R_0800x0600" /* R_0800x0600 */]: { browserWindowWidth: 800, browserWindowHeight: 600 },
@@ -3163,6 +3170,9 @@ function getRequiredStringField(params) {
3163
3170
  }
3164
3171
  return value;
3165
3172
  }
3173
+ function buildLightModeWorkflowParams(isLightMode) {
3174
+ return isLightMode === true ? { workflowParams: { llm: { tier: "light" /* Light */ } } } : {};
3175
+ }
3166
3176
  function buildGenerationActionScript(params) {
3167
3177
  const testCaseRecord = params.testCase;
3168
3178
  const projectId = getRequiredStringField({
@@ -3215,7 +3225,8 @@ function buildGenerationActionScript(params) {
3215
3225
  ...params.freshSession === true ? { freshSession: true } : {},
3216
3226
  // The studio loads this record's managed profile and secrets, and the cloud files the run
3217
3227
  // under it; without it the cloud picks the local record at displayParams.
3218
- ...params.runSettingsId ? { runSettingsId: params.runSettingsId } : {}
3228
+ ...params.runSettingsId ? { runSettingsId: params.runSettingsId } : {},
3229
+ ...buildLightModeWorkflowParams(params.isLightMode)
3219
3230
  },
3220
3231
  goal: params.testCase.goal,
3221
3232
  url: params.localUrl,
@@ -3284,7 +3295,8 @@ function buildReplayActionScript(params) {
3284
3295
  ...params.freshSession ? { freshSession: true } : {},
3285
3296
  // A replay runs under the record of the script it replays. A remote-lane script's record
3286
3297
  // belongs to the other lane, so its replay is filed by size instead.
3287
- ...params.testScript.type === "local" /* Local */ && params.testScript.runSettingsId ? { runSettingsId: params.testScript.runSettingsId } : {}
3298
+ ...params.testScript.type === "local" /* Local */ && params.testScript.runSettingsId ? { runSettingsId: params.testScript.runSettingsId } : {},
3299
+ ...buildLightModeWorkflowParams(params.isLightMode)
3288
3300
  },
3289
3301
  goal: params.testScript.name,
3290
3302
  url: params.localUrl,
@@ -4067,7 +4079,8 @@ async function runTestGenerationLocked(params) {
4067
4079
  ownerUserId: authContent.userId,
4068
4080
  displayResolution: params.displayResolution,
4069
4081
  freshSession: effectiveFreshSession,
4070
- runSettingsId: params.runSettingsId
4082
+ runSettingsId: params.runSettingsId,
4083
+ isLightMode: params.isLightMode
4071
4084
  });
4072
4085
  const inputFilePath = await writeTempFile({
4073
4086
  filename: `${runId}_input.json`,
@@ -4256,7 +4269,8 @@ async function runReplayLocked(params) {
4256
4269
  ownerUserId: authContent.userId,
4257
4270
  displayResolution: params.displayResolution,
4258
4271
  pinnedAccount: params.pinnedAccount,
4259
- freshSession: params.freshSession
4272
+ freshSession: params.freshSession,
4273
+ isLightMode: params.isLightMode
4260
4274
  });
4261
4275
  const inputFilePath = await writeTempFile({
4262
4276
  filename: `${runId}_input.json`,
@@ -6382,6 +6396,14 @@ var PinnedAccountSchema = z.object({
6382
6396
  passwordSecretId: MuggleEntityIdSchema.describe("Secret ID (UUID) of the secret holding the account password")
6383
6397
  });
6384
6398
 
6399
+ // packages/mcps/src/shared/llm-tier-constants.ts
6400
+ var WORKFLOW_LLM_PARAMS_DESCRIPTION = "Set tier to 'light' to run Studio in Light mode \u2014 a faster, lower-cost model (Claude Sonnet 5.5). Omit to inherit the project/use case/test case setting.";
6401
+ var LIGHT_MODE_INPUT_DESCRIPTION = "Run Studio in Light mode \u2014 faster, lower-cost model (Claude Sonnet 5.5). Default false.";
6402
+ var LLM_TIER_DISPLAY_LABELS = {
6403
+ ["standard" /* Standard */]: "Standard",
6404
+ ["light" /* Light */]: "Light mode"
6405
+ };
6406
+
6385
6407
  // packages/mcps/src/mcp/e2e/contracts/constants.ts
6386
6408
  var WORKFLOW_RUNTIME_ID_NOT_RUN_ID_HINT = "Use the `workflowRuntimeId` returned when the workflow was started \u2014 not a run `id` or a test runs summary's `latestWorkflowRunId`, which are run ids and are not found here.";
6387
6409
  var TEST_STATE_PARALLEL_ACCOUNT_SET_LIMIT_MIN = 1;
@@ -6615,8 +6637,12 @@ var WorkflowMemoryParamsSchema = z.object({
6615
6637
  enableSharedTestMemory: z.boolean().optional().describe("Override to enable/disable SharedTestMemory for this workflow run"),
6616
6638
  enableEverMemOS: z.boolean().optional().describe("Override to enable/disable EverMemOS for this workflow run")
6617
6639
  });
6640
+ var WorkflowLlmParamsSchema = z.object({
6641
+ tier: z.enum(LlmTierEnum).optional()
6642
+ });
6618
6643
  var WorkflowParamsSchema = z.object({
6619
- memory: WorkflowMemoryParamsSchema.optional().describe("Per-run memory override settings")
6644
+ memory: WorkflowMemoryParamsSchema.optional().describe("Per-run memory override settings"),
6645
+ llm: WorkflowLlmParamsSchema.optional().describe(WORKFLOW_LLM_PARAMS_DESCRIPTION)
6620
6646
  }).passthrough().optional().describe("Optional workflow parameters for workflow-level overrides");
6621
6647
  var TokenUsageFilterTypeSchema = z.enum([
6622
6648
  "project",
@@ -9954,7 +9980,9 @@ var ExecuteTestGenerationInputSchema = z.object({
9954
9980
  /** The local-lane runSettings record to generate the script for. */
9955
9981
  runSettingsId: z.string().optional().describe(
9956
9982
  "Local runSettings record to record this run against, e.g. a local script's runSettingsId. Pass its resolution as displayResolution."
9957
- )
9983
+ ),
9984
+ /** Run Studio's prediction agent on the Light mode model tier. */
9985
+ lightMode: z.boolean().optional().describe(LIGHT_MODE_INPUT_DESCRIPTION)
9958
9986
  });
9959
9987
  var ExecuteReplayInputSchema = z.object({
9960
9988
  /** Test script metadata from muggle-remote-test-script-get. */
@@ -9980,7 +10008,9 @@ var ExecuteReplayInputSchema = z.object({
9980
10008
  /** Resolution for this run; defaults to the size the script was recorded at. */
9981
10009
  displayResolution: DisplayResolutionSchema.optional().describe(
9982
10010
  "Browser resolution, e.g. R_0390x0844. Defaults to the script's recorded size."
9983
- )
10011
+ ),
10012
+ /** Run Studio's prediction agent on the Light mode model tier. */
10013
+ lightMode: z.boolean().optional().describe(LIGHT_MODE_INPUT_DESCRIPTION)
9984
10014
  });
9985
10015
  var CancelExecutionInputSchema = z.object({
9986
10016
  runId: MuggleEntityIdSchema.describe("Run ID (UUID) to cancel")
@@ -10283,6 +10313,12 @@ function formatElectronBrowserVisibilityLine(visibility) {
10283
10313
  return `**UI:** ${label} \u2014 showElectronBrowser is "${visibility.showElectronBrowserPreference}", so showUi: ${ignoredShowUi} was ignored`;
10284
10314
  }
10285
10315
 
10316
+ // packages/mcps/src/mcp/tools/local/llm-tier-line.ts
10317
+ function formatLlmTierLine(isLightMode) {
10318
+ const llmTier = isLightMode === true ? "light" /* Light */ : "standard" /* Standard */;
10319
+ return `**Model tier:** ${LLM_TIER_DISPLAY_LABELS[llmTier]}`;
10320
+ }
10321
+
10286
10322
  // packages/mcps/src/mcp/tools/local/studio-verdict-line-constants.ts
10287
10323
  var STUDIO_VERDICT_LABELS = {
10288
10324
  ["success" /* Success */]: "Passed",
@@ -10654,7 +10690,8 @@ var executeTestGenerationTool = {
10654
10690
  showUi: browserVisibility.isBrowserShown,
10655
10691
  freshSession: input.freshSession,
10656
10692
  displayResolution: input.displayResolution,
10657
- runSettingsId: input.runSettingsId
10693
+ runSettingsId: input.runSettingsId,
10694
+ isLightMode: input.lightMode
10658
10695
  })
10659
10696
  });
10660
10697
  const content = [
@@ -10664,6 +10701,7 @@ var executeTestGenerationTool = {
10664
10701
  `**Test Script ID:** ${generationRun.testScriptId}`,
10665
10702
  `**Status:** ${generationRun.status}`,
10666
10703
  `**Duration:** ${generationRun.executionTimeMs}ms`,
10704
+ formatLlmTierLine(input.lightMode),
10667
10705
  formatRunViewUrlLine(generationRun.id),
10668
10706
  formatElectronBrowserVisibilityLine(browserVisibility),
10669
10707
  generationRun.errorMessage ? `**Error:** ${generationRun.errorMessage}` : ""
@@ -10724,7 +10762,8 @@ var executeReplayTool = {
10724
10762
  showUi: browserVisibility.isBrowserShown,
10725
10763
  freshSession: input.freshSession,
10726
10764
  pinnedAccount: input.pinnedAccount,
10727
- displayResolution: input.displayResolution
10765
+ displayResolution: input.displayResolution,
10766
+ isLightMode: input.lightMode
10728
10767
  })
10729
10768
  });
10730
10769
  const content = [
@@ -10734,6 +10773,7 @@ var executeReplayTool = {
10734
10773
  `**Test Script ID:** ${replayRun.testScriptId}`,
10735
10774
  `**Status:** ${replayRun.status}`,
10736
10775
  `**Duration:** ${replayRun.executionTimeMs}ms`,
10776
+ formatLlmTierLine(input.lightMode),
10737
10777
  formatRunViewUrlLine(replayRun.id),
10738
10778
  formatElectronBrowserVisibilityLine(browserVisibility),
10739
10779
  replayRun.errorMessage ? `**Error:** ${replayRun.errorMessage}` : ""
@@ -11146,6 +11186,7 @@ __export(e2e_exports2, {
11146
11186
  WorkflowGetReplayBulkBatchSummaryInputSchema: () => WorkflowGetReplayBulkBatchSummaryInputSchema,
11147
11187
  WorkflowGetReplayLatestRunInputSchema: () => WorkflowGetReplayLatestRunInputSchema,
11148
11188
  WorkflowListRuntimesInputSchema: () => WorkflowListRuntimesInputSchema,
11189
+ WorkflowLlmParamsSchema: () => WorkflowLlmParamsSchema,
11149
11190
  WorkflowMemoryParamsSchema: () => WorkflowMemoryParamsSchema,
11150
11191
  WorkflowParamsSchema: () => WorkflowParamsSchema,
11151
11192
  WorkflowStartTestCaseDetectionInputSchema: () => WorkflowStartTestCaseDetectionInputSchema,
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-TM6IZEKH.js';
3
- import './chunk-AEJM2CBK.js';
2
+ import { runCli } from './chunk-NFCB3A5Z.js';
3
+ import './chunk-WZKHFEBL.js';
4
4
 
5
5
  // src/cli/main.ts
6
6
  runCli().catch((error) => {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-TM6IZEKH.js';
2
- export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-AEJM2CBK.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-NFCB3A5Z.js';
2
+ export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-WZKHFEBL.js';
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.32.0-staging.287",
4
+ "version": "5.32.0-staging.289",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.32.0-staging.287",
7
+ "@muggleai/works@5.32.0-staging.289",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.32.0-staging.287",
3
+ "version": "5.32.0-staging.289",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.32.0-staging.287",
5
+ "version": "5.32.0-staging.289",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.32.0-staging.287",
7
+ "@muggleai/works@5.32.0-staging.289",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -6,4 +6,4 @@ The studio publishes every completed run — pass or fail — to the cloud durin
6
6
 
7
7
  ## Screenshots
8
8
 
9
- Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
9
+ Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. From the same response retain the run's closing halt step, `summaryStep`, as `runSummary` — or `{ isRecorded: false }` when the script has none — mapped per the `runSummary` rule in the same guide. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
@@ -14,6 +14,7 @@ The caller resolves these before the loop and supplies them per test case:
14
14
  - `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
15
15
  - `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
16
16
  - `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
17
+ - `lightMode` — `true` only when the user asks for Light mode (faster, lower-cost model, Claude Sonnet 5.5); omit otherwise.
17
18
 
18
19
  The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
19
20
 
@@ -168,7 +168,8 @@ For each test case:
168
168
  - testScriptId: `<id>`
169
169
  - runId: `<id>`
170
170
  - viewUrl: `<url>`
171
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]`
171
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]`
172
+ - runSummary: the run's closing halt step, `{ isRecorded: true, headline, status, verdict, blockingIssues, screenshotUrl }` or `{ isRecorded: false }` when the run has no `summaryStep` (mapping in `../muggle-pr-visual-walkthrough/e2e-report-assembly.md`)
172
173
 
173
174
  **Failed:** (count)
174
175
  - (test case name):
@@ -180,7 +181,8 @@ For each test case:
180
181
  - viewUrl: `<url>`
181
182
  - failureStepIndex: `<index>`
182
183
  - error: `<message>`
183
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]`
184
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]`
185
+ - runSummary: as for Passed
184
186
  - artifactsDir: `<path>` (for local debugging)
185
187
 
186
188
  **Inconclusive:** (count) — use for runs that couldn't yield a pass/fail signal: no replayable script, environment precondition unmet, prerequisites unmet (Step 3.5), infra error, agent stalled on auth/cookie banner before reaching the assertion, missing secrets. The product is **not** implicated — that's `failed`, not `inconclusive`.
@@ -191,7 +193,8 @@ For each test case:
191
193
  - runId: `<id>` (synthesize a UUID if no run started)
192
194
  - viewUrl: `<url>` (project-level run-results fallback when no specific run URL exists)
193
195
  - reason: `<one short sentence>`
194
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]` (empty only when the run produced no steps)
196
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]` (empty only when the run produced no steps)
197
+ - runSummary: as for Passed
195
198
 
196
199
  **Deliverables:** (count) — one entry per deliverable check from Step 5, in the report-entry shape of [`../_shared/deliverable-categories.md`](../_shared/deliverable-categories.md#report-entry). Omitted when the scope planned none.
197
200
 
@@ -32,7 +32,11 @@ For each result:
32
32
  2. `viewUrl` — from the run result (deep-links to the specific run).
33
33
  3. `status` — from `muggle-local-run-result-get`.
34
34
  4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
35
- 5. If the caller hands over a `baselineRunId` for a failed entry — a run of the same test case against the base that failed too — set it on the entry. `build-pr-section` credits it only after checking the run itself: same test case, failed, same runSettings record, and a stack that served a base commit between the PR's fork point and the base tip. A credited failure reads "also fails on base" and stops holding the walkthrough check red; a refused one is named on stderr and stays a plain failure. Pass `--base <branch>` when the PR does not target the remote's default branch.
35
+ 5. `runSummary` — the run's closing halt step, which the script stores as `summaryStep` apart from `steps[]` (replays drop the recorded halt from `steps[]` too). Set it on every entry whose action script you fetched, passed, failed and inconclusive alike; the walkthrough renders it as the row closing the step list.
36
+ - `summaryStep` present → `{ isRecorded: true, headline, status, verdict, blockingIssues, screenshotUrl }`: `headline` is `structuredSummary.summaryHeadline`, else `briefExplanation`; `status` is `structuredSummary.status` (`success` · `bug_detected` · `goal_unachievable`); `verdict` and `blockingIssues` are the text after `Verdict:` and `Blocking Issues:` in `comment`; `screenshotUrl` is `operation.screenshotUrl`. Omit any of the last four the step does not carry.
37
+ - `summaryStep` absent → `{ isRecorded: false }`: the run died before summarizing, and the walkthrough says so on that test.
38
+ - Omit `runSummary` only when no action script exists to read — a run that never started or the last-resort stub below.
39
+ 6. If the caller hands over a `baselineRunId` for a failed entry — a run of the same test case against the base that failed too — set it on the entry. `build-pr-section` credits it only after checking the run itself: same test case, failed, same runSettings record, and a stack that served a base commit between the PR's fork point and the base tip. A credited failure reads "also fails on base" and stops holding the walkthrough check red; a refused one is named on stderr and stays a plain failure. Pass `--base <branch>` when the PR does not target the remote's default branch.
36
40
 
37
41
  ## Last-resort: no cloud refs on the run result
38
42
 
@@ -70,7 +74,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
70
74
  "replayShortId": "<run shortId, when it has one>",
71
75
  "viewUrl": "<viewUrl from run result>",
72
76
  "status": "passed",
73
- "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }]
77
+ "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }],
78
+ "runSummary": { "isRecorded": true, "headline": "<summaryHeadline>", "status": "success", "verdict": "<Verdict: text>", "blockingIssues": "<Blocking Issues: text>", "screenshotUrl": "<summaryStep.operation.screenshotUrl>" }
74
79
  },
75
80
  {
76
81
  "name": "<failed test case title>",
@@ -82,7 +87,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
82
87
  "status": "failed",
83
88
  "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Sign in' to open the login form.", "screenshotUrl": "..." }],
84
89
  "failureStepIndex": 0,
85
- "error": "<error message from run result>"
90
+ "error": "<error message from run result>",
91
+ "runSummary": { "isRecorded": true, "headline": "<summaryHeadline>", "status": "bug_detected", "verdict": "<Verdict: text>", "blockingIssues": "<Blocking Issues: text>", "screenshotUrl": "..." }
86
92
  },
87
93
  {
88
94
  "name": "<inconclusive test case title>",
@@ -93,7 +99,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
93
99
  "viewUrl": "<viewUrl from run result, or project-level fallback URL>",
94
100
  "status": "inconclusive",
95
101
  "steps": [{ "stepIndex": 0, "action": "navigate", "description": "Workflow started at the app's URL.", "screenshotUrl": "..." }],
96
- "reason": "<one short sentence: why neither pass nor fail applies>"
102
+ "reason": "<one short sentence: why neither pass nor fail applies>",
103
+ "runSummary": { "isRecorded": false }
97
104
  }
98
105
  ]
99
106
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "release": "5.26.0",
3
- "buildId": "run-287-1",
4
- "commitSha": "94d1ed6069a5df3123163ad6efd2a481c95cb735",
5
- "buildTime": "2026-11-03T22:06:08Z",
3
+ "buildId": "run-289-1",
4
+ "commitSha": "5d44bf0bdd34dec23b1a1626bcf9640d434dc7e9",
5
+ "buildTime": "2026-11-04T07:03:17Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
@@ -1 +1 @@
1
- export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-AEJM2CBK.js';
1
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-WZKHFEBL.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@muggleai/works",
3
3
  "mcpName": "io.github.multiplex-ai/muggle",
4
- "version": "5.32.0-staging.287",
4
+ "version": "5.32.0-staging.289",
5
5
  "description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.32.0-staging.287",
4
+ "version": "5.32.0-staging.289",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.32.0-staging.287",
7
+ "@muggleai/works@5.32.0-staging.289",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.32.0-staging.287",
3
+ "version": "5.32.0-staging.289",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
5
  "author": {
6
6
  "name": "Muggle AI",
@@ -2,7 +2,7 @@
2
2
  "name": "muggle",
3
3
  "displayName": "Muggle AI",
4
4
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
5
- "version": "5.32.0-staging.287",
5
+ "version": "5.32.0-staging.289",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.32.0-staging.287",
7
+ "@muggleai/works@5.32.0-staging.289",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -6,4 +6,4 @@ The studio publishes every completed run — pass or fail — to the cloud durin
6
6
 
7
7
  ## Screenshots
8
8
 
9
- Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
9
+ Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. From the same response retain the run's closing halt step, `summaryStep`, as `runSummary` — or `{ isRecorded: false }` when the script has none — mapped per the `runSummary` rule in the same guide. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
@@ -14,6 +14,7 @@ The caller resolves these before the loop and supplies them per test case:
14
14
  - `baseBranch` — the change's base, only when it is not the remote default (a stacked change, a PR into a release branch). Omitted, the tools check `cwd` against the remote default.
15
15
  - `testCase` / `cloudTestCaseId` / `projectId` — the cloud test case, its id and its project.
16
16
  - `showUi` — from the caller's `showElectronBrowser` resolution: omit for visible, `false` for headless.
17
+ - `lightMode` — `true` only when the user asks for Light mode (faster, lower-cost model, Claude Sonnet 5.5); omit otherwise.
17
18
 
18
19
  The tool boundary is fixed: cloud reads (`muggle-remote-*`) resolve definitions and scripts; local tools (`muggle-local-*`) run the browser, fetch results, and publish.
19
20
 
@@ -168,7 +168,8 @@ For each test case:
168
168
  - testScriptId: `<id>`
169
169
  - runId: `<id>`
170
170
  - viewUrl: `<url>`
171
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]`
171
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]`
172
+ - runSummary: the run's closing halt step, `{ isRecorded: true, headline, status, verdict, blockingIssues, screenshotUrl }` or `{ isRecorded: false }` when the run has no `summaryStep` (mapping in `../muggle-pr-visual-walkthrough/e2e-report-assembly.md`)
172
173
 
173
174
  **Failed:** (count)
174
175
  - (test case name):
@@ -180,7 +181,8 @@ For each test case:
180
181
  - viewUrl: `<url>`
181
182
  - failureStepIndex: `<index>`
182
183
  - error: `<message>`
183
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]`
184
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]`
185
+ - runSummary: as for Passed
184
186
  - artifactsDir: `<path>` (for local debugging)
185
187
 
186
188
  **Inconclusive:** (count) — use for runs that couldn't yield a pass/fail signal: no replayable script, environment precondition unmet, prerequisites unmet (Step 3.5), infra error, agent stalled on auth/cookie banner before reaching the assertion, missing secrets. The product is **not** implicated — that's `failed`, not `inconclusive`.
@@ -191,7 +193,8 @@ For each test case:
191
193
  - runId: `<id>` (synthesize a UUID if no run started)
192
194
  - viewUrl: `<url>` (project-level run-results fallback when no specific run URL exists)
193
195
  - reason: `<one short sentence>`
194
- - steps: `[{ stepIndex, action, description, screenshotUrl }, ...]` (empty only when the run produced no steps)
196
+ - steps: `[{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }, ...]` (empty only when the run produced no steps)
197
+ - runSummary: as for Passed
195
198
 
196
199
  **Deliverables:** (count) — one entry per deliverable check from Step 5, in the report-entry shape of [`../_shared/deliverable-categories.md`](../_shared/deliverable-categories.md#report-entry). Omitted when the scope planned none.
197
200
 
@@ -32,7 +32,11 @@ For each result:
32
32
  2. `viewUrl` — from the run result (deep-links to the specific run).
33
33
  3. `status` — from `muggle-local-run-result-get`.
34
34
  4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
35
- 5. If the caller hands over a `baselineRunId` for a failed entry — a run of the same test case against the base that failed too — set it on the entry. `build-pr-section` credits it only after checking the run itself: same test case, failed, same runSettings record, and a stack that served a base commit between the PR's fork point and the base tip. A credited failure reads "also fails on base" and stops holding the walkthrough check red; a refused one is named on stderr and stays a plain failure. Pass `--base <branch>` when the PR does not target the remote's default branch.
35
+ 5. `runSummary` — the run's closing halt step, which the script stores as `summaryStep` apart from `steps[]` (replays drop the recorded halt from `steps[]` too). Set it on every entry whose action script you fetched, passed, failed and inconclusive alike; the walkthrough renders it as the row closing the step list.
36
+ - `summaryStep` present → `{ isRecorded: true, headline, status, verdict, blockingIssues, screenshotUrl }`: `headline` is `structuredSummary.summaryHeadline`, else `briefExplanation`; `status` is `structuredSummary.status` (`success` · `bug_detected` · `goal_unachievable`); `verdict` and `blockingIssues` are the text after `Verdict:` and `Blocking Issues:` in `comment`; `screenshotUrl` is `operation.screenshotUrl`. Omit any of the last four the step does not carry.
37
+ - `summaryStep` absent → `{ isRecorded: false }`: the run died before summarizing, and the walkthrough says so on that test.
38
+ - Omit `runSummary` only when no action script exists to read — a run that never started or the last-resort stub below.
39
+ 6. If the caller hands over a `baselineRunId` for a failed entry — a run of the same test case against the base that failed too — set it on the entry. `build-pr-section` credits it only after checking the run itself: same test case, failed, same runSettings record, and a stack that served a base commit between the PR's fork point and the base tip. A credited failure reads "also fails on base" and stops holding the walkthrough check red; a refused one is named on stderr and stays a plain failure. Pass `--base <branch>` when the PR does not target the remote's default branch.
36
40
 
37
41
  ## Last-resort: no cloud refs on the run result
38
42
 
@@ -70,7 +74,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
70
74
  "replayShortId": "<run shortId, when it has one>",
71
75
  "viewUrl": "<viewUrl from run result>",
72
76
  "status": "passed",
73
- "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }]
77
+ "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }],
78
+ "runSummary": { "isRecorded": true, "headline": "<summaryHeadline>", "status": "success", "verdict": "<Verdict: text>", "blockingIssues": "<Blocking Issues: text>", "screenshotUrl": "<summaryStep.operation.screenshotUrl>" }
74
79
  },
75
80
  {
76
81
  "name": "<failed test case title>",
@@ -82,7 +87,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
82
87
  "status": "failed",
83
88
  "steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Sign in' to open the login form.", "screenshotUrl": "..." }],
84
89
  "failureStepIndex": 0,
85
- "error": "<error message from run result>"
90
+ "error": "<error message from run result>",
91
+ "runSummary": { "isRecorded": true, "headline": "<summaryHeadline>", "status": "bug_detected", "verdict": "<Verdict: text>", "blockingIssues": "<Blocking Issues: text>", "screenshotUrl": "..." }
86
92
  },
87
93
  {
88
94
  "name": "<inconclusive test case title>",
@@ -93,7 +99,8 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape, eac
93
99
  "viewUrl": "<viewUrl from run result, or project-level fallback URL>",
94
100
  "status": "inconclusive",
95
101
  "steps": [{ "stepIndex": 0, "action": "navigate", "description": "Workflow started at the app's URL.", "screenshotUrl": "..." }],
96
- "reason": "<one short sentence: why neither pass nor fail applies>"
102
+ "reason": "<one short sentence: why neither pass nor fail applies>",
103
+ "runSummary": { "isRecorded": false }
97
104
  }
98
105
  ]
99
106
  }