@muggleai/works 5.32.0-staging.283 → 5.32.0-staging.285
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-NTEBYUCA.js → chunk-AEJM2CBK.js} +17 -7
- package/dist/{chunk-CGKARU5D.js → chunk-TM6IZEKH.js} +8 -5
- 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 +10 -2
- package/dist/plugin/scripts/pr-watch-events.sh +14 -1
- package/dist/plugin/scripts/pr-watch-fetch.sh +1 -0
- package/dist/plugin/scripts/pr-watch-floors.sh +21 -8
- package/dist/plugin/scripts/pr-watch-loop.sh +16 -1
- package/dist/plugin/scripts/pr-watch-state.jq +26 -2
- package/dist/plugin/scripts/pr-watch-verdict.mjs +6 -1
- package/dist/plugin/skills/_shared/pr-followup-helpers/classify.md +12 -0
- package/dist/plugin/skills/_shared/pr-followup-helpers/echo-skip.md +1 -0
- package/dist/plugin/skills/_shared/session-state-writes.md +1 -1
- package/dist/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +1 -1
- package/dist/plugin/skills/_shared/vcs/github/conversation-comments.md +22 -0
- package/dist/plugin/skills/_shared/vcs/github/top-level-comment.md +2 -2
- package/dist/plugin/skills/_shared/vcs/github.md +1 -0
- package/dist/plugin/skills/do/address-reviews.md +20 -12
- package/dist/plugin/skills/do/input-routing.md +1 -1
- package/dist/plugin/skills/do/open-prs/forward.md +1 -1
- package/dist/plugin/skills/do/per-comment-replies.md +8 -1
- package/dist/plugin/skills/muggle-pr-followup/SKILL.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/arm-watcher.md +5 -5
- package/dist/plugin/skills/muggle-pr-followup/auto-track.md +1 -1
- package/dist/plugin/skills/muggle-pr-followup/bootstrap.md +3 -1
- package/dist/plugin/skills/muggle-pr-followup/contract.md +8 -4
- package/dist/plugin/skills/muggle-pr-followup/output-templates/inline-reply.md +12 -0
- package/dist/plugin/skills/muggle-pr-followup/state-schemas.md +7 -2
- package/dist/release-manifest.json +3 -3
- package/dist/{src-LYOBYPFZ.js → src-KNX6CG4Z.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 +10 -2
- package/plugin/scripts/pr-watch-events.sh +14 -1
- package/plugin/scripts/pr-watch-fetch.sh +1 -0
- package/plugin/scripts/pr-watch-floors.sh +21 -8
- package/plugin/scripts/pr-watch-loop.sh +16 -1
- package/plugin/scripts/pr-watch-state.jq +26 -2
- package/plugin/scripts/pr-watch-verdict.mjs +6 -1
- package/plugin/skills/_shared/pr-followup-helpers/classify.md +12 -0
- package/plugin/skills/_shared/pr-followup-helpers/echo-skip.md +1 -0
- package/plugin/skills/_shared/session-state-writes.md +1 -1
- package/plugin/skills/_shared/telemetry-events/pr-followup-tick.md +1 -1
- package/plugin/skills/_shared/vcs/github/conversation-comments.md +22 -0
- package/plugin/skills/_shared/vcs/github/top-level-comment.md +2 -2
- package/plugin/skills/_shared/vcs/github.md +1 -0
- package/plugin/skills/do/address-reviews.md +20 -12
- package/plugin/skills/do/input-routing.md +1 -1
- package/plugin/skills/do/open-prs/forward.md +1 -1
- package/plugin/skills/do/per-comment-replies.md +8 -1
- package/plugin/skills/muggle-pr-followup/SKILL.md +1 -1
- package/plugin/skills/muggle-pr-followup/arm-watcher.md +5 -5
- package/plugin/skills/muggle-pr-followup/auto-track.md +1 -1
- package/plugin/skills/muggle-pr-followup/bootstrap.md +3 -1
- package/plugin/skills/muggle-pr-followup/contract.md +8 -4
- package/plugin/skills/muggle-pr-followup/output-templates/inline-reply.md +12 -0
- package/plugin/skills/muggle-pr-followup/state-schemas.md +7 -2
|
@@ -15,3 +15,15 @@ When an actionable review has a non-empty body but zero line comments, GitHub ha
|
|
|
15
15
|
```
|
|
16
16
|
Re: review #<review_id> — addressed in <short-sha>: <one-line summary>.
|
|
17
17
|
```
|
|
18
|
+
|
|
19
|
+
## Conversation-comment reply
|
|
20
|
+
|
|
21
|
+
A top-level PR comment (Conversation tab) has no reply endpoint. Answer it with its own top-level comment, exactly one per addressed conversation comment, quoting its first line and linking it so a reader can tell which comment it answers:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
> <first line of the comment, trimmed>
|
|
25
|
+
|
|
26
|
+
Re: [comment](<comment html_url>) by @<author> — addressed in <short-sha>: <one-line summary>.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
A question the round answered without a change drops `addressed in <short-sha>:` for the answer itself. Posted per [`../../_shared/vcs/github/top-level-comment.md`](../../_shared/vcs/github/top-level-comment.md) with `--mode loop`, so the watch reads it as the loop's own and never wakes on it.
|
|
@@ -98,10 +98,12 @@ Keyed by `"<owner>/<repo>#<n>"`. One key per PR in the slot.
|
|
|
98
98
|
{
|
|
99
99
|
"<owner>/<repo>#<n>": {
|
|
100
100
|
"lastBodyReviewId": <int>,
|
|
101
|
+
"lastConversationCommentId": <int>,
|
|
101
102
|
"last_pushed_sha": "<sha-or-null>",
|
|
102
103
|
"idle_tick_count": <int>,
|
|
103
104
|
"cycles_completed": <int>,
|
|
104
105
|
"escalated_review_ids": [<int>, ...],
|
|
106
|
+
"escalated_conversation_comment_ids": [<int>, ...],
|
|
105
107
|
"pushed_shas": ["<sha>", ...],
|
|
106
108
|
"ci_fix_attempts": { "<sha>": <int> },
|
|
107
109
|
"ci_escalated_shas": ["<sha>", ...],
|
|
@@ -124,10 +126,12 @@ Keyed by `"<owner>/<repo>#<n>"`. One key per PR in the slot.
|
|
|
124
126
|
```
|
|
125
127
|
|
|
126
128
|
- `lastBodyReviewId`: narrow watermark for **body-only** reviews (a submitted review carrying no line comments). The watcher dispatches a body-only review only when `id > lastBodyReviewId`. Line-comment threads do **not** use it — they are dispatched from live thread state (unresolved + not outdated + newest comment unmarked by the loop), so there is no cursor that can pin past them. Bootstrap sets it to the highest existing submitted review id with `--forward-only`, else `0`. The cursor keeps its name under GitLab, where it holds the highest note / discussion id.
|
|
129
|
+
- `lastConversationCommentId` (GitHub only): narrow watermark for **conversation comments** — top-level PR comments on the Conversation tab, which belong to no review and no thread. The watcher dispatches one only when `id > lastConversationCommentId` ([`../_shared/vcs/github/conversation-comments.md`](../_shared/vcs/github/conversation-comments.md)). Issue-comment ids are their own sequence, so this never shares `lastBodyReviewId`. Bootstrap, auto-track and forward mode write it beside `lastBodyReviewId` — `0`, or the highest existing conversation comment id under `--forward-only`. An entry **without** the key predates conversation comments being watched: the tick seeds it to the highest actionable id it reads and dispatches none of them, so an upgrade never re-answers a PR's comment history.
|
|
127
130
|
- `last_pushed_sha`: most recent SHA `/muggle-do` pushed in this PR's life; `null` until the first push.
|
|
128
131
|
- `idle_tick_count`: incremented each tick whose actionable set is empty. Reset to 0 on any tick that dispatches `/muggle-do`. Diagnostic only — does not gate behavior.
|
|
129
132
|
- `cycles_completed`: incremented each time `/muggle-do` completes an address-reviews invocation (regardless of actionable/ambiguous/mixed).
|
|
130
133
|
- `escalated_review_ids`: review ids classified as ambiguous by `/muggle-do`. The watcher excludes these from the actionable set (both body-only reviews and the threads they own) so the same ambiguous review is never re-dispatched.
|
|
134
|
+
- `escalated_conversation_comment_ids`: conversation comment ids `/muggle-do` classified ambiguous. Excluded from the actionable set like `escalated_review_ids`, and either list non-empty blocks the watch with reason `reviews_escalated`.
|
|
131
135
|
- `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.
|
|
132
136
|
- `ci_fix_attempts`: per-SHA count of fix-ci cycles `/muggle-do` has run, incremented when a cycle starts — so a cycle that only re-runs a noisy check, or escalates without a push, still counts. The watcher stops dispatching fix-ci for a SHA once its count reaches 3. Keyed by head SHA. A count of 1 or more is the only evidence that floors a red head at arm time or releases the turn-end gate.
|
|
133
137
|
- `ci_escalated_shas`: head SHAs whose CI the fix-ci stage gave up on (attempts exhausted, only out-of-scope checks, or a noisy check red again after its re-run). Suppresses CI dispatch **only while `ci_fix_attempts[sha] >= 1`**; an entry with no attempt behind it is ignored and fix-ci dispatches anyway.
|
|
@@ -226,13 +230,14 @@ The watch loop's comparison floor — plain `KEY=VALUE` lines, one file per slot
|
|
|
226
230
|
|
|
227
231
|
- `REV` — highest submitted-review id already handled
|
|
228
232
|
- `COM` — highest thread-comment id already handled
|
|
233
|
+
- `CONV` — highest human conversation-comment id (top-level PR comment, Conversation tab) already handled. The loop's projection drops muggle's own posts and bot authors before taking the max, so the loop's signed reply never lifts it. A watermark without the key predates the floor: arming seeds it from the drain's read, and a loop running over such a watermark floors at its own first read until then.
|
|
229
234
|
- `THREADS` — semicolon-joined ids of threads already known unresolved
|
|
230
235
|
- `CIRED` — the red key `<head_sha>@<red-check-runs>` (each failed check's `name#run-id`, sorted — the last field of [`../../scripts/pr-watch-state.jq`](../../scripts/pr-watch-state.jq)) of a red verdict fix-ci is finished with: `head_sha` ∈ `ci_escalated_shas` with an attempt behind it, or `ci_fix_attempts[sha] >= 3`. Empty when the checks are green, still pending, unseen, or red with fix-ci not finished — the last so the loop reports it. A lone attempt never floors: the count is written before the fix runs, so it proves a cycle started, not that anything on the PR changed. The floor is a red key rather than a monotonic id because the rollup flips green↔red and resets on each push, and it carries run ids because a settled walkthrough comment or a rerun publishes a new run on the **same** head — a red verdict from that run is what fix-ci waits on, so it wakes the loop again ([`arm-watcher.md`](arm-watcher.md)).
|
|
231
236
|
- `REBASED` — the `rebase_key` (`<head_sha>..<base_tip_sha>`) whose behind/conflicting state a rebase cycle already attempted (`conflict_resolve_attempts[key] >= 1`); empty when the branch is current with its base, unseen, or stale with no attempt. 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) Steps 5–6 dedup rebase dispatch on; the loop only signals a due rebase, the tick's verdict applies the budgets.
|
|
232
237
|
- `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.
|
|
233
238
|
- `REBASE_HELD` — `1` when the PR has spent its catch-up rebase budget (`catch_up_rebases` has reached [`maxCatchUpRebases`](../muggle-preferences/preference-gates/maxCatchUpRebases.md)), empty otherwise. While set, the loop raises no rebase wake and records no rebase as due however far the base moves: the tick's verdict refuses every rebase until the owner raises the cap, so a wake would only ask for work it turns down. Every arm recomputes it, so a raised cap lifts the hold at the next re-arm.
|
|
234
239
|
|
|
235
|
-
Written whole-file by the orchestrating session — the review/comment/CI/rebase floors seeded at arm time (`REV`/`COM`/`THREADS` to the **drain's own observed max** on a first arm, and carried forward from this file on a re-arm, dropping threads since resolved, so a review that landed after the session's last read stays above them; `CIRED`/`REBASED` to the red head and stale key a cycle already attempted, `REBASE_HELD` from the rebase budget) and advanced after every cycle to the **handled wave's snapshot** (the max review-id and comment
|
|
240
|
+
Written whole-file by the orchestrating session — the review/comment/CI/rebase floors seeded at arm time (`REV`/`COM`/`CONV`/`THREADS` to the **drain's own observed max** on a first arm, and carried forward from this file on a re-arm, dropping threads since resolved, so a review that landed after the session's last read stays above them; `CIRED`/`REBASED` to the red head and stale key a cycle already attempted, `REBASE_HELD` from the rebase budget) and advanced after every cycle to the **handled wave's snapshot** (the max review-id, comment-id and conversation-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 re-arm 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.
|
|
236
241
|
|
|
237
242
|
**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.
|
|
238
243
|
|
|
@@ -250,7 +255,7 @@ The file is **empty** when nothing is due. Written by [`../../scripts/pr-watch-a
|
|
|
250
255
|
|
|
251
256
|
What the slot's loops already reported to the session — `KEY="value"` lines like the watermark's, written only by the loop, and only on the poll that ends it with a report:
|
|
252
257
|
|
|
253
|
-
- `REV` / `COM` — the newest review and comment ids that poll saw; each one at or below them was reported or already floored.
|
|
258
|
+
- `REV` / `COM` / `CONV` — the newest review, thread-comment and human conversation-comment ids that poll saw; each one at or below them was reported or already floored.
|
|
254
259
|
- `THREADS` — the threads unresolved at that poll.
|
|
255
260
|
- `CIRED` / `REBASED` — the red key and the rebase key a loop reported.
|
|
256
261
|
- `BLOCKED_CIDIGEST` / `BLOCKED_FOR` — the CI digest a blocked-resume wake reported, and the watermark's `BLOCKED_CIDIGEST` it was reported under. It quiets only that block, so the same digest can resume a later one.
|