Documentation
¶
Overview ¶
Package androidagent assembles the experimental in-process Android tool set. It is separate from desktop tool wiring: constructing it requires an Android host to provide the actual per-call authorization gate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
Capabilities describe executable paths found at construction, not a promise that a subsequent call will be authorized or that execution will succeed.
type Config ¶
type Config struct {
Root string
Permissions *permissions.State
BeforeToolCall agentcore.BeforeToolCallFunc
// NoShell omits bash/write_stdin even when /system/bin/sh exists. A host
// that has not built a command sandbox yet can still offer the file tools;
// the prompt then says shell is unavailable instead of advertising a tool
// the catalog does not contain.
NoShell bool
// NoGit omits the structured Git tool. The tool is local by default and
// gates clone/fetch/push on the host's per-call network grant.
NoGit bool
GitAuthorName string
GitAuthorEmail string
GitToken string
// AndroidUseEndpoint is the app-private endpoint file exposed by the
// Kotlin AccessibilityService host. Empty means AndroidUse is not authorized.
AndroidUseEndpoint string
// AndroidUsePhase2 enables the separate high-privilege background-display
// surface. It must be explicitly consented to by the user.
AndroidUsePhase2 bool
// SearchEnv supplies web-search credentials (TAVILY_API_KEY / EXA_API_KEY).
// Nil falls back to os.Getenv; the Android host passes its own encrypted
// store so keys never enter the process environment.
SearchEnv func(string) string
}
Config is supplied by the Android host, not by the model. BeforeToolCall must be the host's actual authorization gate; the tool set never manufactures an unconfined-execution grant. A nil Permissions selects auto mode.
type Toolset ¶
type Toolset struct {
Tools []agentcore.AgentTool
Batch agenttool.BatchConfig
Permissions *permissions.State
Capabilities Capabilities
Root string
// contains filtered or unexported fields
}
Toolset carries one matched catalog, prompt and execution gate. A caller must pass Batch to the agent loop and Tools to the model context together.
func New ¶
New builds the Android catalog using the current app process's executable paths. It refuses other platforms rather than changing their existing wiring.