@muggleai/works 5.11.1 → 5.12.0-staging.73

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.
Files changed (90) hide show
  1. package/config/runtime-targets.json +33 -0
  2. package/dist/{chunk-MSPMXBO5.js → chunk-FCDHJD6I.js} +441 -347
  3. package/dist/{chunk-WUMAJOBT.js → chunk-O7LFABOC.js} +39 -35
  4. package/dist/cli.js +2 -2
  5. package/dist/index.js +2 -2
  6. package/dist/plugin/hooks/README.md +4 -1
  7. package/dist/plugin/hooks/hooks.json +24 -0
  8. package/dist/plugin/scripts/guardrail-capability-claim.sh +38 -0
  9. package/dist/plugin/scripts/guardrail-comment-reply-gate.sh +42 -0
  10. package/dist/plugin/scripts/guardrail-debug-path-gate.sh +1 -1
  11. package/dist/plugin/scripts/guardrail-e2e-gate.sh +1 -1
  12. package/dist/plugin/scripts/guardrail-record-comment-replies.sh +28 -0
  13. package/dist/plugin/scripts/guardrail-resolve-gate.sh +22 -0
  14. package/dist/plugin/scripts/guardrail-stage-gate.sh +1 -1
  15. package/dist/plugin/scripts/guardrail-terminal-gate.sh +1 -1
  16. package/dist/plugin/scripts/guardrail-walkthrough-gate.sh +1 -1
  17. package/dist/plugin/scripts/guardrail-watch-gate.sh +1 -1
  18. package/dist/plugin/scripts/guardrails.mjs +506 -32
  19. package/dist/plugin/scripts/pr-watch-loop.sh +9 -24
  20. package/dist/plugin/scripts/pr-watch-state.jq +52 -0
  21. package/dist/plugin/skills/_shared/identity-and-inbox.md +39 -0
  22. package/dist/plugin/skills/_shared/sync-branch-with-base.md +29 -0
  23. package/dist/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +3 -2
  24. package/dist/plugin/skills/_shared/vcs/github/unresolved-threads.md +2 -0
  25. package/dist/plugin/skills/_shared/vcs/gitlab/unresolved-discussions.md +3 -1
  26. package/dist/plugin/skills/_shared/vcs/gitlab.md +0 -1
  27. package/dist/plugin/skills/do/address-reviews.md +5 -2
  28. package/dist/plugin/skills/do/build.md +9 -0
  29. package/dist/plugin/skills/do/e2e-acceptance.md +2 -0
  30. package/dist/plugin/skills/do/e2e-repair.md +98 -0
  31. package/dist/plugin/skills/do/open-prs/forward.md +17 -9
  32. package/dist/plugin/skills/do/open-prs/update.md +9 -2
  33. package/dist/plugin/skills/do/per-comment-replies.md +13 -1
  34. package/dist/plugin/skills/do/pre-flight.md +2 -2
  35. package/dist/plugin/skills/do/resolve-conflicts.md +59 -59
  36. package/dist/plugin/skills/muggle-browser-task/SKILL.md +1 -1
  37. package/dist/plugin/skills/muggle-do/SKILL.md +6 -5
  38. package/dist/plugin/skills/muggle-pr-followup/arm-watcher.md +1 -1
  39. package/dist/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +5 -5
  40. package/dist/plugin/skills/muggle-status/SKILL.md +15 -6
  41. package/dist/plugin/skills/muggle-test/SKILL.md +1 -0
  42. package/dist/plugin/skills/muggle-test-feature-local/SKILL.md +5 -3
  43. package/dist/plugin/skills/muggle-test-prepare/steps/rebase-check.md +1 -1
  44. package/dist/release-manifest.json +3 -3
  45. package/dist/src-TFNPZD5X.js +1 -0
  46. package/package.json +17 -8
  47. package/plugin/hooks/README.md +4 -1
  48. package/plugin/hooks/hooks.json +24 -0
  49. package/plugin/scripts/guardrail-capability-claim.sh +38 -0
  50. package/plugin/scripts/guardrail-comment-reply-gate.sh +42 -0
  51. package/plugin/scripts/guardrail-debug-path-gate.sh +1 -1
  52. package/plugin/scripts/guardrail-e2e-gate.sh +1 -1
  53. package/plugin/scripts/guardrail-record-comment-replies.sh +28 -0
  54. package/plugin/scripts/guardrail-resolve-gate.sh +22 -0
  55. package/plugin/scripts/guardrail-stage-gate.sh +1 -1
  56. package/plugin/scripts/guardrail-terminal-gate.sh +1 -1
  57. package/plugin/scripts/guardrail-walkthrough-gate.sh +1 -1
  58. package/plugin/scripts/guardrail-watch-gate.sh +1 -1
  59. package/plugin/scripts/guardrails.mjs +506 -32
  60. package/plugin/scripts/pr-watch-loop.sh +9 -24
  61. package/plugin/scripts/pr-watch-state.jq +52 -0
  62. package/plugin/skills/_shared/identity-and-inbox.md +39 -0
  63. package/plugin/skills/_shared/sync-branch-with-base.md +29 -0
  64. package/plugin/skills/_shared/telemetry-events/muggle-do-escalation.md +3 -2
  65. package/plugin/skills/_shared/vcs/github/unresolved-threads.md +2 -0
  66. package/plugin/skills/_shared/vcs/gitlab/unresolved-discussions.md +3 -1
  67. package/plugin/skills/_shared/vcs/gitlab.md +0 -1
  68. package/plugin/skills/do/address-reviews.md +5 -2
  69. package/plugin/skills/do/build.md +9 -0
  70. package/plugin/skills/do/e2e-acceptance.md +2 -0
  71. package/plugin/skills/do/e2e-repair.md +98 -0
  72. package/plugin/skills/do/open-prs/forward.md +17 -9
  73. package/plugin/skills/do/open-prs/update.md +9 -2
  74. package/plugin/skills/do/per-comment-replies.md +13 -1
  75. package/plugin/skills/do/pre-flight.md +2 -2
  76. package/plugin/skills/do/resolve-conflicts.md +59 -59
  77. package/plugin/skills/muggle-browser-task/SKILL.md +1 -1
  78. package/plugin/skills/muggle-do/SKILL.md +6 -5
  79. package/plugin/skills/muggle-pr-followup/arm-watcher.md +1 -1
  80. package/plugin/skills/muggle-preferences/preference-gates/autoRebase.md +5 -5
  81. package/plugin/skills/muggle-status/SKILL.md +15 -6
  82. package/plugin/skills/muggle-test/SKILL.md +1 -0
  83. package/plugin/skills/muggle-test-feature-local/SKILL.md +5 -3
  84. package/plugin/skills/muggle-test-prepare/steps/rebase-check.md +1 -1
  85. package/scripts/postinstall.mjs +59 -2
  86. package/dist/plugin/skills/_shared/rebase-before-e2e.md +0 -21
  87. package/dist/plugin/skills/_shared/vcs/gitlab/resolve-discussion.md +0 -10
  88. package/dist/src-B5OTAZKM.js +0 -1
  89. package/plugin/skills/_shared/rebase-before-e2e.md +0 -21
  90. package/plugin/skills/_shared/vcs/gitlab/resolve-discussion.md +0 -10
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env bash
2
+ set -uo pipefail
3
+
4
+ # Review-thread resolve gate (PreToolUse, Bash). Denies a `gh api` GraphQL
5
+ # resolveReviewThread and its `glab api` counterpart, so the loop replies to a
6
+ # review thread and leaves closing it to the reviewer.
7
+ #
8
+ # Must stay synchronous — only a sync PreToolUse hook can deny — and it fires
9
+ # before every Bash call, so a keyword pre-filter keeps Node off the hot path.
10
+ # The filter is deliberately looser than the gate: it lets `unresolveReviewThread`
11
+ # and `resolved=false` through to guardrails.mjs, which allows both. Cheaper to
12
+ # pay one cold start on the rare inverse call than to encode the boundary twice
13
+ # and have the two drift. Degrades to {} so it never blocks an unrelated command.
14
+ payload="$(cat)"
15
+
16
+ if ! grep -Eiq 'resolveReviewThread|resolved=(true|false)' <<<"$payload"; then
17
+ printf '{}'
18
+ exit 0
19
+ fi
20
+
21
+ root="${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-}}"
22
+ printf '%s' "$payload" | node "${root}/scripts/guardrails.mjs" resolve-gate 2>/dev/null || printf '{}'
@@ -34,7 +34,7 @@ state_file="$home/.muggle-ai/guardrails/$sid.json"
34
34
  if [ ! -f "$state_file" ] \
35
35
  || ! grep -q '"mandatoryStages"' "$state_file" \
36
36
  || grep -q '"mandatoryStages": \[\]' "$state_file" \
37
- || grep -q '"stageSkipped": true' "$state_file"; then
37
+ || grep -q '"stageReleased": true' "$state_file" \n || grep -q '"stageSkipped": true' "$state_file"; then
38
38
  printf '{}'
39
39
  exit 0
40
40
  fi
@@ -29,7 +29,7 @@ fi
29
29
  state_file="$home/.muggle-ai/guardrails/$sid.json"
30
30
  if [ ! -f "$state_file" ] \
31
31
  || ! grep -q '"terminalPending"' "$state_file" \
32
- || grep -q '"terminalPending": \[\]' "$state_file"; then
32
+ || grep -q '"terminalReleased": true' "$state_file" || grep -q '"terminalPending": \[\]' "$state_file"; then
33
33
  printf '{}'
34
34
  exit 0
35
35
  fi
@@ -32,7 +32,7 @@ state_file="$home/.muggle-ai/guardrails/$sid.json"
32
32
  if [ ! -f "$state_file" ] \
33
33
  || ! grep -q '"e2eRun": true' "$state_file" \
34
34
  || grep -q '"walkthroughPosted": true' "$state_file" \
35
- || grep -q '"walkthroughSkipped": true' "$state_file"; then
35
+ || grep -q '"walkthroughReleased": true' "$state_file" \n || grep -q '"walkthroughSkipped": true' "$state_file"; then
36
36
  printf '{}'
37
37
  exit 0
38
38
  fi
@@ -31,7 +31,7 @@ state_file="$home/.muggle-ai/guardrails/$sid.json"
31
31
  if [ ! -f "$state_file" ] \
32
32
  || ! grep -q '"prsHandled"' "$state_file" \
33
33
  || grep -q '"prsHandled": \[\]' "$state_file" \
34
- || grep -q '"watchSkipped": true' "$state_file"; then
34
+ || grep -q '"watchReleased": true' "$state_file" \n || grep -q '"watchSkipped": true' "$state_file"; then
35
35
  printf '{}'
36
36
  exit 0
37
37
  fi