harness

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizePayload

func NormalizePayload(runtime Runtime, provenance string, payload []byte) (*contract.HarnessEvent, error)

func Run

func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) error

Types

type BindingSpec

type BindingSpec struct {
	Kind  bindingSpecKind
	Key   string
	Value string
}

type CodexHookPayload

type CodexHookPayload struct {
	SessionID      *string     `json:"session_id"`
	TranscriptPath *string     `json:"transcript_path"`
	CWD            *string     `json:"cwd"`
	HookEventName  *string     `json:"hook_event_name"`
	Model          *string     `json:"model"`
	Source         *string     `json:"source"`
	TurnID         *string     `json:"turn_id"`
	UserPrompt     *string     `json:"user_prompt"`
	ToolName       *string     `json:"tool_name"`
	ToolUseID      *string     `json:"tool_use_id"`
	ToolInput      *ToolInput  `json:"tool_input"`
	ToolOutput     *ToolOutput `json:"tool_output"`
	StopHookActive *bool       `json:"stop_hook_active"`
}

type EmitOptions

type EmitOptions struct {
	Runtime      Runtime
	Provenance   string
	SocketPath   string
	SocketEnv    string
	EmitStdout   bool
	SuccessJSON  string
	BindingSpecs []BindingSpec
}

type InstallOptions

type InstallOptions struct {
	Runtime    Runtime
	Scope      string
	Defaulted  bool
	HelperArgs []string
}

type ListenOptions

type ListenOptions struct {
	SocketPath string
}

type RunOptions

type RunOptions struct {
	Runtime              Runtime
	Scenario             string
	PromptFile           string
	ApprovalPolicy       string
	Sandbox              string
	GeminiApprovalMode   string
	ClaudePermissionMode string
	ExtraArgs            []string
}

type Runtime

type Runtime string
const (
	RuntimeCodex    Runtime = "codex"
	RuntimeGemini   Runtime = "gemini"
	RuntimeClaude   Runtime = "claude"
	RuntimeOpenCode Runtime = "opencode"
	RuntimePi       Runtime = "pi"
)

type ToolInput

type ToolInput struct {
	Command *string `json:"command"`
}

type ToolOutput

type ToolOutput struct {
	ExitCode *int    `json:"exit_code"`
	Stdout   *string `json:"stdout"`
	Stderr   *string `json:"stderr"`
}

Jump to

Keyboard shortcuts

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