@muggleai/works 5.25.0-staging.184 → 5.25.0-staging.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  "name": "muggleai",
10
10
  "source": "./plugin",
11
11
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
12
- "version": "5.25.0-staging.184"
12
+ "version": "5.25.0-staging.186"
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, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, OnboardingBlanketChoice, PreferenceKey, resolvePreferences } from './chunk-BJGZAKBB.js';
1
+ import { __export, getLogger, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, initTelemetry, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, buildElectronAppChecksumsUrl, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, OnboardingBlanketChoice, PreferenceKey, resolvePreferences } from './chunk-C6OEDLIP.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';
@@ -31,7 +31,7 @@ function clearTools() {
31
31
  function zodToJsonSchema(schema) {
32
32
  try {
33
33
  if (schema && typeof schema === "object" && "safeParse" in schema) {
34
- return z.toJSONSchema(schema);
34
+ return buildToolInputJsonSchema(schema);
35
35
  }
36
36
  } catch {
37
37
  }
@@ -69,66 +69,66 @@ function convertZodDef(schema) {
69
69
  required.push(key);
70
70
  }
71
71
  }
72
- const result = {
72
+ const jsonSchema = {
73
73
  type: "object",
74
74
  properties
75
75
  };
76
76
  if (required.length > 0) {
77
- result.required = required;
77
+ jsonSchema.required = required;
78
78
  }
79
- return result;
79
+ return jsonSchema;
80
80
  }
81
81
  case "ZodString":
82
82
  case "string": {
83
- const result = { type: "string" };
84
- if (def.description) result.description = def.description;
83
+ const jsonSchema = { type: "string" };
84
+ if (def.description) jsonSchema.description = def.description;
85
85
  if (def.checks) {
86
86
  for (const check of def.checks) {
87
- if (check.kind === "min") result.minLength = check.value;
88
- if (check.kind === "max") result.maxLength = check.value;
89
- if (check.kind === "url") result.format = "uri";
90
- if (check.kind === "email") result.format = "email";
87
+ if (check.kind === "min") jsonSchema.minLength = check.value;
88
+ if (check.kind === "max") jsonSchema.maxLength = check.value;
89
+ if (check.kind === "url") jsonSchema.format = "uri";
90
+ if (check.kind === "email") jsonSchema.format = "email";
91
91
  }
92
92
  }
93
- return result;
93
+ return jsonSchema;
94
94
  }
95
95
  case "ZodNumber":
96
96
  case "number": {
97
- const result = { type: "number" };
98
- if (def.description) result.description = def.description;
97
+ const jsonSchema = { type: "number" };
98
+ if (def.description) jsonSchema.description = def.description;
99
99
  if (def.checks) {
100
100
  for (const check of def.checks) {
101
- if (check.kind === "int") result.type = "integer";
102
- if (check.kind === "min") result.minimum = check.value;
103
- if (check.kind === "max") result.maximum = check.value;
101
+ if (check.kind === "int") jsonSchema.type = "integer";
102
+ if (check.kind === "min") jsonSchema.minimum = check.value;
103
+ if (check.kind === "max") jsonSchema.maximum = check.value;
104
104
  }
105
105
  }
106
- return result;
106
+ return jsonSchema;
107
107
  }
108
108
  case "ZodBoolean":
109
109
  case "boolean": {
110
- const result = { type: "boolean" };
111
- if (def.description) result.description = def.description;
112
- return result;
110
+ const jsonSchema = { type: "boolean" };
111
+ if (def.description) jsonSchema.description = def.description;
112
+ return jsonSchema;
113
113
  }
114
114
  case "ZodArray":
115
115
  case "array": {
116
- const result = {
116
+ const jsonSchema = {
117
117
  type: "array",
118
118
  items: def.innerType ? convertZodDef(def.innerType) : def.element ? convertZodDef(def.element) : {}
119
119
  };
120
- if (def.description) result.description = def.description;
121
- return result;
120
+ if (def.description) jsonSchema.description = def.description;
121
+ return jsonSchema;
122
122
  }
123
123
  case "ZodEnum":
124
124
  case "enum": {
125
125
  const enumValues = Array.isArray(def.values) ? def.values : def.values ? Object.values(def.values) : [];
126
- const result = {
126
+ const jsonSchema = {
127
127
  type: "string",
128
128
  enum: enumValues
129
129
  };
130
- if (def.description) result.description = def.description;
131
- return result;
130
+ if (def.description) jsonSchema.description = def.description;
131
+ return jsonSchema;
132
132
  }
133
133
  case "ZodOptional":
134
134
  case "optional": {
@@ -226,7 +226,7 @@ function createUnifiedMcpServer(options) {
226
226
  };
227
227
  }
228
228
  const startTime = Date.now();
229
- const result = await tool.execute({
229
+ const toolOutcome = await tool.execute({
230
230
  input: toolInput,
231
231
  correlationId
232
232
  });
@@ -234,16 +234,16 @@ function createUnifiedMcpServer(options) {
234
234
  childLogger.info("Tool call completed", {
235
235
  tool: toolName,
236
236
  latencyMs: latency,
237
- isError: result.isError
237
+ isError: toolOutcome.isError
238
238
  });
239
239
  return {
240
240
  content: [
241
241
  {
242
242
  type: "text",
243
- text: result.content
243
+ text: toolOutcome.content
244
244
  }
245
245
  ],
246
- isError: result.isError
246
+ isError: toolOutcome.isError
247
247
  };
248
248
  } catch (error) {
249
249
  if (error instanceof ZodError) {
@@ -1042,7 +1042,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1042
1042
  if (gsUrls.length === 0) {
1043
1043
  return report;
1044
1044
  }
1045
- const mcps = await import('./src-BYDDPSF6.js');
1045
+ const mcps = await import('./src-V7DVV6KO.js');
1046
1046
  const credentials = await mcps.getCallerCredentialsAsync();
1047
1047
  if (!credentials.bearerToken && !credentials.apiKey) {
1048
1048
  stderrWrite(
@@ -73,6 +73,7 @@ __export(src_exports, {
73
73
  buildElectronAppReleaseAssetUrl: () => buildElectronAppReleaseAssetUrl,
74
74
  buildElectronAppReleaseTag: () => buildElectronAppReleaseTag,
75
75
  buildOnboardingPlan: () => buildOnboardingPlan,
76
+ buildToolInputJsonSchema: () => buildToolInputJsonSchema,
76
77
  calculateFileChecksum: () => calculateFileChecksum,
77
78
  completeOnboarding: () => completeOnboarding,
78
79
  createApiKeyWithToken: () => createApiKeyWithToken,
@@ -4463,6 +4464,44 @@ function toolRequiresAuth(toolName) {
4463
4464
  ];
4464
4465
  return !noAuthTools.includes(toolName);
4465
4466
  }
4467
+ var ZOD_PATTERN_BY_STRING_FORMAT = /* @__PURE__ */ new Map([
4468
+ ["uuid", z.toJSONSchema(z.uuid()).pattern],
4469
+ ["email", z.toJSONSchema(z.email()).pattern]
4470
+ ]);
4471
+
4472
+ // packages/mcps/src/shared/tool-input-schema/tool-input-schema.ts
4473
+ function buildToolInputJsonSchema(inputSchema) {
4474
+ const { $schema: _dialect, ...schemaBody } = z.toJSONSchema(inputSchema);
4475
+ return compactSchemaNode(schemaBody);
4476
+ }
4477
+ function compactSchemaNode(node) {
4478
+ if (Array.isArray(node)) {
4479
+ return node.map(compactSchemaNode);
4480
+ }
4481
+ if (node === null || typeof node !== "object") {
4482
+ return node;
4483
+ }
4484
+ const schemaNode = node;
4485
+ const compactedNode = {};
4486
+ for (const [keyword, value] of Object.entries(schemaNode)) {
4487
+ if (!isRestatedKeyword(schemaNode, keyword, value)) {
4488
+ compactedNode[keyword] = compactSchemaNode(value);
4489
+ }
4490
+ }
4491
+ return compactedNode;
4492
+ }
4493
+ function isRestatedKeyword(schemaNode, keyword, value) {
4494
+ switch (keyword) {
4495
+ case "pattern":
4496
+ return typeof schemaNode.format === "string" && ZOD_PATTERN_BY_STRING_FORMAT.get(schemaNode.format) === value;
4497
+ case "maximum":
4498
+ return value === Number.MAX_SAFE_INTEGER;
4499
+ case "minimum":
4500
+ return value === Number.MIN_SAFE_INTEGER;
4501
+ default:
4502
+ return false;
4503
+ }
4504
+ }
4466
4505
 
4467
4506
  // packages/mcps/src/mcp/index.ts
4468
4507
  var mcp_exports = {};
@@ -9400,4 +9439,4 @@ function applyOnboardingAnswers(answers, dataDirOverride2, now = /* @__PURE__ */
9400
9439
  return { isCompleted: true, preferences: prefs };
9401
9440
  }
9402
9441
 
9403
- export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, EventName, HTML_VIEW_OFFER_LINE, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, ServiceName, Surface, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, __export, __require, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports2 as e2e_exports, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDisclosureCopy, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, hasShownDisclosure, initTelemetry, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports2 as local_exports, markDisclosureShown, markOnboardingCompleted, mcp_exports, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, src_exports, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, track, validatePreference, verifyFileChecksum, writePreferences2 as writePreferences, writePreferencesWithMetadata, writeRunViewHtml };
9442
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, EventName, HTML_VIEW_OFFER_LINE, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, ServiceName, Surface, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, __export, __require, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports2 as e2e_exports, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDisclosureCopy, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, hasShownDisclosure, initTelemetry, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports2 as local_exports, markDisclosureShown, markOnboardingCompleted, mcp_exports, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, src_exports, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, track, validatePreference, verifyFileChecksum, writePreferences2 as writePreferences, writePreferencesWithMetadata, writeRunViewHtml };
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-CE5HUVNQ.js';
3
- import './chunk-BJGZAKBB.js';
2
+ import { runCli } from './chunk-53MCWNVE.js';
3
+ import './chunk-C6OEDLIP.js';
4
4
 
5
5
  // src/cli/main.ts
6
6
  runCli().catch((error) => {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-CE5HUVNQ.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-BJGZAKBB.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-53MCWNVE.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-C6OEDLIP.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.25.0-staging.184",
4
+ "version": "5.25.0-staging.186",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.184",
7
+ "@muggleai/works@5.25.0-staging.186",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.25.0-staging.184",
3
+ "version": "5.25.0-staging.186",
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.25.0-staging.184",
5
+ "version": "5.25.0-staging.186",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.184",
7
+ "@muggleai/works@5.25.0-staging.186",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -1,18 +1,51 @@
1
1
  # Next-Step Suggestion
2
2
 
3
- Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advances silently when the session still has a plan, stops and asks when it doesn't.
3
+ Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advances silently when the session still has a plan; otherwise reports where this chat's work stands, then asks what to do next.
4
4
 
5
5
  ## Input
6
6
 
7
7
  - `slug` — the session.
8
8
  - `teardownRan` — whether [`cleanup.md`](cleanup.md) already ran teardown (true on `merged` + `autoCleanup: always`; false on `closed` or a skipped gate).
9
9
 
10
+ ## This chat's work
11
+
12
+ "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>` plus every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
13
+
14
+ The sessions directory holds every chat's slots, so a selector drawn from the whole directory offers work this chat never touched. Report and follow-ups cover this chat only; other chats sit behind one explicit option.
15
+
10
16
  ## Procedure
11
17
 
12
18
  1. Read the session plan — the current session's TodoWrite list.
13
19
  2. **Pending items remain** → do not prompt. Append `next-step: plan has <N> pending — advancing` to `followup.log` and continue to the next pending item. The user set a course; honor it.
14
- 3. **No pending items** → stop and ask for directions with one `AskUserQuestion` selector:
15
- - **Clean up now** — offer only when `teardownRan` is false (a `closed` PR, or `merged` with `autoCleanup` not `always`). Runs the shared teardown [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) for this slug, under its own safety rules.
16
- - **Move on / next task** — start a fresh `/muggle-do` forward run, or pick another open session.
17
- - **Done — stop here** — exit with no further action.
20
+ 3. **No pending items** → print the [status block](#status-block), then ask with one `AskUserQuestion` [selector](#selector). The status block always comes first: a selector without it asks the user to decide blind.
18
21
  4. Append the chosen outcome to `followup.log`.
22
+
23
+ ## Status block
24
+
25
+ One line per slot of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
26
+
27
+ ```
28
+ This chat's work:
29
+ merged acme/widget#142 — Add CSV export · cleaned up
30
+ open acme/widget#145 — Rate-limit login · CI green · 2 threads open · watcher live
31
+ blocked acme/widget#147 — Retry webhooks · awaiting you: resolve the rebase conflict
32
+ closed acme/widget#139 — Old approach · unmerged, branch kept
33
+ Left over: #145 shipped [E2E FAILING]; review 2210 on #142 escalated
34
+ ```
35
+
36
+ - **Terminal slots** (`merged`, `closed`) read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
37
+ - **Open slots** refresh live. Resolve the provider per [`detect-vcs.md`](../_shared/vcs/detect-vcs.md) and use its PR-metadata and unresolved-thread recipes ([`github.md`](../_shared/vcs/github.md), [`gitlab.md`](../_shared/vcs/gitlab.md)); CI per [`ci-rollup.md`](../_shared/vcs/common/ci-rollup.md). The watcher reads `live` when [`watch-heartbeat`](../muggle-pr-followup/state-schemas.md#watch-heartbeat) is fresh, `stopped` otherwise.
38
+ - **Blocked** replaces `open` when `last_seen.json` carries `blocked`; the line names the pending act per [`blocked-reminder.md`](../muggle-pr-followup/output-templates/blocked-reminder.md).
39
+ - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md`. `nothing` when empty.
40
+
41
+ No other chat's slot appears in the block.
42
+
43
+ ## Selector
44
+
45
+ At most four options, in this order:
46
+
47
+ 1. **This chat's follow-ups** — up to two, each naming the status-block line it acts on. Candidates, highest first: unblock a `blocked` PR; **Clean up now** for `<slug>` when `teardownRan` is false, running [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) for this slug under its own safety rules; re-arm a `stopped` watcher on an open PR; address a `Left over` item. Anything the status block does not show is never offered — no generic suggestion, no other chat's PR. Candidates past the first two stay reachable through the free-text answer.
48
+ 2. **Other chats' work** — always present; the gear shift. Lists every unfinalized slot of another chat (no `result.md`, name not ending in `.stopped`) as `<slug> → <owner>/<repo>#<n> — <title> (<state>)`, newest first, from each slot's `prs.json` and `last_seen.json`, or `No other chat has open work.` Then one selector: up to three of those slots to adopt per [`adopt.md`](../muggle-pr-followup/adopt.md), plus **Done**. Listing adopts nothing; a slot changes hands only when the user picks it.
49
+ 3. **Done — stop here** — exit with no further action.
50
+
51
+ A new task goes through the selector's free-text answer, which starts a fresh `/muggle-do` forward run.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "release": "5.18.0",
3
- "buildId": "run-184-1",
4
- "commitSha": "277d13740371fad962c52db835b2c8591d2e310a",
5
- "buildTime": "2026-10-23T18:05:26Z",
3
+ "buildId": "run-186-1",
4
+ "commitSha": "8650294aca28949199047d5502a07cf04cc36f3d",
5
+ "buildTime": "2026-10-23T18:32:16Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
@@ -0,0 +1 @@
1
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, mcp_exports as mcp, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, e2e_exports as qa, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-C6OEDLIP.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.25.0-staging.184",
4
+ "version": "5.25.0-staging.186",
5
5
  "description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "muggle",
3
3
  "description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
4
- "version": "5.25.0-staging.184",
4
+ "version": "5.25.0-staging.186",
5
5
  "author": {
6
6
  "name": "Muggle AI",
7
7
  "email": "support@muggle-ai.com"
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.184",
7
+ "@muggleai/works@5.25.0-staging.186",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.25.0-staging.184",
3
+ "version": "5.25.0-staging.186",
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.25.0-staging.184",
5
+ "version": "5.25.0-staging.186",
6
6
  "author": {
7
7
  "name": "Muggle AI",
8
8
  "email": "support@muggle-ai.com"
package/plugin/.mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "command": "npx",
5
5
  "args": [
6
6
  "-y",
7
- "@muggleai/works@5.25.0-staging.184",
7
+ "@muggleai/works@5.25.0-staging.186",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -1,18 +1,51 @@
1
1
  # Next-Step Suggestion
2
2
 
3
- Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advances silently when the session still has a plan, stops and asks when it doesn't.
3
+ Closing step of a terminal `/muggle-do` turn (post-merge or post-close). Advances silently when the session still has a plan; otherwise reports where this chat's work stands, then asks what to do next.
4
4
 
5
5
  ## Input
6
6
 
7
7
  - `slug` — the session.
8
8
  - `teardownRan` — whether [`cleanup.md`](cleanup.md) already ran teardown (true on `merged` + `autoCleanup: always`; false on `closed` or a skipped gate).
9
9
 
10
+ ## This chat's work
11
+
12
+ "This chat" is the Claude Code session running the turn, `$CLAUDE_CODE_SESSION_ID`. Its work is `<slug>` plus every slot under `~/.muggle-ai/muggle-do/sessions/` whose [`owner.json`](../muggle-pr-followup/state-schemas.md#ownerjson) records that id — the owned side of reconcile's split ([`reconcile.md`](../muggle-pr-followup/reconcile.md#step-1--enumerate-and-partition-slots)), finalized slots included. Every other slot holding a `prs.json` is another chat's work. With the id unset, this chat's work is `<slug>` alone.
13
+
14
+ The sessions directory holds every chat's slots, so a selector drawn from the whole directory offers work this chat never touched. Report and follow-ups cover this chat only; other chats sit behind one explicit option.
15
+
10
16
  ## Procedure
11
17
 
12
18
  1. Read the session plan — the current session's TodoWrite list.
13
19
  2. **Pending items remain** → do not prompt. Append `next-step: plan has <N> pending — advancing` to `followup.log` and continue to the next pending item. The user set a course; honor it.
14
- 3. **No pending items** → stop and ask for directions with one `AskUserQuestion` selector:
15
- - **Clean up now** — offer only when `teardownRan` is false (a `closed` PR, or `merged` with `autoCleanup` not `always`). Runs the shared teardown [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) for this slug, under its own safety rules.
16
- - **Move on / next task** — start a fresh `/muggle-do` forward run, or pick another open session.
17
- - **Done — stop here** — exit with no further action.
20
+ 3. **No pending items** → print the [status block](#status-block), then ask with one `AskUserQuestion` [selector](#selector). The status block always comes first: a selector without it asks the user to decide blind.
18
21
  4. Append the chosen outcome to `followup.log`.
22
+
23
+ ## Status block
24
+
25
+ One line per slot of this chat's work, `<slug>` first, the rest newest first, then the `Left over` line:
26
+
27
+ ```
28
+ This chat's work:
29
+ merged acme/widget#142 — Add CSV export · cleaned up
30
+ open acme/widget#145 — Rate-limit login · CI green · 2 threads open · watcher live
31
+ blocked acme/widget#147 — Retry webhooks · awaiting you: resolve the rebase conflict
32
+ closed acme/widget#139 — Old approach · unmerged, branch kept
33
+ Left over: #145 shipped [E2E FAILING]; review 2210 on #142 escalated
34
+ ```
35
+
36
+ - **Terminal slots** (`merged`, `closed`) read `prs.json` and `result.md`; the teardown note comes from the cleanup line in `followup.log`.
37
+ - **Open slots** refresh live. Resolve the provider per [`detect-vcs.md`](../_shared/vcs/detect-vcs.md) and use its PR-metadata and unresolved-thread recipes ([`github.md`](../_shared/vcs/github.md), [`gitlab.md`](../_shared/vcs/gitlab.md)); CI per [`ci-rollup.md`](../_shared/vcs/common/ci-rollup.md). The watcher reads `live` when [`watch-heartbeat`](../muggle-pr-followup/state-schemas.md#watch-heartbeat) is fresh, `stopped` otherwise.
38
+ - **Blocked** replaces `open` when `last_seen.json` carries `blocked`; the line names the pending act per [`blocked-reminder.md`](../muggle-pr-followup/output-templates/blocked-reminder.md).
39
+ - **`Left over`** lists what this chat's slots recorded as unfinished: a waiver or Blocker in `state.md`, an `[E2E FAILING]` ship, escalated review ids in `result.md`. `nothing` when empty.
40
+
41
+ No other chat's slot appears in the block.
42
+
43
+ ## Selector
44
+
45
+ At most four options, in this order:
46
+
47
+ 1. **This chat's follow-ups** — up to two, each naming the status-block line it acts on. Candidates, highest first: unblock a `blocked` PR; **Clean up now** for `<slug>` when `teardownRan` is false, running [`../_shared/post-merge-cleanup.md`](../_shared/post-merge-cleanup.md) for this slug under its own safety rules; re-arm a `stopped` watcher on an open PR; address a `Left over` item. Anything the status block does not show is never offered — no generic suggestion, no other chat's PR. Candidates past the first two stay reachable through the free-text answer.
48
+ 2. **Other chats' work** — always present; the gear shift. Lists every unfinalized slot of another chat (no `result.md`, name not ending in `.stopped`) as `<slug> → <owner>/<repo>#<n> — <title> (<state>)`, newest first, from each slot's `prs.json` and `last_seen.json`, or `No other chat has open work.` Then one selector: up to three of those slots to adopt per [`adopt.md`](../muggle-pr-followup/adopt.md), plus **Done**. Listing adopts nothing; a slot changes hands only when the user picks it.
49
+ 3. **Done — stop here** — exit with no further action.
50
+
51
+ A new task goes through the selector's free-text answer, which starts a fresh `/muggle-do` forward run.
@@ -1 +0,0 @@
1
- export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, CheckoutFreshnessVerdict, DEFAULT_PREFERENCES, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildOnboardingPlan, calculateFileChecksum, completeOnboarding, createApiKeyWithToken, createChildLogger, deleteApiKeyData, deleteCredentials, e2e_exports as e2e, evaluateCheckoutFreshness, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, loadApiKeyData, loadCredentials, local_exports as localQa, markOnboardingCompleted, mcp_exports as mcp, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, e2e_exports as qa, readPreferencesMetadata, readRunView, reconcileProjectPreferences, recordOnboardingSkip, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-BJGZAKBB.js';