androiduse

package
v1.5.155 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package androiduse implements the Go side of the Phase 1 AndroidUse capability: a typed tool over a local, app-private Unix socket provided by the Kotlin AccessibilityService host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint string
}

Client talks to the in-process Android host over loopback. The endpoint file is app-private and carries a per-process token; no external network is used.

func (Client) Do

func (c Client) Do(ctx context.Context, request map[string]any) (map[string]any, error)

Do sends one newline-delimited JSON request and decodes one response. A response with ok=false is returned as an error; the caller must not replay an action whose result is unknown.

type Phase2Gate

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

Phase2Gate is the policy floor for the high-privilege helper path. Android binding is tracked separately by Kotlin, but this state machine decides when the Go tool layer may consider the helper usable.

func NewPhase2Gate

func NewPhase2Gate() *Phase2Gate

func (*Phase2Gate) Disable

func (g *Phase2Gate) Disable()

func (*Phase2Gate) Enable

func (g *Phase2Gate) Enable(consent bool) error

func (*Phase2Gate) HelperConnected

func (g *Phase2Gate) HelperConnected() error

func (*Phase2Gate) HelperDisconnected

func (g *Phase2Gate) HelperDisconnected()

func (*Phase2Gate) PairingCompleted

func (g *Phase2Gate) PairingCompleted()

func (*Phase2Gate) State

func (g *Phase2Gate) State() Phase2State

func (*Phase2Gate) Stop

func (g *Phase2Gate) Stop()

type Phase2State

type Phase2State string

Phase2State is deliberately separate from visible-screen control. Enabling background control must not grant shell access to visible-screen tools.

const (
	Phase2Disabled     Phase2State = "disabled"
	Phase2NeedsPairing Phase2State = "needs-pairing"
	Phase2NeedsHelper  Phase2State = "needs-helper"
	Phase2Ready        Phase2State = "ready"
	Phase2Stopped      Phase2State = "stopped"
)

type Tool

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

Tool exposes the Phase 1 Android accessibility surface to the Go agent. Node actions carry a snapshot id so a stale observation cannot silently click a different screen.

func NewTool

func NewTool(endpoint string) *Tool

func NewToolWithPhase2

func NewToolWithPhase2(endpoint string, enabled bool) *Tool

NewToolWithPhase2 exposes the high-privilege background-display actions only after the host has received explicit advanced-control consent.

func (*Tool) Description

func (t *Tool) Description() string

func (*Tool) ExecutionMode

func (t *Tool) ExecutionMode() agentcore.ToolExecutionMode

func (*Tool) Name

func (t *Tool) Name() string

func (*Tool) Schema

func (t *Tool) Schema() json.RawMessage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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