PermissionStatus

sealed class PermissionStatus

Uniform shape returned by every special-access module's permissionStatus(context) helper. Lets host apps render permission cards inline (e.g. in chat) before the LLM tries to call a tool, with a single switch over a closed type.

  • Granted — the special access is currently active. Tools in this module will succeed.

  • NotGranted — the user hasn't enabled the permission. Optionally carries an intent the host can launch to take them to the relevant Settings page.

  • Unavailable — the device can't support this module at all (e.g. API floor too low). Renders as "Not supported on this device" rather than a "Grant" button. Currently reserved for future hard-floor modules; no module returns it as of 0.7.0.

Inheritors

Types

Link copied to clipboard
data class Granted(val message: String = "Granted") : PermissionStatus
Link copied to clipboard
data class NotGranted(val message: String, val intent: Intent?) : PermissionStatus
Link copied to clipboard
data class Unavailable(val message: String, val requiredApiLevel: Int) : PermissionStatus

Properties

Link copied to clipboard
abstract val granted: Boolean
Link copied to clipboard
abstract val intent: Intent?
Link copied to clipboard
abstract val message: String