@muggleai/works 5.24.0-staging.164 → 5.24.0-staging.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/{chunk-YVR2MCR2.js → chunk-CUL7GQDB.js} +47 -10
  3. package/dist/{chunk-6AAGQQDL.js → chunk-OPJUT6PX.js} +34 -45
  4. package/dist/cli.js +2 -2
  5. package/dist/index.js +2 -2
  6. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  7. package/dist/plugin/.codex-plugin/plugin.json +1 -1
  8. package/dist/plugin/.cursor-plugin/plugin.json +1 -1
  9. package/dist/plugin/scripts/guardrails.mjs +132 -6
  10. package/dist/plugin/scripts/pr-watch-arm.sh +3 -3
  11. package/dist/plugin/scripts/pr-watch-fetch.sh +2 -2
  12. package/dist/plugin/scripts/pr-watch-loop.sh +2 -2
  13. package/dist/plugin/scripts/pr-watch-state.jq +8 -2
  14. package/dist/plugin/skills/_shared/pr-followup-helpers/classify.md +2 -0
  15. package/dist/plugin/skills/do/address-reviews.md +12 -8
  16. package/dist/plugin/skills/do/cycle-size.md +33 -0
  17. package/dist/plugin/skills/do/e2e-acceptance.md +7 -1
  18. package/dist/plugin/skills/do/e2e-repair.md +4 -0
  19. package/dist/plugin/skills/do/fix-ci.md +3 -3
  20. package/dist/plugin/skills/do/impact-analysis.md +11 -0
  21. package/dist/plugin/skills/do/open-prs/forward.md +4 -0
  22. package/dist/plugin/skills/do/open-prs/update.md +7 -4
  23. package/dist/plugin/skills/do/pre-flight.md +6 -3
  24. package/dist/plugin/skills/do/resolve-conflicts.md +2 -2
  25. package/dist/plugin/skills/do/wave-e2e.md +85 -0
  26. package/dist/plugin/skills/muggle-do/SKILL.md +4 -2
  27. package/dist/plugin/skills/muggle-test-prepare/SKILL.md +7 -0
  28. package/dist/release-manifest.json +3 -3
  29. package/dist/{src-OHWBRW4X.js → src-3I5BNAZ7.js} +1 -1
  30. package/package.json +1 -1
  31. package/plugin/.claude-plugin/plugin.json +1 -1
  32. package/plugin/.codex-plugin/plugin.json +1 -1
  33. package/plugin/.cursor-plugin/plugin.json +1 -1
  34. package/plugin/scripts/guardrails.mjs +132 -6
  35. package/plugin/scripts/pr-watch-arm.sh +3 -3
  36. package/plugin/scripts/pr-watch-fetch.sh +2 -2
  37. package/plugin/scripts/pr-watch-loop.sh +2 -2
  38. package/plugin/scripts/pr-watch-state.jq +8 -2
  39. package/plugin/skills/_shared/pr-followup-helpers/classify.md +2 -0
  40. package/plugin/skills/do/address-reviews.md +12 -8
  41. package/plugin/skills/do/cycle-size.md +33 -0
  42. package/plugin/skills/do/e2e-acceptance.md +7 -1
  43. package/plugin/skills/do/e2e-repair.md +4 -0
  44. package/plugin/skills/do/fix-ci.md +3 -3
  45. package/plugin/skills/do/impact-analysis.md +11 -0
  46. package/plugin/skills/do/open-prs/forward.md +4 -0
  47. package/plugin/skills/do/open-prs/update.md +7 -4
  48. package/plugin/skills/do/pre-flight.md +6 -3
  49. package/plugin/skills/do/resolve-conflicts.md +2 -2
  50. package/plugin/skills/do/wave-e2e.md +85 -0
  51. package/plugin/skills/muggle-do/SKILL.md +4 -2
  52. package/plugin/skills/muggle-test-prepare/SKILL.md +7 -0
@@ -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.24.0-staging.164"
12
+ "version": "5.24.0-staging.166"
13
13
  }
14
14
  ]
15
15
  }
@@ -4680,7 +4680,10 @@ var TokenUsageFilterTypeSchema = z.enum([
4680
4680
  var ProjectCreateInputSchema = z.object({
4681
4681
  projectName: z.string().min(1).max(255).describe("Name of the project"),
4682
4682
  description: z.string().min(1).describe("Project description"),
4683
- url: z.string().url().describe("Target website URL to test")
4683
+ url: z.string().url().describe("Target website URL to test"),
4684
+ organizationId: IdSchema.optional().describe(
4685
+ "Organization (UUID) that owns the project; its runs are billed to that organization. Omit for a personal project. The caller must be an active member: list memberships with muggle-remote-organization-list."
4686
+ )
4684
4687
  });
4685
4688
  var ProjectGetInputSchema = z.object({
4686
4689
  projectId: IdSchema.describe("Project ID (UUID) to retrieve")
@@ -4692,7 +4695,10 @@ var ProjectUpdateInputSchema = z.object({
4692
4695
  projectId: IdSchema.describe("Project ID (UUID) to update"),
4693
4696
  projectName: z.string().min(1).max(255).optional().describe("New project name"),
4694
4697
  description: z.string().optional().describe("Updated description"),
4695
- url: z.string().url().optional().describe("Updated target URL")
4698
+ url: z.string().url().optional().describe("Updated target URL"),
4699
+ organizationId: IdSchema.optional().describe(
4700
+ "Move a personal project into this organization (UUID). One-way: an organization's project cannot move to another organization or back to personal. The caller must be an active member."
4701
+ )
4696
4702
  });
4697
4703
  var ProjectListInputSchema = PaginationInputSchema.extend({});
4698
4704
  var PrdFileUploadInputSchema = z.object({
@@ -5163,7 +5169,9 @@ var ALLOWED_UPSTREAM_PREFIXES = [
5163
5169
  "/v1/protected/muggle-test/",
5164
5170
  "/v1/protected/wallet/",
5165
5171
  "/v1/protected/api-keys",
5166
- "/v1/protected/actionScript/"
5172
+ "/v1/protected/actionScript/",
5173
+ // Only the caller's own membership read: the organization admin routes stay out of an agent's reach.
5174
+ "/v1/protected/organizations/my-organizations"
5167
5175
  ];
5168
5176
  var PromptServiceClient = class {
5169
5177
  httpClient;
@@ -5412,6 +5420,20 @@ function getPromptServiceClient() {
5412
5420
  return clientInstance;
5413
5421
  }
5414
5422
 
5423
+ // packages/mcps/src/mcp/tools/e2e/organization-list-transform.ts
5424
+ function mapOrganizationList(response) {
5425
+ const envelope = response.data;
5426
+ const memberships = envelope?.organizations ?? [];
5427
+ return {
5428
+ organizations: memberships.map((membership) => ({
5429
+ organizationId: membership.organization.id,
5430
+ name: membership.organization.name,
5431
+ status: membership.organization.status,
5432
+ role: membership.role
5433
+ }))
5434
+ };
5435
+ }
5436
+
5415
5437
  // packages/mcps/src/mcp/tools/e2e/test-runs-summary-transform.ts
5416
5438
  var UNKNOWN_STATUS = "UNKNOWN";
5417
5439
  function slimEntry(raw) {
@@ -5472,18 +5494,20 @@ var getWorkflowTimeoutMs = () => getConfig().e2e.workflowTimeoutMs;
5472
5494
  var projectTools = [
5473
5495
  {
5474
5496
  name: "muggle-remote-project-create",
5475
- description: "Create an E2E acceptance testing project to organize browser tests for a web app. A project groups test scenarios (use cases), specific test steps (test cases), and replayable browser scripts (test scripts) for one application. Create a project first before generating or running any E2E tests.",
5497
+ description: "Create an E2E acceptance testing project to organize browser tests for a web app. A project groups test scenarios (use cases), specific test steps (test cases), and replayable browser scripts (test scripts) for one application. Create a project first before generating or running any E2E tests. Pass organizationId to create it under an organization the caller belongs to; omit it for a personal project.",
5476
5498
  inputSchema: ProjectCreateInputSchema,
5477
5499
  mapToUpstream: (input) => {
5478
5500
  const toolInput = input;
5501
+ const body = {
5502
+ name: toolInput.projectName,
5503
+ description: toolInput.description,
5504
+ url: toolInput.url
5505
+ };
5506
+ if (toolInput.organizationId !== void 0) body.organizationId = toolInput.organizationId;
5479
5507
  return {
5480
5508
  method: "POST",
5481
5509
  path: `${MUGGLE_TEST_PREFIX}/projects`,
5482
- body: {
5483
- name: toolInput.projectName,
5484
- description: toolInput.description,
5485
- url: toolInput.url
5486
- }
5510
+ body
5487
5511
  };
5488
5512
  }
5489
5513
  },
@@ -5501,7 +5525,7 @@ var projectTools = [
5501
5525
  },
5502
5526
  {
5503
5527
  name: "muggle-remote-project-update",
5504
- description: "Update an existing project's details.",
5528
+ description: "Update an existing project's details, or move a personal project into an organization the caller belongs to.",
5505
5529
  inputSchema: ProjectUpdateInputSchema,
5506
5530
  mapToUpstream: (input) => {
5507
5531
  const toolInput = input;
@@ -5509,6 +5533,7 @@ var projectTools = [
5509
5533
  if (toolInput.projectName !== void 0) body.name = toolInput.projectName;
5510
5534
  if (toolInput.description !== void 0) body.description = toolInput.description;
5511
5535
  if (toolInput.url !== void 0) body.url = toolInput.url;
5536
+ if (toolInput.organizationId !== void 0) body.organizationId = toolInput.organizationId;
5512
5537
  return {
5513
5538
  method: "PUT",
5514
5539
  path: `${MUGGLE_TEST_PREFIX}/projects/${toolInput.projectId}`,
@@ -5534,6 +5559,18 @@ var projectTools = [
5534
5559
  };
5535
5560
  }
5536
5561
  },
5562
+ {
5563
+ name: "muggle-remote-organization-list",
5564
+ description: "List the organizations the authenticated user is an active member of, with the user's role in each. Pass an organizationId to muggle-remote-project-create or muggle-remote-project-update to make a project organization-owned. Response shape: { organizations: [{ organizationId, name, status, role }] }.",
5565
+ inputSchema: EmptyInputSchema,
5566
+ mapToUpstream: () => {
5567
+ return {
5568
+ method: "GET",
5569
+ path: "/v1/protected/organizations/my-organizations"
5570
+ };
5571
+ },
5572
+ mapFromUpstream: mapOrganizationList
5573
+ },
5537
5574
  {
5538
5575
  name: "muggle-remote-project-delete",
5539
5576
  description: "Delete a project and all associated entities. This is a soft delete.",
@@ -1,4 +1,4 @@
1
- import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, toolRequiresAuth, getCallerCredentials, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, OnboardingBlanketChoice, PreferenceKey, resolvePreferences } from './chunk-YVR2MCR2.js';
1
+ import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, toolRequiresAuth, getCallerCredentials, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, OnboardingBlanketChoice, PreferenceKey, resolvePreferences } from './chunk-CUL7GQDB.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';
@@ -355,7 +355,6 @@ function parentIsAlive(pid) {
355
355
  }
356
356
 
357
357
  // src/cli/pr-section/constants.ts
358
- var DASHBOARD_URL_BASE = "https://www.muggle-ai.com/muggleTestV0/dashboard/projects";
359
358
  var DETAIL_IMAGE_WIDTH = 720;
360
359
  var STEP_IMAGE_WIDTH = 640;
361
360
  var STEP_LIST_ELISION_THRESHOLD = 20;
@@ -390,6 +389,9 @@ var UNPASSED_STATUS_EMOJI = {
390
389
  function escapeHtml(s) {
391
390
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
392
391
  }
392
+ function escapeHtmlAttribute(s) {
393
+ return escapeHtml(s).replace(/"/g, "&quot;");
394
+ }
393
395
  function describeUnpassedCase(unpassed) {
394
396
  const outcome = unpassed.status === "failed" /* Failed */ && unpassed.failedStep !== void 0 ? `failed at step ${unpassed.failedStep}` : unpassed.status;
395
397
  return `${outcome}: ${escapeHtml(unpassed.detail)}`;
@@ -636,7 +638,7 @@ function endingFrame(test) {
636
638
  };
637
639
  }
638
640
  function fullSizeImage(url, alt) {
639
- return `<a href="${url}"><img src="${url}" width="${DETAIL_IMAGE_WIDTH}" alt="${escapeHtml(alt).replace(/"/g, "&quot;")}"></a>`;
641
+ return `<a href="${url}"><img src="${url}" width="${DETAIL_IMAGE_WIDTH}" alt="${escapeHtmlAttribute(alt)}"></a>`;
640
642
  }
641
643
  function tableCell(s) {
642
644
  return s.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
@@ -644,9 +646,8 @@ function tableCell(s) {
644
646
  function stepText(step) {
645
647
  return escapeHtml((step.description ?? step.action).replace(STEP_ELEMENT_ID_SUFFIX, ""));
646
648
  }
647
- function dashboardLink(test, projectId, dashboardBaseUrl) {
648
- const url = `${dashboardBaseUrl}/${projectId}/scripts?modal=script-details&testCaseId=${encodeURIComponent(test.testCaseId)}`;
649
- return `<a href="${url}" target="_blank" rel="noopener noreferrer">Open the full run on Muggle AI \u2192</a>`;
649
+ function dashboardLink(test) {
650
+ return `<a href="${escapeHtmlAttribute(test.viewUrl)}" target="_blank" rel="noopener noreferrer">Open the full run on Muggle AI \u2192</a>`;
650
651
  }
651
652
  function renderOverview(report) {
652
653
  const latestRuns = resolveLatestRuns(report.tests);
@@ -737,14 +738,14 @@ function buildGroupedLayout(latestRuns) {
737
738
  }
738
739
  return layout;
739
740
  }
740
- function renderTestDetails(entry, projectId, testNumber, dashboardBaseUrl = DASHBOARD_URL_BASE, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
741
+ function renderTestDetails(entry, testNumber, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
741
742
  const { test } = entry;
742
743
  const lines = [`<a name="${testAnchor(test.testCaseId)}"></a>`, "", `#### ${statusEmoji(test)} ${testNumber}. ${test.name}`, ""];
743
744
  if (test.description && !isSameText(test.description, test.name)) {
744
745
  lines.push(`_${test.description.replace(/\s*\n\s*/g, " ")}_`, "");
745
746
  }
746
- lines.push(...renderResultTable(entry, projectId, dashboardBaseUrl));
747
- const steps = renderSteps(test, projectId, dashboardBaseUrl, screenshotDetail) ?? [];
747
+ lines.push(...renderResultTable(entry));
748
+ const steps = renderSteps(test, screenshotDetail) ?? [];
748
749
  const frame = renderEndingFrame(test) ?? [];
749
750
  const evidence = [...steps, ...steps.length > 0 && frame.length > 0 ? [""] : [], ...frame];
750
751
  if (evidence.length > 0) {
@@ -798,7 +799,7 @@ function thumbnailUrl(url) {
798
799
  const proxied = url.startsWith(IMAGE_PROXY_PREFIX) ? url : `${IMAGE_PROXY_PREFIX}${encodeURIComponent(url)}`;
799
800
  return `${proxied}&amp;w=${STEP_THUMBNAIL_WIDTH_PX}&amp;q=${STEP_THUMBNAIL_QUALITY}&amp;output=jpg`;
800
801
  }
801
- function renderSteps(test, projectId, dashboardBaseUrl, screenshotDetail) {
802
+ function renderSteps(test, screenshotDetail) {
802
803
  const { steps } = test;
803
804
  if (steps.length === 0) {
804
805
  return null;
@@ -819,12 +820,12 @@ function renderSteps(test, projectId, dashboardBaseUrl, screenshotDetail) {
819
820
  ...heading,
820
821
  ...steps.slice(0, STEP_LIST_HEAD_COUNT).map((step, i) => collapsible(step, i + 1)),
821
822
  "",
822
- `_\u2026 ${hidden} more ${hidden === 1 ? "step" : "steps"} \u2014 ${dashboardLink(test, projectId, dashboardBaseUrl)}_`,
823
+ `_\u2026 ${hidden} more ${hidden === 1 ? "step" : "steps"} \u2014 ${dashboardLink(test)}_`,
823
824
  "",
824
825
  ...steps.slice(tailStart).map((step, i) => collapsible(step, tailStart + i + 1))
825
826
  ];
826
827
  }
827
- function renderResultTable(entry, projectId, dashboardBaseUrl) {
828
+ function renderResultTable(entry) {
828
829
  const { test } = entry;
829
830
  const rows = [];
830
831
  if (test.status === "passed") {
@@ -840,11 +841,11 @@ function renderResultTable(entry, projectId, dashboardBaseUrl) {
840
841
  rows.push(`| **Attempts** | ${entry.attempts} \u2014 showing the latest |`);
841
842
  }
842
843
  const count = test.steps.length;
843
- rows.push(`| **Run** | ${count} browser ${count === 1 ? "step" : "steps"} \xB7 ${dashboardLink(test, projectId, dashboardBaseUrl)} |`);
844
+ rows.push(`| **Run** | ${count} browser ${count === 1 ? "step" : "steps"} \xB7 ${dashboardLink(test)} |`);
844
845
  return rows;
845
846
  }
846
- function renderDetailBlocks(report, dashboardBaseUrl, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
847
- return resolveLatestRuns(report.tests).map((entry, i) => renderTestDetails(entry, report.projectId, i + 1, dashboardBaseUrl ?? DASHBOARD_URL_BASE, screenshotDetail)).join(`
847
+ function renderDetailBlocks(report, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
848
+ return resolveLatestRuns(report.tests).map((entry, i) => renderTestDetails(entry, i + 1, screenshotDetail)).join(`
848
849
 
849
850
  ${TEST_DETAILS_DIVIDER}
850
851
 
@@ -875,7 +876,7 @@ ${renderOverview(report)}`;
875
876
  "",
876
877
  "### Test details",
877
878
  "",
878
- renderDetailBlocks(report, opts.dashboardBaseUrl)
879
+ renderDetailBlocks(report)
879
880
  ].join("\n");
880
881
  }
881
882
  function renderComment(report, opts = {}) {
@@ -891,13 +892,13 @@ function renderComment(report, opts = {}) {
891
892
  "",
892
893
  "### Test details",
893
894
  "",
894
- renderDetailBlocks(report, opts.dashboardBaseUrl, screenshotDetail)
895
+ renderDetailBlocks(report, screenshotDetail)
895
896
  ].join("\n");
896
897
  }
897
898
 
898
899
  // src/cli/pr-section/overflow.ts
899
900
  function splitWithOverflow(report, opts) {
900
- const inlineBody = renderBody(report, { inlineDetails: true, dashboardBaseUrl: opts.dashboardBaseUrl });
901
+ const inlineBody = renderBody(report, { inlineDetails: true });
901
902
  const inlineBytes = Buffer.byteLength(inlineBody, "utf-8");
902
903
  if (inlineBytes <= opts.maxBodyBytes) {
903
904
  return { body: inlineBody, comment: null };
@@ -905,14 +906,14 @@ function splitWithOverflow(report, opts) {
905
906
  if (report.tests.length === 0) {
906
907
  return { body: inlineBody, comment: null };
907
908
  }
908
- const spilledBody = renderBody(report, { inlineDetails: false, dashboardBaseUrl: opts.dashboardBaseUrl });
909
- const comment = renderFittingComment(report, opts.dashboardBaseUrl);
909
+ const spilledBody = renderBody(report, { inlineDetails: false });
910
+ const comment = renderFittingComment(report);
910
911
  return {
911
912
  body: spilledBody,
912
913
  comment: comment.length > 0 ? comment : null
913
914
  };
914
915
  }
915
- function renderFittingComment(report, dashboardBaseUrl) {
916
+ function renderFittingComment(report) {
916
917
  const ladder = [
917
918
  "before-and-after" /* BeforeAndAfter */,
918
919
  "before-only" /* BeforeOnly */,
@@ -920,7 +921,7 @@ function renderFittingComment(report, dashboardBaseUrl) {
920
921
  ];
921
922
  let comment = "";
922
923
  for (const screenshotDetail of ladder) {
923
- comment = renderComment(report, { dashboardBaseUrl, screenshotDetail });
924
+ comment = renderComment(report, { screenshotDetail });
924
925
  if (Buffer.byteLength(comment, "utf-8") <= MAX_COMMENT_BYTES) {
925
926
  return comment;
926
927
  }
@@ -1027,7 +1028,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1027
1028
  if (gsUrls.length === 0) {
1028
1029
  return report;
1029
1030
  }
1030
- const mcps = await import('./src-OHWBRW4X.js');
1031
+ const mcps = await import('./src-3I5BNAZ7.js');
1031
1032
  const credentials = await mcps.getCallerCredentialsAsync();
1032
1033
  if (!credentials.bearerToken && !credentials.apiKey) {
1033
1034
  stderrWrite(
@@ -1078,18 +1079,6 @@ var DEFAULT_MAX_BODY_BYTES = 6e4;
1078
1079
  var REPORT_SECTION_SENTINEL = "<!-- muggle-pr-section:v1 -->";
1079
1080
  var withSentinel = (s) => s ? `${REPORT_SECTION_SENTINEL}
1080
1081
  ${s}` : s;
1081
- async function resolveDashboardBaseUrl(stderrWrite) {
1082
- try {
1083
- const mcps = await import('./src-OHWBRW4X.js');
1084
- return mcps.resolveActiveProfile().dashboardBaseUrl;
1085
- } catch (err) {
1086
- stderrWrite(
1087
- `build-pr-section: could not resolve the runtime target, linking to production: ${errMsg2(err)}
1088
- `
1089
- );
1090
- return DASHBOARD_URL_BASE;
1091
- }
1092
- }
1093
1082
  async function readAll(stream) {
1094
1083
  const chunks = [];
1095
1084
  for await (const chunk of stream) {
@@ -1137,8 +1126,7 @@ ${err.issues.map((i) => ` - ${i.path.join(".")}: ${i.message}`).join("\n")}
1137
1126
  const sentinelCost = Buffer.byteLength(`${REPORT_SECTION_SENTINEL}
1138
1127
  `, "utf-8");
1139
1128
  const renderedSection = buildPrSection(resolvedReport, {
1140
- maxBodyBytes: opts.maxBodyBytes - sentinelCost,
1141
- dashboardBaseUrl: await resolveDashboardBaseUrl(opts.stderrWrite)
1129
+ maxBodyBytes: opts.maxBodyBytes - sentinelCost
1142
1130
  });
1143
1131
  opts.stdoutWrite(
1144
1132
  JSON.stringify({
@@ -2357,6 +2345,7 @@ var E2eSkipCode = /* @__PURE__ */ ((E2eSkipCode2) => {
2357
2345
  E2eSkipCode2["MuggleAuthDown"] = "MUGGLE_AUTH_DOWN";
2358
2346
  E2eSkipCode2["NoPr"] = "NO_PR";
2359
2347
  E2eSkipCode2["UserWaived"] = "USER_WAIVED";
2348
+ E2eSkipCode2["NoAppLogicChange"] = "NO_APP_LOGIC_CHANGE";
2360
2349
  return E2eSkipCode2;
2361
2350
  })(E2eSkipCode || {});
2362
2351
 
@@ -2428,6 +2417,13 @@ function listPrComments(pr, run) {
2428
2417
  return null;
2429
2418
  }
2430
2419
  }
2420
+ function readPrHeadSha(pr, run) {
2421
+ try {
2422
+ return run(["api", `repos/${pr.repo}/pulls/${pr.prNumber}`, "--jq", ".head.sha"])?.trim() || null;
2423
+ } catch {
2424
+ return null;
2425
+ }
2426
+ }
2431
2427
  function writeJson(args, payload, run) {
2432
2428
  try {
2433
2429
  return run(args, JSON.stringify(payload)) !== null;
@@ -2545,13 +2541,6 @@ function readEvent(eventPath) {
2545
2541
  return {};
2546
2542
  }
2547
2543
  }
2548
- function fetchHeadSha(repo, prNumber, run) {
2549
- try {
2550
- return run(["api", `repos/${repo}/pulls/${prNumber}`, "--jq", ".head.sha"])?.trim() ?? null;
2551
- } catch {
2552
- return null;
2553
- }
2554
- }
2555
2544
  function resolveCheckTarget(flags, env, run = defaultGhRunner) {
2556
2545
  const repo = flags.repo ?? env.GITHUB_REPOSITORY;
2557
2546
  if (!repo) return null;
@@ -2559,7 +2548,7 @@ function resolveCheckTarget(flags, env, run = defaultGhRunner) {
2559
2548
  const commentedPrNumber = event.issue?.pull_request ? event.issue.number : void 0;
2560
2549
  const prNumber = Number(flags.pr ?? event.pull_request?.number ?? commentedPrNumber ?? NaN);
2561
2550
  if (!Number.isInteger(prNumber) || prNumber <= 0) return null;
2562
- const headSha = flags.headSha ?? event.pull_request?.head?.sha ?? fetchHeadSha(repo, prNumber, run);
2551
+ const headSha = flags.headSha ?? event.pull_request?.head?.sha ?? readPrHeadSha({ repo, prNumber }, run);
2563
2552
  if (!headSha) return null;
2564
2553
  return {
2565
2554
  repo,
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-6AAGQQDL.js';
3
- import './chunk-YVR2MCR2.js';
2
+ import { runCli } from './chunk-OPJUT6PX.js';
3
+ import './chunk-CUL7GQDB.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-6AAGQQDL.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-YVR2MCR2.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-OPJUT6PX.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-CUL7GQDB.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.24.0-staging.164",
4
+ "version": "5.24.0-staging.166",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.24.0-staging.164",
3
+ "version": "5.24.0-staging.166",
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.24.0-staging.164",
5
+ "version": "5.24.0-staging.166",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"