Documentation
¶
Overview ¶
Package computeruse defines the shared model for the session-oriented computer-use server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionResult ¶
type ActionResult struct {
SessionID string `json:"session_id,omitempty"`
StateID string `json:"state_id,omitempty"`
Action string `json:"action,omitempty"`
Target string `json:"target,omitempty"`
Message string `json:"message,omitempty"`
RequiresRefresh bool `json:"requires_refresh,omitempty"`
}
ActionResult reports the outcome of a state-bound interaction.
type AppInfo ¶
type AppInfo struct {
Name string `json:"name,omitempty"`
BundleID string `json:"bundle_id,omitempty"`
PID int `json:"pid,omitempty"`
}
AppInfo identifies a running macOS application.
type AppState ¶
type AppState struct {
SessionID string `json:"session_id"`
StateID string `json:"state_id"`
App AppInfo `json:"app"`
Window WindowInfo `json:"window"`
Tree []ElementNode `json:"tree"`
ScreenshotPNGBase64 string `json:"screenshot_png_base64,omitempty"`
Instructions string `json:"instructions,omitempty"`
Approval ApprovalState `json:"approval"`
Permissions PermissionState `json:"permissions"`
}
AppState is the canonical snapshot returned by get_app_state.
type ApprovalDecision ¶
type ApprovalDecision string
ApprovalDecision reports how an approval request should be resolved.
const ( ApprovalDecisionRequire ApprovalDecision = "require" ApprovalDecisionApprove ApprovalDecision = "approve" ApprovalDecisionApprovePersistent ApprovalDecision = "approve_persistent" ApprovalDecisionDeny ApprovalDecision = "deny" ApprovalDecisionCancel ApprovalDecision = "cancel" )
type ApprovalOutcome ¶
type ApprovalOutcome string
ApprovalOutcome reports the current approval status or the result of a recent approval request.
const ( ApprovalOutcomeRequired ApprovalOutcome = "required" ApprovalOutcomeApproved ApprovalOutcome = "approved" ApprovalOutcomeDenied ApprovalOutcome = "denied" ApprovalOutcomeCanceled ApprovalOutcome = "canceled" ApprovalOutcomePersistenceFailed ApprovalOutcome = "persistence_failed" )
type ApprovalState ¶
type ApprovalState struct {
Outcome ApprovalOutcome `json:"outcome,omitempty"`
Required bool `json:"required"`
Approved bool `json:"approved"`
Persistent bool `json:"persistent"`
Message string `json:"message,omitempty"`
}
ApprovalState reports the current approval state and, when applicable, the outcome of the decision that produced it.
type ApprovalStore ¶
type ApprovalStore interface {
Resolve(bundleID string, decision ApprovalDecision) (ApprovalState, error)
}
ApprovalStore manages app-control approvals.
type ElementNode ¶
type ElementNode struct {
Index int `json:"index"`
ParentIndex int `json:"parent_index"`
Role string `json:"role,omitempty"`
Title string `json:"title,omitempty"`
Value string `json:"value,omitempty"`
Description string `json:"description,omitempty"`
Identifier string `json:"identifier,omitempty"`
X int `json:"x,omitempty"`
Y int `json:"y,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Enabled bool `json:"enabled"`
Settable bool `json:"settable"`
SecondaryActions []string `json:"secondary_actions,omitempty"`
}
ElementNode is an indexed AX node in a returned app state.
type InstructionProvider ¶
InstructionProvider returns app-specific guidance for a snapshot.
type PermissionState ¶
type PermissionState struct {
AccessibilityGranted bool `json:"accessibility_granted"`
AccessibilityStatus string `json:"accessibility_status,omitempty"`
ScreenRecordingGranted bool `json:"screen_recording_granted"`
ScreenRecordingStatus string `json:"screen_recording_status,omitempty"`
Pending bool `json:"pending"`
Message string `json:"message,omitempty"`
}
PermissionState reports the current system-permission status needed for computer-use actions.
type WindowInfo ¶
type WindowInfo struct {
WindowID uint32 `json:"window_id,omitempty"`
Title string `json:"title,omitempty"`
X int `json:"x,omitempty"`
Y int `json:"y,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
ScreenshotWidth int `json:"screenshot_width,omitempty"`
ScreenshotHeight int `json:"screenshot_height,omitempty"`
}
WindowInfo describes the active target window for a state snapshot.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package approval implements app-control approval tracking for computer-use sessions, including session and persistent approvals plus explicit deny, cancel, and persistence-failed outcomes.
|
Package approval implements app-control approval tracking for computer-use sessions, including session and persistent approvals plus explicit deny, cancel, and persistence-failed outcomes. |
|
Package appstate builds live app snapshots for the computer-use server.
|
Package appstate builds live app snapshots for the computer-use server. |
|
Package coords converts between computer-use coordinate spaces.
|
Package coords converts between computer-use coordinate spaces. |
|
Package input provides reusable input helpers for the computer-use server.
|
Package input provides reusable input helpers for the computer-use server. |
|
Package instruction provides app-specific hints for computer-use sessions.
|
Package instruction provides app-specific hints for computer-use sessions. |
|
Package intervention detects recent physical user input.
|
Package intervention detects recent physical user input. |
|
Package magnify resolves semantic zoom and pinch requests into concrete backend actions.
|
Package magnify resolves semantic zoom and pinch requests into concrete backend actions. |
|
Package policy enforces computer-use safety policies.
|
Package policy enforces computer-use safety policies. |