An agent leans over the seed tray and asks nicely. The app checks with the gardener first.


Ouro AX for Android
Your actions, called by agents.
Doors are the ways an agent gets in without a screen. On Android the door is AppFunctions, from core's one defineAction declaration. A consequential one never runs until the person says yes.
In release 0.12.0. AppFunctions need compileSdk 37 and AGP 9.1 or later.


Declare once
One command writes the door.
Declare your actions in TypeScript with core’s defineAction, then run core’s Android generator into your app’s sources.
node ouro-actions-android.mts generate <actions.mts> <dir>That writes OuroActions.kt, with an AppFunction for each action an agent may call and none for a person-only one, and doors.json, which says which door carries which action, and why not.
One path
A press and a call take the same road.
In ouro-actions, a person's press and an agent's AppFunction call take one path. A person-only action refuses agents with core's typed refusal.
The person's yes
The kit asks the person itself.
Android has no system prompt to ask for an app, so ouro-actions asks itself, with a built-in confirmation an app can replace with its own. Don't is the default button.
App on screen
The confirmation opens at once.
App in the background
A notification asks, and tapping it opens the confirmation. It has no Allow and shows none of the values, so the person reads them first.
Nothing can ask
With no notification permission and the app in the background, the call is refused with OuroNeedsPerson, which says how to fix it.
Nobody answers
The call waits up to two minutes, then counts as no, and no runs nothing.


AX X-ray
Do agents and people see the same actions?
CI runs the sample on an Android 17 emulator, and the X-ray compares what Android indexed against the declarations. What agents can call and what people can press both come from the app's declarations, and the X-ray checks they agree with them.
Agents get exactly what they may call
The AppFunctions Android indexed are the declared actions an agent may call, no more and no fewer.
Person-only stays the person’s
A person-only action has no AppFunction, and a typed refusal.
Same handler
An agent's add runs through the same handler a person's press does.
Buttons for people too
People get a button for every declared action.
On CI's API 36 emulator image, Android indexed none of the sample's AppFunctions, so CI checks them on Android 17 (API 37). Checked on emulators only, never on a real device.