Documentation
¶
Index ¶
Constants ¶
const TeardownTimeout = 3 * time.Second
TeardownTimeout is the failsafe duration to wait for a zombie process to die after a Stop/Kill signal before giving up to avoid deep deadlocks. This is especially important for slow environments like WSL/CI.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Tools []ProcessConfig `yaml:"tools" json:"tools"`
}
ConfigFile represents the structure of tools.yaml
type ProcessConfig ¶
type ProcessConfig struct {
Name string `yaml:"name" json:"name"`
Command string `yaml:"command" json:"command"`
Args []string `yaml:"args" json:"args"`
Environment map[string]string `yaml:"env" json:"env"`
Description string `yaml:"description" json:"description"`
}
ProcessConfig represents the configuration for an external tool execution.
type RegisteredProcess ¶
RegisteredProcess defines a allowed command execution.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner implements a ToolRunner that executes local processes. It follows a Strict Registry pattern for security (Allow-Listing).
func NewRunner ¶
func NewRunner(opts ...RunnerOption) *Runner
NewRunner creates a new Process Runner.
type RunnerOption ¶
type RunnerOption func(*Runner)
RunnerOption configures the runner.
func WithBaseDir ¶ added in v0.7.3
func WithBaseDir(dir string) RunnerOption
WithBaseDir sets the working directory for executed processes.
func WithInlineExecution ¶
func WithInlineExecution(allow bool) RunnerOption
WithInlineExecution enables ad-hoc execution (Dangerous).
func WithRegistry ¶
func WithRegistry(tools map[string]ProcessConfig) RunnerOption
WithRegistry populates the allow-list from a loaded config.