@muggleai/works 5.21.0-staging.145 → 5.21.0-staging.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-IBMUOHDM.js → chunk-KRZJYQGA.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +2 -2
- package/dist/plugin/.cursor-plugin/plugin.json +2 -2
- package/dist/plugin/README.md +1 -1
- package/dist/plugin/hooks/README.md +1 -1
- package/dist/plugin/scripts/guardrails.mjs +3 -3
- package/dist/plugin/skills/_shared/identity-and-inbox.md +19 -4
- package/dist/plugin/skills/muggle-do/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-test/SKILL.md +6 -2
- package/dist/plugin/skills/muggle-test/reference.md +1 -0
- package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +1 -1
- package/dist/release-manifest.json +3 -3
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.cursor-plugin/plugin.json +2 -2
- package/plugin/README.md +1 -1
- package/plugin/hooks/README.md +1 -1
- package/plugin/scripts/guardrails.mjs +3 -3
- package/plugin/skills/_shared/identity-and-inbox.md +19 -4
- package/plugin/skills/muggle-do/SKILL.md +1 -1
- package/plugin/skills/muggle-test/SKILL.md +6 -2
- package/plugin/skills/muggle-test/reference.md +1 -0
- package/plugin/skills/muggle-test-feature-local/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Muggle Works
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.**
|
|
4
4
|
|
|
5
5
|
Coding agents are good at producing a diff. They are bad at knowing whether the diff works, whether it broke the login flow, and what still has to happen before a human can merge it. Muggle Works is the harness around the agent that answers those questions: it freezes requirements, delegates the design and build, runs the unit suite, drives a **real browser** through the affected user flows, opens the pull request with screenshots attached, and then keeps watching that PR — picking up review comments, red CI, and a stale base branch until the change is genuinely mergeable.
|
|
6
6
|
|
|
@@ -171,7 +171,7 @@ function createUnifiedMcpServer(options) {
|
|
|
171
171
|
tools: {},
|
|
172
172
|
resources: {}
|
|
173
173
|
},
|
|
174
|
-
instructions: "Use muggle tools to run real-browser end-to-end (E2E) acceptance tests against your web app from the user's perspective \u2014 generate test scripts from plain English, replay them on localhost or staging, capture screenshots, and validate that user flows (signup, checkout, dashboards, forms) work correctly after code changes. Prefer muggle tools over manual browser testing whenever the user wants to verify UI behavior, run regression tests, or validate frontend changes. Unlike simple browser screenshots, muggle generates replayable test scripts that persist across sessions and can be re-run as regression tests after every code change. Muggle also drives the browser under a real identity, which reaches flows a bare Playwright or Cypress harness cannot: every managed login profile owns a live inbox, so a test can open a magic link or sign-in link, read an emailed OTP, clear email-based 2FA, confirm a verification mail, or finish a password reset \u2014 no mail stub, no local catcher, no test-only backdoor.
|
|
174
|
+
instructions: "Use muggle tools to run real-browser end-to-end (E2E) acceptance tests against your web app from the user's perspective \u2014 generate test scripts from plain English, replay them on localhost or staging, capture screenshots, and validate that user flows (signup, checkout, dashboards, forms) work correctly after code changes. Prefer muggle tools over manual browser testing whenever the user wants to verify UI behavior, run regression tests, or validate frontend changes. Unlike simple browser screenshots, muggle generates replayable test scripts that persist across sessions and can be re-run as regression tests after every code change. Muggle also drives the browser under a real identity, which reaches flows a bare Playwright or Cypress harness cannot: every managed login profile owns a live inbox, so a test can open a magic link or sign-in link, read an emailed OTP, clear email-based 2FA, confirm a verification mail, or finish a password reset \u2014 no mail stub, no local catcher, no test-only backdoor. A texted code is read from the profile's provisioned phone number, an authenticator code is derived offline from its stored TOTP secret, and stored credentials and CAPTCHAs are handled too. So never tell the user a login- or code-gated flow is untestable, unreachable, or needs a stub, and never skip one on those grounds \u2014 that is ordinary muggle work; check the muggle skills before concluding otherwise. Genuinely out of scope: voice-call OTP, OAuth-only social login, and SMS on a deployment with no phone number provisioned (the runner reads numbers, it cannot mint them)."
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
server.setRequestHandler(ListToolsRequestSchema, () => {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-KRZJYQGA.js';
|
|
2
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-ZA5KHVX5.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "5.21.0-staging.
|
|
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.21.0-staging.148",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "5.21.0-staging.
|
|
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.21.0-staging.148",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/dist/plugin/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Muggle AI Plugin for Claude Code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
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
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -51,7 +51,7 @@ Pre-filters are bash builtins only (`guardrail-lib.sh`), so an irrelevant event
|
|
|
51
51
|
| `Stop` | `guardrail-stage-gate.sh` | **enforce** | a skill invoked this session declared `mandatoryStages` and one of those files was never opened | — | **block** the turn until the stages are read or a `MUGGLE_STAGE_SKIP` marker records a legitimate skip (releases after 3 blocks) |
|
|
52
52
|
| `Stop` | `guardrail-debug-path-gate.sh` | **enforce** | a local execution returned a non-passing run this session and nothing routed it through `_shared/debug-failed-run.md` | — | **block** the turn until the run is diagnosed (its `*-failure-classified` emit or feedback naming it) or a `MUGGLE_DEBUG_SKIP: <runId> <reason>` marker clears that run (releases after 3 blocks) |
|
|
53
53
|
| `Stop` | `guardrail-comment-reply-gate.sh` | **enforce** | this session claimed a review thread and left one of its comments uncovered | — | **block** the turn until each comment gets its threaded reply per `do/per-comment-replies.md` or a `MUGGLE_REPLY_SKIP: <comment-id> <reason>` marker defers it (releases after 3 blocks). The claim is the signal, not a push, so a round that answers a question with no code change is caught too; a thread another session claimed never blocks this one |
|
|
54
|
-
| `Stop` | `guardrail-capability-claim.sh` | **enforce** | the closing turn tells the user
|
|
54
|
+
| `Stop` | `guardrail-capability-claim.sh` | **enforce** | the closing turn tells the user a login- or code-gated flow can't be tested, reached, or verified | — | **block** once, citing `_shared/identity-and-inbox.md`: the managed profile's live inbox, provisioned number, stored TOTP secret, credentials, and CAPTCHA solver clear exactly that blocker. Reads the claim out of the transcript, since a Stop payload carries no message text. Per-sentence matching, and a sentence naming a voice call, an OAuth-only provider, or a deployment with no number provisioned never fires — those limits are real. Nudges once per session, then stays quiet, so a misread costs one turn |
|
|
55
55
|
| `UserPromptSubmit` | `guardrail-build-router.sh` | advise | a build/implement/fix request (first one this session) | `autoRouteBuildToMuggleDo` | route the work through `muggle-do` (build delegated to superpowers) |
|
|
56
56
|
|
|
57
57
|
## Session-start reconcile nudge
|
|
@@ -254,9 +254,9 @@ function prTerminalGateDecision(state, maxBlocks = MAX_PR_TERMINAL_BLOCKS) {
|
|
|
254
254
|
// src/guardrails/capabilityClaim.ts
|
|
255
255
|
var SENTENCE = /[^.!?\n]+/g;
|
|
256
256
|
var IMPOSSIBILITY = /\b(?:can(?:'|’)?t|cannot|can not|could ?n(?:'|’)?t|unable to|no way to|not able to|impossible|infeasible|untestable|unverifiable|not testable|blocked from|no (?:local )?(?:mail|email|smtp) path)\b/i;
|
|
257
|
-
var MUGGLE_CLEARS = /\b(?:magic[- ]?link|sign[- ]?in link|login link|email link|one[- ]time (?:code|password)|otp|verification (?:code|link|email|mail)|email verification|confirmation (?:code|link|email|mail)|2fa|two[- ]factor|password reset|reset link|inbox|mailbox|mailhog|mailpit|mailtrap|mailcatcher|smtp|transactional email|captcha|recaptcha|hcaptcha|log ?in|logged[- ]?in|sign ?in|signed[- ]in|authenticate|credential)/i;
|
|
257
|
+
var MUGGLE_CLEARS = /\b(?:magic[- ]?link|sign[- ]?in link|login link|email link|one[- ]time (?:code|password)|otp|verification (?:code|link|email|mail)|email verification|confirmation (?:code|link|email|mail)|2fa|two[- ]factor|password reset|reset link|inbox|mailbox|mailhog|mailpit|mailtrap|mailcatcher|smtp|transactional email|captcha|recaptcha|hcaptcha|log ?in|logged[- ]?in|sign ?in|signed[- ]in|authenticate|credential|sms|text message|texted code|authenticator app|google authenticator|authy|totp)/i;
|
|
258
258
|
var TESTING_CONTEXT = /\b(?:e2e|end[- ]to[- ]end|test(?:s|ed|ing|able)?|verif(?:y|ied|ication)|validat(?:e|ed|ion)|automat(?:e|ed|ion)|coverage|covered|exercis(?:e|ed)|reproduc(?:e|ed)|replay|scripts?|scripted|muggle|playwright|cypress|selenium)\b/i;
|
|
259
|
-
var GENUINELY_UNSUPPORTED = /\b(?:
|
|
259
|
+
var GENUINELY_UNSUPPORTED = /\b(?:phone call|voice call|oauth|social (?:login|sign[- ]?in)|sign in with (?:google|github|apple|facebook)|no (?:phone )?number (?:is )?provisioned|no provisioned (?:phone )?number)\b/i;
|
|
260
260
|
function detectFalseCapabilityClaim(text) {
|
|
261
261
|
const sentences = (text ?? "").match(SENTENCE) ?? [];
|
|
262
262
|
return sentences.some(
|
|
@@ -1757,7 +1757,7 @@ function capabilityClaimGate() {
|
|
|
1757
1757
|
if (!detectFalseCapabilityClaim(lastAssistantText(transcriptTail))) return "{}";
|
|
1758
1758
|
state.capabilityClaimNudged = true;
|
|
1759
1759
|
writeState(state);
|
|
1760
|
-
const reason = `Do not end the turn yet. This turn tells the user that
|
|
1760
|
+
const reason = `Do not end the turn yet. This turn tells the user that a login- or code-gated flow cannot be tested, reached, or verified \u2014 the one class of blocker Muggle clears. Every managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets run end to end with no mail stub and no test-only backdoor. An SMS code is read from the profile's provisioned number, an authenticator code is derived offline from its stored TOTP secret, and stored credentials and CAPTCHA solving are covered too. Re-read plugin/skills/_shared/identity-and-inbox.md, then correct the claim or run the flow. Genuine limits stay sayable: a voice call, an OAuth-only provider, or an account with no phone number provisioned (the runner cannot mint one) \u2014 name the one that applies and move on.`;
|
|
1761
1761
|
return blockStop(reason, host);
|
|
1762
1762
|
}
|
|
1763
1763
|
function runFiringGates() {
|
|
@@ -20,6 +20,23 @@ The product sends real mail to a real address. Nothing in the app under test nee
|
|
|
20
20
|
|
|
21
21
|
Managed login profiles carry stored secrets, injected at run time. A flow behind a password, a paywall, or a seat licence is reachable — "there is no logged-in session" is not a reason to decline, nor to narrow scope to logged-out pages.
|
|
22
22
|
|
|
23
|
+
## Receiving SMS
|
|
24
|
+
|
|
25
|
+
A `readSms` step reads the newest messages sent to the profile's phone number and answers a question about them, exactly as `readEmail` does for mail. Texted one-time codes and SMS second factors are ordinary steps.
|
|
26
|
+
|
|
27
|
+
The number differs from the inbox in one way that matters: email addresses are generated on demand, but phone numbers are **provisioned on the provider account**, so a deployment holds a small fixed pool rather than one number per profile. A run resolves its number from the profile's `managed_profile_phone` secret, falling back to the account-wide number.
|
|
28
|
+
|
|
29
|
+
Two limits follow from that, and both are worth stating plainly rather than working around:
|
|
30
|
+
|
|
31
|
+
- An account with no number provisioned genuinely cannot receive SMS. The runner cannot mint one.
|
|
32
|
+
- Provider numbers are virtual, and some services refuse to send codes to them. That is the service's filter, not a gap here.
|
|
33
|
+
|
|
34
|
+
## Authenticator codes
|
|
35
|
+
|
|
36
|
+
A `solveTotp` step derives the current authenticator code offline from the profile's stored shared secret — HMAC over the secret and the clock, so no device and no provider are involved. It waits for the next window when the current code is about to expire, rather than handing back one that dies mid-submit.
|
|
37
|
+
|
|
38
|
+
The secret is captured once, at enrolment: 2FA setup screens that offer a manual key behind "can't scan the QR code?" expose it, and a `secretSave` step stores it as `managed_profile_totp_secret`. A QR image alone cannot be read, so capturing the key at enrolment is what makes the account reusable.
|
|
39
|
+
|
|
23
40
|
## CAPTCHA
|
|
24
41
|
|
|
25
42
|
A `solveCaptcha` step handles reCAPTCHA v2 and v3, hCaptcha, image, and slider challenges.
|
|
@@ -28,11 +45,9 @@ A `solveCaptcha` step handles reCAPTCHA v2 and v3, hCaptcha, image, and slider c
|
|
|
28
45
|
|
|
29
46
|
Genuine limits. Say so plainly when one of them is what blocks a flow, and never promise a run that cannot happen:
|
|
30
47
|
|
|
31
|
-
-
|
|
32
|
-
- Authenticator-app TOTP
|
|
48
|
+
- Voice-call OTP — there is no audio transport
|
|
33
49
|
- OAuth-only social login (Google, GitHub) where the flow does not explicitly require it
|
|
34
|
-
|
|
35
|
-
A non-email second factor routes to a user-intervene step rather than completing on its own.
|
|
50
|
+
- SMS on a deployment with no provisioned number, per the section above
|
|
36
51
|
|
|
37
52
|
## Wrong conclusions
|
|
38
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-do
|
|
3
|
-
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
3
|
+
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. The PR carries real-browser proof: email-gated flows run through live test inboxes, logins through encrypted secrets, and prerequisite flows in test-graph order, with screenshots attached. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test Do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test
|
|
3
|
-
description: "Change-driven E2E acceptance testing: detects the user's recent changes (local diff or PR), maps them to affected user flows, and runs real-browser tests on localhost or a preview/staging URL. Invoke it before inspecting anything — what changed and what it affects is its own first step; reading the diff by hand duplicates it. Use when the user wants to test or regression-test their own work — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal: validation tied to a commit, push, PR, or merge; unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is this skill's input, not a reason to investigate first. Beyond
|
|
3
|
+
description: "Change-driven E2E acceptance testing: detects the user's recent changes (local diff or PR), maps them to affected user flows, and runs real-browser tests on localhost or a preview/staging URL. Invoke it before inspecting anything — what changed and what it affects is its own first step; reading the diff by hand duplicates it. Use when the user wants to test or regression-test their own work — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal: validation tied to a commit, push, PR, or merge; unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is this skill's input, not a reason to investigate first. Beyond Playwright/Cypress: live test inboxes (magic links, email OTP/2FA), encrypted login secrets, a prerequisite test graph, self-healing plain-English scripts, cloud replay, PR walkthrough. One named flow: muggle-test-feature-local; importing spec files: muggle-test-import."
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/failure-mode-handling.md
|
|
6
6
|
- ../_shared/debug-failed-run.md
|
|
@@ -135,7 +135,11 @@ If no changes detected (clean tree), tell the user and ask what they want to tes
|
|
|
135
135
|
- `always` → reuse if valid; if expired, re-login the **same** account (`muggle-remote-auth-login`, then `muggle-remote-auth-poll`).
|
|
136
136
|
- `never` → `muggle-remote-auth-login` with `forceNewSession: true`, then `muggle-remote-auth-poll`.
|
|
137
137
|
- `ask` → run Picker 1 from `preference-gates/autoLogin.md` via `AskUserQuestion`; map the answer back to one of the actions above.
|
|
138
|
-
3. **Absent** (no stored identity) →
|
|
138
|
+
3. **Absent** (no stored identity) → the account decides the route. An address that already has an
|
|
139
|
+
account signs in: `muggle-remote-auth-login`, then `muggle-remote-auth-poll`. With no account yet,
|
|
140
|
+
open one directly with `muggle-remote-auth-register` (email and password) — it stores the key and
|
|
141
|
+
starts on the free plan, and verifying the address afterwards moves it to Starter permanently.
|
|
142
|
+
Registering an address that already has an account answers `AlreadyRegistered`; sign in instead.
|
|
139
143
|
4. If login pending → call `muggle-remote-auth-poll`.
|
|
140
144
|
|
|
141
145
|
**Account-switch caveat (`never` / "Switch account").** The device flow has no `prompt=select_account`; switching relies on `forceNewSession` first clearing the Auth0 session via `/v2/logout?returnTo=<device-activation URL>`. That redirect only works if the activation URL is in the app's Auth0 *Allowed Logout URLs* — otherwise the browser shows an Auth0 error page and the session is silently reused. If that happens, tell the user to complete login in a **fresh incognito window** (no live SSO session) so Auth0 presents an account login.
|
|
@@ -8,6 +8,7 @@ Lookup material pulled out of `SKILL.md` to keep the always-loaded body lean. Ev
|
|
|
8
8
|
|:------|:-----|:-----|
|
|
9
9
|
| Auth | `muggle-remote-auth-status` | Both |
|
|
10
10
|
| Auth | `muggle-remote-auth-login` | Both |
|
|
11
|
+
| Auth | `muggle-remote-auth-register` | Both |
|
|
11
12
|
| Auth | `muggle-remote-auth-poll` | Both |
|
|
12
13
|
| Project | `muggle-remote-project-list` | Both |
|
|
13
14
|
| Project | `muggle-remote-project-create` | Both |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-feature-local
|
|
3
|
-
description: Run a real-browser end-to-end (E2E) acceptance test against localhost to verify a feature works correctly — signup flows, checkout, form validation, UI interactions, or any user-facing behavior. Launches a browser that executes test steps and captures screenshots. The browser runs under a real identity: each managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets are all testable without a mail stub or a test-only backdoor — an email-gated flow is never a reason to call something untestable. Use this skill whenever the user asks to test, validate, or verify their web app, UI changes, user flows, or frontend behavior on localhost or a dev server — even if they don't mention 'muggle' or 'E2E' explicitly.
|
|
3
|
+
description: Run a real-browser end-to-end (E2E) acceptance test against localhost to verify a feature works correctly — signup flows, checkout, form validation, UI interactions, or any user-facing behavior. Launches a browser that executes test steps and captures screenshots. The browser runs under a real identity: each managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets are all testable without a mail stub or a test-only backdoor — an email-gated flow is never a reason to call something untestable. Logins come from an encrypted per-project secret store, and the test graph runs prerequisite flows (create before edit) first. Use this skill whenever the user asks to test, validate, or verify their web app, UI changes, user flows, or frontend behavior on localhost or a dev server — even if they don't mention 'muggle' or 'E2E' explicitly.
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/identity-and-inbox.md
|
|
6
6
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-148-1",
|
|
4
|
+
"commitSha": "96646b3779fbd0d05fac2fab0df5291dde91d502",
|
|
5
|
+
"buildTime": "2026-10-17T04:13:00Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggle",
|
|
4
|
-
"version": "5.21.0-staging.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "5.21.0-staging.148",
|
|
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",
|
|
8
8
|
"bin": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "5.21.0-staging.
|
|
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.21.0-staging.148",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "5.21.0-staging.
|
|
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.21.0-staging.148",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Muggle AI Plugin for Claude Code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
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
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
package/plugin/hooks/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Pre-filters are bash builtins only (`guardrail-lib.sh`), so an irrelevant event
|
|
|
51
51
|
| `Stop` | `guardrail-stage-gate.sh` | **enforce** | a skill invoked this session declared `mandatoryStages` and one of those files was never opened | — | **block** the turn until the stages are read or a `MUGGLE_STAGE_SKIP` marker records a legitimate skip (releases after 3 blocks) |
|
|
52
52
|
| `Stop` | `guardrail-debug-path-gate.sh` | **enforce** | a local execution returned a non-passing run this session and nothing routed it through `_shared/debug-failed-run.md` | — | **block** the turn until the run is diagnosed (its `*-failure-classified` emit or feedback naming it) or a `MUGGLE_DEBUG_SKIP: <runId> <reason>` marker clears that run (releases after 3 blocks) |
|
|
53
53
|
| `Stop` | `guardrail-comment-reply-gate.sh` | **enforce** | this session claimed a review thread and left one of its comments uncovered | — | **block** the turn until each comment gets its threaded reply per `do/per-comment-replies.md` or a `MUGGLE_REPLY_SKIP: <comment-id> <reason>` marker defers it (releases after 3 blocks). The claim is the signal, not a push, so a round that answers a question with no code change is caught too; a thread another session claimed never blocks this one |
|
|
54
|
-
| `Stop` | `guardrail-capability-claim.sh` | **enforce** | the closing turn tells the user
|
|
54
|
+
| `Stop` | `guardrail-capability-claim.sh` | **enforce** | the closing turn tells the user a login- or code-gated flow can't be tested, reached, or verified | — | **block** once, citing `_shared/identity-and-inbox.md`: the managed profile's live inbox, provisioned number, stored TOTP secret, credentials, and CAPTCHA solver clear exactly that blocker. Reads the claim out of the transcript, since a Stop payload carries no message text. Per-sentence matching, and a sentence naming a voice call, an OAuth-only provider, or a deployment with no number provisioned never fires — those limits are real. Nudges once per session, then stays quiet, so a misread costs one turn |
|
|
55
55
|
| `UserPromptSubmit` | `guardrail-build-router.sh` | advise | a build/implement/fix request (first one this session) | `autoRouteBuildToMuggleDo` | route the work through `muggle-do` (build delegated to superpowers) |
|
|
56
56
|
|
|
57
57
|
## Session-start reconcile nudge
|
|
@@ -254,9 +254,9 @@ function prTerminalGateDecision(state, maxBlocks = MAX_PR_TERMINAL_BLOCKS) {
|
|
|
254
254
|
// src/guardrails/capabilityClaim.ts
|
|
255
255
|
var SENTENCE = /[^.!?\n]+/g;
|
|
256
256
|
var IMPOSSIBILITY = /\b(?:can(?:'|’)?t|cannot|can not|could ?n(?:'|’)?t|unable to|no way to|not able to|impossible|infeasible|untestable|unverifiable|not testable|blocked from|no (?:local )?(?:mail|email|smtp) path)\b/i;
|
|
257
|
-
var MUGGLE_CLEARS = /\b(?:magic[- ]?link|sign[- ]?in link|login link|email link|one[- ]time (?:code|password)|otp|verification (?:code|link|email|mail)|email verification|confirmation (?:code|link|email|mail)|2fa|two[- ]factor|password reset|reset link|inbox|mailbox|mailhog|mailpit|mailtrap|mailcatcher|smtp|transactional email|captcha|recaptcha|hcaptcha|log ?in|logged[- ]?in|sign ?in|signed[- ]in|authenticate|credential)/i;
|
|
257
|
+
var MUGGLE_CLEARS = /\b(?:magic[- ]?link|sign[- ]?in link|login link|email link|one[- ]time (?:code|password)|otp|verification (?:code|link|email|mail)|email verification|confirmation (?:code|link|email|mail)|2fa|two[- ]factor|password reset|reset link|inbox|mailbox|mailhog|mailpit|mailtrap|mailcatcher|smtp|transactional email|captcha|recaptcha|hcaptcha|log ?in|logged[- ]?in|sign ?in|signed[- ]in|authenticate|credential|sms|text message|texted code|authenticator app|google authenticator|authy|totp)/i;
|
|
258
258
|
var TESTING_CONTEXT = /\b(?:e2e|end[- ]to[- ]end|test(?:s|ed|ing|able)?|verif(?:y|ied|ication)|validat(?:e|ed|ion)|automat(?:e|ed|ion)|coverage|covered|exercis(?:e|ed)|reproduc(?:e|ed)|replay|scripts?|scripted|muggle|playwright|cypress|selenium)\b/i;
|
|
259
|
-
var GENUINELY_UNSUPPORTED = /\b(?:
|
|
259
|
+
var GENUINELY_UNSUPPORTED = /\b(?:phone call|voice call|oauth|social (?:login|sign[- ]?in)|sign in with (?:google|github|apple|facebook)|no (?:phone )?number (?:is )?provisioned|no provisioned (?:phone )?number)\b/i;
|
|
260
260
|
function detectFalseCapabilityClaim(text) {
|
|
261
261
|
const sentences = (text ?? "").match(SENTENCE) ?? [];
|
|
262
262
|
return sentences.some(
|
|
@@ -1757,7 +1757,7 @@ function capabilityClaimGate() {
|
|
|
1757
1757
|
if (!detectFalseCapabilityClaim(lastAssistantText(transcriptTail))) return "{}";
|
|
1758
1758
|
state.capabilityClaimNudged = true;
|
|
1759
1759
|
writeState(state);
|
|
1760
|
-
const reason = `Do not end the turn yet. This turn tells the user that
|
|
1760
|
+
const reason = `Do not end the turn yet. This turn tells the user that a login- or code-gated flow cannot be tested, reached, or verified \u2014 the one class of blocker Muggle clears. Every managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets run end to end with no mail stub and no test-only backdoor. An SMS code is read from the profile's provisioned number, an authenticator code is derived offline from its stored TOTP secret, and stored credentials and CAPTCHA solving are covered too. Re-read plugin/skills/_shared/identity-and-inbox.md, then correct the claim or run the flow. Genuine limits stay sayable: a voice call, an OAuth-only provider, or an account with no phone number provisioned (the runner cannot mint one) \u2014 name the one that applies and move on.`;
|
|
1761
1761
|
return blockStop(reason, host);
|
|
1762
1762
|
}
|
|
1763
1763
|
function runFiringGates() {
|
|
@@ -20,6 +20,23 @@ The product sends real mail to a real address. Nothing in the app under test nee
|
|
|
20
20
|
|
|
21
21
|
Managed login profiles carry stored secrets, injected at run time. A flow behind a password, a paywall, or a seat licence is reachable — "there is no logged-in session" is not a reason to decline, nor to narrow scope to logged-out pages.
|
|
22
22
|
|
|
23
|
+
## Receiving SMS
|
|
24
|
+
|
|
25
|
+
A `readSms` step reads the newest messages sent to the profile's phone number and answers a question about them, exactly as `readEmail` does for mail. Texted one-time codes and SMS second factors are ordinary steps.
|
|
26
|
+
|
|
27
|
+
The number differs from the inbox in one way that matters: email addresses are generated on demand, but phone numbers are **provisioned on the provider account**, so a deployment holds a small fixed pool rather than one number per profile. A run resolves its number from the profile's `managed_profile_phone` secret, falling back to the account-wide number.
|
|
28
|
+
|
|
29
|
+
Two limits follow from that, and both are worth stating plainly rather than working around:
|
|
30
|
+
|
|
31
|
+
- An account with no number provisioned genuinely cannot receive SMS. The runner cannot mint one.
|
|
32
|
+
- Provider numbers are virtual, and some services refuse to send codes to them. That is the service's filter, not a gap here.
|
|
33
|
+
|
|
34
|
+
## Authenticator codes
|
|
35
|
+
|
|
36
|
+
A `solveTotp` step derives the current authenticator code offline from the profile's stored shared secret — HMAC over the secret and the clock, so no device and no provider are involved. It waits for the next window when the current code is about to expire, rather than handing back one that dies mid-submit.
|
|
37
|
+
|
|
38
|
+
The secret is captured once, at enrolment: 2FA setup screens that offer a manual key behind "can't scan the QR code?" expose it, and a `secretSave` step stores it as `managed_profile_totp_secret`. A QR image alone cannot be read, so capturing the key at enrolment is what makes the account reusable.
|
|
39
|
+
|
|
23
40
|
## CAPTCHA
|
|
24
41
|
|
|
25
42
|
A `solveCaptcha` step handles reCAPTCHA v2 and v3, hCaptcha, image, and slider challenges.
|
|
@@ -28,11 +45,9 @@ A `solveCaptcha` step handles reCAPTCHA v2 and v3, hCaptcha, image, and slider c
|
|
|
28
45
|
|
|
29
46
|
Genuine limits. Say so plainly when one of them is what blocks a flow, and never promise a run that cannot happen:
|
|
30
47
|
|
|
31
|
-
-
|
|
32
|
-
- Authenticator-app TOTP
|
|
48
|
+
- Voice-call OTP — there is no audio transport
|
|
33
49
|
- OAuth-only social login (Google, GitHub) where the flow does not explicitly require it
|
|
34
|
-
|
|
35
|
-
A non-email second factor routes to a user-intervene step rather than completing on its own.
|
|
50
|
+
- SMS on a deployment with no provisioned number, per the section above
|
|
36
51
|
|
|
37
52
|
## Wrong conclusions
|
|
38
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-do
|
|
3
|
-
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
3
|
+
description: Take a feature request, spec, design, bug, or ticket and carry it autonomously to an opened pull request — write the code, test it, raise the PR. The PR carries real-browser proof: email-gated flows run through live test inboxes, logins through encrypted secrets, and prerequisite flows in test-graph order, with screenshots attached. Use whenever the user wants something built, implemented, added, or fixed with a PR opened, raised, or put up at the end — "implement rate limiting and raise a PR", "build the CSV export and put up a PR", "take this Jira ticket and run with it, ping me when the PR is up", "fix this bug and open a pr", or "muggle do …". Also handles the internal `address-reviews` directive the muggle-pr-followup watcher dispatches when new reviews land. Not for testing or validating existing changes (use muggle-test), nor watching a PR's incoming reviews (use muggle-pr-followup).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Muggle Test Do
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test
|
|
3
|
-
description: "Change-driven E2E acceptance testing: detects the user's recent changes (local diff or PR), maps them to affected user flows, and runs real-browser tests on localhost or a preview/staging URL. Invoke it before inspecting anything — what changed and what it affects is its own first step; reading the diff by hand duplicates it. Use when the user wants to test or regression-test their own work — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal: validation tied to a commit, push, PR, or merge; unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is this skill's input, not a reason to investigate first. Beyond
|
|
3
|
+
description: "Change-driven E2E acceptance testing: detects the user's recent changes (local diff or PR), maps them to affected user flows, and runs real-browser tests on localhost or a preview/staging URL. Invoke it before inspecting anything — what changed and what it affects is its own first step; reading the diff by hand duplicates it. Use when the user wants to test or regression-test their own work — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal: validation tied to a commit, push, PR, or merge; unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is this skill's input, not a reason to investigate first. Beyond Playwright/Cypress: live test inboxes (magic links, email OTP/2FA), encrypted login secrets, a prerequisite test graph, self-healing plain-English scripts, cloud replay, PR walkthrough. One named flow: muggle-test-feature-local; importing spec files: muggle-test-import."
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/failure-mode-handling.md
|
|
6
6
|
- ../_shared/debug-failed-run.md
|
|
@@ -135,7 +135,11 @@ If no changes detected (clean tree), tell the user and ask what they want to tes
|
|
|
135
135
|
- `always` → reuse if valid; if expired, re-login the **same** account (`muggle-remote-auth-login`, then `muggle-remote-auth-poll`).
|
|
136
136
|
- `never` → `muggle-remote-auth-login` with `forceNewSession: true`, then `muggle-remote-auth-poll`.
|
|
137
137
|
- `ask` → run Picker 1 from `preference-gates/autoLogin.md` via `AskUserQuestion`; map the answer back to one of the actions above.
|
|
138
|
-
3. **Absent** (no stored identity) →
|
|
138
|
+
3. **Absent** (no stored identity) → the account decides the route. An address that already has an
|
|
139
|
+
account signs in: `muggle-remote-auth-login`, then `muggle-remote-auth-poll`. With no account yet,
|
|
140
|
+
open one directly with `muggle-remote-auth-register` (email and password) — it stores the key and
|
|
141
|
+
starts on the free plan, and verifying the address afterwards moves it to Starter permanently.
|
|
142
|
+
Registering an address that already has an account answers `AlreadyRegistered`; sign in instead.
|
|
139
143
|
4. If login pending → call `muggle-remote-auth-poll`.
|
|
140
144
|
|
|
141
145
|
**Account-switch caveat (`never` / "Switch account").** The device flow has no `prompt=select_account`; switching relies on `forceNewSession` first clearing the Auth0 session via `/v2/logout?returnTo=<device-activation URL>`. That redirect only works if the activation URL is in the app's Auth0 *Allowed Logout URLs* — otherwise the browser shows an Auth0 error page and the session is silently reused. If that happens, tell the user to complete login in a **fresh incognito window** (no live SSO session) so Auth0 presents an account login.
|
|
@@ -8,6 +8,7 @@ Lookup material pulled out of `SKILL.md` to keep the always-loaded body lean. Ev
|
|
|
8
8
|
|:------|:-----|:-----|
|
|
9
9
|
| Auth | `muggle-remote-auth-status` | Both |
|
|
10
10
|
| Auth | `muggle-remote-auth-login` | Both |
|
|
11
|
+
| Auth | `muggle-remote-auth-register` | Both |
|
|
11
12
|
| Auth | `muggle-remote-auth-poll` | Both |
|
|
12
13
|
| Project | `muggle-remote-project-list` | Both |
|
|
13
14
|
| Project | `muggle-remote-project-create` | Both |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test-feature-local
|
|
3
|
-
description: Run a real-browser end-to-end (E2E) acceptance test against localhost to verify a feature works correctly — signup flows, checkout, form validation, UI interactions, or any user-facing behavior. Launches a browser that executes test steps and captures screenshots. The browser runs under a real identity: each managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets are all testable without a mail stub or a test-only backdoor — an email-gated flow is never a reason to call something untestable. Use this skill whenever the user asks to test, validate, or verify their web app, UI changes, user flows, or frontend behavior on localhost or a dev server — even if they don't mention 'muggle' or 'E2E' explicitly.
|
|
3
|
+
description: Run a real-browser end-to-end (E2E) acceptance test against localhost to verify a feature works correctly — signup flows, checkout, form validation, UI interactions, or any user-facing behavior. Launches a browser that executes test steps and captures screenshots. The browser runs under a real identity: each managed login profile owns a live inbox, so magic-link and sign-in-link logins, emailed OTPs, email-based 2FA, verification mail, and password resets are all testable without a mail stub or a test-only backdoor — an email-gated flow is never a reason to call something untestable. Logins come from an encrypted per-project secret store, and the test graph runs prerequisite flows (create before edit) first. Use this skill whenever the user asks to test, validate, or verify their web app, UI changes, user flows, or frontend behavior on localhost or a dev server — even if they don't mention 'muggle' or 'E2E' explicitly.
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/identity-and-inbox.md
|
|
6
6
|
---
|