Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServer ¶
type APIServer struct {
Name string `yaml:"name"`
Script string `yaml:"script"`
Port int `yaml:"port"`
Env map[string]string `yaml:"env,omitempty"`
}
APIServer describes a host-side REST proxy server.
type Harness ¶
type Harness struct {
Agent string `yaml:"agent"`
Description string `yaml:"description,omitempty"`
Image string `yaml:"image,omitempty"`
Policy string `yaml:"policy,omitempty"`
Skills []string `yaml:"skills,omitempty"`
Providers []string `yaml:"providers,omitempty"`
HostFiles []HostFile `yaml:"host_files,omitempty"`
APIServers []APIServer `yaml:"api_servers,omitempty"`
Model string `yaml:"model,omitempty"`
PreScript string `yaml:"pre_script,omitempty"`
PostScript string `yaml:"post_script,omitempty"`
AgentInput string `yaml:"agent_input,omitempty"`
ValidationLoop *ValidationLoop `yaml:"validation_loop,omitempty"`
RunnerEnv map[string]string `yaml:"runner_env,omitempty"`
TimeoutMinutes int `yaml:"timeout_minutes,omitempty"`
}
Harness is the per-agent configuration that the runner reads to provision a sandbox and launch one agent. It follows the ADR-0017 schema.
func (*Harness) ResolveRelativeTo ¶
ResolveRelativeTo resolves all relative paths in the harness against baseDir. Relative paths that resolve outside baseDir are rejected to prevent directory traversal (e.g. ../../etc/shadow). Absolute paths and ${VAR} paths are allowed.
func (*Harness) ValidateFilesExist ¶
ValidateFilesExist checks that all file paths referenced by the harness exist on disk. Call after ResolveRelativeTo so paths are absolute. Pre/post scripts run on the host and must be file paths (no inline args).
func (*Harness) ValidateRunnerEnv ¶
ValidateRunnerEnv checks that all ${VAR} references in RunnerEnv and HostFiles.Src expand to non-empty values in the host environment.
type HostFile ¶
type HostFile struct {
Src string `yaml:"src"` // host path (may use ${VAR} expansion)
Dest string `yaml:"dest"` // destination path inside the sandbox
Expand bool `yaml:"expand,omitempty"` // expand ${VAR} in file content before copying
}
HostFile describes a file on the host that must be copied into the sandbox during bootstrap. Src may contain ${VAR} references that are expanded from the host environment at bootstrap time. Use this for any file that must exist inside the sandbox (e.g. GCP service account JSON, CA certificates).
When Expand is true, the file content is read and ${VAR} references in the content are expanded from the host environment before copying to the sandbox. Use this for env files that contain variable references which must be resolved on the host (because the sandbox does not have those variables set).
type ProviderDef ¶
type ProviderDef struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Credentials map[string]string `yaml:"credentials"` // KEY: VALUE or KEY: ${HOST_VAR}
Config map[string]string `yaml:"config,omitempty"` // e.g. OPENAI_BASE_URL
}
ProviderDef is a declarative definition of an OpenShell provider. Files in the experiment's providers/ directory are loaded as ProviderDefs and reconciled against the gateway before sandbox creation.
func LoadProviderDefs ¶
func LoadProviderDefs(dir string) ([]ProviderDef, error)
LoadProviderDefs reads all YAML files from a providers/ directory and returns the parsed definitions. Returns nil (no error) if the directory does not exist.
type ValidationLoop ¶
type ValidationLoop struct {
Script string `yaml:"script"`
MaxIterations int `yaml:"max_iterations"`
FeedbackMode string `yaml:"feedback_mode,omitempty"`
}
ValidationLoop configures a deterministic validation step after the agent exits.