Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- **`gl-mrs` — MR triage board.** Lists MRs (default `author=@me`), sorted failing-first then stalest, each enriched in parallel with everything you'd otherwise round-trip for: pipeline status (a failure shows the failed **job name** — `phpstan2`, `test_unit_dpt` — i.e. the failure class, pre-empting a `gl-job` call), approval state, age, diff size, watch-state cross-reference (which MRs already have a live `watch` poller), and `conflict`/`draft`/`threads` flags. Footer points at the first failing-and-unwatched MR. Filters: `author`/`reviewer`/`assignee`/`label`/`milestone`/`state`/`per`. Flags: `nopipe`, `iids` (bare id list), `failed` (only failing). Tunable via `enrich_workers`/`enrich_cap`/`per_page`. "Mine" is just the default filter, not a special op — enumeration is a platform concern, kept out of the generic `watch` preset. See [docs/presets/gitlab.md](docs/presets/gitlab.md).
- **`gh-prs` — PR triage board (the `gl-mrs` twin).** Lists GitHub PRs (default `author=@me`), sorted failing-first then stalest. Per PR: check rollup (a failure shows the failing **check name** — the failure class, pre-empting a `gh-job` call), approval state (`reviewDecision`), age, diff size, watch-state cross-reference, and `draft`/`conflict`/`threads` flags. Footer points at the first failing-and-unwatched PR. Unlike GitLab, `gh pr list --json` returns checks + approval in **one** call, so the core board costs a single request; only unresolved review-thread counts enrich in a second parallel wave (skip with `nopipe`). Filters: `author`/`reviewer`/`assignee`/`label`/`state`/`per`. Flags: `nopipe`, `iids` (bare number list), `failed`. Closes [#274](https://github.com/Digital-Process-Tools/claude-supertool/issues/274). See [docs/presets/github.md](docs/presets/github.md).
- **`presets/watch/watch-mine.sh` — watch-a-whole-query supervisor.** Glue between a "list mine" op (`gl-mrs`/`gh-prs`) and the `watch` preset: runs the feed op, extracts ids, spawns one watcher each. Idempotent, so it's safe on `/loop`. `gl-mrs:failed,iids | watch` turns "ping me when any of my MRs goes red" into one looped command. See [docs/presets/watch.md](docs/presets/watch.md).
- **`watch` preset — background event pollers with async wake into Claude Code.** New ops `watch:SOURCE:ID[:only=...]`, `unwatch:SOURCE:ID`, `watches`. Each invocation forks a detached poller that emits state-change events to a UDS socket, a status file, and macOS Notification Center. Source-plugin contract makes new sources ~50 lines. Bundled sources: `github-pr` (PR state, checks, reviews, comments, merge/close, conflicts) and `gitlab-mr` (MR state, pipeline, merge/close, conflicts). Closes [#165](https://github.com/Digital-Process-Tools/claude-supertool/issues/165). See [docs/presets/watch.md](docs/presets/watch.md).
- **`notifiers/claude-channel/` — MCP channel server for async wake.** TypeScript / Bun server that binds the watch UDS socket and pushes events into a running Claude Code session via the Channels feature (research preview, requires Claude Code v2.1.80+). Events arrive as `<channel source="claude-channel" watcher_source="<source>" id="<id>" event="<event>" ...>` tags. UDS file mode 0600 + localhost-only auth model. Launch with `claude --dangerously-load-development-channels server:claude-channel`. See [notifiers/claude-channel/README.md](notifiers/claude-channel/README.md).
Expand Down
1 change: 1 addition & 0 deletions docs/presets/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GitHub ops via the `gh` CLI. Replaces the 4-6 separate `gh` calls needed to revi
|----|--------|-----------------|
| `gh-issue` | `gh-issue:NUMBER[:full]` | Issue metadata, description, all comments (truncated by default), linked PRs, image download. `:full` disables truncation |
| `gh-pr` | `gh-pr:NUMBER_OR_BRANCH[:status]` | Full PR dashboard: branch, checks, reviews/approval state, linked issue, diff stat, comments. `:status` returns slim merge-state only (~250 bytes) |
| `gh-prs` | `gh-prs[:author=@me,reviewer=@me,state=open,failed,nopipe,iids]` | PR triage board: your open PRs sorted failing-first then stalest. Per PR: check rollup (a failure shows the failing **check name**), approval state, age, diff size, watch-state, `draft`/`conflict`/`threads` flags + footer pointing at the first failing-and-unwatched PR. The gl-mrs twin. `iids` emits a bare number list for `watch-mine.sh` |
| `gh-run` | `gh-run:NUMBER` | Workflow run job list with statuses and failed step names |
| `gh-job` | `gh-job:NUMBER[:raw[:START[:END]]]` | Job failure detail: PR context + error pattern search + log tail. `:raw` dumps the full trace; `:raw:START:END` slices lines (1-indexed, inclusive) |
| `gh-follow` | `gh-follow:USERNAME` | Follow a GitHub user via the authenticated session |
Expand Down
4 changes: 2 additions & 2 deletions docs/presets/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ bash presets/watch/watch-mine.sh
# re-sync every 5 min from inside Claude Code
/loop 5m bash presets/watch/watch-mine.sh

# any feed op + source — e.g. my failing GitHub PRs (once a gh-prs op exists)
# any feed op + source — e.g. my failing GitHub PRs
bash presets/watch/watch-mine.sh 'gh-prs:author=@me,failed,iids' github-pr
```

Args: `$1` feed op (default `gl-mrs:author=@me,failed,iids`), `$2` watch source (default `gitlab-mr`), `$3` notify events (default `pipeline_failed,merged`). The separation is deliberate — the list op owns *what's mine* (a platform concern), the watch preset stays generic. The feed op just has to emit bare ids (the `iids` flow); only `gl-mrs` ships today, a `gh-prs` twin is the obvious next one.
Args: `$1` feed op (default `gl-mrs:author=@me,failed,iids`), `$2` watch source (default `gitlab-mr`), `$3` notify events (default `pipeline_failed,merged`). The separation is deliberate — the list op owns *what's mine* (a platform concern), the watch preset stays generic. The feed op just has to emit bare ids (the `iids` flow); both `gl-mrs` (GitLab) and `gh-prs` (GitHub) ship today.

## Bundled sources

Expand Down
11 changes: 10 additions & 1 deletion presets/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@
"gh-pr": {
"cmd": "{python} {path}github/pr.py {args}",
"timeout": 20,
"description": "Review a pull request: branch, checks, reviews/approval, linked issue, diff stat, comments the full dashboard. :status = slim merge-state only (~250B, fits hook cache).",
"description": "Review a pull request: branch, checks, reviews/approval, linked issue, diff stat, comments \u2014 the full dashboard. :status = slim merge-state only (~250B, fits hook cache).",
"syntax": "gh-pr:NUMBER_OR_BRANCH[:status]"
},
"gh-prs": {
"cmd": "{python} {path}github/prs.py {args}",
"timeout": 60,
"description": "PR triage board: list PRs (default author=@me), sorted failing-first. Per PR: check rollup (failed\u2192check name), approval (reviewDecision), age, diff size, watch-state, draft/conflict/threads flags + actionable footer. Filters (comma-sep): author/reviewer/assignee/label/state. Flags: nopipe (skip review-thread enrichment), iids, failed. The core board is one gh call; review threads enrich in parallel.",
"syntax": "gh-prs[:author=@me,reviewer=@me,state=open,failed,nopipe,iids]",
"enrich_workers": 8,
"enrich_cap": 40,
"per_page": 50
},
"gh-run": {
"cmd": "{python} {path}github/run.py {arg}",
"timeout": 15,
Expand Down
Loading
Loading