@muggleai/works 5.34.0-staging.308 → 5.34.0-staging.310
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-C4L5SKOX.js → chunk-SMUHQITB.js} +27 -14
- package/dist/{chunk-L4ZDHFEJ.js → chunk-TVA5J73U.js} +294 -73
- 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-mcp.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/.mcp.json +1 -1
- package/dist/plugin/skills/_shared/dev-loop/fresh-session.md +1 -1
- package/dist/plugin/skills/_shared/dev-loop/run.md +2 -1
- package/dist/plugin/skills/_shared/test-case-design.md +8 -0
- package/dist/plugin/skills/do/e2e-acceptance.md +1 -1
- package/dist/plugin/skills/muggle-browser-task/SKILL.md +3 -0
- package/dist/plugin/skills/muggle-test/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-test/execute-remote.md +1 -1
- package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +1 -0
- package/dist/plugin/skills/muggle-test-import/SKILL.md +2 -0
- package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +1 -1
- package/dist/release-manifest.json +4 -4
- package/dist/{src-Z5YREWY6.js → src-5M2MYBRC.js} +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-mcp.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/skills/_shared/dev-loop/fresh-session.md +1 -1
- package/plugin/skills/_shared/dev-loop/run.md +2 -1
- package/plugin/skills/_shared/test-case-design.md +8 -0
- package/plugin/skills/do/e2e-acceptance.md +1 -1
- package/plugin/skills/muggle-browser-task/SKILL.md +3 -0
- package/plugin/skills/muggle-test/SKILL.md +1 -1
- package/plugin/skills/muggle-test/execute-remote.md +1 -1
- package/plugin/skills/muggle-test-feature-local/SKILL.md +1 -0
- package/plugin/skills/muggle-test-import/SKILL.md +2 -0
- package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +1 -1
- package/scripts/postinstall.mjs +12 -13
- package/scripts/release-integrity/classifyTrustRootFailure.mjs +67 -0
- package/scripts/release-integrity/constants.mjs +55 -0
- package/scripts/release-integrity/enforceReleaseSignature.mjs +62 -0
- package/scripts/release-integrity/findBundleMismatch.mjs +58 -0
- package/scripts/release-integrity/index.d.mts +10 -1
- package/scripts/release-integrity/index.mjs +1 -0
- package/scripts/release-integrity/resolveIntegrityPolicy.mjs +11 -2
- package/scripts/release-integrity/verifyReleaseSignature.mjs +60 -8
|
@@ -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.34.0-staging.
|
|
12
|
+
"version": "5.34.0-staging.310"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
}
|
|
@@ -3188,6 +3188,9 @@ function getRequiredStringField(params) {
|
|
|
3188
3188
|
function buildLightModeWorkflowParams(isLightMode) {
|
|
3189
3189
|
return isLightMode === true ? { workflowParams: { llm: { tier: "light" /* Light */ } } } : {};
|
|
3190
3190
|
}
|
|
3191
|
+
function resolveRunDescription(params) {
|
|
3192
|
+
return params.storedDescription.trim() || params.runName;
|
|
3193
|
+
}
|
|
3191
3194
|
function buildGenerationActionScript(params) {
|
|
3192
3195
|
const testCaseRecord = params.testCase;
|
|
3193
3196
|
const projectId = getRequiredStringField({
|
|
@@ -3245,7 +3248,7 @@ function buildGenerationActionScript(params) {
|
|
|
3245
3248
|
},
|
|
3246
3249
|
goal: params.testCase.goal,
|
|
3247
3250
|
url: params.localUrl,
|
|
3248
|
-
description: params.testCase.title,
|
|
3251
|
+
description: resolveRunDescription({ storedDescription: params.testCase.description, runName: params.testCase.title }),
|
|
3249
3252
|
precondition: params.testCase.precondition ?? "",
|
|
3250
3253
|
instructions: params.testCase.instructions ?? "",
|
|
3251
3254
|
expectedResult: params.testCase.expectedResult,
|
|
@@ -3315,7 +3318,7 @@ function buildReplayActionScript(params) {
|
|
|
3315
3318
|
},
|
|
3316
3319
|
goal: params.testScript.name,
|
|
3317
3320
|
url: params.localUrl,
|
|
3318
|
-
description: params.testScript.name,
|
|
3321
|
+
description: resolveRunDescription({ storedDescription: params.testCaseDescription, runName: params.testScript.name }),
|
|
3319
3322
|
precondition: "",
|
|
3320
3323
|
expectedResult: "Replay completes without critical failures.",
|
|
3321
3324
|
steps: rewrittenActionScript,
|
|
@@ -4328,6 +4331,7 @@ async function runReplayLocked(params) {
|
|
|
4328
4331
|
const builtActionScript = buildReplayActionScript({
|
|
4329
4332
|
testScript,
|
|
4330
4333
|
actionScript,
|
|
4334
|
+
testCaseDescription: params.testCaseDescription,
|
|
4331
4335
|
localUrl,
|
|
4332
4336
|
runId,
|
|
4333
4337
|
ownerUserId: authContent.userId,
|
|
@@ -6470,6 +6474,10 @@ async function registerAccount(email, userProvidedPassword) {
|
|
|
6470
6474
|
}
|
|
6471
6475
|
}
|
|
6472
6476
|
|
|
6477
|
+
// packages/mcps/src/shared/test-case-limit-constants.ts
|
|
6478
|
+
var TEST_CASE_LIMIT_GUIDANCE = "Anything the test must or must not touch, including which target and which path, goes in the test case's stored description before the run. A limit stated only in chat with the coding agent does not reach the run.";
|
|
6479
|
+
var USE_CASE_REGENERATION_WARNING = "Regeneration replaces the use case's test cases, which drops the limits stored in their descriptions; store them again afterwards.";
|
|
6480
|
+
|
|
6473
6481
|
// packages/mcps/src/mcp/contracts/entity-reference-constants.ts
|
|
6474
6482
|
var SHORT_ID_REFERENCE_PATTERN = /^\s*(UC|TC|TS|R)[-\s]?0*([1-9]\d*)\s*$/i;
|
|
6475
6483
|
var ENTITY_REFERENCE_INVALID_MESSAGE = "Expected a full ID or a short ID such as TC-42";
|
|
@@ -6967,7 +6975,7 @@ var TestCaseCreateInputSchema = z.object({
|
|
|
6967
6975
|
projectId: IdSchema.describe("Project ID (UUID)"),
|
|
6968
6976
|
useCaseId: IdSchema.describe("Use case ID (UUID) to associate the test case with"),
|
|
6969
6977
|
title: z.string().min(1).describe("Test case title"),
|
|
6970
|
-
description: z.string().min(1).describe(
|
|
6978
|
+
description: z.string().min(1).describe(`Detailed description of what the test case validates. ${TEST_CASE_LIMIT_GUIDANCE}`),
|
|
6971
6979
|
goal: z.string().min(1).describe("Concise, measurable goal of the test"),
|
|
6972
6980
|
precondition: z.string().optional().describe("Initial state/setup required before test execution"),
|
|
6973
6981
|
expectedResult: z.string().min(1).describe("Expected outcome after test execution"),
|
|
@@ -6984,7 +6992,7 @@ var TestCaseCreateInputSchema = z.object({
|
|
|
6984
6992
|
var TestCaseUpdateInputSchema = z.object({
|
|
6985
6993
|
testCaseId: IdSchema.describe("Test case ID (UUID) to update"),
|
|
6986
6994
|
title: z.string().min(1).optional().describe("Updated test case title"),
|
|
6987
|
-
description: z.string().min(1).optional().describe(
|
|
6995
|
+
description: z.string().min(1).optional().describe(`Updated description; keep the stored text and add to it. ${TEST_CASE_LIMIT_GUIDANCE}`),
|
|
6988
6996
|
goal: z.string().min(1).optional().describe("Updated goal"),
|
|
6989
6997
|
precondition: z.string().optional().describe("Updated precondition"),
|
|
6990
6998
|
expectedResult: z.string().min(1).optional().describe("Updated expected result"),
|
|
@@ -7049,7 +7057,7 @@ var WorkflowStartTestScriptGenerationInputSchema = z.object({
|
|
|
7049
7057
|
url: z.string().url().describe("Target website URL"),
|
|
7050
7058
|
goal: z.string().min(1).describe("Test goal"),
|
|
7051
7059
|
precondition: z.string().min(1).describe("Preconditions"),
|
|
7052
|
-
instructions: z.string().min(1).describe("
|
|
7060
|
+
instructions: z.string().min(1).describe("Text for this run. It adds to the test case's stored description, which always reaches the run, and never replaces it."),
|
|
7053
7061
|
expectedResult: z.string().min(1).describe("Expected result"),
|
|
7054
7062
|
runEnvironmentType: RunEnvironmentInputSchema,
|
|
7055
7063
|
workflowParams: WorkflowParamsSchema
|
|
@@ -8162,7 +8170,7 @@ var useCaseTools = [
|
|
|
8162
8170
|
},
|
|
8163
8171
|
{
|
|
8164
8172
|
name: "muggle-remote-use-case-update-from-prompt",
|
|
8165
|
-
description:
|
|
8173
|
+
description: `Update an existing use case by regenerating its fields from a new instruction. Every call also regenerates its test cases. ${USE_CASE_REGENERATION_WARNING}`,
|
|
8166
8174
|
inputSchema: UseCaseUpdateFromPromptInputSchema,
|
|
8167
8175
|
mapToUpstream: (input) => {
|
|
8168
8176
|
const toolInput = input;
|
|
@@ -8175,7 +8183,7 @@ var useCaseTools = [
|
|
|
8175
8183
|
},
|
|
8176
8184
|
{
|
|
8177
8185
|
name: "muggle-remote-use-case-update",
|
|
8178
|
-
description:
|
|
8186
|
+
description: `Directly update an existing use case's fields without invoking the LLM. Pass only the fields you want to change \u2014 others are left untouched. Use this for cheap, deterministic edits (rename, flip status DRAFT\u2192APPROVED, change priority, edit acceptance criteria). For LLM regeneration from a new instruction, use muggle-remote-use-case-update-from-prompt instead. Note: a real change to title, description, or url triggers background regeneration of dependent test cases on the server; restating a stored value does not. ${USE_CASE_REGENERATION_WARNING}`,
|
|
8179
8187
|
inputSchema: UseCaseUpdateInputSchema,
|
|
8180
8188
|
mapToUpstream: (input) => {
|
|
8181
8189
|
const toolInput = input;
|
|
@@ -8362,7 +8370,7 @@ var testCaseTools = [
|
|
|
8362
8370
|
},
|
|
8363
8371
|
{
|
|
8364
8372
|
name: "muggle-remote-test-case-create",
|
|
8365
|
-
description:
|
|
8373
|
+
description: `Create a new test case for a use case. ${TEST_CASE_LIMIT_GUIDANCE} Optionally place it on the project's test states: the roles it acts as (actsAsRoleIds), the state it needs to start (prerequisiteStateId) and the state it leaves when it passes (resultStateId), using ids from muggle-remote-test-chaining-catalog-get.`,
|
|
8366
8374
|
inputSchema: TestCaseCreateInputSchema,
|
|
8367
8375
|
dashboardLink: linkToInputProjectPage("test-cases" /* TestCases */),
|
|
8368
8376
|
mapToUpstream: (input) => {
|
|
@@ -8395,7 +8403,7 @@ var testCaseTools = [
|
|
|
8395
8403
|
},
|
|
8396
8404
|
{
|
|
8397
8405
|
name: "muggle-remote-test-case-update",
|
|
8398
|
-
description:
|
|
8406
|
+
description: `Directly update an existing test case's fields. Pass only the fields you want to change \u2014 others are left untouched. ${TEST_CASE_LIMIT_GUIDANCE} 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; set the roles it acts as and its prerequisite and result test states with actsAsRoleIds, prerequisiteStateId and resultStateId, null clearing each). Does not touch the associated test script \u2014 script regeneration is a separate workflow (muggle-remote-workflow-start-test-script-generation).`,
|
|
8399
8407
|
inputSchema: TestCaseUpdateInputSchema,
|
|
8400
8408
|
mapToUpstream: (input) => {
|
|
8401
8409
|
const toolInput = input;
|
|
@@ -8802,7 +8810,7 @@ var workflowTools = [
|
|
|
8802
8810
|
},
|
|
8803
8811
|
{
|
|
8804
8812
|
name: "muggle-remote-workflow-start-test-script-generation",
|
|
8805
|
-
description:
|
|
8813
|
+
description: `Start a test script generation workflow. ${TEST_CASE_LIMIT_GUIDANCE}`,
|
|
8806
8814
|
inputSchema: WorkflowStartTestScriptGenerationInputSchema,
|
|
8807
8815
|
dashboardLink: linkToInputScriptDetails,
|
|
8808
8816
|
mapToUpstream: (input) => {
|
|
@@ -10002,14 +10010,16 @@ var TestCaseDetailsSchema = z.object({
|
|
|
10002
10010
|
id: MuggleEntityIdSchema.describe("Cloud test case ID (UUID)"),
|
|
10003
10011
|
/** Test case title. */
|
|
10004
10012
|
title: z.string().min(1).describe("Test case title"),
|
|
10013
|
+
/** Stored description; the one home for what the test must and must not touch. */
|
|
10014
|
+
description: z.string().describe(`Stored description from muggle-remote-test-case-get; the run reads it. ${TEST_CASE_LIMIT_GUIDANCE}`),
|
|
10005
10015
|
/** Test goal. */
|
|
10006
10016
|
goal: z.string().min(1).describe("Test goal - what the test should verify"),
|
|
10007
10017
|
/** Expected result. */
|
|
10008
10018
|
expectedResult: z.string().min(1).describe("Expected outcome after test execution"),
|
|
10009
10019
|
/** Preconditions (optional). */
|
|
10010
10020
|
precondition: z.string().optional().describe("Initial state/setup required before test execution"),
|
|
10011
|
-
/**
|
|
10012
|
-
instructions: z.string().optional().describe("
|
|
10021
|
+
/** Extra text for this run only (optional). */
|
|
10022
|
+
instructions: z.string().optional().describe("Extra text for this run only. It adds to the stored description and never replaces it."),
|
|
10013
10023
|
/** Original cloud URL (for reference, replaced by localUrl). */
|
|
10014
10024
|
url: z.string().url().optional().describe("Original cloud URL (replaced by localUrl during execution)"),
|
|
10015
10025
|
/** Cloud project ID (required for electron workflow context). */
|
|
@@ -10082,6 +10092,8 @@ var ExecuteReplayInputSchema = z.object({
|
|
|
10082
10092
|
testScript: TestScriptDetailsSchema.describe("Test script metadata from muggle-remote-test-script-get"),
|
|
10083
10093
|
/** Action script content from muggle-remote-action-script-get (using testScript.actionScriptId). */
|
|
10084
10094
|
actionScript: z.array(z.unknown()).describe("Action script steps from muggle-remote-action-script-get"),
|
|
10095
|
+
/** Current stored description of the test case the script belongs to. */
|
|
10096
|
+
testCaseDescription: z.string().describe(`Copy description from muggle-remote-test-case-get for testScript.testCaseId: the replay reads the current text, not the text from when the script was recorded. ${TEST_CASE_LIMIT_GUIDANCE}`),
|
|
10085
10097
|
/** Local URL to test against. */
|
|
10086
10098
|
localUrl: z.string().url().describe("Local URL to test against (e.g., http://localhost:3000)"),
|
|
10087
10099
|
/** Absolute path identifying the caller's worktree. Drives the cross-worktree single-flight lock — same path = parallel allowed (intra-change), different path = waits its turn. Required: ambiguity here causes the lock to mis-key, splitting one logical change into two competing holders. */
|
|
@@ -10771,7 +10783,7 @@ function formatRunViewUrlLine(runId) {
|
|
|
10771
10783
|
}
|
|
10772
10784
|
var executeTestGenerationTool = {
|
|
10773
10785
|
name: "muggle-local-execute-test-generation",
|
|
10774
|
-
description:
|
|
10786
|
+
description: `Generate an end-to-end (E2E) acceptance test script by launching a real browser against your web app. The browser navigates your app, executes the test case steps (like signing up, filling forms, clicking through flows), and produces a replayable test script with screenshots. Use this to create new browser tests for any user flow. Requires a test case (from muggle-remote-test-case-get) and a localhost URL. ${TEST_CASE_LIMIT_GUIDANCE} Launches an Electron browser \u2014 the user's showElectronBrowser preference decides whether its window shows when set to always or never; under ask it defaults to a visible window and showUi: false runs it headless.`,
|
|
10775
10787
|
inputSchema: ExecuteTestGenerationInputSchema,
|
|
10776
10788
|
execute: async (ctx) => {
|
|
10777
10789
|
const logger7 = createChildLogger2(ctx.correlationId);
|
|
@@ -10842,7 +10854,7 @@ var executeTestGenerationTool = {
|
|
|
10842
10854
|
};
|
|
10843
10855
|
var executeReplayTool = {
|
|
10844
10856
|
name: "muggle-local-execute-replay",
|
|
10845
|
-
description:
|
|
10857
|
+
description: `Replay an existing E2E acceptance test script in a real browser to verify your app still works correctly \u2014 use this for regression testing after code changes. The browser executes each saved step and captures screenshots so you can see what happened. Requires: (1) test script metadata from muggle-remote-test-script-get, (2) actionScript content from muggle-remote-action-script-get using the testScript.actionScriptId, (3) testCaseDescription, the description from muggle-remote-test-case-get, and (4) a localhost URL. ${TEST_CASE_LIMIT_GUIDANCE} Launches an Electron browser \u2014 the user's showElectronBrowser preference decides whether its window shows when set to always or never; under ask it defaults to a visible window and showUi: false runs it headless.`,
|
|
10846
10858
|
inputSchema: ExecuteReplayInputSchema,
|
|
10847
10859
|
execute: async (ctx) => {
|
|
10848
10860
|
const logger7 = createChildLogger2(ctx.correlationId);
|
|
@@ -10874,6 +10886,7 @@ var executeReplayTool = {
|
|
|
10874
10886
|
execute: () => executeReplay({
|
|
10875
10887
|
testScript: input.testScript,
|
|
10876
10888
|
actionScript: input.actionScript,
|
|
10889
|
+
testCaseDescription: input.testCaseDescription,
|
|
10877
10890
|
localUrl: input.localUrl,
|
|
10878
10891
|
cwd: input.cwd,
|
|
10879
10892
|
mutations: input.mutations,
|