@muggleai/works 5.35.0-staging.322 → 5.35.0-staging.323

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.35.0-staging.322"
12
+ "version": "5.35.0-staging.323"
13
13
  }
14
14
  ]
15
15
  }
@@ -3348,15 +3348,7 @@ function buildStopRequestFilePath(params) {
3348
3348
  return path17.join(params.tempDir, `${params.runId}${STOP_REQUEST_FILE_SUFFIX}`);
3349
3349
  }
3350
3350
  async function requestGracefulStopAsync(params) {
3351
- try {
3352
- await fs15.writeFile(buildStopRequestFilePath(params), params.reason, "utf-8");
3353
- } catch (writeError) {
3354
- logger4.warn("Could not write the stop request; the run will be hard-killed after the grace period", {
3355
- runId: params.runId,
3356
- error: writeError instanceof Error ? writeError.message : String(writeError)
3357
- });
3358
- }
3359
- return setTimeout(() => {
3351
+ const hardKillTimer = setTimeout(() => {
3360
3352
  if (params.child.exitCode === null && params.child.signalCode === null) {
3361
3353
  logger4.warn("Run did not stop within the grace period; killing it", {
3362
3354
  runId: params.runId,
@@ -3365,6 +3357,15 @@ async function requestGracefulStopAsync(params) {
3365
3357
  params.child.kill("SIGTERM");
3366
3358
  }
3367
3359
  }, STOP_REQUEST_GRACE_MS);
3360
+ try {
3361
+ await fs15.writeFile(buildStopRequestFilePath(params), params.reason, "utf-8");
3362
+ } catch (writeError) {
3363
+ logger4.warn("Could not write the stop request; the run will be hard-killed after the grace period", {
3364
+ runId: params.runId,
3365
+ error: writeError instanceof Error ? writeError.message : String(writeError)
3366
+ });
3367
+ }
3368
+ return hardKillTimer;
3368
3369
  }
3369
3370
  async function removeStopRequestFileAsync(params) {
3370
3371
  await fs15.unlink(buildStopRequestFilePath(params)).catch(() => void 0);
@@ -1,4 +1,4 @@
1
- import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, 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, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-OXWLNJQY.js';
1
+ import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, 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, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, local_exports } from './chunk-EYG772QF.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';
@@ -1264,7 +1264,7 @@ async function resolveGsScreenshotUrls(report, opts) {
1264
1264
  if (gsUrls.length === 0) {
1265
1265
  return report;
1266
1266
  }
1267
- const mcps = await import('./src-5FESKMMM.js');
1267
+ const mcps = await import('./src-3AIUIKP6.js');
1268
1268
  const credentials = await mcps.getCallerCredentialsAsync();
1269
1269
  if (!credentials.bearerToken && !credentials.apiKey) {
1270
1270
  stderrWrite(
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-VYRXNDB2.js';
3
- import './chunk-OXWLNJQY.js';
2
+ import { runCli } from './chunk-RRZ7PL3G.js';
3
+ import './chunk-EYG772QF.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-VYRXNDB2.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-OXWLNJQY.js';
1
+ export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-RRZ7PL3G.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-EYG772QF.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.35.0-staging.322",
4
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
7
+ "@muggleai/works@5.35.0-staging.323",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.35.0-staging.322",
3
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
5
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
7
+ "@muggleai/works@5.35.0-staging.323",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -13,15 +13,18 @@ The external state a block is waiting on. Recompute from live state each blocked
13
13
  - `head_sha` — from the tick's [`contract.md`](contract.md) Step 1 refresh.
14
14
  - `latest_review_id` — `max(id)` over submitted reviews per [`../_shared/vcs/github/submitted-reviews.md`](../_shared/vcs/github/submitted-reviews.md) (`0` if none).
15
15
  - `ci_digest` — the CI rollup digest for `head_sha`: each check's `name:state` from [`../_shared/vcs/github/pr-checks.md`](../_shared/vcs/github/pr-checks.md), sorted by name and joined with `,`. This is the signature the watch loop computes (the last field of [`../../scripts/pr-watch-state.jq`](../../scripts/pr-watch-state.jq)), so the loop's live digest equals the fingerprint until CI actually moves; any other shape wakes the loop on every arm.
16
+ - `latest_conversation_comment_id` — `max(id)` over conversation comments fetched per [`../_shared/vcs/github/conversation-comments.md`](../_shared/vcs/github/conversation-comments.md) that muggle did not post and no bot wrote (`0` if none; always `0` under GitLab). The same id the loop's `CONV` floor tracks (the last field of [`../../scripts/pr-watch-state.jq`](../../scripts/pr-watch-state.jq)), so the comment that woke the loop is the one that moves it.
16
17
 
17
- Any component moving means the block may have cleared — a new push (`head_sha`, which also clears the per-SHA escalation sets), a new review (`latest_review_id`), or a CI/deploy state change (`ci_digest`, which is how an external staging deploy is caught).
18
+ Any component moving means the block may have cleared — a new push (`head_sha`, which also clears the per-SHA escalation sets), a new review (`latest_review_id`), a CI/deploy state change (`ci_digest`, which is how an external staging deploy is caught), or the owner answering on the Conversation tab (`latest_conversation_comment_id`, which Step 3 then dispatches).
19
+
20
+ A stored fingerprint with no `latest_conversation_comment_id` was flagged before the component existed: compare against `last_seen.lastConversationCommentId` in its place, or treat the component as unchanged when that key is absent too. A block is flagged only on an idle tick, when every human conversation comment already sits at or below that dispatch watermark, so the absent field never clears a block on its own, and a comment that arrived since still does.
18
21
 
19
22
  ## Flag the block (from Step 7)
20
23
 
21
24
  When an idle tick is a durable human-block and `last_seen.blocked` is not already set:
22
25
 
23
26
  1. Increment `last_seen.idle_tick_count`.
24
- 2. Write `last_seen.blocked = { reason, since: <now>, fingerprint }` (reuse the `latest_review_id` / `ci_digest` already fetched this tick). Mirror the fingerprint's `ci_digest` into the watch-watermark's `BLOCKED_CIDIGEST` ([`state-schemas.md`](state-schemas.md#watch-watermarkenv)) — a whole-file rewrite of `watch-watermark.env` that leaves the other floors untouched. That non-empty value is what arms the loop's blocked-resume probe, so a block resumes on any CI move ([`arm-watcher.md`](arm-watcher.md)), not just red — without it the probe stays dormant.
27
+ 2. Write `last_seen.blocked = { reason, since: <now>, fingerprint }` (reuse the `latest_review_id` / `ci_digest` / `latest_conversation_comment_id` already fetched this tick). Mirror the fingerprint's `ci_digest` into the watch-watermark's `BLOCKED_CIDIGEST` ([`state-schemas.md`](state-schemas.md#watch-watermarkenv)) — a whole-file rewrite of `watch-watermark.env` that leaves the other floors untouched. That non-empty value is what arms the loop's blocked-resume probe, so a block resumes on any CI move ([`arm-watcher.md`](arm-watcher.md)), not just red — without it the probe stays dormant.
25
28
  3. **Remind the owner** — emit the one-line reminder per [`output-templates/blocked-reminder.md`](output-templates/blocked-reminder.md): the pending act plus a reference back to the decision context. This is the block's **only** reminder. Print it as the first line of the tick's final message, after [`contract.md`](contract.md) Step 7.5 has armed the loop and cancelled any cron — printed earlier, it scrolls away under the steps that follow, and the final message is what the owner reads.
26
29
  4. Append a `blocked reason=<reason>` line to `followup.log` per [`output-templates/watcher-log.md`](output-templates/watcher-log.md); emit a `tick` event with `idle: true`, `blocked: true`, and the same other fields as a transient idle. Exit.
27
30
 
@@ -35,4 +35,4 @@ The watcher's one-line nudge to the loop owner, emitted every tick a PR sits blo
35
35
  ⏳ acme/widget#142 awaiting you (2h): muggle-walkthrough stays red on <short-sha> only for cases you waived (Checkout) — merge past it, or re-run E2E. → <pr-url>/checks
36
36
  ```
37
37
 
38
- The reminder repeats every blocked tick (at the normal `1m` cadence) until the owner acts; the watcher stops it the moment the fingerprint moves (a push, a new review, or a CI/deploy change).
38
+ The reminder repeats every blocked tick (at the normal `1m` cadence) until the owner acts; the watcher stops it the moment the fingerprint moves (a push, a new review, a CI/deploy change, or a new conversation comment).
@@ -122,7 +122,8 @@ Keyed by `"<owner>/<repo>#<n>"`. One key per PR in the slot.
122
122
  "fingerprint": {
123
123
  "head_sha": "<sha>",
124
124
  "latest_review_id": <int>,
125
- "ci_digest": "<string>"
125
+ "ci_digest": "<string>",
126
+ "latest_conversation_comment_id": <int>
126
127
  }
127
128
  }
128
129
  }
@@ -155,7 +156,8 @@ Unlike these, `ci_fix_attempts` / `ci_escalated_shas` stay keyed on the head SHA
155
156
  - `reason`: which durable block is being awaited — `conflict_escalated` (`rebase_key` ∈ `conflict_escalated_keys`), `ci_escalated` (`head_sha` ∈ `ci_escalated_shas`), `reviews_escalated` (a review sits in `escalated_review_ids` awaiting the user, actionable set empty), or `rebase_budget_exhausted` (`catch_up_rebases` reached its cap). Selects the reminder wording; the resume decision is fingerprint-driven for every reason but the last.
156
157
  - `rebase_budget_exhausted` is the one reason a fingerprint move does not clear. Base movement is what spent the budget, so resuming on it would restore the unbounded rebase loop the cap exists to end; it clears when the owner raises `maxCatchUpRebases` or the PR goes terminal.
157
158
  - `since`: when the block was first flagged — lets the reminder state how long the owner has been the blocker.
158
- - `fingerprint`: the external state the block is waiting on. `head_sha` moves on a new push (which also clears the per-SHA escalation sets, keyed by SHA); `latest_review_id` is `max(id)` over submitted reviews and moves when a reviewer submits anything new; `ci_digest` is a stable digest of the head SHA's CI rollup (bucket + each check's name/conclusion, sorted) and moves when a check flips, a rerun lands, or an external check such as a staging deploy posts. Any change clears the block and resumes evaluation.
159
+ - `fingerprint`: the external state the block is waiting on. `head_sha` moves on a new push (which also clears the per-SHA escalation sets, keyed by SHA); `latest_review_id` is `max(id)` over submitted reviews and moves when a reviewer submits anything new; `ci_digest` is a stable digest of the head SHA's CI rollup (bucket + each check's name/conclusion, sorted) and moves when a check flips, a rerun lands, or an external check such as a staging deploy posts; `latest_conversation_comment_id` is `max(id)` over conversation comments muggle did not post and no bot wrote (`0` under GitLab) and moves when the owner answers on the Conversation tab. Any change clears the block and resumes evaluation.
160
+ - A fingerprint with no `latest_conversation_comment_id` predates that component: the resume gate reads it as `last_seen.lastConversationCommentId`, or as unchanged when that key is absent too ([`blocked-tick.md`](blocked-tick.md#the-fingerprint)).
159
161
 
160
162
  ## `state.md`
161
163
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "release": "5.35.0-staging.322",
3
- "buildId": "run-322-1",
4
- "commitSha": "05a455a22031796ddd54810dc0763387daae565a",
2
+ "release": "5.35.0-staging.323",
3
+ "buildId": "run-323-1",
4
+ "commitSha": "4144f5adb9cf0a3c4b06bca6da9517e4a8c2d438",
5
5
  "buildTime": "2026-11-10T06:29:55Z",
6
6
  "serviceName": "muggle-ai-works-mcp"
7
7
  }
@@ -1 +1 @@
1
- export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, 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, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-OXWLNJQY.js';
1
+ export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, 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, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-EYG772QF.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.35.0-staging.322",
4
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
4
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
7
+ "@muggleai/works@5.35.0-staging.323",
8
8
  "serve"
9
9
  ],
10
10
  "env": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muggle",
3
- "version": "5.35.0-staging.322",
3
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
5
+ "version": "5.35.0-staging.323",
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.35.0-staging.322",
7
+ "@muggleai/works@5.35.0-staging.323",
8
8
  "serve"
9
9
  ]
10
10
  }
@@ -13,15 +13,18 @@ The external state a block is waiting on. Recompute from live state each blocked
13
13
  - `head_sha` — from the tick's [`contract.md`](contract.md) Step 1 refresh.
14
14
  - `latest_review_id` — `max(id)` over submitted reviews per [`../_shared/vcs/github/submitted-reviews.md`](../_shared/vcs/github/submitted-reviews.md) (`0` if none).
15
15
  - `ci_digest` — the CI rollup digest for `head_sha`: each check's `name:state` from [`../_shared/vcs/github/pr-checks.md`](../_shared/vcs/github/pr-checks.md), sorted by name and joined with `,`. This is the signature the watch loop computes (the last field of [`../../scripts/pr-watch-state.jq`](../../scripts/pr-watch-state.jq)), so the loop's live digest equals the fingerprint until CI actually moves; any other shape wakes the loop on every arm.
16
+ - `latest_conversation_comment_id` — `max(id)` over conversation comments fetched per [`../_shared/vcs/github/conversation-comments.md`](../_shared/vcs/github/conversation-comments.md) that muggle did not post and no bot wrote (`0` if none; always `0` under GitLab). The same id the loop's `CONV` floor tracks (the last field of [`../../scripts/pr-watch-state.jq`](../../scripts/pr-watch-state.jq)), so the comment that woke the loop is the one that moves it.
16
17
 
17
- Any component moving means the block may have cleared — a new push (`head_sha`, which also clears the per-SHA escalation sets), a new review (`latest_review_id`), or a CI/deploy state change (`ci_digest`, which is how an external staging deploy is caught).
18
+ Any component moving means the block may have cleared — a new push (`head_sha`, which also clears the per-SHA escalation sets), a new review (`latest_review_id`), a CI/deploy state change (`ci_digest`, which is how an external staging deploy is caught), or the owner answering on the Conversation tab (`latest_conversation_comment_id`, which Step 3 then dispatches).
19
+
20
+ A stored fingerprint with no `latest_conversation_comment_id` was flagged before the component existed: compare against `last_seen.lastConversationCommentId` in its place, or treat the component as unchanged when that key is absent too. A block is flagged only on an idle tick, when every human conversation comment already sits at or below that dispatch watermark, so the absent field never clears a block on its own, and a comment that arrived since still does.
18
21
 
19
22
  ## Flag the block (from Step 7)
20
23
 
21
24
  When an idle tick is a durable human-block and `last_seen.blocked` is not already set:
22
25
 
23
26
  1. Increment `last_seen.idle_tick_count`.
24
- 2. Write `last_seen.blocked = { reason, since: <now>, fingerprint }` (reuse the `latest_review_id` / `ci_digest` already fetched this tick). Mirror the fingerprint's `ci_digest` into the watch-watermark's `BLOCKED_CIDIGEST` ([`state-schemas.md`](state-schemas.md#watch-watermarkenv)) — a whole-file rewrite of `watch-watermark.env` that leaves the other floors untouched. That non-empty value is what arms the loop's blocked-resume probe, so a block resumes on any CI move ([`arm-watcher.md`](arm-watcher.md)), not just red — without it the probe stays dormant.
27
+ 2. Write `last_seen.blocked = { reason, since: <now>, fingerprint }` (reuse the `latest_review_id` / `ci_digest` / `latest_conversation_comment_id` already fetched this tick). Mirror the fingerprint's `ci_digest` into the watch-watermark's `BLOCKED_CIDIGEST` ([`state-schemas.md`](state-schemas.md#watch-watermarkenv)) — a whole-file rewrite of `watch-watermark.env` that leaves the other floors untouched. That non-empty value is what arms the loop's blocked-resume probe, so a block resumes on any CI move ([`arm-watcher.md`](arm-watcher.md)), not just red — without it the probe stays dormant.
25
28
  3. **Remind the owner** — emit the one-line reminder per [`output-templates/blocked-reminder.md`](output-templates/blocked-reminder.md): the pending act plus a reference back to the decision context. This is the block's **only** reminder. Print it as the first line of the tick's final message, after [`contract.md`](contract.md) Step 7.5 has armed the loop and cancelled any cron — printed earlier, it scrolls away under the steps that follow, and the final message is what the owner reads.
26
29
  4. Append a `blocked reason=<reason>` line to `followup.log` per [`output-templates/watcher-log.md`](output-templates/watcher-log.md); emit a `tick` event with `idle: true`, `blocked: true`, and the same other fields as a transient idle. Exit.
27
30
 
@@ -35,4 +35,4 @@ The watcher's one-line nudge to the loop owner, emitted every tick a PR sits blo
35
35
  ⏳ acme/widget#142 awaiting you (2h): muggle-walkthrough stays red on <short-sha> only for cases you waived (Checkout) — merge past it, or re-run E2E. → <pr-url>/checks
36
36
  ```
37
37
 
38
- The reminder repeats every blocked tick (at the normal `1m` cadence) until the owner acts; the watcher stops it the moment the fingerprint moves (a push, a new review, or a CI/deploy change).
38
+ The reminder repeats every blocked tick (at the normal `1m` cadence) until the owner acts; the watcher stops it the moment the fingerprint moves (a push, a new review, a CI/deploy change, or a new conversation comment).
@@ -122,7 +122,8 @@ Keyed by `"<owner>/<repo>#<n>"`. One key per PR in the slot.
122
122
  "fingerprint": {
123
123
  "head_sha": "<sha>",
124
124
  "latest_review_id": <int>,
125
- "ci_digest": "<string>"
125
+ "ci_digest": "<string>",
126
+ "latest_conversation_comment_id": <int>
126
127
  }
127
128
  }
128
129
  }
@@ -155,7 +156,8 @@ Unlike these, `ci_fix_attempts` / `ci_escalated_shas` stay keyed on the head SHA
155
156
  - `reason`: which durable block is being awaited — `conflict_escalated` (`rebase_key` ∈ `conflict_escalated_keys`), `ci_escalated` (`head_sha` ∈ `ci_escalated_shas`), `reviews_escalated` (a review sits in `escalated_review_ids` awaiting the user, actionable set empty), or `rebase_budget_exhausted` (`catch_up_rebases` reached its cap). Selects the reminder wording; the resume decision is fingerprint-driven for every reason but the last.
156
157
  - `rebase_budget_exhausted` is the one reason a fingerprint move does not clear. Base movement is what spent the budget, so resuming on it would restore the unbounded rebase loop the cap exists to end; it clears when the owner raises `maxCatchUpRebases` or the PR goes terminal.
157
158
  - `since`: when the block was first flagged — lets the reminder state how long the owner has been the blocker.
158
- - `fingerprint`: the external state the block is waiting on. `head_sha` moves on a new push (which also clears the per-SHA escalation sets, keyed by SHA); `latest_review_id` is `max(id)` over submitted reviews and moves when a reviewer submits anything new; `ci_digest` is a stable digest of the head SHA's CI rollup (bucket + each check's name/conclusion, sorted) and moves when a check flips, a rerun lands, or an external check such as a staging deploy posts. Any change clears the block and resumes evaluation.
159
+ - `fingerprint`: the external state the block is waiting on. `head_sha` moves on a new push (which also clears the per-SHA escalation sets, keyed by SHA); `latest_review_id` is `max(id)` over submitted reviews and moves when a reviewer submits anything new; `ci_digest` is a stable digest of the head SHA's CI rollup (bucket + each check's name/conclusion, sorted) and moves when a check flips, a rerun lands, or an external check such as a staging deploy posts; `latest_conversation_comment_id` is `max(id)` over conversation comments muggle did not post and no bot wrote (`0` under GitLab) and moves when the owner answers on the Conversation tab. Any change clears the block and resumes evaluation.
160
+ - A fingerprint with no `latest_conversation_comment_id` predates that component: the resume gate reads it as `last_seen.lastConversationCommentId`, or as unchanged when that key is absent too ([`blocked-tick.md`](blocked-tick.md#the-fingerprint)).
159
161
 
160
162
  ## `state.md`
161
163