ui

package
v1.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(config Config, staticHandler http.Handler) (http.Handler, error)

func NewStaticHandler

func NewStaticHandler() (http.Handler, error)

Types

type ArtifactState

type ArtifactState struct {
	Key        string `json:"key"`
	Path       string `json:"path"`
	Exists     bool   `json:"exists"`
	ModifiedAt string `json:"modified_at,omitempty"`
}

type Config

type Config struct {
	ExecutablePath string
	WorkDir        string
	CommandTimeout time.Duration
	Runner         Runner
}

type ExecRequest

type ExecRequest struct {
	Command string            `json:"command"`
	Args    map[string]string `json:"args,omitempty"`
}

type ExecResponse

type ExecResponse struct {
	OK         bool           `json:"ok"`
	Command    string         `json:"command"`
	Argv       []string       `json:"argv,omitempty"`
	ExitCode   int            `json:"exit_code"`
	DurationMS int64          `json:"duration_ms,omitempty"`
	Stdout     string         `json:"stdout,omitempty"`
	Stderr     string         `json:"stderr,omitempty"`
	JSON       map[string]any `json:"json,omitempty"`
	Error      string         `json:"error,omitempty"`
}

type HealthResponse

type HealthResponse struct {
	OK      bool   `json:"ok"`
	Service string `json:"service"`
}

type Runner

type Runner func(ctx context.Context, workDir string, argv []string) (runResult, error)

type StateResponse

type StateResponse struct {
	OK               bool            `json:"ok"`
	Workspace        string          `json:"workspace"`
	RunpackPath      string          `json:"runpack_path,omitempty"`
	RunID            string          `json:"run_id,omitempty"`
	ManifestDigest   string          `json:"manifest_digest,omitempty"`
	TraceFiles       []string        `json:"trace_files,omitempty"`
	RegressResult    string          `json:"regress_result_path,omitempty"`
	JUnitPath        string          `json:"junit_path,omitempty"`
	Artifacts        []ArtifactState `json:"artifacts,omitempty"`
	PolicyPaths      []string        `json:"policy_paths,omitempty"`
	IntentPaths      []string        `json:"intent_paths,omitempty"`
	DefaultPolicy    string          `json:"default_policy_path,omitempty"`
	DefaultIntent    string          `json:"default_intent_path,omitempty"`
	GaitConfigExists bool            `json:"gait_config_exists"`
	Error            string          `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL