app/src/main/java/com/onemedical/healthai/ai/AkharaPolicy.kt. It’s built on
OkHttp, kotlinx-serialization, and coroutines. See
requirements for versions.
Types
Construct the PEP
baseUrl (https://api.akhara.dev) explicitly. The
client attaches Telemetry.sessionId as the session automatically, and the
call timeout is 8 seconds.
The in-repo demo build ships with a loopback default for the Android emulator so
it can reach a developer’s machine. Production builds must set
baseUrl to the
managed PDP over HTTPS.Methods
suspend and run on Dispatchers.IO. Call them from a coroutine (e.g.
inside a ViewModel’s viewModelScope).
End-to-end example
Permit-gated action
Fail-closed behavior
Any error, non-2xx, or parse failure yields a synthesized BLOCK: