@muggleai/works 4.11.4 → 4.12.1
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/dist/{chunk-E52757MK.js → chunk-2DVZ2LYO.js} +5 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/scripts/ensure-electron-app.sh +29 -4
- package/dist/plugin/skills/_shared/github-cli-recipes/line-comments-for-review.md +8 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/loop-user-identity.md +9 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/pr-edit.md +8 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/pr-metadata.md +12 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/push-to-branch.md +10 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/reply-line-comment.md +10 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/submitted-reviews.md +15 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/top-level-comment.md +7 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/unresolved-threads.md +33 -0
- package/dist/plugin/skills/_shared/github-cli-recipes/verify-working-tree.md +17 -0
- package/dist/plugin/skills/_shared/github-cli-recipes.md +20 -0
- package/dist/plugin/skills/_shared/pr-followup-helpers/allow-list.md +55 -0
- package/dist/plugin/skills/_shared/pr-followup-helpers/classify.md +63 -0
- package/dist/plugin/skills/_shared/pr-followup-helpers/reply-routing.md +40 -0
- package/dist/plugin/skills/_shared/pr-followup-helpers.md +8 -146
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +26 -0
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +19 -0
- package/dist/plugin/skills/_shared/telemetry-events/muggle-do-resolve-reminder.md +19 -0
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-bootstrap.md +20 -0
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +23 -0
- package/dist/plugin/skills/_shared/telemetry-events.md +15 -0
- package/dist/plugin/skills/do/address-reviews.md +137 -0
- package/dist/plugin/skills/do/build.md +5 -5
- package/dist/plugin/skills/do/open-prs/forward.md +80 -0
- package/dist/plugin/skills/do/open-prs/update.md +54 -0
- package/dist/plugin/skills/do/open-prs.md +6 -102
- package/dist/plugin/skills/do/per-comment-replies.md +61 -0
- package/dist/plugin/skills/do/resolve-reminder.md +70 -0
- package/dist/plugin/skills/muggle-do/SKILL.md +41 -45
- package/dist/plugin/skills/muggle-pr-followup/CLAUDE.md +25 -0
- package/dist/plugin/skills/muggle-pr-followup/SKILL.md +21 -43
- package/dist/plugin/skills/muggle-pr-followup/bootstrap.md +88 -0
- package/dist/plugin/skills/muggle-pr-followup/contract.md +44 -161
- package/dist/plugin/skills/muggle-pr-followup/output-templates/bootstrap.md +42 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates/escalation.md +32 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates/help.md +17 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates/inline-reply.md +17 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates/resolve-reminder.md +12 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates/watcher-log.md +21 -0
- package/dist/plugin/skills/muggle-pr-followup/output-templates.md +14 -0
- package/dist/plugin/skills/muggle-pr-followup/state-schemas.md +104 -0
- package/dist/plugin/skills/muggle-test-regenerate-missing/SKILL.md +3 -3
- package/dist/release-manifest.json +4 -4
- package/package.json +106 -106
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/scripts/ensure-electron-app.sh +29 -4
- package/plugin/skills/_shared/github-cli-recipes/line-comments-for-review.md +8 -0
- package/plugin/skills/_shared/github-cli-recipes/loop-user-identity.md +9 -0
- package/plugin/skills/_shared/github-cli-recipes/pr-edit.md +8 -0
- package/plugin/skills/_shared/github-cli-recipes/pr-metadata.md +12 -0
- package/plugin/skills/_shared/github-cli-recipes/push-to-branch.md +10 -0
- package/plugin/skills/_shared/github-cli-recipes/reply-line-comment.md +10 -0
- package/plugin/skills/_shared/github-cli-recipes/submitted-reviews.md +15 -0
- package/plugin/skills/_shared/github-cli-recipes/top-level-comment.md +7 -0
- package/plugin/skills/_shared/github-cli-recipes/unresolved-threads.md +33 -0
- package/plugin/skills/_shared/github-cli-recipes/verify-working-tree.md +17 -0
- package/plugin/skills/_shared/github-cli-recipes.md +20 -0
- package/plugin/skills/_shared/pr-followup-helpers/allow-list.md +55 -0
- package/plugin/skills/_shared/pr-followup-helpers/classify.md +63 -0
- package/plugin/skills/_shared/pr-followup-helpers/reply-routing.md +40 -0
- package/plugin/skills/_shared/pr-followup-helpers.md +8 -146
- package/plugin/skills/_shared/telemetry-events/muggle-do-cycle.md +26 -0
- package/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +19 -0
- package/plugin/skills/_shared/telemetry-events/muggle-do-resolve-reminder.md +19 -0
- package/plugin/skills/_shared/telemetry-events/pr-followup-bootstrap.md +20 -0
- package/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +23 -0
- package/plugin/skills/_shared/telemetry-events.md +15 -0
- package/plugin/skills/do/address-reviews.md +137 -0
- package/plugin/skills/do/build.md +5 -5
- package/plugin/skills/do/open-prs/forward.md +80 -0
- package/plugin/skills/do/open-prs/update.md +54 -0
- package/plugin/skills/do/open-prs.md +6 -102
- package/plugin/skills/do/per-comment-replies.md +61 -0
- package/plugin/skills/do/resolve-reminder.md +70 -0
- package/plugin/skills/muggle-do/SKILL.md +41 -45
- package/plugin/skills/muggle-pr-followup/CLAUDE.md +25 -0
- package/plugin/skills/muggle-pr-followup/SKILL.md +21 -43
- package/plugin/skills/muggle-pr-followup/bootstrap.md +88 -0
- package/plugin/skills/muggle-pr-followup/contract.md +44 -161
- package/plugin/skills/muggle-pr-followup/output-templates/bootstrap.md +42 -0
- package/plugin/skills/muggle-pr-followup/output-templates/escalation.md +32 -0
- package/plugin/skills/muggle-pr-followup/output-templates/help.md +17 -0
- package/plugin/skills/muggle-pr-followup/output-templates/inline-reply.md +17 -0
- package/plugin/skills/muggle-pr-followup/output-templates/resolve-reminder.md +12 -0
- package/plugin/skills/muggle-pr-followup/output-templates/watcher-log.md +21 -0
- package/plugin/skills/muggle-pr-followup/output-templates.md +14 -0
- package/plugin/skills/muggle-pr-followup/state-schemas.md +104 -0
- package/plugin/skills/muggle-test-regenerate-missing/SKILL.md +3 -3
- package/scripts/postinstall.mjs +36 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Escalation messages
|
|
2
|
+
|
|
3
|
+
Emitted by `/muggle-do` in address-reviews mode. One per invocation, at most. Anchored here so wording stays consistent.
|
|
4
|
+
|
|
5
|
+
## Ambiguous escalation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
**Review-followup escalation — <owner>/<repo>#<n>**
|
|
9
|
+
|
|
10
|
+
I can't act on <count> review(s) without your input. Listed below; reply on GitHub by submitting a new review with clearer direction, or tell me here which way to go.
|
|
11
|
+
|
|
12
|
+
Review #<id> from <login>:
|
|
13
|
+
> <body or "(no body)">
|
|
14
|
+
|
|
15
|
+
Comments:
|
|
16
|
+
- <file>:<line> — <body>
|
|
17
|
+
- ...
|
|
18
|
+
|
|
19
|
+
[Repeat per ambiguous review in the batch.]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Design-adjustment escalation
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
**Design-adjustment needed — <owner>/<repo>#<n>**
|
|
26
|
+
|
|
27
|
+
While addressing review #<id>, the cycle surfaced a conflict with the current design:
|
|
28
|
+
|
|
29
|
+
<one-paragraph description of the conflict>
|
|
30
|
+
|
|
31
|
+
This is beyond a routine code change. Confirm the design intent (reply here, or update the requirements doc) before I retry.
|
|
32
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Help output
|
|
2
|
+
|
|
3
|
+
For `/muggle:muggle-pr-followup` with no args, or with `help` / `?`:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
muggle-pr-followup — watcher loop for PR review follow-ups
|
|
7
|
+
|
|
8
|
+
Active loops:
|
|
9
|
+
<slug> → <owner>/<repo>#<n> (cursor @ review #<id>, <N> cycles)
|
|
10
|
+
...
|
|
11
|
+
(or "no active loops")
|
|
12
|
+
|
|
13
|
+
Usage:
|
|
14
|
+
/muggle:muggle-pr-followup <pr-url> → bootstrap a new loop
|
|
15
|
+
/muggle:muggle-pr-followup <slug> <pr-number> → run one tick (called by /loop)
|
|
16
|
+
/muggle:muggle-pr-followup <pr-number> → run one tick (slug inferred from on-disk state)
|
|
17
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Per-comment inline reply
|
|
2
|
+
|
|
3
|
+
Posted via `gh api .../comments/<comment-id>/replies` per cycle, one per line comment.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Addressed in <short-sha>: <one-line summary of the change made for THIS comment>.
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
`<short-sha>` is the first 7 chars of the new SHA. The body must contain that substring — the resolve-reminder stage greps for it to classify threads as addressed-by-loop.
|
|
10
|
+
|
|
11
|
+
## Top-level fallback (review-body-only)
|
|
12
|
+
|
|
13
|
+
When an actionable review has a non-empty body but zero line comments, GitHub has no `/replies` endpoint for the body. Post a top-level PR comment instead, at most once per such review:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Re: review #<review_id> — addressed in <short-sha>: <one-line summary>.
|
|
17
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Resolve-reminder top-level PR comment
|
|
2
|
+
|
|
3
|
+
Posted via `gh pr comment` after the resolve-reminder stage scans threads. Only when at least one addressed-by-loop thread exists.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
I addressed these threads in <short-sha> — mark them resolved when satisfied:
|
|
7
|
+
- #<thread-id-1>
|
|
8
|
+
- #<thread-id-2>
|
|
9
|
+
- ...
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
If `addressed_by_loop == 0`, no comment is posted (silent).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Watcher tick log lines
|
|
2
|
+
|
|
3
|
+
The watcher does **not** print to the user during normal operation. It only appends to `followup.log`. All user-facing escalations come from `/muggle-do`.
|
|
4
|
+
|
|
5
|
+
## Idle tick
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
<ISO-8601> tick pr=<n> reviews_seen=0 idle
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Dispatching tick
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
<ISO-8601> tick pr=<n> reviews_seen=<count> dispatched=<id1>,<id2>,...
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Terminal tick
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
<ISO-8601> tick pr=<n> terminal=<merged|closed> result.md written
|
|
21
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Output templates
|
|
2
|
+
|
|
3
|
+
All user-facing message text used by the watcher, bootstrap, and `/muggle-do` in address-reviews mode. Each template group is its own file — load only what the current step emits.
|
|
4
|
+
|
|
5
|
+
## Index
|
|
6
|
+
|
|
7
|
+
| Group | Use case |
|
|
8
|
+
| :---- | :------- |
|
|
9
|
+
| [`bootstrap`](output-templates/bootstrap.md) | Bootstrap success summary + all bootstrap aborts. |
|
|
10
|
+
| [`watcher-log`](output-templates/watcher-log.md) | The three `followup.log` line shapes (idle, dispatching, terminal). |
|
|
11
|
+
| [`escalation`](output-templates/escalation.md) | `/muggle-do` terminal escalation messages (ambiguous, design-adjustment). |
|
|
12
|
+
| [`inline-reply`](output-templates/inline-reply.md) | Per-comment inline reply + top-level fallback for body-only reviews. |
|
|
13
|
+
| [`resolve-reminder`](output-templates/resolve-reminder.md) | Top-level PR comment for the resolve-reminder stage. |
|
|
14
|
+
| [`help`](output-templates/help.md) | Skill help output (no args / `help` / `?`). |
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Session State Schemas
|
|
2
|
+
|
|
3
|
+
Canonical shapes for the JSON files in a PR-follow-up session slot. The slot path is `.muggle-do/sessions/<slug>/` (the caller's session dir; `muggle-do` is the current and only caller).
|
|
4
|
+
|
|
5
|
+
All files are atomic writes — the caller rewrites the whole file each time, never mutates in place. Use a temp file + rename if the platform supports it.
|
|
6
|
+
|
|
7
|
+
## `prs.json`
|
|
8
|
+
|
|
9
|
+
A list of one entry. (Historical: the file is an array for forward-compat with the original session-wide model. Today, each PR has its own session slot, so the array always has exactly one entry.)
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"repo": "<owner>/<repo>",
|
|
15
|
+
"number": <int>,
|
|
16
|
+
"url": "https://github.com/<owner>/<repo>/pull/<number>",
|
|
17
|
+
"head_sha": "<40-char-hex-sha>",
|
|
18
|
+
"state": "open" | "merged" | "closed"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `state` is the **observed** state from the last `gh pr view`. The watcher refreshes it each tick.
|
|
24
|
+
- Terminal states (`merged`, `closed`) are sticky — once set, the watcher writes `result.md` and exits without rescheduling.
|
|
25
|
+
|
|
26
|
+
## `last_seen.json`
|
|
27
|
+
|
|
28
|
+
Keyed by `"<owner>/<repo>#<n>"`. One key per PR in the slot.
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"<owner>/<repo>#<n>": {
|
|
33
|
+
"reviewId": <int>,
|
|
34
|
+
"last_pushed_sha": "<sha-or-null>",
|
|
35
|
+
"idle_tick_count": <int>,
|
|
36
|
+
"cycles_completed": <int>,
|
|
37
|
+
"escalated_review_ids": [<int>, ...],
|
|
38
|
+
"pushed_shas": ["<sha>", ...]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `reviewId`: the cursor. The watcher fetches reviews with `id > reviewId`. Bootstrap pins this to the highest existing submitted review id (or `0` if none).
|
|
44
|
+
- `last_pushed_sha`: most recent SHA `/muggle-do` pushed in this PR's life; `null` until the first push.
|
|
45
|
+
- `idle_tick_count`: incremented each tick that sees zero new reviews. Reset to 0 on any tick that dispatches `/muggle-do`. Diagnostic only — does not gate behavior.
|
|
46
|
+
- `cycles_completed`: incremented each time `/muggle-do` completes an address-reviews invocation (regardless of actionable/ambiguous/mixed).
|
|
47
|
+
- `escalated_review_ids`: review ids classified as ambiguous by `/muggle-do`. The watcher excludes these from future review fetches so the same ambiguous review is never re-dispatched.
|
|
48
|
+
- `pushed_shas`: every SHA `/muggle-do` has pushed for this PR. Append-only. Used by the resolve-reminder stage to recognize threads addressed by the loop.
|
|
49
|
+
|
|
50
|
+
## `state.md`
|
|
51
|
+
|
|
52
|
+
Free-form markdown. No required schema beyond a few well-known fields the caller-agnostic code reads:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# Session — <slug>
|
|
56
|
+
|
|
57
|
+
**PR:** <url>
|
|
58
|
+
**Slug:** <slug>
|
|
59
|
+
**Loop user:** <github-login> ← cached from `gh api user`
|
|
60
|
+
**Created:** <ISO-8601>
|
|
61
|
+
**Bootstrapped from URL:** <yes | no>
|
|
62
|
+
|
|
63
|
+
...free-form notes added by /muggle-do and bootstrap...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The watcher does **not** read or write `state.md`. Only bootstrap, `/muggle-do`, and the caller's stages touch it.
|
|
67
|
+
|
|
68
|
+
## `followup.log`
|
|
69
|
+
|
|
70
|
+
Append-only line-per-tick log. One line per watcher tick, plus one line per `/muggle-do` invocation. Format is loose, but each line starts with an ISO-8601 timestamp:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
2026-05-20T12:34:56Z tick pr=154 reviews_seen=0 idle
|
|
74
|
+
2026-05-20T12:35:56Z tick pr=154 reviews_seen=1 dispatched=4295962800
|
|
75
|
+
2026-05-20T12:36:14Z muggle-do cycle review_ids=[4295962800] outcome=pushed head_sha=abc1234
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Used for forensics only — never read back by skills.
|
|
79
|
+
|
|
80
|
+
## `result.md`
|
|
81
|
+
|
|
82
|
+
Written exactly once when the PR's watcher exits terminally (PR merged or closed). Free-form markdown summarizing the PR's life under this loop:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
# Result — <slug>
|
|
86
|
+
|
|
87
|
+
**PR:** <url>
|
|
88
|
+
**Final state:** merged | closed
|
|
89
|
+
**Cycles completed:** <int>
|
|
90
|
+
**Pushed SHAs:** <comma-separated list>
|
|
91
|
+
**Escalated review ids:** <comma-separated list or "none">
|
|
92
|
+
|
|
93
|
+
## Timeline
|
|
94
|
+
|
|
95
|
+
- <ISO-8601> bootstrap (cursor pinned at <reviewId>)
|
|
96
|
+
- <ISO-8601> review <id> from <login> — actionable, pushed <sha>
|
|
97
|
+
- <ISO-8601> review <id> from <login> — ambiguous, escalated
|
|
98
|
+
- ...
|
|
99
|
+
- <ISO-8601> PR <merged|closed> — watcher terminal
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Not in the slot
|
|
103
|
+
|
|
104
|
+
`cycle.json` and `requirements.md` are not seeded or read. `/muggle-do` reads reviews off GitHub each invocation.
|
|
@@ -180,15 +180,15 @@ Bulk regen does not run replays, so the section B (replay) router does not apply
|
|
|
180
180
|
|
|
181
181
|
### Step 8 — Open the Dashboard
|
|
182
182
|
|
|
183
|
-
Open the Muggle AI dashboard so the user can watch progress visually:
|
|
183
|
+
Open the Muggle AI dashboard so the user can watch progress visually. Point them at the **scripts** page (where DRAFT → GENERATING → ACTIVE transitions are visible), not `/runs` (which is for replay batches and shows nothing for a regen):
|
|
184
184
|
|
|
185
185
|
```bash
|
|
186
|
-
open "https://www.muggle-ai.com/muggleTestV0/dashboard/projects/{projectId}/
|
|
186
|
+
open "https://www.muggle-ai.com/muggleTestV0/dashboard/projects/{projectId}/scripts"
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
Tell them:
|
|
190
190
|
|
|
191
|
-
> "I've opened the project's
|
|
191
|
+
> "I've opened the project's scripts page. Generation jobs typically take a few minutes each — your test cases will move from `DRAFT` through `GENERATING` to `ACTIVE` as scripts complete."
|
|
192
192
|
|
|
193
193
|
### Step 9 (optional) — Poll Status
|
|
194
194
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "4.
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-05-
|
|
2
|
+
"release": "4.12.1",
|
|
3
|
+
"buildId": "run-39-1",
|
|
4
|
+
"commitSha": "e69fef56f40ab4b9c47ea9fa90c2237ab9ca62eb",
|
|
5
|
+
"buildTime": "2026-05-21T22:26:42Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
2
|
+
"name": "@muggleai/works",
|
|
3
|
+
"mcpName": "io.github.multiplex-ai/muggle",
|
|
4
|
+
"version": "4.12.1",
|
|
5
|
+
"description": "Ship quality products with AI-powered E2E acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"muggle": "bin/muggle.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"plugin",
|
|
14
|
+
"bin/muggle.js",
|
|
15
|
+
"scripts/postinstall.mjs"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"clean": "rimraf dist",
|
|
19
|
+
"build": "tsup && node scripts/strip-telemetry-comments.mjs && node scripts/write-release-manifest.mjs && node scripts/sync-versions.mjs && node scripts/build-plugin.mjs",
|
|
20
|
+
"build:plugin": "node scripts/build-plugin.mjs",
|
|
21
|
+
"sync:versions": "node scripts/sync-versions.mjs",
|
|
22
|
+
"build:release": "npm run build",
|
|
23
|
+
"verify:plugin": "node scripts/verify-plugin-marketplace.mjs",
|
|
24
|
+
"verify:contracts": "node scripts/verify-compatibility-contracts.mjs",
|
|
25
|
+
"verify:electron-release-checksums": "node scripts/verify-electron-release-checksums.mjs",
|
|
26
|
+
"verify:upgrade-experience": "node scripts/verify-upgrade-experience.mjs",
|
|
27
|
+
"build:workspace": "turbo run build",
|
|
28
|
+
"typecheck:workspace": "turbo run typecheck",
|
|
29
|
+
"lint:workspace": "turbo run lint",
|
|
30
|
+
"test:workspace": "turbo run test",
|
|
31
|
+
"dev:workspace": "turbo run dev",
|
|
32
|
+
"bootstrap": "npm install && npm run build",
|
|
33
|
+
"bootstrap:workspace": "pnpm install && pnpm run build:workspace",
|
|
34
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
35
|
+
"start": "node dist/index.js",
|
|
36
|
+
"dev": "tsx watch src/index.ts",
|
|
37
|
+
"lint": "eslint . --fix",
|
|
38
|
+
"lint:check": "eslint .",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:watch": "vitest"
|
|
42
|
+
},
|
|
43
|
+
"muggleConfig": {
|
|
44
|
+
"electronAppVersion": "1.0.92",
|
|
45
|
+
"downloadBaseUrl": "https://github.com/multiplex-ai/muggle-ai-works/releases/download",
|
|
46
|
+
"runtimeTargetDefault": "production",
|
|
47
|
+
"checksums": {
|
|
48
|
+
"darwin-arm64": "26fbcadb2e43a708fc424cf85c30dad99d9dff4b1013c6101de6f9c8233fc928",
|
|
49
|
+
"darwin-x64": "80fa0d2f00ce2f1209c5d9ba421d6c9fe39baba97aa1390a4d04616302fed693",
|
|
50
|
+
"linux-x64": "9898c5df678d19a2fcf07733caccd26b35953286b43d722f3bf7d8bafda21a51",
|
|
51
|
+
"win32-x64": "994c637547f12d1e9c57acba324946b54f1c36631fe314e6f8e1043e1c1afedf"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
56
|
+
"applicationinsights": "^3.14.0",
|
|
57
|
+
"axios": "^1.7.9",
|
|
58
|
+
"commander": "^14.0.3",
|
|
59
|
+
"open": "^11.0.0",
|
|
60
|
+
"ulid": "^3.0.2",
|
|
61
|
+
"uuid": "^14.0.0",
|
|
62
|
+
"winston": "^3.17.0",
|
|
63
|
+
"zod": "^4.3.6"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.133",
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@muggleai/mcp": "file:packages/mcps",
|
|
69
|
+
"@muggleai/workflows": "file:packages/workflows",
|
|
70
|
+
"@types/node": "^25.5.2",
|
|
71
|
+
"@types/uuid": "^11.0.0",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
73
|
+
"@typescript-eslint/parser": "^8.34.0",
|
|
74
|
+
"eslint": "^10.2.0",
|
|
75
|
+
"eslint-plugin-unused-imports": "^4.2.0",
|
|
76
|
+
"rimraf": "^6.0.1",
|
|
77
|
+
"tsup": "^8.5.1",
|
|
78
|
+
"tsx": "^4.19.2",
|
|
79
|
+
"turbo": "^2.9.4",
|
|
80
|
+
"typescript": "^6.0.2",
|
|
81
|
+
"vitest": "^4.0.18"
|
|
82
|
+
},
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=22.0.0"
|
|
85
|
+
},
|
|
86
|
+
"keywords": [
|
|
87
|
+
"mcp",
|
|
88
|
+
"model-context-protocol",
|
|
89
|
+
"muggle-ai",
|
|
90
|
+
"e2e-testing",
|
|
91
|
+
"testing",
|
|
92
|
+
"automation",
|
|
93
|
+
"localhost",
|
|
94
|
+
"ai-coding",
|
|
95
|
+
"user-experience",
|
|
96
|
+
"cursor",
|
|
97
|
+
"claude-code",
|
|
98
|
+
"vibe-coding"
|
|
99
|
+
],
|
|
100
|
+
"author": "Muggle AI",
|
|
101
|
+
"license": "MIT",
|
|
102
|
+
"packageManager": "pnpm@10.0.0",
|
|
103
|
+
"repository": {
|
|
104
|
+
"type": "git",
|
|
105
|
+
"url": "git+https://github.com/multiplex-ai/muggle-ai-works.git"
|
|
106
|
+
},
|
|
107
|
+
"homepage": "https://www.muggle-ai.com/muggleTestV0/docs/mcp/mcp-overview"
|
|
108
108
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Run real-browser end-to-end (E2E) acceptance tests on your web app from any AI coding agent. Generate test scripts from plain English, replay them on localhost, capture screenshots, and validate user flows like signup, checkout, and dashboards. Works across Claude Code, Cursor, Codex, and Windsurf.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.12.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Ship quality products with AI-powered end-to-end (E2E) acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.12.1",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -3,10 +3,35 @@
|
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
|
|
5
5
|
# Ensure the Electron browser test runner is installed/up to date (silent, best-effort).
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
#
|
|
7
|
+
# Bounded + cached: this script runs from a SessionStart hook on every Claude
|
|
8
|
+
# session, so a hung `muggle setup` (e.g. one blocked by host security policy
|
|
9
|
+
# on Windows) must not leak a ~100 MB orphan per session start. We cap the
|
|
10
|
+
# attempt with `timeout` and skip the call entirely if we already checked
|
|
11
|
+
# within the last day.
|
|
12
|
+
ensure_marker_dir="${HOME}/.cache/muggle"
|
|
13
|
+
ensure_marker="${ensure_marker_dir}/electron-app-checked"
|
|
14
|
+
ensure_ttl=$((24 * 60 * 60))
|
|
15
|
+
|
|
16
|
+
ensure_now=$(date +%s)
|
|
17
|
+
ensure_last=0
|
|
18
|
+
if [ -f "${ensure_marker}" ]; then
|
|
19
|
+
ensure_last=$(stat -f %m "${ensure_marker}" 2>/dev/null || stat -c %Y "${ensure_marker}" 2>/dev/null || echo 0)
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ $((ensure_now - ensure_last)) -ge "${ensure_ttl}" ]; then
|
|
23
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
24
|
+
ensure_timeout="timeout -k 5 60"
|
|
25
|
+
else
|
|
26
|
+
ensure_timeout=""
|
|
27
|
+
fi
|
|
28
|
+
if command -v muggle >/dev/null 2>&1; then
|
|
29
|
+
${ensure_timeout} muggle setup >/dev/null 2>&1 || true
|
|
30
|
+
else
|
|
31
|
+
${ensure_timeout} npx -y @muggleai/works setup >/dev/null 2>&1 || true
|
|
32
|
+
fi
|
|
33
|
+
mkdir -p "${ensure_marker_dir}" 2>/dev/null || true
|
|
34
|
+
touch "${ensure_marker}" 2>/dev/null || true
|
|
10
35
|
fi
|
|
11
36
|
|
|
12
37
|
# --- Context injection ---
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Identify the loop user
|
|
2
|
+
|
|
3
|
+
The GitHub identity that owns the authenticated `gh` token. Resolve-reminder thread classification and reply attribution need this.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gh api user --jq '.login'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Cache in `state.md` under `Loop user:`; re-resolve only when missing.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Refresh the PR title or body
|
|
2
|
+
|
|
3
|
+
For `open-prs/update.md` when E2E state flips (passing↔failing) or validation strategy changes.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gh pr edit <pr-number> --repo <owner>/<repo> --title "<new-title>"
|
|
7
|
+
gh pr edit <pr-number> --repo <owner>/<repo> --body-file <file>
|
|
8
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PR metadata snapshot
|
|
2
|
+
|
|
3
|
+
Fetch the fields the watcher and bootstrap need in one call.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gh pr view <pr-number> --repo <owner>/<repo> \
|
|
7
|
+
--json url,number,headRefOid,headRefName,baseRefName,state,mergedAt,closedAt,body,title,author
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
- `state` is one of `OPEN`, `MERGED`, `CLOSED`.
|
|
11
|
+
- `headRefOid` is the current head SHA — store as `head_sha` in `prs.json`.
|
|
12
|
+
- `headRefName` is the branch — must match the working tree's branch in bootstrap.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Push to the PR branch
|
|
2
|
+
|
|
3
|
+
After the address-reviews cycle's work.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
git -C <repo-path> push origin <head-ref-name>
|
|
7
|
+
git -C <repo-path> rev-parse HEAD
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Append the new SHA to `last_seen.pushed_shas[]` so resolve-reminder can recognize it.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Reply to a line comment (threaded)
|
|
2
|
+
|
|
3
|
+
Used by `/muggle-do` per-comment inline replies.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gh api --method POST \
|
|
7
|
+
-H "Accept: application/vnd.github+json" \
|
|
8
|
+
repos/<owner>/<repo>/pulls/<n>/comments/<comment-id>/replies \
|
|
9
|
+
-f body="<reply-text>"
|
|
10
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Submitted reviews past a cursor
|
|
2
|
+
|
|
3
|
+
For the watcher's poll and the address-reviews fetch.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
gh api repos/<owner>/<repo>/pulls/<n>/reviews --paginate
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Filter client-side:
|
|
10
|
+
|
|
11
|
+
- `submitted_at != null` (skip PENDING drafts)
|
|
12
|
+
- `id > last_seen.reviewId`
|
|
13
|
+
- `id` not in `last_seen.escalated_review_ids`
|
|
14
|
+
- `user.login` in the resolved allow-list
|
|
15
|
+
- `state` in `{CHANGES_REQUESTED, COMMENTED}`, OR `APPROVED` with a non-empty body or at least one line comment
|