pr-shepherd 0.60.0 → 1.0.0
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/plugin.json +1 -1
- package/README.md +7 -5
- package/bin/api.d.mts +35 -24
- package/bin/api.mjs +68 -48
- package/bin/checks/classify.d.mts +1 -1
- package/bin/checks/classify.mjs +4 -4
- package/bin/checks/log-excerpt.mjs +1 -1
- package/bin/classify/standard/codecov-report.d.mts +1 -1
- package/bin/classify/standard/codecov-report.mjs +7 -2
- package/bin/classify/standard/coderabbit-notices.d.mts +4 -3
- package/bin/classify/standard/coderabbit-notices.mjs +29 -47
- package/bin/classify/standard/codex-notices.mjs +34 -7
- package/bin/classify/standard/dependabot-notices.mjs +5 -1
- package/bin/classify/standard/gemini-notices.d.mts +1 -1
- package/bin/classify/standard/gemini-notices.mjs +16 -5
- package/bin/classify/standard/kilo-no-issues.d.mts +1 -1
- package/bin/classify/standard/kilo-no-issues.mjs +37 -10
- package/bin/classify/standard/sourcery-notices.mjs +1 -1
- package/bin/cli/arg-flags.mjs +0 -3
- package/bin/cli/clean-handler.d.mts +1 -1
- package/bin/cli/clean-handler.mjs +5 -15
- package/bin/cli/default-poll.d.mts +2 -0
- package/bin/cli/default-poll.mjs +9 -6
- package/bin/cli/formatters.d.mts +2 -3
- package/bin/cli/formatters.mjs +0 -26
- package/bin/cli/handlers.d.mts +3 -3
- package/bin/cli/handlers.mjs +45 -35
- package/bin/cli/help-command-pages.d.mts +13 -158
- package/bin/cli/help-command-pages.mjs +12 -157
- package/bin/cli/help-iterate-poll-pages.d.mts +4 -3
- package/bin/cli/help-iterate-poll-pages.mjs +76 -36
- package/bin/cli/help-log-file-page.d.mts +1 -1
- package/bin/cli/help-log-file-page.mjs +3 -5
- package/bin/cli/help-top-page.d.mts +1 -1
- package/bin/cli/help-top-page.mjs +19 -20
- package/bin/cli/help.d.mts +14 -159
- package/bin/cli/iterate-checks-formatter.mjs +1 -1
- package/bin/cli/iterate-flags.d.mts +2 -4
- package/bin/cli/iterate-flags.mjs +4 -20
- package/bin/cli/iterate-formatter.d.mts +1 -1
- package/bin/cli/iterate-formatter.mjs +6 -6
- package/bin/cli/iterate-instructions.d.mts +1 -1
- package/bin/cli/iterate-instructions.mjs +5 -6
- package/bin/cli/iterate-lean.mjs +32 -40
- package/bin/cli/iterate-verbose.mjs +1 -1
- package/bin/cli/journal-formatter.mjs +0 -3
- package/bin/cli/journal-handler.d.mts +1 -1
- package/bin/cli/journal-handler.mjs +2 -1
- package/bin/cli/mutate-formatter.mjs +0 -9
- package/bin/cli/next-check-format.d.mts +0 -4
- package/bin/cli/next-check-format.mjs +0 -4
- package/bin/cli/poll-handler.d.mts +3 -0
- package/bin/cli/poll-handler.mjs +88 -47
- package/bin/cli/poll-summary-emitter.mjs +2 -2
- package/bin/cli/poll-summary-formatter.mjs +2 -2
- package/bin/cli/poll-targets.d.mts +2 -2
- package/bin/cli/poll-targets.mjs +15 -35
- package/bin/cli/removed-flags.d.mts +3 -0
- package/bin/cli/removed-flags.mjs +24 -0
- package/bin/cli/runner.d.mts +1 -1
- package/bin/cli/runner.mjs +2 -2
- package/bin/cli/stack-overview.d.mts +0 -1
- package/bin/cli/stack-overview.mjs +1 -2
- package/bin/cli/{fix-formatter-extra.d.mts → triage-formatter-extra.d.mts} +1 -2
- package/bin/cli/{fix-formatter-extra.mjs → triage-formatter-extra.mjs} +0 -6
- package/bin/cli/triage-formatter.d.mts +4 -0
- package/bin/cli/{fix-formatter.mjs → triage-formatter.mjs} +31 -42
- package/bin/cli/unknown-flags.d.mts +6 -0
- package/bin/cli/unknown-flags.mjs +29 -0
- package/bin/cli-parser.mjs +41 -62
- package/bin/commands/check-annotations.d.mts +1 -1
- package/bin/commands/check-annotations.mjs +1 -1
- package/bin/commands/check-review-budget.d.mts +1 -1
- package/bin/commands/check-review-budget.mjs +1 -1
- package/bin/commands/check-wait-detectors.d.mts +1 -1
- package/bin/commands/check-wait-detectors.mjs +1 -1
- package/bin/commands/check.d.mts +1 -1
- package/bin/commands/check.mjs +7 -7
- package/bin/commands/commit-suggestion-instruction.d.mts +2 -2
- package/bin/commands/commit-suggestion-instruction.mjs +3 -3
- package/bin/commands/iterate/api-usage.mjs +8 -8
- package/bin/commands/iterate/check-instructions.d.mts +4 -4
- package/bin/commands/iterate/check-instructions.mjs +8 -8
- package/bin/commands/iterate/classify.mjs +2 -2
- package/bin/commands/iterate/escalate.mjs +6 -6
- package/bin/commands/iterate/index.mjs +20 -23
- package/bin/commands/iterate/merge-plan.mjs +3 -3
- package/bin/commands/iterate/merge-state.mjs +4 -7
- package/bin/commands/iterate/native-stack-rebase.mjs +1 -1
- package/bin/commands/iterate/render.d.mts +1 -1
- package/bin/commands/iterate/render.mjs +2 -2
- package/bin/commands/iterate/stall.mjs +11 -9
- package/bin/commands/iterate/{fix-loop-instruction.mjs → triage-loop-instruction.mjs} +7 -3
- package/bin/commands/iterate/{fix-code.d.mts → triage.d.mts} +2 -2
- package/bin/commands/iterate/{fix-code.mjs → triage.mjs} +14 -23
- package/bin/commands/iterate/unreported-required.mjs +2 -5
- package/bin/commands/journal/index.d.mts +1 -3
- package/bin/commands/journal/index.mjs +1 -1
- package/bin/commands/mark-files-as-viewed.d.mts +1 -3
- package/bin/commands/mark-files-as-viewed.mjs +1 -1
- package/bin/commands/next-check.d.mts +2 -2
- package/bin/commands/next-check.mjs +4 -2
- package/bin/commands/poll-progress.mjs +1 -1
- package/bin/commands/poll-summary-explicit-instructions.mjs +1 -1
- package/bin/commands/poll-summary-instructions.mjs +7 -7
- package/bin/commands/poll-summary.mjs +4 -4
- package/bin/commands/poll.d.mts +1 -1
- package/bin/commands/poll.mjs +4 -4
- package/bin/commands/resolve-mutate.d.mts +1 -1
- package/bin/commands/resolve-mutate.mjs +1 -1
- package/bin/commands/rest-stack-merge-readiness.mjs +1 -1
- package/bin/commands/single-tick.d.mts +5 -0
- package/bin/commands/single-tick.mjs +7 -0
- package/bin/commands/stack-drain.mjs +1 -1
- package/bin/commands/stack-merge-flag.mjs +1 -1
- package/bin/commands/stack-stall.d.mts +2 -2
- package/bin/commands/stack-stall.mjs +2 -2
- package/bin/commands/stack-work.d.mts +2 -2
- package/bin/commands/stack-work.mjs +2 -2
- package/bin/commands/suggestion-patch-item.d.mts +0 -1
- package/bin/commands/suggestion-patch-item.mjs +0 -12
- package/bin/commands/suggestion-patches.d.mts +2 -2
- package/bin/commands/suggestion-patches.mjs +1 -1
- package/bin/commands/tick-instructions.d.mts +9 -0
- package/bin/commands/tick-instructions.mjs +23 -0
- package/bin/commands/tick.d.mts +15 -0
- package/bin/commands/{event-mode.mjs → tick.mjs} +39 -55
- package/bin/comments/minimize-policy.mjs +1 -3
- package/bin/comments/resolve.d.mts +0 -23
- package/bin/comments/resolve.mjs +0 -4
- package/bin/comments/review-output-budget.d.mts +1 -1
- package/bin/comments/review-output-budget.mjs +1 -1
- package/bin/comments/sha-poll.mjs +3 -1
- package/bin/config/default-bot-usernames.d.mts +2 -0
- package/bin/config/default-bot-usernames.mjs +15 -0
- package/bin/config/load.d.mts +4 -138
- package/bin/config/load.mjs +88 -443
- package/bin/config/merge-command-args.mjs +2 -2
- package/bin/config/merge-method.d.mts +1 -2
- package/bin/config/merge-method.mjs +1 -8
- package/bin/config/renames.d.mts +8 -0
- package/bin/config/renames.mjs +87 -0
- package/bin/config/resolve.d.mts +31 -0
- package/bin/config/resolve.mjs +89 -0
- package/bin/config/schema.d.mts +161 -0
- package/bin/config/schema.mjs +168 -0
- package/bin/exit-codes.d.mts +1 -1
- package/bin/exit-codes.mjs +3 -3
- package/bin/github/poll-summary-check-blockers.mjs +1 -1
- package/bin/github/poll-summary-command.mjs +8 -6
- package/bin/github/poll-summary-projector.mjs +2 -2
- package/bin/github/poll-summary-review.mjs +1 -1
- package/bin/github/poll-summary-route.mjs +9 -9
- package/bin/github/poll-summary-unreported.mjs +1 -1
- package/bin/github/poll-summary.mjs +1 -1
- package/bin/github/queries.d.mts +1 -1
- package/bin/github/queries.mjs +1 -1
- package/bin/mcp/server.mjs +48 -54
- package/bin/merge-status/derive.mjs +1 -1
- package/bin/state/durable-state.d.mts +1 -3
- package/bin/state/durable-state.mjs +2 -8
- package/bin/state/fix-attempts.d.mts +2 -2
- package/bin/state/fix-attempts.mjs +1 -1
- package/bin/state/merge-request.mjs +1 -1
- package/bin/state/pr-fingerprint.mjs +4 -11
- package/bin/state/seen-comments.d.mts +4 -5
- package/bin/state/seen-comments.mjs +8 -14
- package/bin/state/stack-stall.d.mts +1 -1
- package/bin/state/stack-stall.mjs +1 -1
- package/bin/state/stall-state-store.d.mts +1 -1
- package/bin/state/stall-state-store.mjs +1 -1
- package/bin/types/escalate.d.mts +2 -2
- package/bin/types/iterate.d.mts +12 -26
- package/bin/types/merge-queue.d.mts +2 -2
- package/bin/types/next-check.d.mts +1 -1
- package/bin/types/poll-summary.d.mts +3 -6
- package/bin/types/report.d.mts +2 -2
- package/bin/types/suggestion-patch.d.mts +1 -8
- package/package.json +2 -1
- package/plugins/pr-shepherd/.claude-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex.mcp.json +1 -1
- package/plugins/pr-shepherd/.mcp.json +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/SKILL.md +6 -6
- package/plugins/pr-shepherd/skills/pr-shepherd/references/ci-failure-triage.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/{cloud-event-loop.md → event-loop.md} +5 -5
- package/plugins/pr-shepherd/skills/pr-shepherd/references/mcp-fallback.md +3 -3
- package/plugins/pr-shepherd/skills/pr-shepherd/references/merge-queue-ejection.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/suggestion-patches.md +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/references/{fix-code-loop.md → triage-loop.md} +3 -3
- package/plugins/pr-shepherd/skills/reduce-pr-noise/SKILL.md +1 -1
- package/plugins/pr-shepherd/skills/reduce-pr-noise/references/classifiers.md +2 -2
- package/plugins/pr-shepherd/skills/reduce-pr-noise/references/settings.md +11 -11
- package/pr-shepherd.schema.json +361 -0
- package/bin/cli/event-state-scope.d.mts +0 -19
- package/bin/cli/event-state-scope.mjs +0 -60
- package/bin/cli/fix-formatter.d.mts +0 -4
- package/bin/commands/commit-suggestion.d.mts +0 -8
- package/bin/commands/commit-suggestion.mjs +0 -26
- package/bin/commands/event-instructions.d.mts +0 -11
- package/bin/commands/event-instructions.mjs +0 -27
- package/bin/commands/event-mode.d.mts +0 -14
- package/bin/commands/poll-mode.d.mts +0 -8
- package/bin/commands/poll-mode.mjs +0 -14
- package/bin/config.json +0 -68
- package/bin/types/protected-run.d.mts +0 -6
- package/bin/types/protected-run.mjs +0 -1
- /package/bin/commands/iterate/{fix-loop-instruction.d.mts → triage-loop-instruction.d.mts} +0 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"version": {
|
|
6
|
+
"type": "number",
|
|
7
|
+
"const": 1
|
|
8
|
+
},
|
|
9
|
+
"github": {
|
|
10
|
+
"default": {},
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"transport": {
|
|
14
|
+
"default": "auto",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"auto",
|
|
18
|
+
"graphql",
|
|
19
|
+
"rest"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
},
|
|
25
|
+
"cli-command": {
|
|
26
|
+
"default": [
|
|
27
|
+
"pr-shepherd"
|
|
28
|
+
],
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "\\S"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"bot-usernames": {
|
|
37
|
+
"default": [
|
|
38
|
+
"chatgpt-connector",
|
|
39
|
+
"openai-codex",
|
|
40
|
+
"codex",
|
|
41
|
+
"claude",
|
|
42
|
+
"copilot-pull-request-reviewer",
|
|
43
|
+
"gemini-code-assist",
|
|
44
|
+
"coderabbitai",
|
|
45
|
+
"greptile-apps",
|
|
46
|
+
"qodo-merge-pro",
|
|
47
|
+
"deepsource-io",
|
|
48
|
+
"sonarqubecloud",
|
|
49
|
+
"what-the-diff"
|
|
50
|
+
],
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"checks": {
|
|
57
|
+
"default": {},
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"ignore": {
|
|
61
|
+
"default": [],
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"never-ignore": {
|
|
68
|
+
"default": [],
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"ci-trigger-events": {
|
|
75
|
+
"default": [
|
|
76
|
+
"pull_request",
|
|
77
|
+
"pull_request_target"
|
|
78
|
+
],
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"ignore-log-lines": {
|
|
85
|
+
"default": [],
|
|
86
|
+
"type": "array",
|
|
87
|
+
"items": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"format": "regex"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"iterate": {
|
|
96
|
+
"default": {},
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"triage-attempts-per-thread": {
|
|
100
|
+
"default": 3,
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"exclusiveMinimum": 0,
|
|
103
|
+
"maximum": 9007199254740991
|
|
104
|
+
},
|
|
105
|
+
"stall-timeout-minutes": {
|
|
106
|
+
"default": 60,
|
|
107
|
+
"type": "number",
|
|
108
|
+
"minimum": 0
|
|
109
|
+
},
|
|
110
|
+
"ready-delay-minutes": {
|
|
111
|
+
"default": 0,
|
|
112
|
+
"type": "number",
|
|
113
|
+
"minimum": 0
|
|
114
|
+
},
|
|
115
|
+
"minimize-approvals": {
|
|
116
|
+
"default": false,
|
|
117
|
+
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"minimize-comments": {
|
|
120
|
+
"default": "bots",
|
|
121
|
+
"type": "string",
|
|
122
|
+
"enum": [
|
|
123
|
+
"all",
|
|
124
|
+
"bots",
|
|
125
|
+
"none"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"behind-base-hint": {
|
|
129
|
+
"default": "",
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"review-output-max-chars": {
|
|
133
|
+
"default": 50000,
|
|
134
|
+
"type": "integer",
|
|
135
|
+
"minimum": 0,
|
|
136
|
+
"maximum": 9007199254740991
|
|
137
|
+
},
|
|
138
|
+
"resolve-other-human-threads": {
|
|
139
|
+
"default": "none",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"enum": [
|
|
142
|
+
"none",
|
|
143
|
+
"outdated",
|
|
144
|
+
"always"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"instructions": {
|
|
148
|
+
"default": "inline",
|
|
149
|
+
"type": "string",
|
|
150
|
+
"enum": [
|
|
151
|
+
"inline",
|
|
152
|
+
"playbook"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"additionalProperties": false
|
|
157
|
+
},
|
|
158
|
+
"poll": {
|
|
159
|
+
"default": {},
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"interval-seconds": {
|
|
163
|
+
"default": 60,
|
|
164
|
+
"type": "number",
|
|
165
|
+
"exclusiveMinimum": 0
|
|
166
|
+
},
|
|
167
|
+
"stack-interval-factor": {
|
|
168
|
+
"default": 2,
|
|
169
|
+
"type": "number",
|
|
170
|
+
"minimum": 1
|
|
171
|
+
},
|
|
172
|
+
"timeout-seconds": {
|
|
173
|
+
"default": 270,
|
|
174
|
+
"type": "number",
|
|
175
|
+
"exclusiveMinimum": 0
|
|
176
|
+
},
|
|
177
|
+
"debounce-seconds": {
|
|
178
|
+
"default": 60,
|
|
179
|
+
"type": "number",
|
|
180
|
+
"minimum": 0
|
|
181
|
+
},
|
|
182
|
+
"quiet-status": {
|
|
183
|
+
"default": false,
|
|
184
|
+
"type": "boolean"
|
|
185
|
+
},
|
|
186
|
+
"reconcile-seconds": {
|
|
187
|
+
"default": 900,
|
|
188
|
+
"type": "number",
|
|
189
|
+
"minimum": 0
|
|
190
|
+
},
|
|
191
|
+
"quota-warnings": {
|
|
192
|
+
"default": [
|
|
193
|
+
{
|
|
194
|
+
"remaining-percent": 30,
|
|
195
|
+
"interval-factor": 2
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"remaining-percent": 20,
|
|
199
|
+
"interval-factor": 5
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"remaining-percent": 10,
|
|
203
|
+
"interval-factor": 10
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"type": "array",
|
|
207
|
+
"items": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"properties": {
|
|
210
|
+
"remaining-percent": {
|
|
211
|
+
"type": "integer",
|
|
212
|
+
"minimum": 1,
|
|
213
|
+
"maximum": 100
|
|
214
|
+
},
|
|
215
|
+
"interval-minutes": {
|
|
216
|
+
"type": "number",
|
|
217
|
+
"exclusiveMinimum": 0
|
|
218
|
+
},
|
|
219
|
+
"interval-factor": {
|
|
220
|
+
"type": "number",
|
|
221
|
+
"minimum": 1
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"required": [
|
|
225
|
+
"remaining-percent"
|
|
226
|
+
],
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"required": [
|
|
231
|
+
"interval-minutes"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"required": [
|
|
236
|
+
"interval-factor"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
},
|
|
245
|
+
"apply": {
|
|
246
|
+
"default": {},
|
|
247
|
+
"type": "object",
|
|
248
|
+
"properties": {
|
|
249
|
+
"sha-poll-interval-seconds": {
|
|
250
|
+
"default": 2,
|
|
251
|
+
"type": "number",
|
|
252
|
+
"exclusiveMinimum": 0
|
|
253
|
+
},
|
|
254
|
+
"sha-poll-max-attempts": {
|
|
255
|
+
"default": 10,
|
|
256
|
+
"type": "integer",
|
|
257
|
+
"exclusiveMinimum": 0,
|
|
258
|
+
"maximum": 9007199254740991
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"additionalProperties": false
|
|
262
|
+
},
|
|
263
|
+
"mark-ready": {
|
|
264
|
+
"default": {},
|
|
265
|
+
"type": "object",
|
|
266
|
+
"properties": {
|
|
267
|
+
"auto": {
|
|
268
|
+
"default": true,
|
|
269
|
+
"type": "boolean"
|
|
270
|
+
},
|
|
271
|
+
"blocking-reviewer-logins": {
|
|
272
|
+
"default": [],
|
|
273
|
+
"type": "array",
|
|
274
|
+
"items": {
|
|
275
|
+
"type": "string"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"additionalProperties": false
|
|
280
|
+
},
|
|
281
|
+
"merge": {
|
|
282
|
+
"default": {},
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"method": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"enum": [
|
|
288
|
+
"merge",
|
|
289
|
+
"squash",
|
|
290
|
+
"rebase"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"command-args": {
|
|
294
|
+
"default": [],
|
|
295
|
+
"type": "array",
|
|
296
|
+
"items": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"not": {
|
|
299
|
+
"pattern": "^(?:--repo(?:=|$)|-R|--auto(?:=|$)|--disable-auto(?:=|$)|--match-head-commit(?:=|$)|--admin(?:=|$)|--body-file(?:=|$)|-F|--help(?:=|$)|-h)"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"additionalProperties": false
|
|
305
|
+
},
|
|
306
|
+
"actions": {
|
|
307
|
+
"default": {},
|
|
308
|
+
"type": "object",
|
|
309
|
+
"properties": {
|
|
310
|
+
"auto-minimize-suppressed": {
|
|
311
|
+
"default": true,
|
|
312
|
+
"type": "boolean"
|
|
313
|
+
},
|
|
314
|
+
"work-while-queued": {
|
|
315
|
+
"default": false,
|
|
316
|
+
"type": "boolean"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"additionalProperties": false
|
|
320
|
+
},
|
|
321
|
+
"classify": {
|
|
322
|
+
"default": {},
|
|
323
|
+
"type": "object",
|
|
324
|
+
"properties": {
|
|
325
|
+
"standard": {
|
|
326
|
+
"default": {},
|
|
327
|
+
"type": "object",
|
|
328
|
+
"propertyNames": {
|
|
329
|
+
"type": "string",
|
|
330
|
+
"enum": [
|
|
331
|
+
"all",
|
|
332
|
+
"coderabbit-notices",
|
|
333
|
+
"codecov-report",
|
|
334
|
+
"codex-notices",
|
|
335
|
+
"dependabot-notices",
|
|
336
|
+
"gemini-notices",
|
|
337
|
+
"kilo-no-issues",
|
|
338
|
+
"sourcery-notices"
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
"additionalProperties": {
|
|
342
|
+
"type": "boolean"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"additionalProperties": false
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"additionalProperties": false,
|
|
350
|
+
"anyOf": [
|
|
351
|
+
{
|
|
352
|
+
"maxProperties": 0
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"required": [
|
|
356
|
+
"version"
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"title": "pr-shepherd configuration"
|
|
361
|
+
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run a dispatched command, entering the durable state scope first when it resolves to event
|
|
3
|
-
* mode. Entering before log setup keeps the per-worktree log a peer of the seen markers and
|
|
4
|
-
* stall state an event session writes. Invalid flags or config fall through unscoped so the
|
|
5
|
-
* command handler reports them.
|
|
6
|
-
*/
|
|
7
|
-
export declare function runInEventStateScope<T>(args: string[], work: () => Promise<T>): Promise<T>;
|
|
8
|
-
/**
|
|
9
|
-
* Report an invalid `--poll-mode` value as a usage error. Commands that only use the flag to
|
|
10
|
-
* pick a state scope (`log-file`, `clean`) call this before `runInPollModeScope`, because no
|
|
11
|
-
* later handler would reject a typo there. Returns true after printing the error.
|
|
12
|
-
*/
|
|
13
|
-
export declare function rejectInvalidPollModeFlag(args: string[], command: string): boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Run `work` in the durable state scope when `--poll-mode` in `args`, or else `poll.mode`,
|
|
16
|
-
* resolves to event mode. `log-file` and `clean` use this to reach the state an event tick
|
|
17
|
-
* writes.
|
|
18
|
-
*/
|
|
19
|
-
export declare function runInPollModeScope<T>(args: string[], work: () => Promise<T>): Promise<T>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { loadConfig } from "../config/load.mjs";
|
|
2
|
-
import { EXIT } from "../exit-codes.mjs";
|
|
3
|
-
import { resolvePollMode } from "../commands/poll-mode.mjs";
|
|
4
|
-
import { runWithDurableState } from "../state/durable-state.mjs";
|
|
5
|
-
import { getFlag } from "./args.mjs";
|
|
6
|
-
import { isDefaultPollInvocation } from "./default-poll.mjs";
|
|
7
|
-
/** Subcommands that honor `--poll-mode`; the default poll invocation honors it too. */
|
|
8
|
-
const POLL_MODE_SUBCOMMANDS = new Set(["iterate", "poll"]);
|
|
9
|
-
const REQUESTABLE = ["auto", "poll", "event"];
|
|
10
|
-
function requestedPollMode(value) {
|
|
11
|
-
return REQUESTABLE.find((mode) => mode === value);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Run a dispatched command, entering the durable state scope first when it resolves to event
|
|
15
|
-
* mode. Entering before log setup keeps the per-worktree log a peer of the seen markers and
|
|
16
|
-
* stall state an event session writes. Invalid flags or config fall through unscoped so the
|
|
17
|
-
* command handler reports them.
|
|
18
|
-
*/
|
|
19
|
-
export function runInEventStateScope(args, work) {
|
|
20
|
-
const subcommand = args[0];
|
|
21
|
-
const honorsPollMode = isDefaultPollInvocation(subcommand) || POLL_MODE_SUBCOMMANDS.has(subcommand ?? "");
|
|
22
|
-
return honorsPollMode ? runInPollModeScope(args, work) : work();
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Report an invalid `--poll-mode` value as a usage error. Commands that only use the flag to
|
|
26
|
-
* pick a state scope (`log-file`, `clean`) call this before `runInPollModeScope`, because no
|
|
27
|
-
* later handler would reject a typo there. Returns true after printing the error.
|
|
28
|
-
*/
|
|
29
|
-
export function rejectInvalidPollModeFlag(args, command) {
|
|
30
|
-
if (!args.some((arg) => arg === "--poll-mode" || arg.startsWith("--poll-mode=")))
|
|
31
|
-
return false;
|
|
32
|
-
const value = getFlag(args, "--poll-mode");
|
|
33
|
-
if (requestedPollMode(value))
|
|
34
|
-
return false;
|
|
35
|
-
process.stderr.write(`pr-shepherd: ${command}: --poll-mode must be one of ${REQUESTABLE.join(", ")}, got ${JSON.stringify(value ?? "")}\n`);
|
|
36
|
-
process.exitCode = EXIT.USAGE;
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Run `work` in the durable state scope when `--poll-mode` in `args`, or else `poll.mode`,
|
|
41
|
-
* resolves to event mode. `log-file` and `clean` use this to reach the state an event tick
|
|
42
|
-
* writes.
|
|
43
|
-
*/
|
|
44
|
-
export function runInPollModeScope(args, work) {
|
|
45
|
-
return resolvesToEvent(args) ? runWithDurableState(work) : work();
|
|
46
|
-
}
|
|
47
|
-
function resolvesToEvent(args) {
|
|
48
|
-
const flag = getFlag(args, "--poll-mode");
|
|
49
|
-
const requested = requestedPollMode(flag);
|
|
50
|
-
// An explicit poll or event request wins without reading config, so a malformed config
|
|
51
|
-
// cannot drop an explicit `--poll-mode event` out of the durable scope.
|
|
52
|
-
if (requested === "event" || requested === "poll")
|
|
53
|
-
return requested === "event";
|
|
54
|
-
try {
|
|
55
|
-
return resolvePollMode(requested, loadConfig().poll.mode) === "event";
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CommitSuggestionResult, GlobalOptions } from "../types.mts";
|
|
2
|
-
export interface CommitSuggestionOptions extends GlobalOptions {
|
|
3
|
-
threadId: string;
|
|
4
|
-
message: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
}
|
|
7
|
-
/** @deprecated Use runSuggestionPatches. */
|
|
8
|
-
export declare function runCommitSuggestion(opts: CommitSuggestionOptions): Promise<CommitSuggestionResult>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { buildSingularInstructions } from "./suggestion-patch-item.mjs";
|
|
2
|
-
import { runSuggestionPatches } from "./suggestion-patches.mjs";
|
|
3
|
-
import { formatPrUrl } from "../pr-reference.mjs";
|
|
4
|
-
/** @deprecated Use runSuggestionPatches. */
|
|
5
|
-
export async function runCommitSuggestion(opts) {
|
|
6
|
-
const result = await runSuggestionPatches({
|
|
7
|
-
prNumber: opts.prNumber,
|
|
8
|
-
targetRepository: opts.targetRepository,
|
|
9
|
-
format: opts.format,
|
|
10
|
-
verbose: opts.verbose,
|
|
11
|
-
suggestions: [
|
|
12
|
-
{
|
|
13
|
-
threadId: opts.threadId,
|
|
14
|
-
message: opts.message,
|
|
15
|
-
...(opts.description !== undefined && { description: opts.description }),
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
});
|
|
19
|
-
const patch = result.patches[0];
|
|
20
|
-
return {
|
|
21
|
-
...patch,
|
|
22
|
-
pr: result.pr,
|
|
23
|
-
repo: result.repo,
|
|
24
|
-
postActionInstructions: buildSingularInstructions(patch, formatPrUrl(result.repo, result.pr)),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { NextCheck } from "../types/next-check.mts";
|
|
2
|
-
/**
|
|
3
|
-
* Steps that replace "iterate immediately" when Shepherd ran in event mode and the PR is
|
|
4
|
-
* waiting: end the turn, keep one wake-up, and let the next tick come from a PR event or the
|
|
5
|
-
* wake-up. Always printed after any state-specific sentence.
|
|
6
|
-
*/
|
|
7
|
-
export declare function eventWaitSteps(next: NextCheck): string[];
|
|
8
|
-
/** Replaces the `[FIX_CODE]` "iterate immediately" line when the tick ran in event mode. */
|
|
9
|
-
export declare function eventFixContinuation(next: NextCheck): string;
|
|
10
|
-
/** One aggregate step: sessions still run first, and only then does the turn end. */
|
|
11
|
-
export declare function eventAggregateStep(next: NextCheck, waiting: boolean): string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { playbookPointer } from "./playbook-pointer.mjs";
|
|
2
|
-
function wakeUpClause(next) {
|
|
3
|
-
const kind = next.reason === "safety-net" ? "safety-net wake-up" : "wake-up";
|
|
4
|
-
return `Keep exactly one ${kind} at \`${next.at}\` (\`${next.reason}\`).`;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Steps that replace "iterate immediately" when Shepherd ran in event mode and the PR is
|
|
8
|
-
* waiting: end the turn, keep one wake-up, and let the next tick come from a PR event or the
|
|
9
|
-
* wake-up. Always printed after any state-specific sentence.
|
|
10
|
-
*/
|
|
11
|
-
export function eventWaitSteps(next) {
|
|
12
|
-
return [
|
|
13
|
-
`Event mode: end this turn now without sleeping or polling. ${playbookPointer("Cloud event loop")}`,
|
|
14
|
-
`${wakeUpClause(next)} When a PR event or that wake-up arrives, rerun this command with the same options and act only on Shepherd's output, never on the event payload.`,
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
/** Replaces the `[FIX_CODE]` "iterate immediately" line when the tick ran in event mode. */
|
|
18
|
-
export function eventFixContinuation(next) {
|
|
19
|
-
return `\`[FIX_CODE]\` is non-terminal. After the steps above, rerun this command once with the same options, then end the turn without sleeping. ${wakeUpClause(next)} ${playbookPointer("Cloud event loop")}`;
|
|
20
|
-
}
|
|
21
|
-
/** One aggregate step: sessions still run first, and only then does the turn end. */
|
|
22
|
-
export function eventAggregateStep(next, waiting) {
|
|
23
|
-
const lead = waiting
|
|
24
|
-
? "Event mode: end this turn now without sleeping or polling."
|
|
25
|
-
: "Event mode: once the steps above are done and the rerun still waits, end the turn without sleeping.";
|
|
26
|
-
return `${lead} ${wakeUpClause(next)} When a PR event or that wake-up arrives, rerun this selector with the same options and act only on Shepherd's output, never on the event payload. ${playbookPointer("Cloud event loop")}`;
|
|
27
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { IterateCommandOptions, IterateResult, PollSummaryCommandOptions, PollSummaryResult } from "../types.mts";
|
|
2
|
-
import { type PollCommandOptions } from "./poll.mts";
|
|
3
|
-
import { type AggregatePollCommandOptions } from "./poll-summary.mts";
|
|
4
|
-
/**
|
|
5
|
-
* One iterate tick. In event mode the tick runs exactly once with no settle window and no
|
|
6
|
-
* sleeping, persists seen markers immediately, and reports when to come back.
|
|
7
|
-
*/
|
|
8
|
-
export declare function runIterateForMode(opts: IterateCommandOptions): Promise<IterateResult>;
|
|
9
|
-
/** One aggregate tick; event mode adds `pollMode` and `nextCheck`. */
|
|
10
|
-
export declare function runPollSummaryForMode(opts: PollSummaryCommandOptions): Promise<PollSummaryResult>;
|
|
11
|
-
/** The default poll command: the sleeping loop in poll mode, one tick in event mode. */
|
|
12
|
-
export declare function runPollForMode(opts: PollCommandOptions): Promise<IterateResult>;
|
|
13
|
-
/** The aggregate poll command: the sleeping loop in poll mode, one tick in event mode. */
|
|
14
|
-
export declare function runAggregatePollForMode(opts: AggregatePollCommandOptions): Promise<PollSummaryResult>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PollMode } from "../config/load.mts";
|
|
2
|
-
/** The mode a command actually runs in. `auto` has been resolved away. */
|
|
3
|
-
export type ResolvedPollMode = "poll" | "event";
|
|
4
|
-
/**
|
|
5
|
-
* Resolve `--poll-mode` / the `pollMode` option / `poll.mode`. An explicit request wins over
|
|
6
|
-
* config; `auto` becomes `event` only inside a cloud session. A missing value counts as `auto`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolvePollMode(requested: PollMode | undefined, configured: PollMode | undefined): ResolvedPollMode;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** True when the process runs in a Claude Code cloud (remote) session. */
|
|
2
|
-
function isCloudSession() {
|
|
3
|
-
return process.env["CLAUDE_CODE_REMOTE"] === "true";
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Resolve `--poll-mode` / the `pollMode` option / `poll.mode`. An explicit request wins over
|
|
7
|
-
* config; `auto` becomes `event` only inside a cloud session. A missing value counts as `auto`.
|
|
8
|
-
*/
|
|
9
|
-
export function resolvePollMode(requested, configured) {
|
|
10
|
-
const mode = requested ?? configured ?? "auto";
|
|
11
|
-
if (mode === "auto")
|
|
12
|
-
return isCloudSession() ? "event" : "poll";
|
|
13
|
-
return mode;
|
|
14
|
-
}
|
package/bin/config.json
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"github": { "transport": "auto" },
|
|
3
|
-
"cliCommand": ["pr-shepherd"],
|
|
4
|
-
"botUsernames": [
|
|
5
|
-
"chatgpt-connector",
|
|
6
|
-
"openai-codex",
|
|
7
|
-
"codex",
|
|
8
|
-
"claude",
|
|
9
|
-
"copilot-pull-request-reviewer",
|
|
10
|
-
"gemini-code-assist",
|
|
11
|
-
"coderabbitai",
|
|
12
|
-
"greptile-apps",
|
|
13
|
-
"qodo-merge-pro",
|
|
14
|
-
"deepsource-io",
|
|
15
|
-
"sonarqubecloud",
|
|
16
|
-
"what-the-diff"
|
|
17
|
-
],
|
|
18
|
-
"ignoreChecks": [],
|
|
19
|
-
"iterate": {
|
|
20
|
-
"fixAttemptsPerThread": 3,
|
|
21
|
-
"stallTimeoutMinutes": 60,
|
|
22
|
-
"minimizeApprovals": false,
|
|
23
|
-
"minimizeComments": "all",
|
|
24
|
-
"behindBaseHint": "",
|
|
25
|
-
"resolveOtherHumanThreads": "none",
|
|
26
|
-
"instructions": "inline",
|
|
27
|
-
"reviewOutputMaxChars": 50000
|
|
28
|
-
},
|
|
29
|
-
"poll": {
|
|
30
|
-
"intervalSeconds": 60,
|
|
31
|
-
"stackIntervalFactor": 2,
|
|
32
|
-
"timeoutSeconds": 270,
|
|
33
|
-
"debounceSeconds": 60,
|
|
34
|
-
"quietStatus": false,
|
|
35
|
-
"mode": "auto",
|
|
36
|
-
"reconcileSeconds": 900
|
|
37
|
-
},
|
|
38
|
-
"watch": {
|
|
39
|
-
"readyDelayMinutes": 10,
|
|
40
|
-
"graphqlQuotaWarnings": [
|
|
41
|
-
{ "remainingPercent": 30, "pollIntervalFactor": 2 },
|
|
42
|
-
{ "remainingPercent": 20, "pollIntervalFactor": 5 },
|
|
43
|
-
{ "remainingPercent": 10, "pollIntervalFactor": 10 }
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"resolve": {
|
|
47
|
-
"shaPoll": {
|
|
48
|
-
"intervalMs": 2000,
|
|
49
|
-
"maxAttempts": 10
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"checks": {
|
|
53
|
-
"ciTriggerEvents": ["pull_request", "pull_request_target"],
|
|
54
|
-
"ignoreLogLines": []
|
|
55
|
-
},
|
|
56
|
-
"mergeStatus": {
|
|
57
|
-
"blockingReviewerLogins": ["copilot"]
|
|
58
|
-
},
|
|
59
|
-
"merge": {
|
|
60
|
-
"commandArgs": []
|
|
61
|
-
},
|
|
62
|
-
"actions": {
|
|
63
|
-
"autoMinimizeSuppressed": true,
|
|
64
|
-
"autoMarkReady": true,
|
|
65
|
-
"neverCancelRuns": [],
|
|
66
|
-
"workWhileQueued": false
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|