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 ¶
- type Client
- type Phase2Gate
- type Phase2State
- type Tool
- func (t *Tool) Description() string
- func (t *Tool) Execute(ctx context.Context, _ string, raw json.RawMessage, _ agentcore.ToolUpdateFunc) (agentcore.AgentToolResult, error)
- func (t *Tool) ExecutionMode() agentcore.ToolExecutionMode
- func (t *Tool) Name() string
- func (t *Tool) Schema() json.RawMessage
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.
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 NewToolWithPhase2 ¶
NewToolWithPhase2 exposes the high-privilege background-display actions only after the host has received explicit advanced-control consent.
func (*Tool) Description ¶
func (*Tool) Execute ¶
func (t *Tool) Execute(ctx context.Context, _ string, raw json.RawMessage, _ agentcore.ToolUpdateFunc) (agentcore.AgentToolResult, error)
func (*Tool) ExecutionMode ¶
func (t *Tool) ExecutionMode() agentcore.ToolExecutionMode
func (*Tool) Schema ¶
func (t *Tool) Schema() json.RawMessage