Problem
Several planned features need to run user-configured shell scripts and
capture their output — AI message generation, integration conflict
resolution, and restack conflict resolution all want the same
"run a recipe, read what it produced" primitive. Without a shared
utility each would reimplement script execution, output capture, and
exit-code handling slightly differently.
Proposal
Add a small, single-responsibility scriptrun package for executing
user-configured scripts and capturing their output.
- Scripts may be plain shell snippets (run via
sh -c) or
self-contained executables starting with a shebang (written to a temp
file and executed directly).
- stdout and stderr are captured independently and returned with the
exit code.
- The package does not interpret output — that is the caller's job —
keeping it reusable across different output protocols (commit
messages, conflict resolutions, etc.).
- A non-zero exit is reported in the result rather than as an error, so
callers can distinguish "script ran and disagreed" from "script could
not be run at all."
This is foundational infrastructure for the AI message generation and
integration/restack resolver features.
Tracked by
Problem
Several planned features need to run user-configured shell scripts and
capture their output — AI message generation, integration conflict
resolution, and restack conflict resolution all want the same
"run a recipe, read what it produced" primitive. Without a shared
utility each would reimplement script execution, output capture, and
exit-code handling slightly differently.
Proposal
Add a small, single-responsibility
scriptrunpackage for executinguser-configured scripts and capturing their output.
sh -c) orself-contained executables starting with a shebang (written to a temp
file and executed directly).
exit code.
keeping it reusable across different output protocols (commit
messages, conflict resolutions, etc.).
callers can distinguish "script ran and disagreed" from "script could
not be run at all."
This is foundational infrastructure for the AI message generation and
integration/restack resolver features.
Tracked by
scriptrunscript-runner utility