Documentation
¶
Overview ¶
Package accessibility provides bounded, read-only native accessibility discovery without exposing platform object references outside the process.
Index ¶
Constants ¶
const ( BackendATSPI2 = "at-spi2" BackendMacOSAccessibility = "macos-accessibility" BackendWindowsAutomation = "windows-ui-automation" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ActionRequest ¶
type ActionRequest struct {
Target Target
Reference []byte
Expected ElementExpectation
Action string
Value []byte
Postcondition *ElementCondition
BeforeFinalGate func(context.Context) error
BeforeDispatch func(context.Context) error
}
ActionRequest binds one retained opaque reference to its exact top-level target and expected live semantic identity.
type ActionResult ¶
ActionResult identifies the irreversible native dispatch boundary and whether an idempotent final gate proved that dispatch was unnecessary.
func Act ¶
func Act(ctx context.Context, request ActionRequest) (ActionResult, error)
Act re-resolves and revalidates one retained element before performing one native semantic action. It never uses pointer or keyboard fallback.
type Capability ¶
type Capability struct {
Available bool
Backend string
Reason string
Notes string
PermissionDenied bool
}
Capability is a sanitized, non-prompting native-backend probe result.
func Probe ¶
func Probe(ctx context.Context) Capability
Probe checks native availability without opening an OS consent dialog.
type ConditionResult ¶
ConditionResult is one read-only check of an observation-bound element.
func Check ¶
func Check(ctx context.Context, request ActionRequest) (ConditionResult, error)
Check re-resolves one retained element and evaluates its postcondition without performing an action or using a fallback backend.
type ElementCondition ¶
type ElementCondition struct {
Kind ElementConditionKind
State string
}
ElementCondition contains no native reference and no private action value.
type ElementConditionKind ¶
type ElementConditionKind string
ElementConditionKind identifies one privacy-preserving, element-relative postcondition. ValueEqualsActionValue compares against ActionRequest.Value; the condition itself never carries a value.
const ( ElementConditionStatePresent ElementConditionKind = "state-present" ElementConditionStateAbsent ElementConditionKind = "state-absent" ElementConditionFocused ElementConditionKind = "focused" ElementConditionNotFocused ElementConditionKind = "not-focused" ElementConditionValueEqualsActionValue ElementConditionKind = "value-equals-action-value" )
type ElementExpectation ¶
type ElementExpectation struct {
Role string
Name string
Sensitive bool
States []string
Bounds *Bounds
Actions []string
}
ElementExpectation contains only the semantic facts authorized at the agent boundary and re-read immediately before native dispatch.
type Limits ¶
type Limits struct {
MaxElements uint32
MaxDepth uint32
MaxStringBytes uint32
MaxReferenceBytes uint32
MaxTotalReferenceBytes uint32
AllowedRoles map[string]bool
ReadName bool
ReadDescription bool
ReadValue bool
ReadStates bool
ReadBounds bool
ReadFocus bool
ReadActions bool
}
Limits bounds both native queries and the returned snapshot.
type Node ¶
type Node struct {
Reference []byte
Parent int
Depth uint32
Role string
Name string
Description string
Value string
Sensitive bool
Hidden bool
Offscreen bool
States []string
Bounds *Bounds
Focused bool
Actions []string
}
Node is a bounded platform-neutral projection. Reference remains private to the agent session and must be zeroed when its observation is released.