localcontrol

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBrowserDriver  = "agent-browser"
	DefaultDesktopDriver  = "cua-driver"
	DefaultTerminalDriver = "tuistory"
	DefaultTimeout        = 30 * time.Second
	EnvHelperManifest     = "ZERO_LOCAL_CONTROL_HELPERS"
)
View Source
const (
	DefaultDevToolsPort = 9222
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

type Browser struct {
	// contains filtered or unexported fields
}

func NewBrowser

func NewBrowser(options BrowserOptions) Browser

func (Browser) Enabled

func (browser Browser) Enabled() bool

func (Browser) Run

func (browser Browser) Run(ctx context.Context, args ...string) (CommandResult, error)

type BrowserAppLaunchOptions

type BrowserAppLaunchOptions struct {
	Runner      BrowserAppRunner
	WaitTimeout time.Duration
}

type BrowserAppLaunchRequest

type BrowserAppLaunchRequest struct {
	App          string
	DebugPort    int
	StopExisting bool
	Wait         bool
}

type BrowserAppLaunchResult

type BrowserAppLaunchResult struct {
	App         string
	Command     string
	Args        []string
	PID         int
	DebugPort   int
	DevToolsURL string
}

type BrowserAppLauncher

type BrowserAppLauncher struct {
	// contains filtered or unexported fields
}

func NewBrowserAppLauncher

func NewBrowserAppLauncher(options BrowserAppLaunchOptions) BrowserAppLauncher

func (BrowserAppLauncher) LaunchBrowserApp

func (launcher BrowserAppLauncher) LaunchBrowserApp(ctx context.Context, request BrowserAppLaunchRequest) (BrowserAppLaunchResult, error)

type BrowserAppRunner

type BrowserAppRunner interface {
	Run(ctx context.Context, path string, args []string, env []string, timeout time.Duration) (CommandResult, error)
	StartDetached(ctx context.Context, path string, args []string, env []string) (int, error)
}

type BrowserOptions

type BrowserOptions = HelperOptions

type CommandResult

type CommandResult struct {
	Path     string
	Args     []string
	Stdout   string
	Stderr   string
	ExitCode int
}

func (CommandResult) Output

func (result CommandResult) Output() string

type CommandRunner

type CommandRunner interface {
	Run(ctx context.Context, path string, args []string, env []string, timeout time.Duration) (CommandResult, error)
}

type Desktop

type Desktop struct {
	// contains filtered or unexported fields
}

func NewDesktop

func NewDesktop(options DesktopOptions) Desktop

func (Desktop) Enabled

func (desktop Desktop) Enabled() bool

func (Desktop) Run

func (desktop Desktop) Run(ctx context.Context, args ...string) (CommandResult, error)

type DesktopOptions

type DesktopOptions = HelperOptions

type ExecBrowserAppRunner

type ExecBrowserAppRunner struct{}

func (ExecBrowserAppRunner) Run

func (ExecBrowserAppRunner) Run(ctx context.Context, path string, args []string, env []string, timeout time.Duration) (CommandResult, error)

func (ExecBrowserAppRunner) StartDetached

func (ExecBrowserAppRunner) StartDetached(_ context.Context, path string, args []string, env []string) (int, error)

type ExecRunner

type ExecRunner struct{}

func (ExecRunner) Run

func (ExecRunner) Run(ctx context.Context, path string, args []string, env []string, timeout time.Duration) (CommandResult, error)

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

func NewHelper

func NewHelper(options HelperOptions) Helper

func (Helper) Enabled

func (helper Helper) Enabled() bool

func (Helper) Run

func (helper Helper) Run(ctx context.Context, args ...string) (CommandResult, error)

type HelperOptions

type HelperOptions struct {
	Enabled         bool
	Driver          string
	HelperPath      string
	ConfigPath      string
	DisabledMessage string
	MissingHint     string
	Timeout         time.Duration
	Runner          CommandRunner
}

type ResolvedHelper

type ResolvedHelper struct {
	Command    string
	PrefixArgs []string
	Env        []string
}

type Terminal

type Terminal struct {
	// contains filtered or unexported fields
}

func NewTerminal

func NewTerminal(options TerminalOptions) Terminal

func (Terminal) Enabled

func (terminal Terminal) Enabled() bool

func (Terminal) Run

func (terminal Terminal) Run(ctx context.Context, args ...string) (CommandResult, error)

type TerminalOptions

type TerminalOptions = HelperOptions

Jump to

Keyboard shortcuts

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