desktopadapter

package
v0.0.0-...-116f9d4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ResultSchemaVersion = "rdev.desktop-result.v1"

Variables

This section is empty.

Functions

func NormalizeAction

func NormalizeAction(action string) string

Types

type Frame

type Frame struct {
	Index      int    `json:"index"`
	CapturedAt string `json:"captured_at"`
	PNGBase64  string `json:"png_base64"`
	Bytes      int    `json:"bytes"`
}

type ResultArtifact

type ResultArtifact struct {
	SchemaVersion       string   `json:"schema_version"`
	Adapter             string   `json:"adapter"`
	Action              string   `json:"action"`
	Status              string   `json:"status"`
	Detail              string   `json:"detail,omitempty"`
	Error               string   `json:"error,omitempty"`
	Windows             []Window `json:"windows,omitempty"`
	PNGBase64           string   `json:"png_base64,omitempty"`
	Frames              []Frame  `json:"frames,omitempty"`
	ArtifactPath        string   `json:"artifact_path,omitempty"`
	ArtifactContentType string   `json:"artifact_content_type,omitempty"`
	ArtifactBytes       int64    `json:"artifact_bytes,omitempty"`
	ArtifactSHA256      string   `json:"artifact_sha256,omitempty"`
	ClipboardText       string   `json:"clipboard_text,omitempty"`
	WindowID            string   `json:"window_id,omitempty"`
	Target              string   `json:"target,omitempty"`
	DesktopSessionState string   `json:"desktop_session_state,omitempty"`
	StartedAt           string   `json:"started_at"`
	EndedAt             string   `json:"ended_at"`
	DurationMillis      int64    `json:"duration_millis"`
}

func Execute

func Execute(spec Spec) (ResultArtifact, error)

func ExecuteContext

func ExecuteContext(ctx context.Context, spec Spec) (ResultArtifact, error)

func (ResultArtifact) ArtifactContent

func (r ResultArtifact) ArtifactContent() string

type Spec

type Spec struct {
	Action             string
	URL                string
	App                string
	WindowID           string
	Title              string
	Text               string
	X                  int
	Y                  int
	Width              int
	Height             int
	Button             string
	Frames             int
	IntervalMillis     int
	MaxDurationSeconds int
	MaxOutputBytes     int
	WorkspaceRoot      string
	WriteScope         []string
	OutputPath         string
}

type Window

type Window struct {
	ID        string `json:"id"`
	Title     string `json:"title,omitempty"`
	ProcessID uint32 `json:"process_id,omitempty"`
	Visible   bool   `json:"visible"`
}

Jump to

Keyboard shortcuts

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