Documentation
¶
Overview ¶
Package execution runs external processes through structured argv. It never builds or interprets a shell string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Claude ¶ added in v1.37.0
type Claude struct {
// Path is the claude executable; empty looks it up on PATH.
Path string
// Grace is how long a stopped turn has to end by itself before it is killed; zero means five seconds.
Grace time.Duration
}
Claude runs turns of the claude command in its non-interactive mode (`claude -p` with stream-json output). It is the same claude as in the terminal: it loads the project's instructions, settings and hooks, so what governs the agent there governs it here.
One thing is not the same, and it is why this adapter checks the hooks twice: with a settings file that is not valid, `claude -p` runs with NO hooks and says nothing (seen with 2.1.333). So a turn is refused before it starts when the project's settings do not parse or declare no hooks, and it is stopped when the session opens without having run the project's SessionStart hook.
It never passes --bare (which skips hooks) nor any flag that bypasses permissions.
type Runner ¶
type Runner struct {
// Log receives one debug line per process; nil means no logging.
Log ports.Logger
}
Runner is the process adapter.
func (Runner) LookPath ¶
LookPath resolves an executable name on PATH. bash is resolved with the platform rules of lookBash (Git Bash on Windows, never the WSL launcher).