Documentation
¶
Index ¶
- Constants
- Variables
- func DetectCommands(ctx context.Context, claude *anthropic.Client, workDir string) ([]config.Command, error)
- func List(cfg *config.ProjectConfig, status iostream.StatusFunc) error
- func RunAll(ctx context.Context, workDir string, cfg *config.ProjectConfig, ...) error
- func RunDryRun(cfg *config.ProjectConfig, name string, status iostream.StatusFunc) error
- func RunInline(ctx context.Context, workDir, name, command string, status iostream.StatusFunc, ...) error
- func RunNamed(ctx context.Context, workDir, name string, cfg *config.ProjectConfig, ...) error
- func RunRemote(ctx context.Context, ...) error
- func RunRemoteInline(ctx context.Context, ...) error
- type PackageManager
Constants ¶
const DefaultTimeout = 300
DefaultTimeout is the per-command execution timeout in seconds.
Variables ¶
var ErrNotConfigured = errors.New("no validate commands configured")
ErrNotConfigured indicates no validate commands are configured.
Functions ¶
func DetectCommands ¶ added in v0.7.2
func DetectCommands(ctx context.Context, claude *anthropic.Client, workDir string) ([]config.Command, error)
DetectCommands returns the full set of validate commands for the repo with metadata. For known toolchains it returns richer commands without calling Claude. Claude is only used as a fallback for unknown toolchains, and only when a client is provided.
func List ¶
func List(cfg *config.ProjectConfig, status iostream.StatusFunc) error
List prints all configured command names and their run strings.
func RunAll ¶
func RunAll(ctx context.Context, workDir string, cfg *config.ProjectConfig, status iostream.StatusFunc, streams iostream.Streams) error
RunAll runs all configured commands, stopping at the first failure.
func RunDryRun ¶
func RunDryRun(cfg *config.ProjectConfig, name string, status iostream.StatusFunc) error
RunDryRun prints commands without executing them.
func RunInline ¶
func RunInline(ctx context.Context, workDir, name, command string, status iostream.StatusFunc, streams iostream.Streams) error
RunInline runs an inline command string.
func RunNamed ¶
func RunNamed(ctx context.Context, workDir, name string, cfg *config.ProjectConfig, status iostream.StatusFunc, streams iostream.Streams) error
RunNamed runs a single named command from config.
func RunRemote ¶
func RunRemote(ctx context.Context, exec func(ctx context.Context, script string) (stdout, stderr string, exitCode int, err error), cfg *config.ProjectConfig, dest string, streams iostream.Streams) error
RunRemote runs commands on a remote sandbox via SSH.
func RunRemoteInline ¶ added in v0.7.29
func RunRemoteInline(ctx context.Context, exec func(ctx context.Context, script string) (stdout, stderr string, exitCode int, err error), name, command, dest string, streams iostream.Streams) error
RunRemoteInline runs a single inline command on a remote sandbox via SSH.
Types ¶
type PackageManager ¶ added in v0.7.2
PackageManager holds the name and CI-safe install command for a detected package manager.
func DetectPackageManager ¶ added in v0.7.2
func DetectPackageManager(workDir string) *PackageManager
DetectPackageManager returns the detected package manager and its CI-safe install command, or nil.