cmd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

func SetEmbeddedSkill

func SetEmbeddedSkill(name, content string)

SetEmbeddedSkill registers an embedded skill's content (called from main).

func SetVersion

func SetVersion(v string)

Types

type BatchResult

type BatchResult struct {
	Steps   []BatchStep  `json:"steps"`
	Final   any          `json:"final,omitempty"`
	FinalOp string       `json:"final_op,omitempty"`
	Summary BatchSummary `json:"summary"`
}

BatchResult is the final JSON returned by `ghostchrome batch`.

type BatchStep

type BatchStep struct {
	Index  int    `json:"step"`
	Cmd    string `json:"cmd"`
	Args   string `json:"args,omitempty"`
	OK     bool   `json:"ok"`
	TimeMs int64  `json:"ms"`
	Error  string `json:"error,omitempty"`
}

BatchStep captures one line of execution in the script.

type BatchSummary

type BatchSummary struct {
	Total  int   `json:"total"`
	Ok     int   `json:"ok"`
	Failed int   `json:"failed"`
	TimeMs int64 `json:"total_ms"`
}

BatchSummary gives the agent a glanceable overview.

type LocatorFlags

type LocatorFlags struct {
	Role  string
	Name  string
	Label string
	Text  string
}

LocatorFlags are the shared --by-role / --by-name / --by-label / --by-text flags wired onto click / type / hover. They're mutually compatible with the positional @ref argument: if a --by-* flag is set, it wins; otherwise the ref is used.

func (LocatorFlags) Any

func (f LocatorFlags) Any() bool

Any reports whether at least one locator flag was set.

func (LocatorFlags) Describe

func (f LocatorFlags) Describe() string

Describe renders a short label used by output helpers.

func (*LocatorFlags) RegisterOn

func (f *LocatorFlags) RegisterOn(cmd *cobra.Command)

RegisterOn installs the standard --by-* flags on cmd, writing to the fields of f. Call this from the init() of each command that supports locators.

func (LocatorFlags) ToLocator

func (f LocatorFlags) ToLocator() engine.Locator

ToLocator converts flags into an engine.Locator.

Directories

Path Synopsis
ghostchrome-mcp is a standalone MCP server binary that exposes the ghostchrome browser automation engine over JSON-RPC stdio.
ghostchrome-mcp is a standalone MCP server binary that exposes the ghostchrome browser automation engine over JSON-RPC stdio.

Jump to

Keyboard shortcuts

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