Commit 6e46e9d
igor
agent-helpers: expose upstream-pr-prep as a safe-agent-action subcommand
Problem: invoking agent-helpers/upstream-pr-prep.sh directly does not
match the PreToolUse auto-approval hook's regex (which matches only
'safe-agent-action.sh'), so every call prompted the operator for
permission.
Fix: add an 'upstream-pr-prep' case to the wrapper that execs the
helper script with all args passed through. The agent-facing invocation
is now:
agent-helpers/safe-agent-action.sh upstream-pr-prep --commit X ...
which the auto-approval hook matches on 'safe-agent-action.sh' in the
command string. The wrapper's exec replaces the shell process with the
helper script, so all internal git/make subprocesses run inside the
single Bash tool call — no further prompts.
The helper script at agent-helpers/upstream-pr-prep.sh is unchanged
and still directly executable (operators debugging it will see a
one-time prompt per invocation, which is acceptable for debugging).
Also updates the wrapper's 'help' text and agents.md to document the
new subcommand as the canonical invocation path.1 parent 4302628 commit 6e46e9d
2 files changed
Lines changed: 38 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
339 | 358 | | |
340 | 359 | | |
341 | 360 | | |
| |||
557 | 576 | | |
558 | 577 | | |
559 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
560 | 588 | | |
561 | 589 | | |
562 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | | - | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| |||
0 commit comments