Broaden platform action and trigger coverage #22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal: cover as much of the Android platform as the app can legitimately reach, in matched get/set pairs plus the trigger
for the same state, so an automation can read a value, change it, and restore it.
The recent Do Not Disturb, volume and audio-playback work is the pattern to follow: a read action, a write action that
reports what it replaced, and an event where Android exposes one.
Existing coverage
Candidates
Weighted towards what works without privileged permissions and stays F-Droid compatible — no proprietary services.
set.WRITE_SETTINGS, which is a special access like Do Not Disturb.CameraManager, plus its availability callback as a trigger.getconditional.MediaSession.Constraints to respect
dnd.setdoes.BackgroundResourceManagerownership rather than independent managers.First increment landed in
2bd4a83: ringer mode, torch (set + status), clipboard (get + set), and display brightness andscreen timeout behind WRITE_SETTINGS. All verified on a Pixel 9 / API 36 AOSP emulator.
Coverage table updated:
Findings that change the remaining plan
WifiManager.setWifiEnabledis a no-op for apps targetingAPI 29+, and
BluetoothAdapter.enable()is deprecated and non-functional from API 33. The only honest option islaunching a settings panel, which is not an automation. Suggest recording them as permanently unavailable with a
reason, the way planned event sources already are, rather than leaving them on the candidate list.
hasTextseparate fromtext. Android only lets the focused app read the clipboard, so abackground run sees nothing; an empty string alone cannot be distinguished from an empty clipboard.
an explicit handler because actions run on a background dispatcher with no Looper.
Still open from the original list
Media transport controls and notification posted/removed both need a notification listener, which ENGINE.md already
calls out as an OS-governed exception and which deserves its own increment. Calendar and contacts reads want the typed
reference seam that
FileReferencenow establishes. Device idle and app-foreground reads are small and could join thenext batch.
Further increments landed:
b03f058,9b6da33,ef9e9e3,3029ae6,6ea922c,bea18a5,4e1ba1c,bbe4d7f.The catalogue is now 44 actions/operators and 21 event types. Full instrumented suite (68 tests) green on a Pixel 9 / API 36 AOSP emulator, plus the JVM suite and lint.
Coverage now
Built-in modifiers
Roughly 30 pure actions covering text, numbers, dates, lists, dictionaries and value selection, so ordinary shaping no longer needs a JavaScript node: split/join, regex match and replace, pad, case, URL and Base64 coding, hashing; arithmetic, rounding, clamping, formatting, parsing, statistics, random; date format/parse/adjust/difference/parts; list get with negative indexes, slice, sort by key, unique, contains; JSON parse/stringify, dotted-path get and set, keys, merge; choose-value and default-if-empty.
Notes for whoever picks this up next
number.randomdeclares Read, not Pure, so it is never retried as a deterministic computation.action_threwfailures instead of propagating out of the registry.Still open
Accessibility integration, calendar reads, and "ask for input" (which would map onto durable suspension rather than a blocking dialog). Wi-Fi and Bluetooth toggles remain not worth attempting, per the earlier comment.