@muggleai/works 5.22.0 → 5.23.0-staging.162
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/.claude-plugin/marketplace.json +1 -1
- package/dist/{chunk-SF75W2SV.js → chunk-6AAGQQDL.js} +3 -3
- package/dist/{chunk-M2PJRVCC.js → chunk-YVR2MCR2.js} +65 -15
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/skills/_shared/dev-loop/fresh-session.md +14 -2
- package/dist/plugin/skills/_shared/dev-loop/run.md +3 -3
- package/dist/plugin/skills/_shared/identity-and-inbox.md +10 -0
- package/dist/release-manifest.json +3 -3
- package/dist/{src-5QO7XTIG.js → src-OHWBRW4X.js} +1 -1
- package/package.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/skills/_shared/dev-loop/fresh-session.md +14 -2
- package/plugin/skills/_shared/dev-loop/run.md +3 -3
- package/plugin/skills/_shared/identity-and-inbox.md +10 -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.
|
|
12
|
+
"version": "5.23.0-staging.162"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
}
|
|
@@ -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-
|
|
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';
|
|
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';
|
|
@@ -1027,7 +1027,7 @@ async function resolveGsScreenshotUrls(report, opts) {
|
|
|
1027
1027
|
if (gsUrls.length === 0) {
|
|
1028
1028
|
return report;
|
|
1029
1029
|
}
|
|
1030
|
-
const mcps = await import('./src-
|
|
1030
|
+
const mcps = await import('./src-OHWBRW4X.js');
|
|
1031
1031
|
const credentials = await mcps.getCallerCredentialsAsync();
|
|
1032
1032
|
if (!credentials.bearerToken && !credentials.apiKey) {
|
|
1033
1033
|
stderrWrite(
|
|
@@ -1080,7 +1080,7 @@ var withSentinel = (s) => s ? `${REPORT_SECTION_SENTINEL}
|
|
|
1080
1080
|
${s}` : s;
|
|
1081
1081
|
async function resolveDashboardBaseUrl(stderrWrite) {
|
|
1082
1082
|
try {
|
|
1083
|
-
const mcps = await import('./src-
|
|
1083
|
+
const mcps = await import('./src-OHWBRW4X.js');
|
|
1084
1084
|
return mcps.resolveActiveProfile().dashboardBaseUrl;
|
|
1085
1085
|
} catch (err) {
|
|
1086
1086
|
stderrWrite(
|
|
@@ -2782,7 +2782,11 @@ function buildGenerationActionScript(params) {
|
|
|
2782
2782
|
displayParams: resolveDisplayParams({
|
|
2783
2783
|
requestedResolution: params.displayResolution,
|
|
2784
2784
|
storedDisplayOptions: params.testCase.displayOptions
|
|
2785
|
-
})
|
|
2785
|
+
}),
|
|
2786
|
+
// Replay reads these from the recording, so they are written only when set:
|
|
2787
|
+
// a legacy test case must produce exactly the params it always did.
|
|
2788
|
+
...params.testCase.pinnedAccount ? { pinnedAccount: params.testCase.pinnedAccount } : {},
|
|
2789
|
+
...params.freshSession === true ? { freshSession: true } : {}
|
|
2786
2790
|
},
|
|
2787
2791
|
goal: params.testCase.goal,
|
|
2788
2792
|
url: params.localUrl,
|
|
@@ -2845,7 +2849,9 @@ function buildReplayActionScript(params) {
|
|
|
2845
2849
|
// own hardcoded 1920x1080, which is why a phone-viewport run needs this.
|
|
2846
2850
|
displayParams: resolveDisplayParams({
|
|
2847
2851
|
requestedResolution: params.displayResolution
|
|
2848
|
-
})
|
|
2852
|
+
}),
|
|
2853
|
+
...params.pinnedAccount ? { pinnedAccount: params.pinnedAccount } : {},
|
|
2854
|
+
...params.freshSession ? { freshSession: true } : {}
|
|
2849
2855
|
},
|
|
2850
2856
|
goal: params.testScript.name,
|
|
2851
2857
|
url: params.localUrl,
|
|
@@ -3096,6 +3102,11 @@ function describeElectronSpawnFailure(params) {
|
|
|
3096
3102
|
].join("\n");
|
|
3097
3103
|
}
|
|
3098
3104
|
|
|
3105
|
+
// packages/mcps/src/mcp/local/services/fresh-session.ts
|
|
3106
|
+
function resolveEffectiveFreshSession(params) {
|
|
3107
|
+
return params.requestedFreshSession ?? params.storedAlwaysStartsFreshSession;
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3099
3110
|
// packages/mcps/src/mcp/local/services/execution-service.ts
|
|
3100
3111
|
var logger5 = getLogger();
|
|
3101
3112
|
function extractStudioCloudRefs(studioReturnedResult) {
|
|
@@ -3530,13 +3541,18 @@ async function runTestGenerationLocked(params) {
|
|
|
3530
3541
|
});
|
|
3531
3542
|
const runId = runResult.id;
|
|
3532
3543
|
const startedAt = Date.now();
|
|
3544
|
+
const effectiveFreshSession = resolveEffectiveFreshSession({
|
|
3545
|
+
requestedFreshSession: params.freshSession,
|
|
3546
|
+
storedAlwaysStartsFreshSession: testCase.alwaysStartsFreshSession
|
|
3547
|
+
});
|
|
3533
3548
|
const actionScript = buildGenerationActionScript({
|
|
3534
3549
|
testCase,
|
|
3535
3550
|
localUrl,
|
|
3536
3551
|
runId,
|
|
3537
3552
|
localTestScriptId: localTestScript.id,
|
|
3538
3553
|
ownerUserId: authContent.userId,
|
|
3539
|
-
displayResolution: params.displayResolution
|
|
3554
|
+
displayResolution: params.displayResolution,
|
|
3555
|
+
freshSession: effectiveFreshSession
|
|
3540
3556
|
});
|
|
3541
3557
|
const inputFilePath = await writeTempFile({
|
|
3542
3558
|
filename: `${runId}_input.json`,
|
|
@@ -3559,7 +3575,7 @@ async function runTestGenerationLocked(params) {
|
|
|
3559
3575
|
authFilePath,
|
|
3560
3576
|
timeoutMs,
|
|
3561
3577
|
showUi: params.showUi,
|
|
3562
|
-
freshSession:
|
|
3578
|
+
freshSession: effectiveFreshSession
|
|
3563
3579
|
});
|
|
3564
3580
|
const completedAt = Date.now();
|
|
3565
3581
|
const executionTimeMs = completedAt - startedAt;
|
|
@@ -3720,7 +3736,9 @@ async function runReplayLocked(params) {
|
|
|
3720
3736
|
localUrl,
|
|
3721
3737
|
runId,
|
|
3722
3738
|
ownerUserId: authContent.userId,
|
|
3723
|
-
displayResolution: params.displayResolution
|
|
3739
|
+
displayResolution: params.displayResolution,
|
|
3740
|
+
pinnedAccount: params.pinnedAccount,
|
|
3741
|
+
freshSession: params.freshSession
|
|
3724
3742
|
});
|
|
3725
3743
|
const inputFilePath = await writeTempFile({
|
|
3726
3744
|
filename: `${runId}_input.json`,
|
|
@@ -4589,6 +4607,10 @@ var EventName;
|
|
|
4589
4607
|
EventName2["SystemDisclosureShown"] = "system.disclosure_shown";
|
|
4590
4608
|
})(EventName || (EventName = {}));
|
|
4591
4609
|
var MuggleEntityIdSchema = z.string().uuid();
|
|
4610
|
+
var PinnedAccountSchema = z.object({
|
|
4611
|
+
emailSecretId: MuggleEntityIdSchema.describe("Secret ID (UUID) of the secret holding the account email"),
|
|
4612
|
+
passwordSecretId: MuggleEntityIdSchema.describe("Secret ID (UUID) of the secret holding the account password")
|
|
4613
|
+
});
|
|
4592
4614
|
var RunEnvironment = /* @__PURE__ */ ((RunEnvironment2) => {
|
|
4593
4615
|
RunEnvironment2["Local"] = "local";
|
|
4594
4616
|
RunEnvironment2["Remote"] = "remote";
|
|
@@ -4620,7 +4642,13 @@ var LocalRunUploadInputSchema = z.object({
|
|
|
4620
4642
|
actionScript: z.array(z.unknown()).min(1).describe("Generated action script steps from local execution"),
|
|
4621
4643
|
status: z.enum(["passed", "failed"]).describe("Final local run status"),
|
|
4622
4644
|
executionTimeMs: z.number().int().nonnegative().describe("Run duration in milliseconds"),
|
|
4623
|
-
errorMessage: z.string().optional().describe("Error message when status is failed")
|
|
4645
|
+
errorMessage: z.string().optional().describe("Error message when status is failed"),
|
|
4646
|
+
pinnedAccount: PinnedAccountSchema.optional().describe(
|
|
4647
|
+
"The pinned account the run signed in as, copied from the run's actionParams. Omit when the run was not pinned"
|
|
4648
|
+
),
|
|
4649
|
+
freshSession: z.boolean().optional().describe(
|
|
4650
|
+
"True when the run started from an emptied browser session, copied from the run's actionParams. Omit otherwise"
|
|
4651
|
+
)
|
|
4624
4652
|
});
|
|
4625
4653
|
|
|
4626
4654
|
// packages/mcps/src/mcp/e2e/contracts/index.ts
|
|
@@ -4836,6 +4864,7 @@ var TestCaseGenerateFromPromptInputSchema = z.object({
|
|
|
4836
4864
|
useCaseId: IdSchema.describe("Use case ID (UUID) to generate test cases for"),
|
|
4837
4865
|
instruction: z.string().min(1).describe("Natural language instruction describing the test cases to generate")
|
|
4838
4866
|
});
|
|
4867
|
+
var ALWAYS_STARTS_FRESH_SESSION_DESCRIPTION = "True when the test must begin in a brand-new browser session with nothing signed in: its precondition needs a signed-out visitor, a brand-new account, or the first registration or sign-in of an account. False when it continues in a state an earlier test established, such as already being signed in or data an earlier test created.";
|
|
4839
4868
|
var TestCaseCreateInputSchema = z.object({
|
|
4840
4869
|
projectId: IdSchema.describe("Project ID (UUID)"),
|
|
4841
4870
|
useCaseId: IdSchema.describe("Use case ID (UUID) to associate the test case with"),
|
|
@@ -4849,7 +4878,9 @@ var TestCaseCreateInputSchema = z.object({
|
|
|
4849
4878
|
priority: z.enum(["HIGH", "MEDIUM", "LOW"]).optional().describe("Test case priority"),
|
|
4850
4879
|
tags: z.array(z.string()).optional().describe("Tags for categorization"),
|
|
4851
4880
|
category: z.string().optional().describe("Test case category"),
|
|
4852
|
-
automated: z.boolean().optional().describe("Whether this test case is automated (default: true)")
|
|
4881
|
+
automated: z.boolean().optional().describe("Whether this test case is automated (default: true)"),
|
|
4882
|
+
pinnedAccount: PinnedAccountSchema.optional().describe("Project secrets the test case signs in as. Omit to leave it unpinned"),
|
|
4883
|
+
alwaysStartsFreshSession: z.boolean().optional().describe(ALWAYS_STARTS_FRESH_SESSION_DESCRIPTION)
|
|
4853
4884
|
});
|
|
4854
4885
|
var TestCaseUpdateInputSchema = z.object({
|
|
4855
4886
|
testCaseId: IdSchema.describe("Test case ID (UUID) to update"),
|
|
@@ -4863,7 +4894,9 @@ var TestCaseUpdateInputSchema = z.object({
|
|
|
4863
4894
|
priority: z.enum(["HIGH", "MEDIUM", "LOW"]).optional().describe("Updated priority"),
|
|
4864
4895
|
tags: z.array(z.string()).optional().describe("Updated tags"),
|
|
4865
4896
|
category: z.string().optional().describe("Updated category"),
|
|
4866
|
-
automated: z.boolean().optional().describe("Whether this test case is automated")
|
|
4897
|
+
automated: z.boolean().optional().describe("Whether this test case is automated"),
|
|
4898
|
+
pinnedAccount: PinnedAccountSchema.nullable().optional().describe("Project secrets the test case signs in as; null clears the pin"),
|
|
4899
|
+
alwaysStartsFreshSession: z.boolean().optional().describe(ALWAYS_STARTS_FRESH_SESSION_DESCRIPTION)
|
|
4867
4900
|
});
|
|
4868
4901
|
var TestScriptListInputSchema = z.object({
|
|
4869
4902
|
projectId: IdSchema.describe("Project ID (UUID) to list test scripts for"),
|
|
@@ -5789,14 +5822,18 @@ var testCaseTools = [
|
|
|
5789
5822
|
priority: toolInput.priority || "MEDIUM",
|
|
5790
5823
|
tags: toolInput.tags || [],
|
|
5791
5824
|
category: toolInput.category || "Functional",
|
|
5792
|
-
automated: toolInput.automated ?? true
|
|
5825
|
+
automated: toolInput.automated ?? true,
|
|
5826
|
+
...toolInput.pinnedAccount !== void 0 && { pinnedAccount: toolInput.pinnedAccount },
|
|
5827
|
+
...toolInput.alwaysStartsFreshSession !== void 0 && {
|
|
5828
|
+
alwaysStartsFreshSession: toolInput.alwaysStartsFreshSession
|
|
5829
|
+
}
|
|
5793
5830
|
}
|
|
5794
5831
|
};
|
|
5795
5832
|
}
|
|
5796
5833
|
},
|
|
5797
5834
|
{
|
|
5798
5835
|
name: "muggle-remote-test-case-update",
|
|
5799
|
-
description: "Directly update an existing test case's fields. Pass only the fields you want to change \u2014 others are left untouched. Use this for cheap, deterministic edits (rename, change status/priority, fix expected result, add tags). Does not touch the associated test script \u2014 script regeneration is a separate workflow (muggle-remote-workflow-start-test-script-generation).",
|
|
5836
|
+
description: "Directly update an existing test case's fields. Pass only the fields you want to change \u2014 others are left untouched. Use this for cheap, deterministic edits (rename, change status/priority, fix expected result, add tags, set or clear the pinned account with pinnedAccount, set whether every run starts from a fresh session with alwaysStartsFreshSession; pinned account and fresh session apply from the next script generation, not to existing scripts). Does not touch the associated test script \u2014 script regeneration is a separate workflow (muggle-remote-workflow-start-test-script-generation).",
|
|
5800
5837
|
inputSchema: TestCaseUpdateInputSchema,
|
|
5801
5838
|
mapToUpstream: (input) => {
|
|
5802
5839
|
const toolInput = input;
|
|
@@ -5812,6 +5849,10 @@ var testCaseTools = [
|
|
|
5812
5849
|
if (toolInput.tags !== void 0) body.tags = toolInput.tags;
|
|
5813
5850
|
if (toolInput.category !== void 0) body.category = toolInput.category;
|
|
5814
5851
|
if (toolInput.automated !== void 0) body.automated = toolInput.automated;
|
|
5852
|
+
if (toolInput.pinnedAccount !== void 0) body.pinnedAccount = toolInput.pinnedAccount;
|
|
5853
|
+
if (toolInput.alwaysStartsFreshSession !== void 0) {
|
|
5854
|
+
body.alwaysStartsFreshSession = toolInput.alwaysStartsFreshSession;
|
|
5855
|
+
}
|
|
5815
5856
|
return {
|
|
5816
5857
|
method: "PUT",
|
|
5817
5858
|
path: `${MUGGLE_TEST_PREFIX}/test-cases/${toolInput.testCaseId}`,
|
|
@@ -6271,7 +6312,9 @@ var workflowTools = [
|
|
|
6271
6312
|
actionScript: toolInput.actionScript,
|
|
6272
6313
|
status: toolInput.status,
|
|
6273
6314
|
executionTimeMs: toolInput.executionTimeMs,
|
|
6274
|
-
errorMessage: toolInput.errorMessage
|
|
6315
|
+
errorMessage: toolInput.errorMessage,
|
|
6316
|
+
...toolInput.pinnedAccount && { pinnedAccount: toolInput.pinnedAccount },
|
|
6317
|
+
...toolInput.freshSession === true && { freshSession: true }
|
|
6275
6318
|
}
|
|
6276
6319
|
};
|
|
6277
6320
|
}
|
|
@@ -7169,7 +7212,11 @@ var TestCaseDetailsSchema = z.object({
|
|
|
7169
7212
|
/** Resolutions stored on the cloud test case; the first entry sizes the run unless the caller names one. */
|
|
7170
7213
|
displayOptions: z.array(DisplayResolutionSchema).optional().describe(
|
|
7171
7214
|
"Resolutions stored on the cloud test case (from muggle-remote-test-case-get). The first entry sizes the browser unless displayResolution overrides it."
|
|
7172
|
-
)
|
|
7215
|
+
),
|
|
7216
|
+
/** Project secrets the test case signs in as; absent or null means unpinned. */
|
|
7217
|
+
pinnedAccount: PinnedAccountSchema.nullable().optional().describe("Pinned account from muggle-remote-test-case-get; the run signs in only as this pair"),
|
|
7218
|
+
/** Whether every run starts from an empty browser session. */
|
|
7219
|
+
alwaysStartsFreshSession: z.boolean().optional().describe("Stored fresh-session flag from muggle-remote-test-case-get; used when freshSession is not passed")
|
|
7173
7220
|
});
|
|
7174
7221
|
var TestScriptDetailsSchema = z.object({
|
|
7175
7222
|
/** Cloud test script ID. */
|
|
@@ -7201,7 +7248,7 @@ var ExecuteTestGenerationInputSchema = z.object({
|
|
|
7201
7248
|
/** Show the electron-app UI during execution. Default: visible window. Pass false to run headless. */
|
|
7202
7249
|
showUi: z.boolean().optional().describe("Show the electron-app UI during generation. Defaults to visible; pass false to run headless."),
|
|
7203
7250
|
/** Clear all session storage (cookies, localStorage, etc.) before execution. Use for test cases that require a clean browser state, such as registration, login, or cookie consent flows. */
|
|
7204
|
-
freshSession: z.boolean().optional().describe("Clear all session storage (cookies, localStorage, etc.) before execution. Use for test cases that require a clean browser state \u2014 e.g. registration, login, or cookie consent flows. Default: false."),
|
|
7251
|
+
freshSession: z.boolean().optional().describe("Clear all session storage (cookies, localStorage, etc.) before execution. Use for test cases that require a clean browser state \u2014 e.g. registration, login, or cookie consent flows. Default: the test case's stored alwaysStartsFreshSession flag (false when unset)."),
|
|
7205
7252
|
/** Mutation parameters providing variable context for this generation run — a string[] where each element is a plain-English instruction or a local file path for uploads (e.g. "Attach the image at C:\\Users\\user\\photo.jpg"). Matches the electron-app's string[] mutation file format. */
|
|
7206
7253
|
mutations: z.array(z.string()).optional().describe(`Mutation parameters: string[] where each element is a plain-English instruction or a local file path (e.g. ["The post content should be 'Hello'", "Attach the image at C:\\\\Users\\\\user\\\\photo.jpg"]).`),
|
|
7207
7254
|
/** Resolution for this run. Overrides `testCase.displayOptions`; both absent means 1920x1080. */
|
|
@@ -7222,10 +7269,12 @@ var ExecuteReplayInputSchema = z.object({
|
|
|
7222
7269
|
timeoutMs: z.number().int().positive().optional().describe("Timeout in milliseconds (default: 180000 = 3 min)"),
|
|
7223
7270
|
/** Show the electron-app UI during execution. Default: visible window. Pass false to run headless. */
|
|
7224
7271
|
showUi: z.boolean().optional().describe("Show the electron-app UI during replay. Defaults to visible; pass false to run headless."),
|
|
7225
|
-
/**
|
|
7226
|
-
freshSession: z.boolean().optional().describe("
|
|
7272
|
+
/** Whether the replay starts from an emptied browser session, copied from the recording. */
|
|
7273
|
+
freshSession: z.boolean().optional().describe("Copy from actionParams.freshSession of the muggle-remote-action-script-get result, so the replay starts the way the script was recorded: true clears all session storage (cookies, localStorage, etc.) before execution. A recording without it may predate run identities; pass true then only for a test that needs clean browser state (registration, login, cookie consent). Default: false."),
|
|
7227
7274
|
/** Mutation parameters passed to the LLM step predictor — a string[] where each element is an instruction describing what varies this run. Supports plain-English instructions (e.g. "The post content should be 'Hello world'") and local file paths for uploads (e.g. "Attach the image at C:\\Users\\user\\photo.jpg"). Matches the electron-app's string[] mutation file format. When provided, the electron app uses LLM-driven step prediction instead of deterministic replay. */
|
|
7228
7275
|
mutations: z.array(z.string()).optional().describe(`Mutation parameters: string[] where each element is a plain-English instruction or a local file path (e.g. ["The post content should be 'Hello'", "Attach the image at C:\\\\Users\\\\user\\\\photo.jpg"]).`),
|
|
7276
|
+
/** Pinned account the script was recorded with, copied from the recording. */
|
|
7277
|
+
pinnedAccount: PinnedAccountSchema.nullable().optional().describe("Copy from actionParams.pinnedAccount of the muggle-remote-action-script-get result: the account the script was recorded as, not the test case's current pin. A pinned replay runs in that account's own browser session; omit when the recording carries none."),
|
|
7229
7278
|
/** Resolution for this run. A test script carries no stored resolution, so this is replay's only sizing input. */
|
|
7230
7279
|
displayResolution: DisplayResolutionSchema.optional().describe(
|
|
7231
7280
|
"Browser resolution for this run, e.g. R_0390x0844 for a 390x844 phone viewport. Defaults to R_1920x1080."
|
|
@@ -7909,6 +7958,7 @@ var executeReplayTool = {
|
|
|
7909
7958
|
timeoutMs: input.timeoutMs,
|
|
7910
7959
|
showUi,
|
|
7911
7960
|
freshSession: input.freshSession,
|
|
7961
|
+
pinnedAccount: input.pinnedAccount,
|
|
7912
7962
|
displayResolution: input.displayResolution
|
|
7913
7963
|
});
|
|
7914
7964
|
const content = [
|
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-
|
|
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-
|
|
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,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.
|
|
4
|
+
"version": "5.23.0-staging.162",
|
|
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.
|
|
3
|
+
"version": "5.23.0-staging.162",
|
|
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.
|
|
5
|
+
"version": "5.23.0-staging.162",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# Dev Loop — Fresh Session
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Generation
|
|
4
|
+
|
|
5
|
+
The test case stores whether every run starts from an empty browser session (`alwaysStartsFreshSession`, from `muggle-remote-test-case-get`). Omit `freshSession` on `muggle-local-execute-test-generation` and the stored value decides.
|
|
6
|
+
|
|
7
|
+
Pass `freshSession` only to override the stored value for one run: `true` forces a clean session, `false` keeps the existing one. The value the run uses is recorded with its script, so a replay of that script starts the same way.
|
|
8
|
+
|
|
9
|
+
For an older test case with no stored flag, pass `freshSession: true` when it needs clean browser state (no prior cookies, localStorage, or login), as these do, and omit it otherwise:
|
|
4
10
|
|
|
5
11
|
- Registration / sign-up.
|
|
6
12
|
- Login / authentication when the flow itself is under test (not a test that merely uses login as a prerequisite).
|
|
7
13
|
- Cookie-consent / GDPR first-visit banners.
|
|
8
14
|
- Onboarding / first-run experiences.
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
## Replay
|
|
17
|
+
|
|
18
|
+
Replay runs as the script was recorded, never as the test case is now. Copy `pinnedAccount` and `freshSession` from the `actionParams` of the `muggle-remote-action-script-get` result onto `muggle-local-execute-replay` when present. A recording that carries neither may predate run identities, so decide its `freshSession` by the list above, as before.
|
|
19
|
+
|
|
20
|
+
## Changing the stored value
|
|
21
|
+
|
|
22
|
+
Use `muggle-remote-test-case-update` with `alwaysStartsFreshSession`. It applies from the next generation; an existing script replays the way it was recorded.
|
|
@@ -24,11 +24,11 @@ Per test case, branch on `mode`:
|
|
|
24
24
|
|
|
25
25
|
**Replay**
|
|
26
26
|
1. `muggle-remote-test-script-get` (latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
|
|
27
|
-
2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)).
|
|
28
|
-
3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `freshSession` (see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
|
|
27
|
+
2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)), plus the `pinnedAccount` and `freshSession` its `actionParams` recorded.
|
|
28
|
+
3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `pinnedAccount` and `freshSession` (each copied from the recording's `actionParams` when present; see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
|
|
29
29
|
|
|
30
30
|
**Regen**
|
|
31
31
|
1. `muggle-remote-test-case-get` → full test case object.
|
|
32
|
-
2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession
|
|
32
|
+
2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession` (omit it so the stored flag decides; pass it only to override for this run, per [`fresh-session.md`](fresh-session.md)), `timeoutMs`.
|
|
33
33
|
|
|
34
34
|
Store the returned `runId`, tagged with its `mode`. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
|
|
@@ -20,6 +20,16 @@ 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
|
+
## Pinned accounts
|
|
24
|
+
|
|
25
|
+
A test case can be pinned to one account: a pair of the project's secrets, one holding the email and one the password (`pinnedAccount` on `muggle-remote-test-case-get`; set or clear it with `muggle-remote-test-case-update`, where `null` clears it). An unpinned test case behaves as before.
|
|
26
|
+
|
|
27
|
+
- A pinned run signs in only as that account. If the page is signed in as anyone else, it signs out first. It is not offered the managed profile's login; other project secrets stay available.
|
|
28
|
+
- Pinned runs sharing an account share its browser session; runs pinned to different accounts never see each other's.
|
|
29
|
+
- A pin applies from the next generation. An existing script replays as recorded, so regenerate after changing a pin.
|
|
30
|
+
- Only the managed profile's inbox is readable. A flow that needs email verification for any other pinned account cannot read its mail; pin such a test to the managed profile instead. Each lane's live managed profile is offered as its own pinnable account, its email and password taken together from that lane, never matched by secret name.
|
|
31
|
+
- A pinned secret that was deleted, or that belongs to another project, fails the run before the browser starts, naming the secret.
|
|
32
|
+
|
|
23
33
|
## Receiving SMS
|
|
24
34
|
|
|
25
35
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-162-1",
|
|
4
|
+
"commitSha": "4bb90ea10bad434423914fe0a7f88a67557b0dc4",
|
|
5
|
+
"buildTime": "2026-10-21T23:32:17Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ACTION_SCRIPT_FILE_NAME, DEFAULT_PREFERENCES, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, 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, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, mcp_exports as mcp, needsOnboarding, openBrowserUrl, performLogin, performLogout, pollDeviceCode, e2e_exports as qa, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-
|
|
1
|
+
export { ACTION_SCRIPT_FILE_NAME, DEFAULT_PREFERENCES, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, 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, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, mcp_exports as mcp, needsOnboarding, openBrowserUrl, performLogin, performLogout, pollDeviceCode, e2e_exports as qa, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-YVR2MCR2.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.
|
|
4
|
+
"version": "5.23.0-staging.162",
|
|
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",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"muggleConfig": {
|
|
60
60
|
"electronAppVersion": "1.10.6",
|
|
61
61
|
"downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
|
|
62
|
-
"runtimeTargetDefault": "
|
|
62
|
+
"runtimeTargetDefault": "staging",
|
|
63
63
|
"checksumsByStream": {
|
|
64
64
|
"production": {
|
|
65
65
|
"win32-x64": "c20acdc2fd7a05039c62f9e5b079e3068d1b3a23a1b3b37b75e2a650b5401de6",
|
|
@@ -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.
|
|
4
|
+
"version": "5.23.0-staging.162",
|
|
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.
|
|
3
|
+
"version": "5.23.0-staging.162",
|
|
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.
|
|
5
|
+
"version": "5.23.0-staging.162",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# Dev Loop — Fresh Session
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Generation
|
|
4
|
+
|
|
5
|
+
The test case stores whether every run starts from an empty browser session (`alwaysStartsFreshSession`, from `muggle-remote-test-case-get`). Omit `freshSession` on `muggle-local-execute-test-generation` and the stored value decides.
|
|
6
|
+
|
|
7
|
+
Pass `freshSession` only to override the stored value for one run: `true` forces a clean session, `false` keeps the existing one. The value the run uses is recorded with its script, so a replay of that script starts the same way.
|
|
8
|
+
|
|
9
|
+
For an older test case with no stored flag, pass `freshSession: true` when it needs clean browser state (no prior cookies, localStorage, or login), as these do, and omit it otherwise:
|
|
4
10
|
|
|
5
11
|
- Registration / sign-up.
|
|
6
12
|
- Login / authentication when the flow itself is under test (not a test that merely uses login as a prerequisite).
|
|
7
13
|
- Cookie-consent / GDPR first-visit banners.
|
|
8
14
|
- Onboarding / first-run experiences.
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
## Replay
|
|
17
|
+
|
|
18
|
+
Replay runs as the script was recorded, never as the test case is now. Copy `pinnedAccount` and `freshSession` from the `actionParams` of the `muggle-remote-action-script-get` result onto `muggle-local-execute-replay` when present. A recording that carries neither may predate run identities, so decide its `freshSession` by the list above, as before.
|
|
19
|
+
|
|
20
|
+
## Changing the stored value
|
|
21
|
+
|
|
22
|
+
Use `muggle-remote-test-case-update` with `alwaysStartsFreshSession`. It applies from the next generation; an existing script replays the way it was recorded.
|
|
@@ -24,11 +24,11 @@ Per test case, branch on `mode`:
|
|
|
24
24
|
|
|
25
25
|
**Replay**
|
|
26
26
|
1. `muggle-remote-test-script-get` (latest replayable script — the lane-scoped one the caller resolved during classification per [`../failure-mode-handling.md`](../failure-mode-handling.md) §A) → note `actionScriptId`.
|
|
27
|
-
2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)).
|
|
28
|
-
3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `freshSession` (see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
|
|
27
|
+
2. `muggle-remote-action-script-get` with that id → full `actionScript` (see [`action-script.md`](action-script.md)), plus the `pinnedAccount` and `freshSession` its `actionParams` recorded.
|
|
28
|
+
3. `muggle-local-execute-replay` with `testScript`, `actionScript`, `localUrl`, `cwd`, `showUi`, `pinnedAccount` and `freshSession` (each copied from the recording's `actionParams` when present; see [`fresh-session.md`](fresh-session.md)), `timeoutMs` (see [`timeouts.md`](timeouts.md)).
|
|
29
29
|
|
|
30
30
|
**Regen**
|
|
31
31
|
1. `muggle-remote-test-case-get` → full test case object.
|
|
32
|
-
2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession
|
|
32
|
+
2. `muggle-local-execute-test-generation` with `testCase`, `localUrl`, `cwd`, `showUi`, `freshSession` (omit it so the stored flag decides; pass it only to override for this run, per [`fresh-session.md`](fresh-session.md)), `timeoutMs`.
|
|
33
33
|
|
|
34
34
|
Store the returned `runId`, tagged with its `mode`. If a run fails, log it and continue the batch — never abort. Read the result per [`failures.md`](failures.md), then [`publish.md`](publish.md).
|
|
@@ -20,6 +20,16 @@ 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
|
+
## Pinned accounts
|
|
24
|
+
|
|
25
|
+
A test case can be pinned to one account: a pair of the project's secrets, one holding the email and one the password (`pinnedAccount` on `muggle-remote-test-case-get`; set or clear it with `muggle-remote-test-case-update`, where `null` clears it). An unpinned test case behaves as before.
|
|
26
|
+
|
|
27
|
+
- A pinned run signs in only as that account. If the page is signed in as anyone else, it signs out first. It is not offered the managed profile's login; other project secrets stay available.
|
|
28
|
+
- Pinned runs sharing an account share its browser session; runs pinned to different accounts never see each other's.
|
|
29
|
+
- A pin applies from the next generation. An existing script replays as recorded, so regenerate after changing a pin.
|
|
30
|
+
- Only the managed profile's inbox is readable. A flow that needs email verification for any other pinned account cannot read its mail; pin such a test to the managed profile instead. Each lane's live managed profile is offered as its own pinnable account, its email and password taken together from that lane, never matched by secret name.
|
|
31
|
+
- A pinned secret that was deleted, or that belongs to another project, fails the run before the browser starts, naming the secret.
|
|
32
|
+
|
|
23
33
|
## Receiving SMS
|
|
24
34
|
|
|
25
35
|
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.
|