@muggleai/works 5.25.0-staging.185 → 5.25.0-staging.187
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-53MCWNVE.js → chunk-TDDPUID3.js} +2 -2
- package/dist/{chunk-C6OEDLIP.js → chunk-V5KNPQ7B.js} +846 -800
- 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/scripts/pr-watch-arm.sh +20 -1
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +18 -15
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +9 -7
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-resolve-reminder.md +11 -9
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-bootstrap.md +10 -8
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +17 -15
- package/dist/plugin/skills/_shared/telemetry-events.md +1 -1
- package/dist/plugin/skills/do/next-step.md +38 -5
- package/dist/plugin/skills/muggle-pr-followup/blocked-tick.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/state-schemas.md +1 -1
- package/dist/release-manifest.json +3 -3
- package/dist/{src-V7DVV6KO.js → src-XKTB74LV.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/scripts/pr-watch-arm.sh +20 -1
- package/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +18 -15
- package/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +9 -7
- package/plugin/skills/_shared/telemetry-events/muggle-do-resolve-reminder.md +11 -9
- package/plugin/skills/_shared/telemetry-events/pr-followup-bootstrap.md +10 -8
- package/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +17 -15
- package/plugin/skills/_shared/telemetry-events.md +1 -1
- package/plugin/skills/do/next-step.md +38 -5
- package/plugin/skills/muggle-pr-followup/blocked-tick.md +1 -1
- package/plugin/skills/muggle-pr-followup/state-schemas.md +1 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
2
|
-
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-TDDPUID3.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-V5KNPQ7B.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.
|
|
4
|
+
"version": "5.25.0-staging.187",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.25.0-staging.
|
|
3
|
+
"version": "5.25.0-staging.187",
|
|
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.
|
|
5
|
+
"version": "5.25.0-staging.187",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/dist/plugin/.mcp.json
CHANGED
|
@@ -89,6 +89,25 @@ if [ "$mergeable" = "CONFLICTING" ] || { [ -n "$behind_count" ] && [ "$behind_co
|
|
|
89
89
|
rebase_floor="${head_sha}..${base_tip_sha}"
|
|
90
90
|
fi
|
|
91
91
|
|
|
92
|
+
# A slot re-armed while blocked keeps its resume probe live. Empty is the
|
|
93
|
+
# not-blocked state, so seeding it empty here would leave the loop asleep
|
|
94
|
+
# through the very CI move the block is waiting on.
|
|
95
|
+
#
|
|
96
|
+
# node rather than sed or jq: the digest sits under a per-PR key, jq is not
|
|
97
|
+
# guaranteed present, and a malformed file must read as not blocked rather than
|
|
98
|
+
# yield a partial match. The file goes in on stdin because Windows node cannot
|
|
99
|
+
# open the POSIX path Git Bash hands it. A digest spanning lines is dropped:
|
|
100
|
+
# written into the line-based watermark, it could forge another floor.
|
|
101
|
+
blocked_digest_floor=""
|
|
102
|
+
if [ -f "${slot}/last_seen.json" ]; then
|
|
103
|
+
blocked_digest_floor="$(PR_KEY="${repo}#${pr_number}" node -e '
|
|
104
|
+
try {
|
|
105
|
+
const digest = JSON.parse(require("fs").readFileSync(0, "utf8"))[process.env.PR_KEY]?.blocked?.fingerprint?.ci_digest;
|
|
106
|
+
if (typeof digest === "string" && !/[\r\n]/.test(digest)) process.stdout.write(digest);
|
|
107
|
+
} catch {}
|
|
108
|
+
' < "${slot}/last_seen.json" 2>/dev/null)"
|
|
109
|
+
fi
|
|
110
|
+
|
|
92
111
|
thread_count=0
|
|
93
112
|
[ -n "$unresolved_threads" ] && thread_count=$(printf '%s' "$unresolved_threads" | tr ';' '\n' | grep -c .)
|
|
94
113
|
|
|
@@ -107,7 +126,7 @@ echo "DRAIN checks pending=${pending_checks:-0} failed=${failed_checks:-0} behin
|
|
|
107
126
|
printf 'THREADS="%s"\n' "$unresolved_threads"
|
|
108
127
|
printf 'CIRED="%s"\n' "$ci_red_floor"
|
|
109
128
|
printf 'REBASED="%s"\n' "$rebase_floor"
|
|
110
|
-
printf 'BLOCKED_CIDIGEST=""\n'
|
|
129
|
+
printf 'BLOCKED_CIDIGEST="%s"\n' "$blocked_digest_floor"
|
|
111
130
|
} > "${slot}/watch-watermark.env"
|
|
112
131
|
|
|
113
132
|
# Claim the slot for this session. watcher_lease_is_foreign reads an absent
|
|
@@ -4,20 +4,22 @@ One per address-reviews invocation, regardless of outcome.
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
"eventType": "muggle-do:cycle",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"review_ids_in": [<int>, ...],
|
|
14
|
+
"review_ids_actionable": [<int>, ...],
|
|
15
|
+
"review_ids_ambiguous": [<int>, ...],
|
|
16
|
+
"ci_checks_in": ["<check-name>", ...],
|
|
17
|
+
"ci_checks_fixed": ["<check-name>", ...],
|
|
18
|
+
"ci_checks_escalated": ["<check-name>", ...],
|
|
19
|
+
"head_sha_before": "<sha-or-null>",
|
|
20
|
+
"head_sha_after": "<sha-or-null>",
|
|
21
|
+
"outcome": "pushed" | "escalated" | "mixed" | "no-op" | "self-loop-skip" | "ci-fixed" | "ci-escalated" | "rebased" | "rebase-escalated" | "rebase-budget-exhausted"
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
```
|
|
23
25
|
|
|
@@ -31,5 +33,6 @@ One per address-reviews invocation, regardless of outcome.
|
|
|
31
33
|
- `"ci-escalated"` — fix-ci exhausted its 3 attempts for the SHA or the failing checks were out of scope; the SHA was added to `ci_escalated_shas`. No further auto-fix on it.
|
|
32
34
|
- `"rebased"` — a watcher-dispatched rebase cycle rebased the branch onto its base (behind-only or conflicts resolved), verified, and force-pushed.
|
|
33
35
|
- `"rebase-escalated"` — the rebase couldn't be completed (a conflict under `autoResolveConflicts=never`, verification failed, or the 2-attempt budget for the head/base-tip pair was spent); the pair was added to `conflict_escalated_keys`. No further auto-rebase until either side moves.
|
|
36
|
+
- `"rebase-budget-exhausted"` — the PR spent its whole `maxCatchUpRebases` catch-up budget; `rebase_budget_exhausted` was set and the watcher stops dispatching rebases for it for good.
|
|
34
37
|
|
|
35
|
-
For fix-ci cycles (`ci-fixed` / `ci-escalated`) the `review_ids_*` arrays are empty and the `ci_checks_*` arrays carry the data: `ci_checks_in` (red checks dispatched), `ci_checks_fixed` (made green and pushed), `ci_checks_escalated` (out-of-scope or unresolved). For rebase cycles (`rebased` / `rebase-escalated`) all the `review_ids_*` and `ci_checks_*` arrays are empty; the SHA fields carry the before/after of the rebase.
|
|
38
|
+
For fix-ci cycles (`ci-fixed` / `ci-escalated`) the `review_ids_*` arrays are empty and the `ci_checks_*` arrays carry the data: `ci_checks_in` (red checks dispatched), `ci_checks_fixed` (made green and pushed), `ci_checks_escalated` (out-of-scope or unresolved). For rebase cycles (`rebased` / `rebase-escalated` / `rebase-budget-exhausted`) all the `review_ids_*` and `ci_checks_*` arrays are empty; the SHA fields carry the before/after of the rebase.
|
|
@@ -4,13 +4,15 @@ Zero or one per address-reviews invocation, plus zero or one per forward cycle t
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
"eventType": "muggle-do:escalation",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"kind": "ambiguous-review" | "design-adjustment" | "rebase-conflict" | "e2e-unrepairable",
|
|
14
|
+
"review_ids": [<int>, ...]
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
17
|
```
|
|
16
18
|
|
|
@@ -4,15 +4,17 @@ Zero or one per cycle. Fires after the resolve-reminder stage scans threads —
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
"eventType": "muggle-do:resolve-reminder",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"addressed_by_loop": <int>,
|
|
14
|
+
"addressed_by_human": <int>,
|
|
15
|
+
"not_addressed": <int>,
|
|
16
|
+
"comment_posted": true | false
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
```
|
|
18
20
|
|
|
@@ -4,14 +4,16 @@ One per successful bootstrap, after state seeding and before the first watcher d
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
"eventType": "muggle-pr-followup:bootstrap",
|
|
8
|
+
"skillName": "muggle-pr-followup",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"caller": "<caller-name>",
|
|
11
|
+
"session_slug": "<slug>",
|
|
12
|
+
"repo": "<owner>/<repo>",
|
|
13
|
+
"pr_number": <int>,
|
|
14
|
+
"cursor_review_id": <int>,
|
|
15
|
+
"resume": true | false
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
```
|
|
17
19
|
|
|
@@ -4,21 +4,23 @@ One per watcher iteration (idle or not).
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
"eventType": "muggle-pr-followup:tick",
|
|
8
|
+
"skillName": "muggle-pr-followup",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"actionable_threads": <int>,
|
|
14
|
+
"dispatched_review_ids": [<int>, ...],
|
|
15
|
+
"rebase_needed": true | false,
|
|
16
|
+
"dispatched_rebase": true | false,
|
|
17
|
+
"checks_red": <int>,
|
|
18
|
+
"dispatched_ci_fix": true | false,
|
|
19
|
+
"terminal": true | false,
|
|
20
|
+
"idle": true | false,
|
|
21
|
+
"blocked": true | false,
|
|
22
|
+
"tick_duration_ms": <int>
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Canonical shapes for `muggle-local-telemetry-event-emit` events. Emission mechanics: [`telemetry-emit.md`](telemetry-emit.md).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Each event is one call: `eventType` is its name from the index below, `skillName` the emitting skill, and `metadata` the event-specific payload — read only the file for the event you're emitting. The tool records them to `~/.muggle-ai/telemetry/workflow-events.jsonl`.
|
|
6
6
|
|
|
7
7
|
## Index
|
|
8
8
|
|
|
@@ -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,
|
|
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** →
|
|
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.
|
|
@@ -10,7 +10,7 @@ The external state a block is waiting on. Recompute from live state each blocked
|
|
|
10
10
|
|
|
11
11
|
- `head_sha` — from the tick's [`contract.md`](contract.md) Step 1 refresh.
|
|
12
12
|
- `latest_review_id` — `max(id)` over submitted reviews per [`../_shared/vcs/github/submitted-reviews.md`](../_shared/vcs/github/submitted-reviews.md) (`0` if none).
|
|
13
|
-
- `ci_digest` — the CI rollup digest for `head_sha`
|
|
13
|
+
- `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.
|
|
14
14
|
|
|
15
15
|
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).
|
|
16
16
|
|
|
@@ -202,7 +202,7 @@ The watch loop's comparison floor — plain `KEY=VALUE` lines, one file per slot
|
|
|
202
202
|
- `REBASED` — the `rebase_key` (`<head_sha>..<base_tip_sha>`) whose behind/conflicting state the drain already handled; empty when the branch is current with its base or unseen. Keyed on the pair, not a monotonic id, because staleness depends on both sides — the loop fires once per newly-due pair and re-arms when the head or the base moves. Same key [`contract.md`](contract.md) Step 5 dedups rebase dispatch on; the monitor only signals a due rebase, the tick applies the `conflict_resolve_attempts` budget.
|
|
203
203
|
- `BLOCKED_CIDIGEST` — the head's `ci_digest` at the moment a block was flagged (the same signature `blocked.fingerprint.ci_digest` carries); empty whenever the watch is not blocked. Non-empty arms the loop's blocked-resume probe: while set, the loop wakes on any move of the live digest away from this value, so a block resumes on a green pass, a rerun, or an external deploy check — not only on red. Written by [`blocked-tick.md`](blocked-tick.md) when a block is flagged and cleared to empty when it resumes.
|
|
204
204
|
|
|
205
|
-
Written whole-file by the orchestrating session — the review/comment/CI/rebase floors seeded at arm time (`REV`/`COM` to the **drain's own observed max**, `CIRED`/`REBASED` to what the drain handled) and advanced after every cycle to the **handled wave's snapshot** (the max review-id and comment-id the cycle read at the start of handling, captured before replies were posted); `BLOCKED_CIDIGEST` is
|
|
205
|
+
Written whole-file by the orchestrating session — the review/comment/CI/rebase floors seeded at arm time (`REV`/`COM` to the **drain's own observed max**, `CIRED`/`REBASED` to what the drain handled) and advanced after every cycle to the **handled wave's snapshot** (the max review-id and comment-id the cycle read at the start of handling, captured before replies were posted); `BLOCKED_CIDIGEST` is set and cleared by the blocked-tick flag/resume path, and every arm re-seeds it from `last_seen.blocked.fingerprint.ci_digest` so a rollover or respawn keeps the resume probe live. **Never** derived from a fresh fetch taken after the drain or after replies land: a later fetch includes ids that arrived in the handling window and were never read, and marking them seen swallows them ([`arm-watcher.md`](arm-watcher.md)). The advance also never moves any floor past an unresolved thread the cycle left unaddressed. Read by the watch loop each iteration; the loop never writes it. A stale watermark makes the next reported event the loop's own reply.
|
|
206
206
|
|
|
207
207
|
**Never `source` this file, and quote or extract values.** `THREADS` holds bare semicolons: sourced unquoted, the shell splits the line at the first `;` and silently drops every id after it — the loop then re-reports known threads as new. The watch loop must extract values verbatim (e.g. `grep '^THREADS=' | cut -d= -f2- | tr -d '"\r'`), tolerating quotes and CRLF; writers should quote the value anyway.
|
|
208
208
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-187-1",
|
|
4
|
+
"commitSha": "a961f4ea53bd300adde56d45b277058c9345d846",
|
|
5
|
+
"buildTime": "2026-10-23T21:20:33Z",
|
|
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, 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-
|
|
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-V5KNPQ7B.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.
|
|
4
|
+
"version": "5.25.0-staging.187",
|
|
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.
|
|
4
|
+
"version": "5.25.0-staging.187",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
package/plugin/.codex-mcp.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.25.0-staging.
|
|
3
|
+
"version": "5.25.0-staging.187",
|
|
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.
|
|
5
|
+
"version": "5.25.0-staging.187",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/.mcp.json
CHANGED
|
@@ -89,6 +89,25 @@ if [ "$mergeable" = "CONFLICTING" ] || { [ -n "$behind_count" ] && [ "$behind_co
|
|
|
89
89
|
rebase_floor="${head_sha}..${base_tip_sha}"
|
|
90
90
|
fi
|
|
91
91
|
|
|
92
|
+
# A slot re-armed while blocked keeps its resume probe live. Empty is the
|
|
93
|
+
# not-blocked state, so seeding it empty here would leave the loop asleep
|
|
94
|
+
# through the very CI move the block is waiting on.
|
|
95
|
+
#
|
|
96
|
+
# node rather than sed or jq: the digest sits under a per-PR key, jq is not
|
|
97
|
+
# guaranteed present, and a malformed file must read as not blocked rather than
|
|
98
|
+
# yield a partial match. The file goes in on stdin because Windows node cannot
|
|
99
|
+
# open the POSIX path Git Bash hands it. A digest spanning lines is dropped:
|
|
100
|
+
# written into the line-based watermark, it could forge another floor.
|
|
101
|
+
blocked_digest_floor=""
|
|
102
|
+
if [ -f "${slot}/last_seen.json" ]; then
|
|
103
|
+
blocked_digest_floor="$(PR_KEY="${repo}#${pr_number}" node -e '
|
|
104
|
+
try {
|
|
105
|
+
const digest = JSON.parse(require("fs").readFileSync(0, "utf8"))[process.env.PR_KEY]?.blocked?.fingerprint?.ci_digest;
|
|
106
|
+
if (typeof digest === "string" && !/[\r\n]/.test(digest)) process.stdout.write(digest);
|
|
107
|
+
} catch {}
|
|
108
|
+
' < "${slot}/last_seen.json" 2>/dev/null)"
|
|
109
|
+
fi
|
|
110
|
+
|
|
92
111
|
thread_count=0
|
|
93
112
|
[ -n "$unresolved_threads" ] && thread_count=$(printf '%s' "$unresolved_threads" | tr ';' '\n' | grep -c .)
|
|
94
113
|
|
|
@@ -107,7 +126,7 @@ echo "DRAIN checks pending=${pending_checks:-0} failed=${failed_checks:-0} behin
|
|
|
107
126
|
printf 'THREADS="%s"\n' "$unresolved_threads"
|
|
108
127
|
printf 'CIRED="%s"\n' "$ci_red_floor"
|
|
109
128
|
printf 'REBASED="%s"\n' "$rebase_floor"
|
|
110
|
-
printf 'BLOCKED_CIDIGEST=""\n'
|
|
129
|
+
printf 'BLOCKED_CIDIGEST="%s"\n' "$blocked_digest_floor"
|
|
111
130
|
} > "${slot}/watch-watermark.env"
|
|
112
131
|
|
|
113
132
|
# Claim the slot for this session. watcher_lease_is_foreign reads an absent
|
|
@@ -4,20 +4,22 @@ One per address-reviews invocation, regardless of outcome.
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
"eventType": "muggle-do:cycle",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"review_ids_in": [<int>, ...],
|
|
14
|
+
"review_ids_actionable": [<int>, ...],
|
|
15
|
+
"review_ids_ambiguous": [<int>, ...],
|
|
16
|
+
"ci_checks_in": ["<check-name>", ...],
|
|
17
|
+
"ci_checks_fixed": ["<check-name>", ...],
|
|
18
|
+
"ci_checks_escalated": ["<check-name>", ...],
|
|
19
|
+
"head_sha_before": "<sha-or-null>",
|
|
20
|
+
"head_sha_after": "<sha-or-null>",
|
|
21
|
+
"outcome": "pushed" | "escalated" | "mixed" | "no-op" | "self-loop-skip" | "ci-fixed" | "ci-escalated" | "rebased" | "rebase-escalated" | "rebase-budget-exhausted"
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
```
|
|
23
25
|
|
|
@@ -31,5 +33,6 @@ One per address-reviews invocation, regardless of outcome.
|
|
|
31
33
|
- `"ci-escalated"` — fix-ci exhausted its 3 attempts for the SHA or the failing checks were out of scope; the SHA was added to `ci_escalated_shas`. No further auto-fix on it.
|
|
32
34
|
- `"rebased"` — a watcher-dispatched rebase cycle rebased the branch onto its base (behind-only or conflicts resolved), verified, and force-pushed.
|
|
33
35
|
- `"rebase-escalated"` — the rebase couldn't be completed (a conflict under `autoResolveConflicts=never`, verification failed, or the 2-attempt budget for the head/base-tip pair was spent); the pair was added to `conflict_escalated_keys`. No further auto-rebase until either side moves.
|
|
36
|
+
- `"rebase-budget-exhausted"` — the PR spent its whole `maxCatchUpRebases` catch-up budget; `rebase_budget_exhausted` was set and the watcher stops dispatching rebases for it for good.
|
|
34
37
|
|
|
35
|
-
For fix-ci cycles (`ci-fixed` / `ci-escalated`) the `review_ids_*` arrays are empty and the `ci_checks_*` arrays carry the data: `ci_checks_in` (red checks dispatched), `ci_checks_fixed` (made green and pushed), `ci_checks_escalated` (out-of-scope or unresolved). For rebase cycles (`rebased` / `rebase-escalated`) all the `review_ids_*` and `ci_checks_*` arrays are empty; the SHA fields carry the before/after of the rebase.
|
|
38
|
+
For fix-ci cycles (`ci-fixed` / `ci-escalated`) the `review_ids_*` arrays are empty and the `ci_checks_*` arrays carry the data: `ci_checks_in` (red checks dispatched), `ci_checks_fixed` (made green and pushed), `ci_checks_escalated` (out-of-scope or unresolved). For rebase cycles (`rebased` / `rebase-escalated` / `rebase-budget-exhausted`) all the `review_ids_*` and `ci_checks_*` arrays are empty; the SHA fields carry the before/after of the rebase.
|
|
@@ -4,13 +4,15 @@ Zero or one per address-reviews invocation, plus zero or one per forward cycle t
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
"eventType": "muggle-do:escalation",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"kind": "ambiguous-review" | "design-adjustment" | "rebase-conflict" | "e2e-unrepairable",
|
|
14
|
+
"review_ids": [<int>, ...]
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
17
|
```
|
|
16
18
|
|
|
@@ -4,15 +4,17 @@ Zero or one per cycle. Fires after the resolve-reminder stage scans threads —
|
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
"eventType": "muggle-do:resolve-reminder",
|
|
8
|
+
"skillName": "muggle-do",
|
|
9
|
+
"metadata": {
|
|
10
|
+
"session_slug": "<slug>",
|
|
11
|
+
"repo": "<owner>/<repo>",
|
|
12
|
+
"pr_number": <int>,
|
|
13
|
+
"addressed_by_loop": <int>,
|
|
14
|
+
"addressed_by_human": <int>,
|
|
15
|
+
"not_addressed": <int>,
|
|
16
|
+
"comment_posted": true | false
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
```
|
|
18
20
|
|