openapi: 3.1.0
info:
  title: PixelKit SDK API
  version: 1.6.11
  description: |
  OpenAPI 3.1.0 specification for the **PixelKit SDK** targeting Google Pixel hardware (Tensor G6, Titan M2/M3, Android 17 API 37).
  
  ### The Zero-Simulation Principle
  Every telemetry read exposes `source: 'hardware' | 'derived' | 'unavailable'`.
  - Fabricated readings are completely unrepresentable in this specification.
  - Unreadable sensor readings are `null` and report `unavailable`.
  - Actuators reject with an explicit reason in `error` when hardware is unavailable or disabled.
  
  Covers all 51 typed hardware and AI hooks, low-overhead native telemetry, and actuators.
  contact:
    name: PixelKit Labs
    url: "https://github.com/PixelKit-Labs/pixelkit-sdk"
  license:
    name: MIT
    url: "https://opensource.org/licenses/MIT"
servers:
  - url: "http://localhost:8081/api"
    description: PixelKit DevTools / Local Metro Bridge
  - url: "http://127.0.0.1:2345/api"
    description: PixelKit Native Hardware Daemon (ADB Port-Forwarded)
tags:
  - name: silicon-compute
    description: "Tensor G6 CPU cores, PowerVR GPU, system memory, battery fuel gauge, and ADPF thermals."
  - name: neural-ai
    description: "Gemini Nano on-device AICore, ML Kit vision and NLP, speech recognition/synthesis, and EdgeTPU embeddings."
  - name: sensors-actuators
    description: "IMU, barometer altimetry, camera extensions, LRA haptics, mic array directivity, FIR thermometer, and torch."
  - name: radios-security
    description: "Titan M2 Keystore, biometrics, BLE 6.0 Channel Sounding, NFC, GNSS, Wi-Fi 7 MLO, Wi-Fi RTT, Satellite NTN, and Private Space."
  - name: system-media
    description: "Microphone capture, cellular modem, display telemetry, media library, spatial audio, and video playback."
  - name: pro-exclusives
    description: "Hardware exclusive to Google Pixel Pro models: HiLight 8-LED ring and Ultra-Wideband (UWB) spatial ranging."
paths:
  /state:
    get:
      summary: Get Full Device Hardware Telemetry Snapshot
      description: Atomic snapshot of instantaneous telemetry across all 51 hardware and AI subsystems. Values are strictly measured from real hardware or null.
      operationId: getFullDeviceState
      tags:
        - silicon-compute
      responses:
        200:
          description: Complete device hardware telemetry state snapshot.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HardwareStateSnapshot"
  /hooks:
    get:
      summary: "List All PixelKit Hardware & AI Hooks"
      description: "Lists all 51 available hooks, their categories, descriptions, and hardware chip badges."
      operationId: listHooks
      tags:
        - silicon-compute
      responses:
        200:
          description: List of all 51 hooks.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/HookCatalogItem"
  /hooks/useADPF:
    get:
      summary: How much thermal room is left before the phone slows itself down.
      description: |
  Warns you before the phone gets hot enough to throttle. Check thermalHeadroom before starting sustained work such as camera capture or a long inference run, and back off as it climbs toward 1.
  
  thermalHeadroom comes from PowerManager.getThermalHeadroom and is sampled every ten seconds, which is the cadence Google specifies; polling faster returns NaN. A live thermal-status listener reports the coarse state from NONE through SHUTDOWN. On Android 16 and above, SystemHealthManager can also report CPU and GPU headroom, which stays null when the device does not provide it. Frame figures pair the display mode refresh rate as a target with the Choreographer-measured rate as the actual.
      operationId: get_useADPF
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useADPF.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPFTelemetry"
  /hooks/useADPF/actions/reportWorkDuration:
    post:
      summary: Invoke reportWorkDuration (useADPF)
      description: |
  Pure helper that judges a measured piece of work against the frame budget. It computes a verdict for your own scheduling; it does not call the platform performance hint system.
  
  **Output Contract**: 'WITHIN_BUDGET' when the work fits the frame, 'BOOST_REQUESTED' when it overran and you should shed work.
      operationId: useADPF_reportWorkDuration
      tags:
        - silicon-compute
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useADPF_reportWorkDuration_Request"
      responses:
        200:
          description: Result of invoking reportWorkDuration.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPF_reportWorkDuration_Response"
  /hooks/useADPFHintSession:
    get:
      summary: Active frame workload negotiation with Android Dynamic Performance Framework and Tensor EAS.
      description: |
  Creates an active ADPF hint session with the Energy-Aware Scheduler to dynamically adjust CPU clock frequencies based on actual frame render workloads, eliminating stutter without wasting battery.
  
  Interfaces directly with android.os.PerformanceHintManager (Android 12+ API 31+). Manages an active thread hint session allowing apps to report exact frame computation times in nanoseconds. This informs the kernel scheduler in real-time whether the workload is meeting its deadline (e.g. 16.67ms for 60Hz or 8.33ms for 120Hz), scaling frequencies up only when needed.
      operationId: get_useADPFHintSession
      tags:
        - silicon-compute
      parameters:
        - name: initialTargetDurationMs
          in: query
          description: "Initial target frame duration budget in milliseconds, defaulting to 16.67ms (60 FPS)."
          required: false
          schema:
            type: number
      responses:
        200:
          description: Current telemetry reading from useADPFHintSession.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPFHintSessionTelemetry"
  /hooks/useADPFHintSession/actions/reportWorkDuration:
    post:
      summary: Invoke reportWorkDuration (useADPFHintSession)
      description: Reports frame workload duration to the Energy-Aware Scheduler.
      operationId: useADPFHintSession_reportWorkDuration
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking reportWorkDuration.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPFHintSession_reportWorkDuration_Response"
  /hooks/useADPFHintSession/actions/updateTargetWorkDuration:
    post:
      summary: Invoke updateTargetWorkDuration (useADPFHintSession)
      description: Updates the target frame deadline in nanoseconds.
      operationId: useADPFHintSession_updateTargetWorkDuration
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking updateTargetWorkDuration.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPFHintSession_updateTargetWorkDuration_Response"
  /hooks/useADPFHintSession/actions/closeSession:
    post:
      summary: Invoke closeSession (useADPFHintSession)
      description: Terminates the active ADPF hint session.
      operationId: useADPFHintSession_closeSession
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking closeSession.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useADPFHintSession_closeSession_Response"
  /hooks/useAltimeter:
    get:
      summary: "Precision barometric altimetry, vertical climb/descent velocity, and weather trends."
      description: |
  Computes real-time altitude from the hardware barometer using the international ICAO hypsometric atmosphere formula. Provides vertical climb velocity in m/s, storm pressure trend detection, and custom sea-level reference calibration (QNH).
  
  Derived from the physical air pressure sensor via expo-sensors. Computes altitude above calibrated sea level using the standard barometric formula: h = 44330 * (1 - (P / P0)^0.1903). Automatically computes vertical velocity (rate of climb/descent in m/s) with exponential smoothing, categorizes atmospheric pressure trends (rising, steady, falling, rapid_fall), and supports local QNH calibration.
      operationId: get_useAltimeter
      tags:
        - sensors-actuators
      parameters:
        - name: updateIntervalMs
          in: query
          description: "Sampling period in milliseconds for the barometer, defaulting to 100ms."
          required: false
          schema:
            type: number
      responses:
        200:
          description: Current telemetry reading from useAltimeter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAltimeterTelemetry"
  /hooks/useAltimeter/actions/calibrateSeaLevel:
    post:
      summary: Invoke calibrateSeaLevel (useAltimeter)
      description: Sets the baseline sea-level pressure (QNH) in hPa.
      operationId: useAltimeter_calibrateSeaLevel
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking calibrateSeaLevel.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAltimeter_calibrateSeaLevel_Response"
  /hooks/useAltimeter/actions/resetCalibration:
    post:
      summary: Invoke resetCalibration (useAltimeter)
      description: Resets sea-level pressure back to standard atmosphere (1013.25 hPa).
      operationId: useAltimeter_resetCalibration
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking resetCalibration.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAltimeter_resetCalibration_Response"
  /hooks/useAppFunctions:
    get:
      summary: Exposes on-device actions and hardware capabilities to system AI and Gemini Assistant.
      description: |
  Bridges Android 16/17 AppFunctions (API 36+). Allows Gemini and local agents to discover and execute in-app functions, query Tensor silicon thermals, and register custom agentic tool handlers.
  
  Backed by android.app.appfunctions.IAppFunctionManager (system service 133 on Pixel 11 Pro). Exposes built-in hardware actions ('check_phone_thermals', 'purge_memory_cache', 'get_device_silicon_info') and enables developers to register custom AppFunction schemas and handlers dynamically. Reports source: 'hardware' when backed by the real system service.
      operationId: get_useAppFunctions
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useAppFunctions.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAppFunctionsTelemetry"
  /hooks/useAppFunctions/actions/executeFunction:
    post:
      summary: Invoke executeFunction (useAppFunctions)
      description: Executes a registered AppFunction or built-in hardware action.
      operationId: useAppFunctions_executeFunction
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking executeFunction.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAppFunctions_executeFunction_Response"
  /hooks/useAppFunctions/actions/registerFunction:
    post:
      summary: Invoke registerFunction (useAppFunctions)
      description: Registers a custom AppFunction handler accessible to on-device agents.
      operationId: useAppFunctions_registerFunction
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking registerFunction.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAppFunctions_registerFunction_Response"
  /hooks/useAppFunctions/actions/unregisterFunction:
    post:
      summary: Invoke unregisterFunction (useAppFunctions)
      description: Unregisters an AppFunction handler.
      operationId: useAppFunctions_unregisterFunction
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking unregisterFunction.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAppFunctions_unregisterFunction_Response"
  /hooks/useAudio:
    get:
      summary: "Microphone recording with levels and input choice, plus playback."
      description: |
  Records from the microphone and plays recordings back. It gives you a live loudness reading for meters and speaking indicators, lets you pause and resume a take, choose which microphone to use, and pick between a speech profile and an unprocessed studio profile.
  
  Built on expo-audio. The speech profile records 16 kHz mono through the voice_recognition source, which is the path that applies the platform noise suppression and is what speech APIs expect; the studio profile records 48 kHz stereo through unprocessed, the raw microphone with no platform processing. Levels are read every 100 ms from the recorder status in dBFS, where -160 is digital silence and 0 is clipping; level maps that onto 0 to 1 with a floor at -60 dBFS so meters behave sensibly. Microphone enumeration only works once the recorder has been prepared, which is why inputs populate after recording starts. Playback routing between speaker and earpiece is an audio-mode setting, so it applies to the whole app.
      operationId: get_useAudio
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useAudio.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudioTelemetry"
  /hooks/useAudio/actions/startRecording:
    post:
      summary: Invoke startRecording (useAudio)
      description: |
  Requests permission if needed, prepares the profile and opens the microphone with metering at 10 Hz.
  
  **Output Contract**: Resolves true when recording started, false with the reason in error when permission was denied or the recorder refused.
      operationId: useAudio_startRecording
      tags:
        - system-media
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_startRecording_Request"
      responses:
        200:
          description: Result of invoking startRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_startRecording_Response"
  /hooks/useAudio/actions/pauseRecording:
    post:
      summary: Invoke pauseRecording (useAudio)
      description: |
  Pauses without finalising the file, so resumeRecording continues the same take.
  
  **Output Contract**: Returns true when the take was paused, false when nothing was recording or it was already paused.
      operationId: useAudio_pauseRecording
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking pauseRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_pauseRecording_Response"
  /hooks/useAudio/actions/resumeRecording:
    post:
      summary: Invoke resumeRecording (useAudio)
      description: |
  Continues the same take after a pause.
  
  **Output Contract**: Returns true when recording resumed, false when there was nothing paused.
      operationId: useAudio_resumeRecording
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking resumeRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_resumeRecording_Response"
  /hooks/useAudio/actions/stopRecording:
    post:
      summary: Invoke stopRecording (useAudio)
      description: |
  Finalises the take and stops metering.
  
  **Output Contract**: Resolves with the recorded file URI, also stored in lastRecordingUri, or null when nothing was recording or the stop failed.
      operationId: useAudio_stopRecording
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking stopRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_stopRecording_Response"
  /hooks/useAudio/actions/setSilenceThresholdDbfs:
    post:
      summary: Invoke setSilenceThresholdDbfs (useAudio)
      description: |
  Moves the boundary between silence and speech that isSilent reports against.
  
  **Output Contract**: Returns nothing; isSilent re-evaluates on the next metering sample.
      operationId: useAudio_setSilenceThresholdDbfs
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_setSilenceThresholdDbfs_Request"
      responses:
        200:
          description: Result of invoking setSilenceThresholdDbfs.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_setSilenceThresholdDbfs_Response"
  /hooks/useAudio/actions/setQuality:
    post:
      summary: Invoke setQuality (useAudio)
      description: |
  Chooses the capture profile for the next recording, not the current one.
  
  **Output Contract**: Returns nothing; quality updates immediately.
      operationId: useAudio_setQuality
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_setQuality_Request"
      responses:
        200:
          description: Result of invoking setQuality.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_setQuality_Response"
  /hooks/useAudio/actions/refreshInputs:
    post:
      summary: Invoke refreshInputs (useAudio)
      description: |
  Re-reads the available microphones. Only valid once a recording has been prepared.
  
  **Output Contract**: Returns the list, also written to inputs. Empty when the platform cannot answer.
      operationId: useAudio_refreshInputs
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking refreshInputs.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_refreshInputs_Response"
  /hooks/useAudio/actions/selectInput:
    post:
      summary: Invoke selectInput (useAudio)
      description: |
  Switches to a specific microphone, such as an attached USB or Bluetooth one.
  
  **Output Contract**: Returns true when the platform accepted it, false with the reason in error otherwise.
      operationId: useAudio_selectInput
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_selectInput_Request"
      responses:
        200:
          description: Result of invoking selectInput.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_selectInput_Response"
  /hooks/useAudio/actions/setRoute:
    post:
      summary: Invoke setRoute (useAudio)
      description: |
  Sends playback to the loudspeaker or the call earpiece, at the audio-mode level.
  
  **Output Contract**: Resolves once the audio mode is applied; on failure route is unchanged and error is set.
      operationId: useAudio_setRoute
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_setRoute_Request"
      responses:
        200:
          description: Result of invoking setRoute.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_setRoute_Response"
  /hooks/useAudio/actions/playLastRecording:
    post:
      summary: Invoke playLastRecording (useAudio)
      description: |
  Plays a recording and starts position polling five times a second.
  
  **Output Contract**: Resolves true when playback started, false when there is nothing to play or the player refused.
      operationId: useAudio_playLastRecording
      tags:
        - system-media
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_playLastRecording_Request"
      responses:
        200:
          description: Result of invoking playLastRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_playLastRecording_Response"
  /hooks/useAudio/actions/pausePlayback:
    post:
      summary: Invoke pausePlayback (useAudio)
      description: |
  Pauses playback where it is.
  
  **Output Contract**: Returns nothing; isPlaying becomes false and position polling stops.
      operationId: useAudio_pausePlayback
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking pausePlayback.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_pausePlayback_Response"
  /hooks/useAudio/actions/stopPlayback:
    post:
      summary: Invoke stopPlayback (useAudio)
      description: |
  Stops playback and rewinds to the start.
  
  **Output Contract**: Resolves once rewound; playbackPositionSeconds returns to 0.
      operationId: useAudio_stopPlayback
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking stopPlayback.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_stopPlayback_Response"
  /hooks/useAudio/actions/seekPlayback:
    post:
      summary: Invoke seekPlayback (useAudio)
      description: |
  Jumps to a position in the file being played.
  
  **Output Contract**: Resolves once the seek completes; playbackPositionSeconds updates.
      operationId: useAudio_seekPlayback
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useAudio_seekPlayback_Request"
      responses:
        200:
          description: Result of invoking seekPlayback.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useAudio_seekPlayback_Response"
  /hooks/useBLE:
    get:
      summary: "Bluetooth adapter state, Channel Sounding, bonded devices, and active BLE peripheral discovery."
      description: |
  Reports whether Bluetooth is on, which devices are already paired, whether this phone supports Channel Sounding, and performs live RF peripheral discovery with real RSSI values.
  
  Adapter state, Channel Sounding support and the bonded device list are read from Android BluetoothAdapter through the native module with source hardware. Live peripheral discovery scans for nearby BLE beacons using Android BluetoothLeScanner, returning verified MAC addresses, RSSI (dBm), and log-distance path loss distance estimations.
      operationId: get_useBLE
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useBLE.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBLETelemetry"
  /hooks/useBLE/actions/startScan:
    post:
      summary: Invoke startScan (useBLE)
      description: |
  Begins physical Bluetooth Low Energy discovery through BluetoothLeScanner.
  
  **Output Contract**: Resolves true when the scan started; false with the reason in scanError otherwise. Results appear in peripherals, polled every 500 ms.
      operationId: useBLE_startScan
      tags:
        - radios-security
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useBLE_startScan_Request"
      responses:
        200:
          description: Result of invoking startScan.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBLE_startScan_Response"
  /hooks/useBLE/actions/stopScan:
    post:
      summary: Invoke stopScan (useBLE)
      description: |
  Stops active BLE discovery and clears the auto-stop timer.
  
  **Output Contract**: Returns nothing; a final results sync runs first, so nothing already discovered is lost.
      operationId: useBLE_stopScan
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking stopScan.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBLE_stopScan_Response"
  /hooks/useBatteryShare:
    get:
      summary: Google Pixel Battery Share (Reverse Wireless Qi Charging) telemetry and actuator.
      description: |
  Monitors and controls the phone's reverse wireless charging transmitter coil to share battery power with accessories like Pixel Buds or other Qi devices docked on the back.
  
  Directly interfaces with the Google Pixel reverse wireless charging subsystem (/sys/class/power_supply/wireless/reverse_chg_mode). Reports whether wireless power transfer is active, whether a compatible Qi receiver is docked, real-time power transmission in watts, and allows programmatically enabling or disabling power transfer with safety cutoff thresholds.
      operationId: get_useBatteryShare
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useBatteryShare.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBatteryShareTelemetry"
  /hooks/useBatteryShare/actions/setBatteryShare:
    post:
      summary: Invoke setBatteryShare (useBatteryShare)
      description: Turns reverse wireless charging on or off.
      operationId: useBatteryShare_setBatteryShare
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking setBatteryShare.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBatteryShare_setBatteryShare_Response"
  /hooks/useBatteryShare/actions/setBatteryThreshold:
    post:
      summary: Invoke setBatteryThreshold (useBatteryShare)
      description: Sets minimum battery cutoff percentage.
      operationId: useBatteryShare_setBatteryThreshold
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking setBatteryThreshold.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBatteryShare_setBatteryThreshold_Response"
  /hooks/useBatteryShare/actions/refresh:
    post:
      summary: Invoke refresh (useBatteryShare)
      description: Refreshes reverse wireless charging state.
      operationId: useBatteryShare_refresh
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBatteryShare_refresh_Response"
  /hooks/useBiometrics:
    get:
      summary: Fingerprint and face authentication.
      description: |
  Asks the user to prove who they are with their fingerprint or face. Check that hardware exists and that something is actually enrolled before you offer it, otherwise the prompt will fail.
  
  Uses the platform BiometricPrompt through expo-local-authentication, which on a Pixel is backed by the hardware security module. The two checks matter separately: a device can have the sensor but no enrolled credential, in which case authentication cannot succeed and you should fall back to a passcode path.
      operationId: get_useBiometrics
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useBiometrics.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBiometricsTelemetry"
  /hooks/useBiometrics/actions/authenticate:
    post:
      summary: Invoke authenticate (useBiometrics)
      description: |
  Shows the system biometric prompt with a device-passcode fallback.
  
  **Output Contract**: Resolves true only on success. A cancel or a mismatch resolves false without setting error; missing hardware or no enrolment resolves false and sets error. lastResult tells the three apart.
      operationId: useBiometrics_authenticate
      tags:
        - radios-security
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useBiometrics_authenticate_Request"
      responses:
        200:
          description: Result of invoking authenticate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBiometrics_authenticate_Response"
  /hooks/useBiometrics/actions/refresh:
    post:
      summary: Invoke refresh (useBiometrics)
      description: |
  Re-reads sensor presence and enrolment. Call it when returning from Settings, where the user may have just enrolled a finger.
  
  **Output Contract**: `Promise<void>` — updates `hasHardware`, `isEnrolled`, `supportedTypes`
      operationId: useBiometrics_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useBiometrics_refresh_Response"
  /hooks/useCPU:
    get:
      summary: What the CPU is and how hard it is working right now.
      description: |
  Tells you the shape of the processor (how many cores, which type, how fast each one can go) and how busy it is at this instant. Use it to decide whether the phone has room for heavy work, or to show a live performance readout.
  
  Core identity comes from /proc/cpuinfo and per-core frequencies from the cpufreq sysfs tree, both read through the PixelNative module. Two different load signals are reported and they mean different things: cpuLoadPercent is how close the cores are running to their maximum clock, read from hardware; appCpuPercent is this app's own share of CPU time, computed from process time over wall time. Android does not let apps read system-wide /proc/stat, so a true "system load" figure does not exist here and is not invented.
      operationId: get_useCPU
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useCPU.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCPUTelemetry"
  /hooks/useCPU/actions/benchmarkCPU:
    post:
      summary: Invoke benchmarkCPU (useCPU)
      description: |
  Runs a real single-threaded prime sieve on the JS thread. It measures Hermes single-thread throughput, not the system, and blocks the UI while it runs.
  
  **Output Contract**: Resolves with the run duration in milliseconds, which is also written to lastBenchmarkDurationMs. Lower is faster.
      operationId: useCPU_benchmarkCPU
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking benchmarkCPU.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCPU_benchmarkCPU_Response"
  /hooks/useCamera:
    get:
      summary: "Lens, zoom, flash and torch, plus taking photos and recording video."
      description: |
  Drives the camera and captures from it. Give it a camera view to hold on to and it can take a still or record a clip, both of which land as real files you can play back, save to the gallery or send to a model. Note that the Pixel Camera app's own colour Looks and long-range zoom are not available to other apps.
  
  The hook owns a ref to a CameraView and drives it, so a screen only renders the view and attaches cameraRef and handleCameraReady. takePicture resolves with a file, its dimensions and optionally base64 for the AI hooks; startRecording resolves when the recording ends, either because you called stopRecording or because a duration or size limit was reached. Two things the API does not make obvious: zoom is a 0 to 1 fraction of the lens range rather than an optical multiplier, so a "5x" figure does not map onto it; and Camera Looks, Super Res Zoom and the low-light video mode belong to the Pixel Camera app and cannot be driven from here, so selectedLook is a label for your own interface.
      operationId: get_useCamera
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useCamera.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCameraTelemetry"
  /hooks/useCamera/actions/handleCameraReady:
    post:
      summary: Invoke handleCameraReady (useCamera)
      description: |
  Pass to the view's onCameraReady. Lens and picture-size lists only resolve once the preview is running, so they are read here.
  
  **Output Contract**: Resolves once isReady is set and availableLenses and availablePictureSizes have been filled.
      operationId: useCamera_handleCameraReady
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking handleCameraReady.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_handleCameraReady_Response"
  /hooks/useCamera/actions/takePicture:
    post:
      summary: Invoke takePicture (useCamera)
      description: |
  Takes a still into the app cache. Use useMediaLibrary().save() to keep it.
  
  **Output Contract**: Resolves with { uri, width, height, base64?, exif? }, or null when the view is not mounted or the capture failed, with the reason in error.
      operationId: useCamera_takePicture
      tags:
        - sensors-actuators
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_takePicture_Request"
      responses:
        200:
          description: Result of invoking takePicture.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_takePicture_Response"
  /hooks/useCamera/actions/startRecording:
    post:
      summary: Invoke startRecording (useCamera)
      description: |
  Records video, switching the view to video mode first.
  
  **Output Contract**: Resolves with the video file URI when recording ends — through stopRecording() or a limit — or null on failure. recordingSeconds ticks while it runs.
      operationId: useCamera_startRecording
      tags:
        - sensors-actuators
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_startRecording_Request"
      responses:
        200:
          description: Result of invoking startRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_startRecording_Response"
  /hooks/useCamera/actions/stopRecording:
    post:
      summary: Invoke stopRecording (useCamera)
      description: |
  Ends the recording. No-op when nothing is recording.
  
  **Output Contract**: Returns nothing; the promise from startRecording resolves with the video file.
      operationId: useCamera_stopRecording
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking stopRecording.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_stopRecording_Response"
  /hooks/useCamera/actions/toggleFacing:
    post:
      summary: Invoke toggleFacing (useCamera)
      description: |
  Switches between the front and rear camera.
  
  **Output Contract**: Returns nothing; facing flips and viewProps carries it to the view.
      operationId: useCamera_toggleFacing
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking toggleFacing.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_toggleFacing_Response"
  /hooks/useCamera/actions/setLook:
    post:
      summary: Invoke setLook (useCamera)
      description: |
  Records a Look label in state. It does not change the image: Camera Looks belong to the Pixel Camera app and are not reachable from a third-party app.
  
  **Output Contract**: Returns nothing; selectedLook updates so your own interface can show it.
      operationId: useCamera_setLook
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_setLook_Request"
      responses:
        200:
          description: Result of invoking setLook.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_setLook_Response"
  /hooks/useCamera/actions/setZoom:
    post:
      summary: Invoke setZoom (useCamera)
      description: |
  Sets zoom as a fraction of the lens range, not an optical multiplier.
  
  **Output Contract**: Returns nothing; zoomFactor updates and viewProps carries it to the view.
      operationId: useCamera_setZoom
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_setZoom_Request"
      responses:
        200:
          description: Result of invoking setZoom.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_setZoom_Response"
  /hooks/useCamera/actions/setZoomStep:
    post:
      summary: Invoke setZoomStep (useCamera)
      description: |
  Evenly spaced zoom stops, for a control with discrete positions.
  
  **Output Contract**: Returns nothing; sets zoomFactor to step / totalSteps.
      operationId: useCamera_setZoomStep
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_setZoomStep_Request"
      responses:
        200:
          description: Result of invoking setZoomStep.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_setZoomStep_Response"
  /hooks/useCamera/actions/setFlash:
    post:
      summary: Invoke setFlash (useCamera)
      description: |
  Chooses flash behaviour for the next capture, as distinct from the continuous torch.
  
  **Output Contract**: Returns nothing; flashMode updates.
      operationId: useCamera_setFlash
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_setFlash_Request"
      responses:
        200:
          description: Result of invoking setFlash.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_setFlash_Response"
  /hooks/useCamera/actions/toggleTorch:
    post:
      summary: Invoke toggleTorch (useCamera)
      description: |
  Turns the continuous light on or off through the preview. For torch without a preview, use useTorch.
  
  **Output Contract**: Returns nothing; isTorchOn flips.
      operationId: useCamera_toggleTorch
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking toggleTorch.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_toggleTorch_Response"
  /hooks/useCamera/actions/setMode:
    post:
      summary: Invoke setMode (useCamera)
      description: |
  Switches the view between stills and video.
  
  **Output Contract**: Returns nothing; mode and viewProps update.
      operationId: useCamera_setMode
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useCamera_setMode_Request"
      responses:
        200:
          description: Result of invoking setMode.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_setMode_Response"
  /hooks/useCamera/actions/pausePreview:
    post:
      summary: Invoke pausePreview (useCamera)
      description: |
  Freezes or restarts the preview without tearing the camera down.
  
  **Output Contract**: Resolves once applied. Silently no-ops when the view has been unmounted.
      operationId: useCamera_pausePreview
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking pausePreview.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_pausePreview_Response"
  /hooks/useCamera/actions/resumePreview:
    post:
      summary: Invoke resumePreview (useCamera)
      description: |
  Freezes or restarts the preview without tearing the camera down.
  
  **Output Contract**: Resolves once applied. Silently no-ops when the view has been unmounted.
      operationId: useCamera_resumePreview
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking resumePreview.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_resumePreview_Response"
  /hooks/useCamera/actions/toggleUltraLowLightVideo:
    post:
      summary: Invoke toggleUltraLowLightVideo (useCamera)
      description: |
  Flips the UI flag only, for the same reason.
  
  **Output Contract**: void
      operationId: useCamera_toggleUltraLowLightVideo
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking toggleUltraLowLightVideo.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCamera_toggleUltraLowLightVideo_Response"
  /hooks/useCameraExtensions:
    get:
      summary: "Google computational photography vendor extensions (Night Sight, Ultra HDR, Portrait Bokeh)."
      description: |
  Queries real camera hardware extensions from the Android Camera2 HAL on Google Pixel devices. Detects whether Night Sight, Ultra HDR exposure stacking, and Portrait mode bokeh blur are supported by the camera sensors.
  
  Backed by Android CameraExtensionCharacteristics (API 31+). Queries vendor-specific image processing modes for back and front cameras. Nothing is simulated: reads directly from the camera HAL and reports source: 'hardware' on genuine devices.
      operationId: get_useCameraExtensions
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useCameraExtensions.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCameraExtensionsTelemetry"
  /hooks/useCameraExtensions/actions/refresh:
    post:
      summary: Invoke refresh (useCameraExtensions)
      description: Manually re-reads camera HAL extension characteristics.
      operationId: useCameraExtensions_refresh
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCameraExtensions_refresh_Response"
  /hooks/useCapabilities:
    get:
      summary: What this particular phone actually has.
      description: |
  The first hook to call. It answers "does this device have that?" so your interface can hide features the phone does not support, instead of showing a control that will fail.
  
  Resolution starts from a model table keyed on the device name, then upgrades to real PackageManager feature checks when the native module is present, at which point verification changes from model-table to device. Fields that can only be answered by the device are null until that upgrade happens. Evaluates verified platform features including android.hardware.npu, BLE Channel Sounding, and StrongBox KeyStore.
      operationId: get_useCapabilities
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useCapabilities.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCapabilitiesTelemetry"
  /hooks/useCellular:
    get:
      summary: "Carrier, radio generation and network codes from the modem."
      description: |
  Tells you whether the phone is on 5G or something slower, and which carrier is serving it. useNetwork can only say the connection is cellular; this says what kind, which is what you need before deciding to stream or download something large.
  
  Wraps expo-cellular. generation reflects the current data connection, so it changes as the phone moves and reads unknown when there is no cellular data attached, including on Wi-Fi. Carrier name and the mobile country and network codes need the phone-state permission on Android; without it they stay null rather than being guessed. The country and network codes together identify a carrier globally, which is more reliable than matching on the display name.
      operationId: get_useCellular
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useCellular.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCellularTelemetry"
  /hooks/useCellular/actions/refresh:
    post:
      summary: Invoke refresh (useCellular)
      description: |
  Re-reads everything the platform answers without prompting.
  
  **Output Contract**: Resolves once generation, carrier and network codes have been updated. Values that need the phone-state permission stay null without it.
      operationId: useCellular_refresh
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCellular_refresh_Response"
  /hooks/useCellular/actions/requestPermission:
    post:
      summary: Invoke requestPermission (useCellular)
      description: |
  Asks for the phone-state permission, which unlocks carrier name and network codes on Android.
  
  **Output Contract**: Resolves true when granted, and refreshes automatically. Generation is readable without it.
      operationId: useCellular_requestPermission
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking requestPermission.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useCellular_requestPermission_Response"
  /hooks/useChannelSounding:
    get:
      summary: Bluetooth Core 6.0 high-accuracy centimeter-precision Phase-Based Ranging (PBR).
      description: |
  Inspects hardware Bluetooth Low Energy 6.0 Channel Sounding transceiver state and manages high-precision spatial distance estimation. Uses multi-channel phase-based ranging (PBR) and round-trip time (RTT) across 79 Bluetooth channels without requiring line of sight.
  
  Backed by android.hardware.bluetooth_le.channel_sounding and the Android 16/17 Ranging HAL service (IBluetoothChannelSounding). Measures distance with sub-decimeter accuracy, complementing UWB for non-line-of-sight spatial positioning. Nothing is simulated: queries actual device hardware capabilities.
      operationId: get_useChannelSounding
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useChannelSounding.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChannelSoundingTelemetry"
  /hooks/useChannelSounding/actions/startRanging:
    post:
      summary: Invoke startRanging (useChannelSounding)
      description: Starts a Channel Sounding ranging session against paired or discovered BLE devices.
      operationId: useChannelSounding_startRanging
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking startRanging.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChannelSounding_startRanging_Response"
  /hooks/useChannelSounding/actions/stopRanging:
    post:
      summary: Invoke stopRanging (useChannelSounding)
      description: Stops an active ranging session.
      operationId: useChannelSounding_stopRanging
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking stopRanging.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChannelSounding_stopRanging_Response"
  /hooks/useChannelSounding/actions/refresh:
    post:
      summary: Invoke refresh (useChannelSounding)
      description: Re-probes hardware channel sounding status.
      operationId: useChannelSounding_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChannelSounding_refresh_Response"
  /hooks/useChargingIntelligence:
    get:
      summary: "Deep battery health, cycle count, manufacturing dates, and charging wattage tiers."
      description: |
  Surfaces low-level battery health indicators: lifetime physical charge cycles, maximum state of health (SoH) capacity relative to design, manufacture and first-activation dates, and USB-PD PPS fast charging tiers.
  
  Reads Android 14+ battery health metrics and Google Pixel power supply sysfs telemetry. Provides lifetime charge cycles (BatteryManager.EXTRA_CYCLE_COUNT), state of health percentage (/sys/class/power_supply/battery/soh), factory manufacture date, first-use date, real-time charging wattage, and classifies charging speed into tiers (slow, standard, rapid, ultra_rapid > 30W).
      operationId: get_useChargingIntelligence
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useChargingIntelligence.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChargingIntelligenceTelemetry"
  /hooks/useChargingIntelligence/actions/refresh:
    post:
      summary: Invoke refresh (useChargingIntelligence)
      description: Requests an updated battery intelligence reading.
      operationId: useChargingIntelligence_refresh
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useChargingIntelligence_refresh_Response"
  /hooks/useDevice:
    get:
      summary: "Device identity, battery level, thermistor temperature, voltage, current, and wattage."
      description: |
  Facts about the phone, its hardware identity, and its real physical power state: battery level, fuel gauge thermistor temperature, instantaneous cell voltage and current flow, wattage draw/charging rate, health status, and lifetime charge cycles.
  
  Identity comes from expo-device, live power state from expo-battery listeners, and deep physical battery telemetry from the native fuel gauge PMIC via PixelNative.getBatteryTelemetry(). batteryTemperatureC reads the actual lithium pack NTC thermistor in 0.1 °C units. batteryVoltageMv and batteryCurrentMa give the cell terminal voltage and live current draw (negative discharging, positive charging); batteryPowerWatts computes real-time wattage (V × I). On Android 14+, batteryCycleCount reads lifetime charge cycles from the PMIC EEPROM. Nothing is simulated: unavailable readings are null.
      operationId: get_useDevice
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useDevice.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDeviceTelemetry"
  /hooks/useDevice/actions/refresh:
    post:
      summary: Invoke refresh (useDevice)
      description: |
  Re-reads device power, PMIC battery fuel gauge, and network connectivity.
  
  **Output Contract**: Promise<void> — Resolves once all battery, electrical, and network states are refreshed.
      operationId: useDevice_refresh
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDevice_refresh_Response"
  /hooks/useDisplay:
    get:
      summary: "Refresh rate, HDR capability, brightness and the screen wake lock."
      description: |
  Reads what the screen is doing and lets you influence it. The refresh rate changes constantly on this panel to save power, so it is re-read live rather than assumed.
  
  Display mode, supported refresh rates, HDR types and resolution come from the Android Display object through the native module, re-read every two seconds because adaptive refresh rate changes the active mode continuously. Brightness uses expo-brightness and the wake lock uses expo-keep-awake. setPreferredRefreshRate requests a rate; the platform may ignore it, so read refreshRateHz back rather than assuming it took.
      operationId: get_useDisplay
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useDisplay.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDisplayTelemetry"
  /hooks/useDisplay/actions/setPreferredRefreshRate:
    post:
      summary: Invoke setPreferredRefreshRate (useDisplay)
      description: |
  Asks the system for a refresh rate for this window, for example 120 during an animation and 60 otherwise.
  
  **Output Contract**: Resolves true when the request was applied. It is a request, not a guarantee: the system may pick another mode.
      operationId: useDisplay_setPreferredRefreshRate
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useDisplay_setPreferredRefreshRate_Request"
      responses:
        200:
          description: Result of invoking setPreferredRefreshRate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDisplay_setPreferredRefreshRate_Response"
  /hooks/useDisplay/actions/setScreenBrightness:
    post:
      summary: Invoke setScreenBrightness (useDisplay)
      description: |
  Sets the brightness of this app window.
  
  **Output Contract**: Resolves once applied. No-op on web; on failure brightness is left unchanged.
      operationId: useDisplay_setScreenBrightness
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useDisplay_setScreenBrightness_Request"
      responses:
        200:
          description: Result of invoking setScreenBrightness.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDisplay_setScreenBrightness_Response"
  /hooks/useDisplay/actions/toggleKeepAwake:
    post:
      summary: Invoke toggleKeepAwake (useDisplay)
      description: |
  Acquires or releases a tagged screen wake lock, so the display does not dim during a long read or capture.
  
  **Output Contract**: Resolves once the lock state has flipped; isKeepAwake reflects it. Release it when you no longer need it.
      operationId: useDisplay_toggleKeepAwake
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking toggleKeepAwake.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useDisplay_toggleKeepAwake_Response"
  /hooks/useEmbeddings:
    get:
      summary: On-device vector embeddings and semantic cosine similarity scoring via Tensor EdgeTPU.
      description: |
  Converts text strings into dense 512-dimensional vector embeddings locally on the EdgeTPU for fast offline semantic search, deduplication, and RAG memory without server calls.
  
  Executes on-device text embedding generation on the Google Tensor EdgeTPU / NPU through ML Kit GenAI. Produces normalized 512-dimensional floating point vectors from input text in milliseconds. Includes an in-memory cosine similarity calculation helper to compare semantic proximity between vectors entirely offline.
      operationId: get_useEmbeddings
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useEmbeddings.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useEmbeddingsTelemetry"
  /hooks/useEmbeddings/actions/embed:
    post:
      summary: Invoke embed (useEmbeddings)
      description: Generates a 512-dimensional embedding vector from input text.
      operationId: useEmbeddings_embed
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking embed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useEmbeddings_embed_Response"
  /hooks/useEmbeddings/actions/cosineSimilarity:
    post:
      summary: Invoke cosineSimilarity (useEmbeddings)
      description: Scores cosine similarity between two embedding vectors.
      operationId: useEmbeddings_cosineSimilarity
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking cosineSimilarity.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useEmbeddings_cosineSimilarity_Response"
  /hooks/useGPU:
    get:
      summary: "Which GPU this is, and whether your frames are arriving on time."
      description: |
  Identifies the graphics chip and measures how smoothly the interface is drawing. If animations feel rough, this tells you whether frames are actually being missed and by how much.
  
  The renderer, vendor and OpenGL version are read through a real offscreen EGL context; the Vulkan version comes from the android.hardware.vulkan.version system feature. Frame timing is measured on the UI thread with Choreographer in one-second windows: average and worst frame interval, frames presented per second, and a jank count for frames that took more than 1.5x the expected interval. Android does not expose GPU memory usage to apps, so that field is always null rather than estimated.
      operationId: get_useGPU
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useGPU.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGPUTelemetry"
  /hooks/useGemini:
    get:
      summary: Cloud Gemini chat with real multi-turn history.
      description: |
  Talks to the full Gemini model over the network. Much more capable than the on-device model, but it needs an API key and a connection. Replies carry real token counts and timings from the API.
  
  Wraps ai.chats.create from @google/genai on gemini-3.8-flash with a system instruction, so history is maintained by the SDK rather than re-sent by hand. Token counts come from the response usageMetadata and latency is measured around the call. Replies stream through sendMessageStream, so partial fills in as chunks arrive and lastFirstChunkMs records time to first token. There is no simulated fallback: without a key, sendMessage appends a system-role message explaining how to configure one. The key is read from SecureStore, never from source.
      operationId: get_useGemini
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useGemini.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiTelemetry"
  /hooks/useGemini/actions/sendMessage:
    post:
      summary: Invoke sendMessage (useGemini)
      description: |
  Sends a turn and appends the reply with its latency and token count.
  
  **Output Contract**: Resolves when the reply arrives. Without an API key it appends a system-role message explaining that instead; API errors arrive the same way rather than as a rejection.
      operationId: useGemini_sendMessage
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_sendMessage_Request"
      responses:
        200:
          description: Result of invoking sendMessage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_sendMessage_Response"
  /hooks/useGemini/actions/setSelectedModel:
    post:
      summary: Invoke setSelectedModel (useGemini)
      description: |
  Switches the cloud model and resets the chat session, because the model is fixed when the session is created.
  
  **Output Contract**: Returns nothing; the next turn starts a new session on that model.
      operationId: useGemini_setSelectedModel
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setSelectedModel_Request"
      responses:
        200:
          description: Result of invoking setSelectedModel.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setSelectedModel_Response"
  /hooks/useGemini/actions/setTopP:
    post:
      summary: Invoke setTopP (useGemini)
      description: |
  Generation parameters. They are fixed when the session is created, so changing one starts a fresh session.
  
  **Output Contract**: Returns nothing.
      operationId: useGemini_setTopP
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setTopP_Request"
      responses:
        200:
          description: Result of invoking setTopP.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setTopP_Response"
  /hooks/useGemini/actions/setTopK:
    post:
      summary: Invoke setTopK (useGemini)
      description: |
  Generation parameters. They are fixed when the session is created, so changing one starts a fresh session.
  
  **Output Contract**: Returns nothing.
      operationId: useGemini_setTopK
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setTopK_Request"
      responses:
        200:
          description: Result of invoking setTopK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setTopK_Response"
  /hooks/useGemini/actions/setTemperature:
    post:
      summary: Invoke setTemperature (useGemini)
      description: |
  Generation parameters. They are fixed when the session is created, so changing one starts a fresh session.
  
  **Output Contract**: Returns nothing.
      operationId: useGemini_setTemperature
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setTemperature_Request"
      responses:
        200:
          description: Result of invoking setTemperature.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setTemperature_Response"
  /hooks/useGemini/actions/setMaxOutputTokens:
    post:
      summary: Invoke setMaxOutputTokens (useGemini)
      description: |
  Generation parameters. They are fixed when the session is created, so changing one starts a fresh session.
  
  **Output Contract**: Returns nothing.
      operationId: useGemini_setMaxOutputTokens
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setMaxOutputTokens_Request"
      responses:
        200:
          description: Result of invoking setMaxOutputTokens.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setMaxOutputTokens_Response"
  /hooks/useGemini/actions/setThinkingBudget:
    post:
      summary: Invoke setThinkingBudget (useGemini)
      description: |
  Thinking tokens requested from the model. Zero disables thinking, and only a value above zero is sent.
  
  **Output Contract**: Returns nothing; applied to the next session.
      operationId: useGemini_setThinkingBudget
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setThinkingBudget_Request"
      responses:
        200:
          description: Result of invoking setThinkingBudget.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setThinkingBudget_Response"
  /hooks/useGemini/actions/setSystemInstruction:
    post:
      summary: Invoke setSystemInstruction (useGemini)
      description: |
  Sets the standing instruction the session is created with, and resets the chat session.
  
  **Output Contract**: Returns nothing; the next turn starts a fresh session carrying that instruction.
      operationId: useGemini_setSystemInstruction
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setSystemInstruction_Request"
      responses:
        200:
          description: Result of invoking setSystemInstruction.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setSystemInstruction_Response"
  /hooks/useGemini/actions/setSafety:
    post:
      summary: Invoke setSafety (useGemini)
      description: |
  Sets one blocking threshold across all four harm categories (harassment, hate speech, sexually explicit, dangerous content) and resets the chat session.
  
  **Output Contract**: Returns nothing; the next turn starts a fresh session carrying that threshold.
      operationId: useGemini_setSafety
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setSafety_Request"
      responses:
        200:
          description: Result of invoking setSafety.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setSafety_Response"
  /hooks/useGemini/actions/setSearchGroundingEnabled:
    post:
      summary: Invoke setSearchGroundingEnabled (useGemini)
      description: |
  Attaches or removes the googleSearch tool, letting the model search the web before answering. Resets the chat session.
  
  **Output Contract**: Returns nothing. When a turn does search, lastGrounding carries the queries and source URIs.
      operationId: useGemini_setSearchGroundingEnabled
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setSearchGroundingEnabled_Request"
      responses:
        200:
          description: Result of invoking setSearchGroundingEnabled.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setSearchGroundingEnabled_Response"
  /hooks/useGemini/actions/countTokens:
    post:
      summary: Invoke countTokens (useGemini)
      description: |
  Asks the API how many tokens a prompt costs on the selected model, before you send it.
  
  **Output Contract**: Resolves to the token count, or null without a key or when the call fails. Also written to lastPromptTokens.
      operationId: useGemini_countTokens
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_countTokens_Request"
      responses:
        200:
          description: Result of invoking countTokens.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_countTokens_Response"
  /hooks/useGemini/actions/clearMessages:
    post:
      summary: Invoke clearMessages (useGemini)
      description: |
  Clears the history and resets the chat session, so the next turn starts with no context.
  
  **Output Contract**: Returns nothing.
      operationId: useGemini_clearMessages
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking clearMessages.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_clearMessages_Response"
  /hooks/useGemini/actions/setApiKey:
    post:
      summary: Invoke setApiKey (useGemini)
      description: |
  Swaps the key in memory and resets the chat session.
  
  **Output Contract**: Returns nothing. hasApiKey updates immediately and availableModels is refreshed in the background.
      operationId: useGemini_setApiKey
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGemini_setApiKey_Request"
      responses:
        200:
          description: Result of invoking setApiKey.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGemini_setApiKey_Response"
  /hooks/useGeminiNano:
    get:
      summary: "Gemini Nano running on the phone, with no network and no API key."
      description: |
  Chat with a model that runs entirely on the device. Nothing leaves the phone and it works offline, but the model is small and the context is short. Check status first: the weights are managed by the system and may need downloading once.
  
  Wraps the ML Kit GenAI Prompt API on AICore through the pixel-nano module. The model is owned by the system, not bundled with the app, so checkStatus can report that a download is required; download reports progress as it runs. AICore keeps no conversation history, so each turn re-sends a capped transcript built by buildNanoTurn. Latency and time to first token are measured around the native call, and output token counts come from the on-device tokenizer, so the performance figures are real rather than estimated. There is no cloud fallback: if the model is unavailable, sendMessage appends an error entry.
      operationId: get_useGeminiNano
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useGeminiNano.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNanoTelemetry"
  /hooks/useGeminiNano/actions/setSystemInstruction:
    post:
      summary: Invoke setSystemInstruction (useGeminiNano)
      description: |
  Sets the standing instruction used by every later turn.
  
  **Output Contract**: Returns nothing; the next sendMessage uses it.
      operationId: useGeminiNano_setSystemInstruction
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setSystemInstruction_Request"
      responses:
        200:
          description: Result of invoking setSystemInstruction.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setSystemInstruction_Response"
  /hooks/useGeminiNano/actions/setTemperature:
    post:
      summary: Invoke setTemperature (useGeminiNano)
      description: |
  Generation parameters applied to every later turn.
  
  **Output Contract**: Returns nothing; the values are read on the next call.
      operationId: useGeminiNano_setTemperature
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setTemperature_Request"
      responses:
        200:
          description: Result of invoking setTemperature.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setTemperature_Response"
  /hooks/useGeminiNano/actions/setTopK:
    post:
      summary: Invoke setTopK (useGeminiNano)
      description: |
  Generation parameters applied to every later turn.
  
  **Output Contract**: Returns nothing; the values are read on the next call.
      operationId: useGeminiNano_setTopK
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setTopK_Request"
      responses:
        200:
          description: Result of invoking setTopK.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setTopK_Response"
  /hooks/useGeminiNano/actions/setCandidateCount:
    post:
      summary: Invoke setCandidateCount (useGeminiNano)
      description: |
  Generation parameters applied to every later turn.
  
  **Output Contract**: Returns nothing; the values are read on the next call.
      operationId: useGeminiNano_setCandidateCount
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setCandidateCount_Request"
      responses:
        200:
          description: Result of invoking setCandidateCount.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setCandidateCount_Response"
  /hooks/useGeminiNano/actions/setMaxOutputTokens:
    post:
      summary: Invoke setMaxOutputTokens (useGeminiNano)
      description: |
  Generation parameters applied to every later turn.
  
  **Output Contract**: Returns nothing; the values are read on the next call.
      operationId: useGeminiNano_setMaxOutputTokens
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setMaxOutputTokens_Request"
      responses:
        200:
          description: Result of invoking setMaxOutputTokens.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setMaxOutputTokens_Response"
  /hooks/useGeminiNano/actions/setThinkingMode:
    post:
      summary: Invoke setThinkingMode (useGeminiNano)
      description: |
  Requests thinking mode. Check info.thinkingModeAvailable first; where it is false the request is dropped and thoughts stays empty.
  
  **Output Contract**: Returns nothing.
      operationId: useGeminiNano_setThinkingMode
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setThinkingMode_Request"
      responses:
        200:
          description: Result of invoking setThinkingMode.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setThinkingMode_Response"
  /hooks/useGeminiNano/actions/download:
    post:
      summary: Invoke download (useGeminiNano)
      description: |
  Asks AICore to fetch the model weights.
  
  **Output Contract**: Resolves with the status after the attempt, or "unavailable" when it failed. Progress arrives in downloadedBytes while it runs.
      operationId: useGeminiNano_download
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking download.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_download_Response"
  /hooks/useGeminiNano/actions/warmup:
    post:
      summary: Invoke warmup (useGeminiNano)
      description: |
  Loads the model into AICore ahead of the first prompt so the first reply is not slow.
  
  **Output Contract**: Resolves with the wall time in milliseconds, or null when the warm-up failed. The same value lands in warmupMs.
      operationId: useGeminiNano_warmup
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking warmup.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_warmup_Response"
  /hooks/useGeminiNano/actions/sendMessage:
    post:
      summary: Invoke sendMessage (useGeminiNano)
      description: |
  Sends a chat turn with streaming, appending both the question and the reply to messages.
  
  **Output Contract**: Resolves when the reply is complete. Tokens accumulate in partial while it streams; failures arrive as a system-role entry in messages, never as a rejection.
      operationId: useGeminiNano_sendMessage
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_sendMessage_Request"
      responses:
        200:
          description: Result of invoking sendMessage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_sendMessage_Response"
  /hooks/useGeminiNano/actions/generate:
    post:
      summary: Invoke generate (useGeminiNano)
      description: |
  One-shot generation outside the conversation, with optional per-call parameters.
  
  **Output Contract**: Resolves with { text, finishReason, thoughts, latencyMs, firstTokenMs }. Throws E_NANO_* on failure; there is no fallback.
      operationId: useGeminiNano_generate
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_generate_Request"
      responses:
        200:
          description: Result of invoking generate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_generate_Response"
  /hooks/useGeminiNano/actions/countTokens:
    post:
      summary: Invoke countTokens (useGeminiNano)
      description: |
  Measures a prompt with the on-device tokenizer before sending it.
  
  **Output Contract**: Resolves with the token count, or null when the tokenizer is unavailable. Compare it against info.tokenLimit.
      operationId: useGeminiNano_countTokens
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_countTokens_Request"
      responses:
        200:
          description: Result of invoking countTokens.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_countTokens_Response"
  /hooks/useGeminiNano/actions/clearMessages:
    post:
      summary: Invoke clearMessages (useGeminiNano)
      description: |
  Empties the conversation and the thinking output.
  
  **Output Contract**: Returns nothing. AICore keeps no history of its own, so this is the whole reset.
      operationId: useGeminiNano_clearMessages
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking clearMessages.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_clearMessages_Response"
  /hooks/useGeminiNano/actions/setModelConfig:
    post:
      summary: Invoke setModelConfig (useGeminiNano)
      description: |
  Chooses the model track AICore serves. The next call creates a new client.
  
  **Output Contract**: Resolves once the config is applied and status and info have been re-read.
      operationId: useGeminiNano_setModelConfig
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGeminiNano_setModelConfig_Request"
      responses:
        200:
          description: Result of invoking setModelConfig.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_setModelConfig_Response"
  /hooks/useGeminiNano/actions/refresh:
    post:
      summary: Invoke refresh (useGeminiNano)
      description: |
  Re-reads status and model facts from AICore.
  
  **Output Contract**: Resolves once status and info have been updated. On failure status becomes unavailable and error is set.
      operationId: useGeminiNano_refresh
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_refresh_Response"
  /hooks/useGeminiNano/actions/summarize:
    post:
      summary: Invoke summarize (useGeminiNano)
      description: |
  On-device summarization through ML Kit GenAI.
  
  **Output Contract**: `Promise<SummarizeResult>` — `{ summary, latencyMs, engine, source }`; **throws** on failure
      operationId: useGeminiNano_summarize
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking summarize.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_summarize_Response"
  /hooks/useGeminiNano/actions/proofread:
    post:
      summary: Invoke proofread (useGeminiNano)
      description: |
  On-device grammar and wording correction.
  
  **Output Contract**: `Promise<ProofreadResult>` — `{ correctedText, suggestions, latencyMs, engine, source }`
      operationId: useGeminiNano_proofread
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking proofread.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_proofread_Response"
  /hooks/useGeminiNano/actions/rewrite:
    post:
      summary: Invoke rewrite (useGeminiNano)
      description: |
  On-device tone and style transformation.
  
  **Output Contract**: `Promise<RewriteResult>` — `{ rewrittenText, suggestions, latencyMs, engine, source }`
      operationId: useGeminiNano_rewrite
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking rewrite.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGeminiNano_rewrite_Response"
  /hooks/useGenAITasks:
    get:
      summary: "Four focused text tasks that run locally: summarise, proofread, rewrite, describe."
      description: |
  Purpose-built text helpers that run on the phone. Each does one job well and is faster and more reliable than prompting a general model for the same thing. No network, no key.
  
  Wraps the ML Kit GenAI task modules on AICore through pixel-nano: genai-summarization, genai-proofreading and genai-rewriting, plus image description. Because each task ships a tuned model rather than a free-form prompt, the output is more consistent than asking a chat model, and it works on more devices. Every call reports its own measured latency and the engine that served it.
      operationId: get_useGenAITasks
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useGenAITasks.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGenAITasksTelemetry"
  /hooks/useGenAITasks/actions/summarize:
    post:
      summary: Invoke summarize (useGenAITasks)
      description: |
  Condenses an article or a conversation on-device. Nothing leaves the phone.
  
  **Output Contract**: Resolves with { summary, latencyMs, engine, source }, or null on failure with the reason in error.
      operationId: useGenAITasks_summarize
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGenAITasks_summarize_Request"
      responses:
        200:
          description: Result of invoking summarize.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGenAITasks_summarize_Response"
  /hooks/useGenAITasks/actions/proofread:
    post:
      summary: Invoke proofread (useGenAITasks)
      description: |
  Fixes grammar, punctuation and wording. Good for cleaning up dictated text.
  
  **Output Contract**: Resolves with { correctedText, suggestions, latencyMs, engine, source } — suggestions lists the individual changes — or null on failure.
      operationId: useGenAITasks_proofread
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGenAITasks_proofread_Request"
      responses:
        200:
          description: Result of invoking proofread.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGenAITasks_proofread_Response"
  /hooks/useGenAITasks/actions/rewrite:
    post:
      summary: Invoke rewrite (useGenAITasks)
      description: |
  Rewrites text in a different tone or length while keeping the meaning.
  
  **Output Contract**: Resolves with { rewrittenText, suggestions, latencyMs, engine, source }, or null on failure.
      operationId: useGenAITasks_rewrite
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGenAITasks_rewrite_Request"
      responses:
        200:
          description: Result of invoking rewrite.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGenAITasks_rewrite_Response"
  /hooks/useGenAITasks/actions/describeImage:
    post:
      summary: Invoke describeImage (useGenAITasks)
      description: |
  Describes an image locally. Useful for alt text without a network round-trip.
  
  **Output Contract**: Resolves with { description, finishReason, latencyMs, engine, source }, or null on failure.
      operationId: useGenAITasks_describeImage
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useGenAITasks_describeImage_Request"
      responses:
        200:
          description: Result of invoking describeImage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useGenAITasks_describeImage_Response"
  /hooks/useHaptics:
    get:
      summary: "Vibration, from simple taps to custom-shaped waveforms."
      description: |
  Makes the phone buzz. Standard patterns cover ordinary taps and confirmations. On this device you can also design your own vibration shape, rising and falling in intensity, which is how you make a distinctive feel rather than a generic buzz.
  
  Standard patterns come from expo-haptics. Beyond that, the native module reports the actual vibrator hardware: whether amplitude can be varied, its resonant frequency, and which composition primitives it supports. Android 16 envelope effects are built with BasicEnvelopeBuilder from intensity and sharpness control points and must finish at zero intensity. This Pixel supports them, which is how the thinking ramp and alert pulses are produced.
      operationId: get_useHaptics
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useHaptics.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHapticsTelemetry"
  /hooks/useHaptics/actions/selection:
    post:
      summary: Invoke selection (useHaptics)
      description: |
  Faint tick for moving between options: sliders, wheel pickers, tab changes.
  
  **Output Contract**: Resolves once dispatched. No-op on web; failures are logged rather than thrown.
      operationId: useHaptics_selection
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking selection.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_selection_Response"
  /hooks/useHaptics/actions/light:
    post:
      summary: Invoke light (useHaptics)
      description: |
  Impact taps of increasing weight, for presses, reveals and destructive confirmations.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_light
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking light.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_light_Response"
  /hooks/useHaptics/actions/medium:
    post:
      summary: Invoke medium (useHaptics)
      description: |
  Impact taps of increasing weight, for presses, reveals and destructive confirmations.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_medium
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking medium.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_medium_Response"
  /hooks/useHaptics/actions/heavy:
    post:
      summary: Invoke heavy (useHaptics)
      description: |
  Impact taps of increasing weight, for presses, reveals and destructive confirmations.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_heavy
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking heavy.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_heavy_Response"
  /hooks/useHaptics/actions/success:
    post:
      summary: Invoke success (useHaptics)
      description: |
  Notification patterns that carry meaning: a double pulse, a buzz, a triple pulse. Use them consistently.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_success
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking success.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_success_Response"
  /hooks/useHaptics/actions/warning:
    post:
      summary: Invoke warning (useHaptics)
      description: |
  Notification patterns that carry meaning: a double pulse, a buzz, a triple pulse. Use them consistently.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_warning
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking warning.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_warning_Response"
  /hooks/useHaptics/actions/error:
    post:
      summary: Invoke error (useHaptics)
      description: |
  Notification patterns that carry meaning: a double pulse, a buzz, a triple pulse. Use them consistently.
  
  **Output Contract**: Resolves once dispatched. No-op on web.
      operationId: useHaptics_error
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_error_Response"
  /hooks/useHaptics/actions/playEnvelope:
    post:
      summary: Invoke playEnvelope (useHaptics)
      description: |
  Plays a custom waveform on Android 16 and later. Check envelopeSupported first.
  
  **Output Contract**: Returns true when the effect was dispatched, false when envelopes are unsupported or the call failed. It never throws.
      operationId: useHaptics_playEnvelope
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHaptics_playEnvelope_Request"
      responses:
        200:
          description: Result of invoking playEnvelope.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_playEnvelope_Response"
  /hooks/useHaptics/actions/playPrimitives:
    post:
      summary: Invoke playPrimitives (useHaptics)
      description: |
  Chains hardware primitives into a composition, Android 11 and later.
  
  **Output Contract**: Returns true when the composition was dispatched, false when the native module is absent or the call failed.
      operationId: useHaptics_playPrimitives
      tags:
        - sensors-actuators
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHaptics_playPrimitives_Request"
      responses:
        200:
          description: Result of invoking playPrimitives.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_playPrimitives_Response"
  /hooks/useHaptics/actions/cancel:
    post:
      summary: Invoke cancel (useHaptics)
      description: |
  Stops any vibration immediately, including an envelope or composition in progress.
  
  **Output Contract**: Returns nothing.
      operationId: useHaptics_cancel
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking cancel.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_cancel_Response"
  /hooks/useHaptics/actions/triggerHaptic:
    post:
      summary: Invoke triggerHaptic (useHaptics)
      description: |
  Plays a standard platform pattern. No-op on web.
  
  **Output Contract**: `Promise<void>` — resolves when dispatched; failures are logged, not thrown
      operationId: useHaptics_triggerHaptic
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking triggerHaptic.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHaptics_triggerHaptic_Response"
  /hooks/useHealthConnect:
    get:
      summary: "Platform health records, steps, and sensor vitals telemetry."
      description: |
  Inspects Android Health Connect framework availability, system step counter hardware, and sensor vitals. Integrates unified health telemetry on Android 14+ without simulation.
  
  Backed by android.health.connect system framework on Android 14+, PackageManager healthdata provider detection, and hardware Sensor.TYPE_STEP_COUNTER / Sensor.TYPE_HEART_RATE HAL drivers. Nothing is simulated: reports real device health telemetry availability.
      operationId: get_useHealthConnect
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useHealthConnect.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHealthConnectTelemetry"
  /hooks/useHealthConnect/actions/refresh:
    post:
      summary: Invoke refresh (useHealthConnect)
      description: Re-probe Health Connect framework and hardware sensors.
      operationId: useHealthConnect_refresh
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHealthConnect_refresh_Response"
  /hooks/useHiLight:
    get:
      summary: The eight-LED ring around the rear camera flash. Real LEDs or nothing.
      description: |
  Controls the coloured lights around the rear camera. Useful as a glanceable signal when the phone is face down: a colour for an incoming call, a pulse while an assistant is thinking. Either it drives the physical LEDs or it reports that it cannot; there is no on-screen substitute.
  
  Android 17 exposes the array as eight lights of type Light.LIGHT_TYPE_APPLICATION, but every lights session needs CONTROL_DEVICE_LIGHTS, which is signature|privileged and cannot be held by a normal app. PixelKit therefore ships a small Java daemon that runs as the adb shell user and listens on 127.0.0.1:11080; start it with npm run hilight:daemon. With the daemon up, availability is hardware and the calls drive real LEDs. Without it, availability is simulated: the colour and pattern state is still tracked and mirrored on screen with haptics, and nothing pretends the lights are on.
      operationId: get_useHiLight
      tags:
        - pro-exclusives
      responses:
        200:
          description: Current telemetry reading from useHiLight.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLightTelemetry"
  /hooks/useHiLight/actions/refreshDaemonStatus:
    post:
      summary: Invoke refreshDaemonStatus (useHiLight)
      description: |
  Re-checks the daemon immediately instead of waiting for the next five-second poll.
  
  **Output Contract**: Resolves true when the daemon answered, false otherwise. The same value lands in isDaemonConnected.
      operationId: useHiLight_refreshDaemonStatus
      tags:
        - pro-exclusives
      responses:
        200:
          description: Result of invoking refreshDaemonStatus.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_refreshDaemonStatus_Response"
  /hooks/useHiLight/actions/setColor:
    post:
      summary: Invoke setColor (useHiLight)
      description: |
  Sets a solid colour and turns the ring on, switching the mode from off to glow when needed.
  
  **Output Contract**: Returns nothing. Nothing lights unless availability is hardware.
      operationId: useHiLight_setColor
      tags:
        - pro-exclusives
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHiLight_setColor_Request"
      responses:
        200:
          description: Result of invoking setColor.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_setColor_Response"
  /hooks/useHiLight/actions/setMode:
    post:
      summary: Invoke setMode (useHiLight)
      description: |
  Switches the animation pattern.
  
  **Output Contract**: Returns nothing; mode and isActive update immediately.
      operationId: useHiLight_setMode
      tags:
        - pro-exclusives
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHiLight_setMode_Request"
      responses:
        200:
          description: Result of invoking setMode.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_setMode_Response"
  /hooks/useHiLight/actions/setBrightness:
    post:
      summary: Invoke setBrightness (useHiLight)
      description: |
  Scales the RGB values sent to the LEDs. The hardware has no separate brightness channel.
  
  **Output Contract**: Returns nothing. Applied immediately when the ring is lit, stored otherwise.
      operationId: useHiLight_setBrightness
      tags:
        - pro-exclusives
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHiLight_setBrightness_Request"
      responses:
        200:
          description: Result of invoking setBrightness.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_setBrightness_Response"
  /hooks/useHiLight/actions/triggerGeminiPulse:
    post:
      summary: Invoke triggerGeminiPulse (useHiLight)
      description: |
  Cyan gemini_thinking hold that clears itself. Pair it with a model call.
  
  **Output Contract**: Returns nothing. A pending timer from an earlier call is cancelled first.
      operationId: useHiLight_triggerGeminiPulse
      tags:
        - pro-exclusives
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHiLight_triggerGeminiPulse_Request"
      responses:
        200:
          description: Result of invoking triggerGeminiPulse.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_triggerGeminiPulse_Response"
  /hooks/useHiLight/actions/triggerContactAlert:
    post:
      summary: Invoke triggerContactAlert (useHiLight)
      description: |
  Coloured incoming_call hold for a caller or event, then clears itself.
  
  **Output Contract**: Returns nothing. Replaces any hold already running.
      operationId: useHiLight_triggerContactAlert
      tags:
        - pro-exclusives
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useHiLight_triggerContactAlert_Request"
      responses:
        200:
          description: Result of invoking triggerContactAlert.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_triggerContactAlert_Response"
  /hooks/useHiLight/actions/turnOff:
    post:
      summary: Invoke turnOff (useHiLight)
      description: |
  Clears the ring and cancels any pending auto-off timer.
  
  **Output Contract**: Returns nothing; mode becomes off and isActive false.
      operationId: useHiLight_turnOff
      tags:
        - pro-exclusives
      responses:
        200:
          description: Result of invoking turnOff.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_turnOff_Response"
  /hooks/useHiLight/actions/toggle:
    post:
      summary: Invoke toggle (useHiLight)
      description: |
  Switches between off and a default blue glow.
  
  **Output Contract**: Returns nothing; isActive flips.
      operationId: useHiLight_toggle
      tags:
        - pro-exclusives
      responses:
        200:
          description: Result of invoking toggle.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useHiLight_toggle_Response"
  /hooks/useKeyAgreement:
    get:
      summary: Hardware-isolated Elliptic Curve Diffie-Hellman session key derivation via Titan M2.
      description: |
  Generates hardware-bound EC keypairs in the Titan M2 security enclave and derives high-entropy shared secrets via ECDH without ever exposing the private key to software memory.
  
  Utilizes AndroidKeyStore and Java Cryptography Architecture (JCA) backed by the Google Titan M2 StrongBox hardware security module. Implements Elliptic Curve Diffie-Hellman (ECDH) on the NIST P-256 (secp256r1) curve with PURPOSE_AGREE_KEY. Generates hardware-isolated keypairs and derives symmetrical AES shared secrets against external peer public keys.
      operationId: get_useKeyAgreement
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useKeyAgreement.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useKeyAgreementTelemetry"
  /hooks/useKeyAgreement/actions/generateKeyPair:
    post:
      summary: Invoke generateKeyPair (useKeyAgreement)
      description: Generates an EC keypair inside the hardware enclave.
      operationId: useKeyAgreement_generateKeyPair
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking generateKeyPair.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useKeyAgreement_generateKeyPair_Response"
  /hooks/useKeyAgreement/actions/deriveSharedSecret:
    post:
      summary: Invoke deriveSharedSecret (useKeyAgreement)
      description: "Derives a shared secret via ECDH with a peer's public key."
      operationId: useKeyAgreement_deriveSharedSecret
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking deriveSharedSecret.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useKeyAgreement_deriveSharedSecret_Response"
  /hooks/useLocation:
    get:
      summary: "Position, altitude, heading and speed from the satellite receiver."
      description: |
  Where the phone is, how accurate that is, which way it is pointing and how fast it is moving. Always check accuracy before trusting a fix, and check permission before assuming you will get one at all.
  
  Streams from expo-location using the high-accuracy provider, which on a Pixel uses the dual-band receiver. The accuracy value is the radius in metres that the platform believes the position lies within; indoors it can be tens of metres and should gate any decision made from the coordinates. Heading and speed are only meaningful while actually moving.
      operationId: get_useLocation
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useLocation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useLocationTelemetry"
  /hooks/useLocation/actions/refreshLocation:
    post:
      summary: Invoke refreshLocation (useLocation)
      description: |
  Requests permission if needed and takes a fresh highest-accuracy fix.
  
  **Output Contract**: Resolves true when a fix arrived, false when permission was denied or the fix failed, with the reason in error. Coordinates never reach the log.
      operationId: useLocation_refreshLocation
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refreshLocation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useLocation_refreshLocation_Response"
  /hooks/useMediaLibrary:
    get:
      summary: "Saving captures to the gallery, and reading what is there."
      description: |
  Puts a photo or video into the user's own gallery, where it survives and other apps can see it. Without this a capture sits in the app's cache and disappears when the system needs space. Also lists recent items and can delete one.
  
  Wraps expo-media-library. SDK 57 uses the class API (Asset.create, Album.create, Query) rather than the deprecated createAssetAsync helpers, which now throw at runtime. Asset fields are async accessors, so the hook flattens each into a plain SavedMedia object that a list can render directly. Permission is more subtle than a yes or no on modern Android: access is granted per media type, and the user can share only selected items, which is what hasLimitedAccess reports.
      operationId: get_useMediaLibrary
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useMediaLibrary.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMediaLibraryTelemetry"
  /hooks/useMediaLibrary/actions/requestPermission:
    post:
      summary: Invoke requestPermission (useMediaLibrary)
      description: |
  Asks for media library access.
  
  **Output Contract**: Resolves true when granted. hasLimitedAccess becomes true when the user shared only selected items, so a grant is not full access.
      operationId: useMediaLibrary_requestPermission
      tags:
        - system-media
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useMediaLibrary_requestPermission_Request"
      responses:
        200:
          description: Result of invoking requestPermission.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMediaLibrary_requestPermission_Response"
  /hooks/useMediaLibrary/actions/save:
    post:
      summary: Invoke save (useMediaLibrary)
      description: |
  Copies a capture out of the app cache into the user media store, where it survives.
  
  **Output Contract**: Resolves with { id, uri, filename, width, height, durationSeconds, creationTime }, or null when permission was denied or the write failed.
      operationId: useMediaLibrary_save
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useMediaLibrary_save_Request"
      responses:
        200:
          description: Result of invoking save.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMediaLibrary_save_Response"
  /hooks/useMediaLibrary/actions/loadRecent:
    post:
      summary: Invoke loadRecent (useMediaLibrary)
      description: |
  Reads the newest items in the library, newest first.
  
  **Output Contract**: Resolves with the items, also written to recent. Empty array when permission was denied.
      operationId: useMediaLibrary_loadRecent
      tags:
        - system-media
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useMediaLibrary_loadRecent_Request"
      responses:
        200:
          description: Result of invoking loadRecent.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMediaLibrary_loadRecent_Response"
  /hooks/useMediaLibrary/actions/remove:
    post:
      summary: Invoke remove (useMediaLibrary)
      description: |
  Deletes an item from the device. The system may show its own confirmation.
  
  **Output Contract**: Resolves true when the item was deleted, and it is dropped from recent.
      operationId: useMediaLibrary_remove
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useMediaLibrary_remove_Request"
      responses:
        200:
          description: Result of invoking remove.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMediaLibrary_remove_Response"
  /hooks/useMemory:
    get:
      summary: "System RAM, this app's heaps, and how close the system is to killing you."
      description: |
  Shows how much memory the phone has left and how much this app is holding. The important field is isLowMemory: when it turns true, Android is close to killing background apps and you should release caches.
  
  System totals come from ActivityManager.getMemoryInfo, polled every two seconds: total RAM, available RAM, the low-memory threshold and the kernel's own low-memory flag. App figures come from Runtime for the Java heap and Debug.getNativeHeapAllocatedSize for the native heap, which is where Hermes, decoded images and JSI allocations live. purgeCaches requests a garbage collection and re-reads; it does not claim to free system RAM, because an app cannot do that.
      operationId: get_useMemory
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useMemory.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMemoryTelemetry"
  /hooks/useMemory/actions/purgeCaches:
    post:
      summary: Invoke purgeCaches (useMemory)
      description: |
  Requests a garbage collection and re-reads the numbers. Advisory only; the runtime decides when to collect, and it can never free system RAM.
  
  **Output Contract**: Returns nothing. The refreshed reading lands in the hook fields, and the amount reclaimed is logged as freedMB.
      operationId: useMemory_purgeCaches
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking purgeCaches.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMemory_purgeCaches_Response"
  /hooks/useMicrophoneArray:
    get:
      summary: "Multi-mic acoustic array topology, polar directivity, and beamforming controls."
      description: |
  Inspects the physical microphone array on the device chassis (top, bottom, rear camera visor), returns polar pattern directivity, and allows steering the hardware acoustic beam towards the user or scene.
  
  Directly queries the Android AudioManager for connected hardware microphones and their geometric coordinates, group mappings, and directivity patterns (omnidirectional, cardioid, hypercardioid). On supported Pixel devices, provides controls to steer acoustic beamforming (towards user, away from user, external) and adjust acoustic zoom field dimension.
      operationId: get_useMicrophoneArray
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useMicrophoneArray.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMicrophoneArrayTelemetry"
  /hooks/useMicrophoneArray/actions/setDirection:
    post:
      summary: Invoke setDirection (useMicrophoneArray)
      description: "Directs acoustic beamforming towards 'user', 'away', 'external', or 'omni'."
      operationId: useMicrophoneArray_setDirection
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking setDirection.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMicrophoneArray_setDirection_Response"
  /hooks/useMicrophoneArray/actions/setFieldZoom:
    post:
      summary: Invoke setFieldZoom (useMicrophoneArray)
      description: Sets the acoustic zoom field dimension (0.0 to 1.0).
      operationId: useMicrophoneArray_setFieldZoom
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking setFieldZoom.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMicrophoneArray_setFieldZoom_Response"
  /hooks/useMicrophoneArray/actions/refresh:
    post:
      summary: Invoke refresh (useMicrophoneArray)
      description: Re-queries hardware microphone state.
      operationId: useMicrophoneArray_refresh
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useMicrophoneArray_refresh_Response"
  /hooks/useNFC:
    get:
      summary: Reading and writing real NFC tags through reader mode.
      description: |
  Reads tags you touch to the back of the phone and can write text to them. Start the reader, hold a tag against the upper third of the phone, and the tag arrives with its identifier, capacity and decoded contents. Writing works the same way: queue the text, then present the tag.
  
  Enables NfcAdapter reader mode on the foreground Activity through the native module. Every tag entering the field raises an event carrying its identifier, supported technologies, NDEF capacity, writability and decoded records; text records have their language prefix stripped and URI records are resolved. Two platform constraints are surfaced rather than hidden: reader mode is bound to the Activity, so it stops when the app is backgrounded and must be started again on resume; and a tag is only readable while physically in the field, so a read either happens in that window or reports why it did not.
      operationId: get_useNFC
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useNFC.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNFCTelemetry"
  /hooks/useNFC/actions/startReader:
    post:
      summary: Invoke startReader (useNFC)
      description: |
  Enables NFC reader mode on the foreground Activity.
  
  **Output Contract**: Resolves true when reader mode started; false with the reason in error when the device has no radio, NFC is switched off, or the build has no reader. Tags then arrive in lastScannedTag.
      operationId: useNFC_startReader
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking startReader.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNFC_startReader_Response"
  /hooks/useNFC/actions/stopReader:
    post:
      summary: Invoke stopReader (useNFC)
      description: |
  Disables reader mode and releases the Activity binding.
  
  **Output Contract**: Resolves once released; isReading becomes false and any pending write is dropped.
      operationId: useNFC_stopReader
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking stopReader.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNFC_stopReader_Response"
  /hooks/useNFC/actions/writeText:
    post:
      summary: Invoke writeText (useNFC)
      description: |
  Queues a text record for the next tag presented. The reader must already be running.
  
  **Output Contract**: Resolves true when the write was queued, not when it completed; the outcome arrives later in lastWriteOk. False with the reason in error when it could not be queued.
      operationId: useNFC_writeText
      tags:
        - radios-security
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useNFC_writeText_Request"
      responses:
        200:
          description: Result of invoking writeText.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNFC_writeText_Response"
  /hooks/useNFC/actions/clearTag:
    post:
      summary: Invoke clearTag (useNFC)
      description: |
  Clears the last read from state, for a "scan another" control.
  
  **Output Contract**: Returns nothing; lastScannedTag and lastWriteOk become null.
      operationId: useNFC_clearTag
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking clearTag.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNFC_clearTag_Response"
  /hooks/useNaturalLanguageAI:
    get:
      summary: "Translation, language detection, smart replies and entity extraction, all offline."
      description: |
  Language tools that work without a connection: translate between 58 languages, work out what language some text is in, suggest replies to a conversation, and pull out things like dates, addresses and tracking numbers.
  
  Wraps the ML Kit language stack through pixel-nano: language-id, translate, smart-reply and entity-extraction. Translation models download per language pair on first use and then run entirely offline, which is why the first call for a new pair is slower. Smart reply takes a short conversation history and proposes replies. Entity extraction returns typed spans with their positions in the original string.
      operationId: get_useNaturalLanguageAI
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useNaturalLanguageAI.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNaturalLanguageAITelemetry"
  /hooks/useNaturalLanguageAI/actions/identifyLanguage:
    post:
      summary: Invoke identifyLanguage (useNaturalLanguageAI)
      description: |
  Detects the language of a sample. Run it before translating when the source is unknown.
  
  **Output Contract**: Resolves with { languageCode, possibleLanguages, latencyMs, source } — languageCode is null when nothing was confident enough — or null on failure.
      operationId: useNaturalLanguageAI_identifyLanguage
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useNaturalLanguageAI_identifyLanguage_Request"
      responses:
        200:
          description: Result of invoking identifyLanguage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNaturalLanguageAI_identifyLanguage_Response"
  /hooks/useNaturalLanguageAI/actions/translate:
    post:
      summary: Invoke translate (useNaturalLanguageAI)
      description: |
  Translates offline. The first call for a language pair downloads that model, so it is slower than the ones after it.
  
  **Output Contract**: Resolves with { translatedText, sourceLanguage, targetLanguage, latencyMs, source }, or null on failure.
      operationId: useNaturalLanguageAI_translate
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useNaturalLanguageAI_translate_Request"
      responses:
        200:
          description: Result of invoking translate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNaturalLanguageAI_translate_Response"
  /hooks/useNaturalLanguageAI/actions/suggestReplies:
    post:
      summary: Invoke suggestReplies (useNaturalLanguageAI)
      description: |
  Proposes short replies for the end of a conversation.
  
  **Output Contract**: Resolves with { suggestions, status, latencyMs, source }. suggestions is empty when the model has nothing confident to offer; null on failure.
      operationId: useNaturalLanguageAI_suggestReplies
      tags:
        - neural-ai
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useNaturalLanguageAI_suggestReplies_Request"
      responses:
        200:
          description: Result of invoking suggestReplies.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNaturalLanguageAI_suggestReplies_Response"
  /hooks/useNaturalLanguageAI/actions/extractEntities:
    post:
      summary: Invoke extractEntities (useNaturalLanguageAI)
      description: |
  Finds dates, addresses, money, phone numbers, flight numbers and tracking codes.
  
  **Output Contract**: Resolves with { entities, latencyMs, source }; each entity carries type, text and the start and end offsets into your input. Null on failure.
      operationId: useNaturalLanguageAI_extractEntities
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useNaturalLanguageAI_extractEntities_Request"
      responses:
        200:
          description: Result of invoking extractEntities.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNaturalLanguageAI_extractEntities_Response"
  /hooks/useNetwork:
    get:
      summary: "Connection type, address and whether traffic actually goes anywhere."
      description: |
  Whether the phone is online, how it is connected, and whether that connection costs money. Check isConnected before any network call, and isMetered before a large download.
  
  Reads from expo-network: interface type, IP address, reachability and airplane mode. Being connected to Wi-Fi is not the same as having internet, which is why isConnected reflects a usable route rather than merely an attached interface. isMetered marks connections where the user pays per byte, typically cellular or a hotspot.
      operationId: get_useNetwork
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useNetwork.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNetworkTelemetry"
  /hooks/useNetwork/actions/refreshNetwork:
    post:
      summary: Invoke refreshNetwork (useNetwork)
      description: |
  Re-runs the connectivity check immediately, for example when the app returns to the foreground.
  
  **Output Contract**: Resolves once the read completes. Each sub-read fails independently, so one missing value does not blank the rest.
      operationId: useNetwork_refreshNetwork
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking refreshNetwork.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useNetwork_refreshNetwork_Response"
  /hooks/usePerfetto:
    get:
      summary: System-level kernel and app performance profiling via Perfetto v54.
      description: |
  Controls high-precision Linux kernel ftrace and Android atrace performance profiling directly from React Native. Captures Tensor G6 CPU frequency scaling, Choreographer frame rendering, and custom app trace sections into .perfetto-trace files viewable in ui.perfetto.dev.
  
  Backed by android.os.Trace, the system Perfetto binary (v54), and Android kernel trace categories (sched, freq, idle, gfx, view, am, wm, camera, hal). Emits zero-overhead hardware trace markers and captures system trace buffers without requiring root privileges. Nothing is simulated: operates directly on physical Android tracing infrastructure.
      operationId: get_usePerfetto
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from usePerfetto.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfettoTelemetry"
  /hooks/usePerfetto/actions/startTrace:
    post:
      summary: Invoke startTrace (usePerfetto)
      description: Start a system trace session with specified categories and buffer size.
      operationId: usePerfetto_startTrace
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking startTrace.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_startTrace_Response"
  /hooks/usePerfetto/actions/stopTrace:
    post:
      summary: Invoke stopTrace (usePerfetto)
      description: Stop the active trace session and write the .perfetto-trace file.
      operationId: usePerfetto_stopTrace
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking stopTrace.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_stopTrace_Response"
  /hooks/usePerfetto/actions/beginSection:
    post:
      summary: Invoke beginSection (usePerfetto)
      description: Emit an android.os.Trace beginSection marker.
      operationId: usePerfetto_beginSection
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking beginSection.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_beginSection_Response"
  /hooks/usePerfetto/actions/endSection:
    post:
      summary: Invoke endSection (usePerfetto)
      description: Emit an android.os.Trace endSection marker.
      operationId: usePerfetto_endSection
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking endSection.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_endSection_Response"
  /hooks/usePerfetto/actions/setCounter:
    post:
      summary: Invoke setCounter (usePerfetto)
      description: Emit an android.os.Trace setCounter metric.
      operationId: usePerfetto_setCounter
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking setCounter.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_setCounter_Response"
  /hooks/usePerfetto/actions/refresh:
    post:
      summary: Invoke refresh (usePerfetto)
      description: Re-probe Perfetto daemon and tracing subsystem.
      operationId: usePerfetto_refresh
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePerfetto_refresh_Response"
  /hooks/usePlayIntegrity:
    get:
      summary: Hardware Key Attestation and Google Play Integrity verdicts via Titan M2.
      description: |
  Generates cryptographic hardware attestation tokens and queries Google Play Integrity and Titan M2 StrongBox KeyMint security. Verifies genuine device integrity, hardware-backed key protection, and bootloader status.
  
  Backed by android.hardware.strongbox_keystore (Titan M2 KeyMint 400), android.hardware.hardware_keystore (500), and Android KeyStore KeyGenParameterSpec attestation. Provides cryptographic hardware verification proving the device is a genuine physical Pixel without root compromise or simulation.
      operationId: get_usePlayIntegrity
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from usePlayIntegrity.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePlayIntegrityTelemetry"
  /hooks/usePlayIntegrity/actions/requestAttestation:
    post:
      summary: Invoke requestAttestation (usePlayIntegrity)
      description: Request hardware-backed key attestation from Titan M2 StrongBox KeyStore.
      operationId: usePlayIntegrity_requestAttestation
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking requestAttestation.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePlayIntegrity_requestAttestation_Response"
  /hooks/usePlayIntegrity/actions/refresh:
    post:
      summary: Invoke refresh (usePlayIntegrity)
      description: Re-probe device security features and Play Integrity status.
      operationId: usePlayIntegrity_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePlayIntegrity_refresh_Response"
  /hooks/usePrivateSpace:
    get:
      summary: Android 15+ Private Space profile isolation detection and vault policy.
      description: |
  Detects whether the running app instance is executing inside Android 15's isolated Private Space vault or the primary profile, and inspects vault auto-lock settings.
  
  Utilizes android.os.UserManager.isPrivateProfile() introduced in Android 15 (API 35). Identifies whether the current application process has been launched within the isolated user profile partition (Private Space), detects whether Private Space has been set up on the device, and reports the active lock policy (immediate, screen_off, device_reboot).
      operationId: get_usePrivateSpace
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from usePrivateSpace.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePrivateSpaceTelemetry"
  /hooks/usePrivateSpace/actions/refresh:
    post:
      summary: Invoke refresh (usePrivateSpace)
      description: Requests an updated check of Private Space status.
      operationId: usePrivateSpace_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/usePrivateSpace_refresh_Response"
  /hooks/useRadios:
    get:
      summary: Every radio subsystem in one read.
      description: |
  A single snapshot of all the wireless hardware: NFC, Bluetooth, ultra-wideband, Wi-Fi precise ranging and satellite messaging. Use this for a status overview instead of calling four separate hooks.
  
  One native call gathers state from NfcAdapter, BluetoothManager, UwbManager, WifiRttManager and PackageManager, refreshed every five seconds. Everything here is read from the platform, so the whole object carries source hardware. It overlaps with useNFC, useBLE and useUWB on purpose: those add per-radio actions, this one is purely for reading state.
      operationId: get_useRadios
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useRadios.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useRadiosTelemetry"
  /hooks/useRadios/actions/refresh:
    post:
      summary: Invoke refresh (useRadios)
      description: |
  Forces an immediate re-read instead of waiting for the next five-second poll.
  
  **Output Contract**: Returns nothing; the nfc, bluetooth, uwb, wifiRtt and satellite blocks update. Call it after sending the user to Settings.
      operationId: useRadios_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useRadios_refresh_Response"
  /hooks/useSatelliteNTN:
    get:
      summary: 3GPP Release-17 Non-Terrestrial Network (satellite SOS) status and alignment telemetry.
      description: |
  Tracks direct-to-satellite modem connectivity for emergency SOS, reporting provider connection states, signal strength bars, and horizon antenna pointing guidance.
  
  Interfaces with Android 15+ (API 35+) satellite telephony services and 3GPP Rel-17 NTN modems. Monitors real-time satellite connection states (disconnected, searching, connected, pointing_assist), provider network names, signal quality bars (0 to 4), emergency SOS packet readiness, and surfaces azimuth and elevation vectors to assist pointing the phone at the horizon satellite constellation.
      operationId: get_useSatelliteNTN
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useSatelliteNTN.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSatelliteNTNTelemetry"
  /hooks/useSatelliteNTN/actions/refresh:
    post:
      summary: Invoke refresh (useSatelliteNTN)
      description: Queries the satellite subsystem for updated connectivity and antenna guidance.
      operationId: useSatelliteNTN_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSatelliteNTN_refresh_Response"
  /hooks/useSecurity:
    get:
      summary: "Encrypted storage for secrets, backed by hardware."
      description: |
  Where API keys and tokens belong. Values are encrypted with a key the operating system holds in secure hardware, so they are not readable from app storage. Never put a secret anywhere else.
  
  Wraps expo-secure-store, which encrypts values using a key held in the Android Keystore and, on devices that have it, StrongBox. Whether this device actually has StrongBox is verified separately by useCapabilities().hasStrongBox. Android 17 does have post-quantum key types, but SecureStore does not use them, so isPostQuantumProtected is false rather than implying protection that is not there.
      operationId: get_useSecurity
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useSecurity.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSecurityTelemetry"
  /hooks/useSecurity/actions/saveSecureItem:
    post:
      summary: Invoke saveSecureItem (useSecurity)
      description: |
  Encrypts and stores a value. This is the only sanctioned place for a secret.
  
  **Output Contract**: Resolves true on success, false with the reason in error on failure.
      operationId: useSecurity_saveSecureItem
      tags:
        - radios-security
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSecurity_saveSecureItem_Request"
      responses:
        200:
          description: Result of invoking saveSecureItem.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSecurity_saveSecureItem_Response"
  /hooks/useSecurity/actions/getSecureItem:
    post:
      summary: Invoke getSecureItem (useSecurity)
      description: |
  Decrypts and returns a stored value.
  
  **Output Contract**: Resolves with the value, or null when nothing is stored under that key or the read failed.
      operationId: useSecurity_getSecureItem
      tags:
        - radios-security
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSecurity_getSecureItem_Request"
      responses:
        200:
          description: Result of invoking getSecureItem.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSecurity_getSecureItem_Response"
  /hooks/useSecurity/actions/deleteSecureItem:
    post:
      summary: Invoke deleteSecureItem (useSecurity)
      description: |
  Removes a stored value.
  
  **Output Contract**: Resolves true when the delete completed, false with the reason in error otherwise.
      operationId: useSecurity_deleteSecureItem
      tags:
        - radios-security
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSecurity_deleteSecureItem_Request"
      responses:
        200:
          description: Result of invoking deleteSecureItem.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSecurity_deleteSecureItem_Response"
  /hooks/useSensors:
    get:
      summary: "Motion, orientation, air pressure and ambient light, streaming live."
      description: |
  A live feed from the phone's motion and environment sensors: how it is being tilted and moved, which way is north, the air pressure, and how bright the room is. Set the interval to trade smoothness against battery.
  
  Streams from expo-sensors: accelerometer and gyroscope for the six-axis IMU, magnetometer for heading, barometer for pressure, and the ambient light sensor. Relative altitude is computed from pressure with the international hypsometric formula, so it is a derived value and drifts with weather. The sampling interval applies to all streams; shorter intervals cost battery and wake the sensor hub more often.
      operationId: get_useSensors
      tags:
        - sensors-actuators
      parameters:
        - name: updateIntervalMs
          in: query
          description: "Sampling period in milliseconds for the IMU, magnetometer and barometer, defaulting to 100; the light sensor samples at twice this. Use 16 to 33 for animation, 500 or more for background monitoring. Changing it re-subscribes every sensor."
          required: false
          schema:
            type: number
      responses:
        200:
          description: Current telemetry reading from useSensors.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSensorsTelemetry"
  /hooks/useSpatialAudio:
    get:
      summary: "Android Spatializer status, binaural rendering, and dynamic head tracking telemetry."
      description: |
  Queries Android's Spatializer audio subsystem (API 32+). Detects whether spatial audio processing is active for the current output routing, whether binaural / transaural mode is enabled, and whether dynamic head tracking sensors (such as Pixel Buds Pro) are actively tracking.
  
  Backed by android.media.Spatializer from the platform AudioManager. Queries audio DSP spatialization effects and checks whether the dynamic head tracker sensor is physically reporting. Nothing is simulated: reads directly from the audio HAL and reports source: 'hardware' on genuine devices.
      operationId: get_useSpatialAudio
      tags:
        - system-media
      responses:
        200:
          description: Current telemetry reading from useSpatialAudio.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpatialAudioTelemetry"
  /hooks/useSpatialAudio/actions/refresh:
    post:
      summary: Invoke refresh (useSpatialAudio)
      description: Manually re-reads spatial audio status from the system AudioManager.
      operationId: useSpatialAudio_refresh
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpatialAudio_refresh_Response"
  /hooks/useSpeech:
    get:
      summary: Speaking text aloud with the voices the phone has installed.
      description: |
  Reads text out loud. This is the output half of voice: useSpeechAI listens, this one talks back. Which voices exist depends on what the user has downloaded in system settings, so check the list rather than assuming a language is available.
  
  Wraps expo-speech, which drives the platform speech service. speak resolves when the engine finishes, so utterances can be awaited in sequence rather than overlapping. Text longer than maxInputLength is rejected rather than silently truncated, because a cut-off sentence is worse than an error. The hook stops the engine on unmount so speech does not continue after the screen is gone.
      operationId: get_useSpeech
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useSpeech.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeechTelemetry"
  /hooks/useSpeech/actions/speak:
    post:
      summary: Invoke speak (useSpeech)
      description: |
  Speaks the text on the platform engine. Await it to sequence utterances instead of overlapping them.
  
  **Output Contract**: Resolves when the engine finishes or is stopped. Rejects when the text is too long or the engine errors, with the message also in error.
      operationId: useSpeech_speak
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeech_speak_Request"
      responses:
        200:
          description: Result of invoking speak.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_speak_Response"
  /hooks/useSpeech/actions/stop:
    post:
      summary: Invoke stop (useSpeech)
      description: |
  Stops speaking immediately and discards the queue.
  
  **Output Contract**: Resolves once stopped; isSpeaking and isPaused become false. Any pending speak promise resolves rather than rejecting.
      operationId: useSpeech_stop
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking stop.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_stop_Response"
  /hooks/useSpeech/actions/pause:
    post:
      summary: Invoke pause (useSpeech)
      description: |
  Suspends and continues an utterance. Not supported by every engine.
  
  **Output Contract**: Resolves once applied; where the engine does not support it, error explains that and isPaused is unchanged.
      operationId: useSpeech_pause
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking pause.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_pause_Response"
  /hooks/useSpeech/actions/resume:
    post:
      summary: Invoke resume (useSpeech)
      description: |
  Suspends and continues an utterance. Not supported by every engine.
  
  **Output Contract**: Resolves once applied; where the engine does not support it, error explains that and isPaused is unchanged.
      operationId: useSpeech_resume
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking resume.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_resume_Response"
  /hooks/useSpeech/actions/checkSpeaking:
    post:
      summary: Invoke checkSpeaking (useSpeech)
      description: |
  Asks the engine directly rather than trusting the local flag.
  
  **Output Contract**: Resolves with the engine answer, which is also written to isSpeaking. False when the engine cannot be reached.
      operationId: useSpeech_checkSpeaking
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking checkSpeaking.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_checkSpeaking_Response"
  /hooks/useSpeech/actions/refreshVoices:
    post:
      summary: Invoke refreshVoices (useSpeech)
      description: |
  Re-reads installed voices, which changes when the user downloads one in system settings.
  
  **Output Contract**: Resolves with the list, also written to voices. Empty array on failure, with the reason in error.
      operationId: useSpeech_refreshVoices
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking refreshVoices.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_refreshVoices_Response"
  /hooks/useSpeech/actions/voicesForLanguage:
    post:
      summary: Invoke voicesForLanguage (useSpeech)
      description: |
  Filters the installed voices to one language, so you can offer a real choice.
  
  **Output Contract**: Returns the matching voices; empty when none are installed for that language.
      operationId: useSpeech_voicesForLanguage
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeech_voicesForLanguage_Request"
      responses:
        200:
          description: Result of invoking voicesForLanguage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_voicesForLanguage_Response"
  /hooks/useSpeech/actions/setVoice:
    post:
      summary: Invoke setVoice (useSpeech)
      description: |
  Defaults applied to later calls to speak, unless that call overrides them.
  
  **Output Contract**: Returns nothing; voice, rate and pitch update.
      operationId: useSpeech_setVoice
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeech_setVoice_Request"
      responses:
        200:
          description: Result of invoking setVoice.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_setVoice_Response"
  /hooks/useSpeech/actions/setRate:
    post:
      summary: Invoke setRate (useSpeech)
      description: |
  Defaults applied to later calls to speak, unless that call overrides them.
  
  **Output Contract**: Returns nothing; voice, rate and pitch update.
      operationId: useSpeech_setRate
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeech_setRate_Request"
      responses:
        200:
          description: Result of invoking setRate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_setRate_Response"
  /hooks/useSpeech/actions/setPitch:
    post:
      summary: Invoke setPitch (useSpeech)
      description: |
  Defaults applied to later calls to speak, unless that call overrides them.
  
  **Output Contract**: Returns nothing; voice, rate and pitch update.
      operationId: useSpeech_setPitch
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeech_setPitch_Request"
      responses:
        200:
          description: Result of invoking setPitch.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeech_setPitch_Response"
  /hooks/useSpeechAI:
    get:
      summary: "Turning speech into text, on the device or in the cloud."
      description: |
  Records the user talking and returns what they said. It can work offline using the phone's own recogniser, or send the clip to Gemini for higher accuracy. Offline is faster and private; cloud handles harder audio.
  
  Capture runs through useAudio at 16 kHz mono on the voice_recognition source, which is the path that applies the platform noise suppression. In offline mode the native module drives Android System Intelligence streaming recognition and emits partial results as the user speaks. In cloud mode the finished clip is sent to Gemini audio understanding. Neither path fabricates a transcript: without a key, cloud mode keeps the recording and returns an error.
      operationId: get_useSpeechAI
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useSpeechAI.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeechAITelemetry"
  /hooks/useSpeechAI/actions/startListening:
    post:
      summary: Invoke startListening (useSpeechAI)
      description: |
  Opens the microphone using the current recognitionMode: the on-device recognizer, or a recording for cloud transcription.
  
  **Output Contract**: Resolves true when the microphone opened, false with the reason in error when permission was denied or the recognizer refused.
      operationId: useSpeechAI_startListening
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking startListening.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeechAI_startListening_Response"
  /hooks/useSpeechAI/actions/stopListeningAndTranscribe:
    post:
      summary: Invoke stopListeningAndTranscribe (useSpeechAI)
      description: |
  Closes the microphone and returns what was heard.
  
  **Output Contract**: Resolves with { transcript, confidence, durationSeconds, latencyMs, language } — confidence is null for cloud transcripts — or null when nothing was captured or transcription failed. In cloud mode the audio file is kept in lastRecordingUri either way.
      operationId: useSpeechAI_stopListeningAndTranscribe
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking stopListeningAndTranscribe.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeechAI_stopListeningAndTranscribe_Response"
  /hooks/useSpeechAI/actions/setRecognitionMode:
    post:
      summary: Invoke setRecognitionMode (useSpeechAI)
      description: |
  Chooses the engine for the next run.
  
  **Output Contract**: Returns nothing. model updates to name the engine that will be used.
      operationId: useSpeechAI_setRecognitionMode
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useSpeechAI_setRecognitionMode_Request"
      responses:
        200:
          description: Result of invoking setRecognitionMode.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useSpeechAI_setRecognitionMode_Response"
  /hooks/useTPU:
    get:
      summary: Whether the on-device AI stack is installed and usable.
      description: |
  Answers one question: can this phone run AI locally? It checks that the system services which host on-device models are present, and reports their versions. It does not run inference itself.
  
  The Tensor TPU is only reachable through AICore (Gemini Nano, via ML Kit) or LiteRT, so this hook reports what is verifiably installed rather than guessing at hardware. AICore and Private Compute Services versions come from PackageManager, which needs a <queries> entry to see them at all. Inference timings deliberately stay null here; real measured latency lives in useGeminiNano. benchmarkTPU runs a genuine matrix multiplication on the JS thread and is labelled CPU fallback, because that is what it is.
      operationId: get_useTPU
      tags:
        - silicon-compute
      responses:
        200:
          description: Current telemetry reading from useTPU.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTPUTelemetry"
  /hooks/useTPU/actions/benchmarkTPU:
    post:
      summary: Invoke benchmarkTPU (useTPU)
      description: |
  Runs a 256x256 float matrix multiply in JavaScript and reports it explicitly as a CPU fallback. No part of it touches the TPU.
  
  **Output Contract**: Resolves with { activeDelegate: "CPU Fallback", isHardwareAccelerated: false, lastInferenceLatencyMs, throughputTokensPerSec: null, memoryFootprintMB: null }. Label it as a CPU number wherever you show it.
      operationId: useTPU_benchmarkTPU
      tags:
        - silicon-compute
      responses:
        200:
          description: Result of invoking benchmarkTPU.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTPU_benchmarkTPU_Response"
  /hooks/useThermometer:
    get:
      summary: Non-contact infrared temperature measurement on Google Pixel Pro hardware.
      description: |
  Reads surface and ambient temperatures from the dedicated far-infrared (FIR) sensor on Pixel 8 Pro, 9 Pro, 10 Pro, and 11 Pro devices. Allows adjusting material emissivity and measurement mode.
  
  Interfaces with the Melexis MLX90632 non-contact FIR temperature sensor integrated into Google Pixel Pro camera visors. Surfaces calibrated surface temperatures in both Celsius and Fahrenheit along with ambient die temperature. Supports configurable emissivity correction factors (0.10 to 1.00) and measurement modes (object, body, ambient). Reports unavailable on non-Pro models.
      operationId: get_useThermometer
      tags:
        - sensors-actuators
      parameters:
        - name: initialEmissivity
          in: query
          description: "Surface emissivity factor from 0.1 to 1.0, defaulting to 0.95 (organic/skin/water)."
          required: false
          schema:
            type: number
      responses:
        200:
          description: Current telemetry reading from useThermometer.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useThermometerTelemetry"
  /hooks/useThermometer/actions/setEmissivity:
    post:
      summary: Invoke setEmissivity (useThermometer)
      description: Updates the material surface emissivity coefficient.
      operationId: useThermometer_setEmissivity
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking setEmissivity.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useThermometer_setEmissivity_Response"
  /hooks/useThermometer/actions/setMode:
    post:
      summary: Invoke setMode (useThermometer)
      description: "Switches the calculation mode between 'object', 'body', and 'ambient'."
      operationId: useThermometer_setMode
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking setMode.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useThermometer_setMode_Response"
  /hooks/useThermometer/actions/refresh:
    post:
      summary: Invoke refresh (useThermometer)
      description: Requests an updated temperature reading from hardware.
      operationId: useThermometer_refresh
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useThermometer_refresh_Response"
  /hooks/useTorch:
    get:
      summary: "The rear flashlight, including variable brightness and an SOS strobe."
      description: |
  Turns the rear light on and off. On this phone the brightness is adjustable in steps rather than just on or off. The state follows the system, so if the user toggles the torch from Quick Settings this hook notices.
  
  Backed by CameraManager.setTorchMode, with turnOnTorchWithStrengthLevel on Android 13 and above for variable brightness. A registered torch callback means external changes are reflected rather than the hook holding a stale belief. Nothing is simulated: when the native module is absent, isAvailable is false and every action rejects instead of pretending.
      operationId: get_useTorch
      tags:
        - sensors-actuators
      responses:
        200:
          description: Current telemetry reading from useTorch.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTorchTelemetry"
  /hooks/useTorch/actions/setTorch:
    post:
      summary: Invoke setTorch (useTorch)
      description: |
  Switches the rear LED, optionally at a specific brightness.
  
  **Output Contract**: Resolves true when the call was accepted, false when the hardware is unavailable or the call threw, with the reason in error.
      operationId: useTorch_setTorch
      tags:
        - sensors-actuators
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useTorch_setTorch_Request"
      responses:
        200:
          description: Result of invoking setTorch.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTorch_setTorch_Response"
  /hooks/useTorch/actions/toggleTorch:
    post:
      summary: Invoke toggleTorch (useTorch)
      description: |
  Flips the current state, stopping any strobe first.
  
  **Output Contract**: Resolves with the state the torch is in afterwards.
      operationId: useTorch_toggleTorch
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking toggleTorch.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTorch_toggleTorch_Response"
  /hooks/useTorch/actions/startStrobe:
    post:
      summary: Invoke startStrobe (useTorch)
      description: |
  Toggles the hardware torch on a timer.
  
  **Output Contract**: Returns nothing; isStrobing becomes true. Replaces any strobe already running.
      operationId: useTorch_startStrobe
      tags:
        - sensors-actuators
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useTorch_startStrobe_Request"
      responses:
        200:
          description: Result of invoking startStrobe.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTorch_startStrobe_Response"
  /hooks/useTorch/actions/stopStrobe:
    post:
      summary: Invoke stopStrobe (useTorch)
      description: |
  Cancels the strobe timer and switches the LED off.
  
  **Output Contract**: Returns nothing; isStrobing becomes false.
      operationId: useTorch_stopStrobe
      tags:
        - sensors-actuators
      responses:
        200:
          description: Result of invoking stopStrobe.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useTorch_stopStrobe_Response"
  /hooks/useUWB:
    get:
      summary: "Ultra-wideband radio state, hardware ranging sessions, and spatial diagnostics."
      description: |
  Reports whether this phone has the short-range precision radio used for precision spatial tracking and car keys, and manages hardware ranging sessions via UwbManager and RangingManager.
  
  Chip presence, enabled state, chip id and ranging service readiness are queried from Android UwbManager and PackageManager through the native module, carrying source hardware. Hardware ranging sessions are initiated via startRanging(), exposing session diagnostics (session ID, protocol status, HAL direct vs declared feature) without mock placeholders.
      operationId: get_useUWB
      tags:
        - pro-exclusives
      responses:
        200:
          description: Current telemetry reading from useUWB.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useUWBTelemetry"
  /hooks/useUWB/actions/startRanging:
    post:
      summary: Invoke startRanging (useUWB)
      description: |
  Initiates a hardware UWB ranging session through UwbManager and RangingManager.
  
  **Output Contract**: Resolves true when the session opened; false with the reason in sessionError when the service is missing or the hardware refused. Diagnostics land in sessionInfo either way.
      operationId: useUWB_startRanging
      tags:
        - pro-exclusives
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useUWB_startRanging_Request"
      responses:
        200:
          description: Result of invoking startRanging.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useUWB_startRanging_Response"
  /hooks/useUWB/actions/stopRanging:
    post:
      summary: Invoke stopRanging (useUWB)
      description: |
  Ends the active UWB ranging session. Safe to call when nothing is running.
  
  **Output Contract**: Returns nothing; isRanging becomes false.
      operationId: useUWB_stopRanging
      tags:
        - pro-exclusives
      responses:
        200:
          description: Result of invoking stopRanging.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useUWB_stopRanging_Response"
  /hooks/useVideo:
    get:
      summary: "Playing video back, with position, seeking and thumbnails."
      description: |
  Plays a video file or stream. The natural partner to the camera: record a clip, hand the file to load(), and play it. It tracks position and duration so you can draw a scrubber, and can pull out frames as images for a poster or filmstrip.
  
  Wraps expo-video, the SDK 57 replacement for the removed expo-av. The hook owns the player and a screen renders VideoView with it. Position, duration, buffered position and status are polled four times a second, which is enough for a scrubber without waking the JS thread every frame. Everything reported comes from the player rather than being tracked locally, so a seek made elsewhere still shows up.
      operationId: get_useVideo
      tags:
        - system-media
      parameters:
        - name: initialSource
          in: query
          description: "Optional file URI, remote URL or bundled asset to load on mount. Defaults to null."
          required: false
          schema:
            $ref: "#/components/schemas/VideoSource"
      responses:
        200:
          description: Current telemetry reading from useVideo.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideoTelemetry"
  /hooks/useVideo/actions/load:
    post:
      summary: Invoke load (useVideo)
      description: |
  Swaps the player source, for example the clip useCamera just recorded.
  
  **Output Contract**: Resolves true when the source was replaced, false with the reason in error otherwise.
      operationId: useVideo_load
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_load_Request"
      responses:
        200:
          description: Result of invoking load.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_load_Response"
  /hooks/useVideo/actions/play:
    post:
      summary: Invoke play (useVideo)
      description: |
  Transport controls for the player this hook owns.
  
  **Output Contract**: Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused.
      operationId: useVideo_play
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking play.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_play_Response"
  /hooks/useVideo/actions/pause:
    post:
      summary: Invoke pause (useVideo)
      description: |
  Transport controls for the player this hook owns.
  
  **Output Contract**: Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused.
      operationId: useVideo_pause
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking pause.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_pause_Response"
  /hooks/useVideo/actions/togglePlay:
    post:
      summary: Invoke togglePlay (useVideo)
      description: |
  Transport controls for the player this hook owns.
  
  **Output Contract**: Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused.
      operationId: useVideo_togglePlay
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking togglePlay.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_togglePlay_Response"
  /hooks/useVideo/actions/seekTo:
    post:
      summary: Invoke seekTo (useVideo)
      description: |
  Jumps to an absolute position.
  
  **Output Contract**: Returns nothing; positionSeconds updates immediately.
      operationId: useVideo_seekTo
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_seekTo_Request"
      responses:
        200:
          description: Result of invoking seekTo.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_seekTo_Response"
  /hooks/useVideo/actions/seekBy:
    post:
      summary: Invoke seekBy (useVideo)
      description: |
  Moves relative to the current position.
  
  **Output Contract**: Returns nothing; on failure error is set.
      operationId: useVideo_seekBy
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_seekBy_Request"
      responses:
        200:
          description: Result of invoking seekBy.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_seekBy_Response"
  /hooks/useVideo/actions/replay:
    post:
      summary: Invoke replay (useVideo)
      description: |
  Restarts from the beginning and plays.
  
  **Output Contract**: Returns nothing; positionSeconds returns to 0.
      operationId: useVideo_replay
      tags:
        - system-media
      responses:
        200:
          description: Result of invoking replay.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_replay_Response"
  /hooks/useVideo/actions/setMuted:
    post:
      summary: Invoke setMuted (useVideo)
      description: |
  Toggles mute and looping.
  
  **Output Contract**: Returns nothing; isMuted and isLooping reflect it. Muting does not change volume.
      operationId: useVideo_setMuted
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_setMuted_Request"
      responses:
        200:
          description: Result of invoking setMuted.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_setMuted_Response"
  /hooks/useVideo/actions/setLoop:
    post:
      summary: Invoke setLoop (useVideo)
      description: |
  Toggles mute and looping.
  
  **Output Contract**: Returns nothing; isMuted and isLooping reflect it. Muting does not change volume.
      operationId: useVideo_setLoop
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_setLoop_Request"
      responses:
        200:
          description: Result of invoking setLoop.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_setLoop_Response"
  /hooks/useVideo/actions/setPlaybackRate:
    post:
      summary: Invoke setPlaybackRate (useVideo)
      description: |
  Sets playback speed with pitch preserved.
  
  **Output Contract**: Returns nothing; playbackRate reflects the clamped value.
      operationId: useVideo_setPlaybackRate
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_setPlaybackRate_Request"
      responses:
        200:
          description: Result of invoking setPlaybackRate.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_setPlaybackRate_Response"
  /hooks/useVideo/actions/setVolume:
    post:
      summary: Invoke setVolume (useVideo)
      description: |
  Sets player volume, independently of mute.
  
  **Output Contract**: Returns nothing; volume updates.
      operationId: useVideo_setVolume
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_setVolume_Request"
      responses:
        200:
          description: Result of invoking setVolume.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_setVolume_Response"
  /hooks/useVideo/actions/setKeepScreenOn:
    post:
      summary: Invoke setKeepScreenOn (useVideo)
      description: |
  Stops the screen dimming mid-clip.
  
  **Output Contract**: Returns nothing.
      operationId: useVideo_setKeepScreenOn
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_setKeepScreenOn_Request"
      responses:
        200:
          description: Result of invoking setKeepScreenOn.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_setKeepScreenOn_Response"
  /hooks/useVideo/actions/generateThumbnails:
    post:
      summary: Invoke generateThumbnails (useVideo)
      description: |
  Extracts frames as images, for a filmstrip or a poster.
  
  **Output Contract**: Resolves with the extracted frames, or an empty array on failure with the reason in error.
      operationId: useVideo_generateThumbnails
      tags:
        - system-media
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVideo_generateThumbnails_Request"
      responses:
        200:
          description: Result of invoking generateThumbnails.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVideo_generateThumbnails_Response"
  /hooks/useVisionAI:
    get:
      summary: "Nine on-device vision capabilities, plus cloud scene understanding."
      description: |
  Everything image-related in one hook. Locally it can read text, scan barcodes, find faces and poses, label objects and cut out the subject. For open-ended questions about a picture it can also send the image to Gemini.
  
  The on-device half wraps the ML Kit vision models through pixel-nano and runs without a network: barcode scanning, text recognition v2, face detection with landmarks and head angles, 468-point face mesh, image labelling, object detection with tracking, 33-point pose detection, selfie and subject segmentation, and digital ink recognition. The cloud half sends a captured or picked image to Gemini and asks for a description plus structured labels. Each on-device call reports its own latency.
      operationId: get_useVisionAI
      tags:
        - neural-ai
      responses:
        200:
          description: Current telemetry reading from useVisionAI.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAITelemetry"
  /hooks/useVisionAI/actions/captureAndAnalyze:
    post:
      summary: Invoke captureAndAnalyze (useVisionAI)
      description: |
  Takes or picks a photo and sends it to Gemini for a description and labels.
  
  **Output Contract**: Resolves with { description, labels, latencyMs, timestamp }, or null when the user cancelled, no API key is configured, or the call failed.
      operationId: useVisionAI_captureAndAnalyze
      tags:
        - neural-ai
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_captureAndAnalyze_Request"
      responses:
        200:
          description: Result of invoking captureAndAnalyze.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_captureAndAnalyze_Response"
  /hooks/useVisionAI/actions/pickImage:
    post:
      summary: Invoke pickImage (useVisionAI)
      description: |
  Opens the camera or the library and loads an image without analysing it.
  
  **Output Contract**: Resolves with the file URI and base64 copy, also stored in selectedImageUri and selectedImageBase64. Null when cancelled or permission was refused.
      operationId: useVisionAI_pickImage
      tags:
        - neural-ai
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_pickImage_Request"
      responses:
        200:
          description: Result of invoking pickImage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_pickImage_Response"
  /hooks/useVisionAI/actions/recognizeText:
    post:
      summary: Invoke recognizeText (useVisionAI)
      description: |
  Reads text from an image, on the device.
  
  **Output Contract**: Resolves with { text, blocks, latencyMs, source }; blocks keep the line and bounding-box structure. Null on failure.
      operationId: useVisionAI_recognizeText
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_recognizeText_Request"
      responses:
        200:
          description: Result of invoking recognizeText.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_recognizeText_Response"
  /hooks/useVisionAI/actions/scanBarcodes:
    post:
      summary: Invoke scanBarcodes (useVisionAI)
      description: |
  Finds and decodes 1D and 2D codes, including QR.
  
  **Output Contract**: Resolves with { barcodes, latencyMs, source }; each barcode carries rawValue, displayValue, format, valueType and a bounding box. Null on failure.
      operationId: useVisionAI_scanBarcodes
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_scanBarcodes_Request"
      responses:
        200:
          description: Result of invoking scanBarcodes.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_scanBarcodes_Response"
  /hooks/useVisionAI/actions/detectFaces:
    post:
      summary: Invoke detectFaces (useVisionAI)
      description: |
  Locates faces and their attributes.
  
  **Output Contract**: Resolves with { faces, latencyMs, source }; each face carries a tracking id, head Euler angles, a bounding box, and smile and eye-open probabilities that are null when classification is off. Null on failure.
      operationId: useVisionAI_detectFaces
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_detectFaces_Request"
      responses:
        200:
          description: Result of invoking detectFaces.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_detectFaces_Response"
  /hooks/useVisionAI/actions/detectObjects:
    post:
      summary: Invoke detectObjects (useVisionAI)
      description: |
  Detects and tracks objects with labels.
  
  **Output Contract**: Resolves with { objects, latencyMs, source }; each object carries a tracking id, a bounding box and labels with confidences. Null on failure.
      operationId: useVisionAI_detectObjects
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_detectObjects_Request"
      responses:
        200:
          description: Result of invoking detectObjects.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_detectObjects_Response"
  /hooks/useVisionAI/actions/detectPose:
    post:
      summary: Invoke detectPose (useVisionAI)
      description: |
  Estimates body pose landmarks.
  
  **Output Contract**: Resolves with { landmarks, latencyMs, source } — 33 landmarks, each with a type, x, y and an in-frame likelihood. Null on failure.
      operationId: useVisionAI_detectPose
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_detectPose_Request"
      responses:
        200:
          description: Result of invoking detectPose.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_detectPose_Response"
  /hooks/useVisionAI/actions/segmentSubject:
    post:
      summary: Invoke segmentSubject (useVisionAI)
      description: |
  Separates the main subject from the background.
  
  **Output Contract**: Resolves with { subjectsCount, foregroundConfidence, latencyMs, source }. Null on failure.
      operationId: useVisionAI_segmentSubject
      tags:
        - neural-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/useVisionAI_segmentSubject_Request"
      responses:
        200:
          description: Result of invoking segmentSubject.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_segmentSubject_Response"
  /hooks/useVisionAI/actions/detectFaceMesh:
    post:
      summary: Invoke detectFaceMesh (useVisionAI)
      description: |
  468-point 3D mesh; needs a close-range face.
  
  **Output Contract**: Promise<FaceMeshResult | null>
      operationId: useVisionAI_detectFaceMesh
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking detectFaceMesh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_detectFaceMesh_Response"
  /hooks/useVisionAI/actions/labelImage:
    post:
      summary: Invoke labelImage (useVisionAI)
      description: |
  Classifies entities and scenes with confidences.
  
  **Output Contract**: Promise<ImageLabelResult | null>
      operationId: useVisionAI_labelImage
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking labelImage.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_labelImage_Response"
  /hooks/useVisionAI/actions/segmentSelfie:
    post:
      summary: Invoke segmentSelfie (useVisionAI)
      description: |
  Foreground portrait mask.
  
  **Output Contract**: Promise<SelfieSegmentationResult | null>
      operationId: useVisionAI_segmentSelfie
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking segmentSelfie.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_segmentSelfie_Response"
  /hooks/useVisionAI/actions/recognizeDigitalInk:
    post:
      summary: Invoke recognizeDigitalInk (useVisionAI)
      description: |
  Recognises handwriting from stroke data, best candidate first.
  
  **Output Contract**: Promise<DigitalInkResult | null>
      operationId: useVisionAI_recognizeDigitalInk
      tags:
        - neural-ai
      responses:
        200:
          description: Result of invoking recognizeDigitalInk.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useVisionAI_recognizeDigitalInk_Response"
  /hooks/useWifi7MLO:
    get:
      summary: Wi-Fi 7 (802.11be) Multi-Link Operation and 320 MHz channel telemetry.
      description: |
  Inspects affiliated Wi-Fi 7 radio links operating simultaneously across 2.4 GHz, 5 GHz, and 6 GHz spectrum, reporting bonded link speeds and channel bandwidths.
  
  Reads Multi-Link Operation (MLO) telemetry introduced in Android 14+ (API 34+) for 802.11be Wi-Fi 7 routers and modems. Surfaces the array of active affiliated links, their respective channel widths (including ultra-wide 320 MHz channels on 6 GHz), per-link transmit and receive speeds, and calculates combined aggregate throughput. Reports inactive on Wi-Fi 6 or earlier.
      operationId: get_useWifi7MLO
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useWifi7MLO.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useWifi7MLOTelemetry"
  /hooks/useWifi7MLO/actions/refresh:
    post:
      summary: Invoke refresh (useWifi7MLO)
      description: Requests an updated reading of affiliated Wi-Fi 7 links.
      operationId: useWifi7MLO_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useWifi7MLO_refresh_Response"
  /hooks/useWifiRTT:
    get:
      summary: Fine Timing Measurement (FTM / 802.11az) indoor centimeter-level positioning.
      description: |
  Measures round-trip time (RTT) distance between the phone and nearby Wi-Fi access points to determine indoor location within 1 to 2 meters without GPS.
  
  Utilizes android.net.wifi.rtt.WifiRttManager for 802.11mc / 802.11az Fine Timing Measurement ranging. Discovers RTT-capable access points and measures exact flight time in picoseconds, returning calculated distances in millimeters with standard deviation accuracy metrics. Operates indoors where satellite GNSS signals are obstructed.
      operationId: get_useWifiRTT
      tags:
        - radios-security
      responses:
        200:
          description: Current telemetry reading from useWifiRTT.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useWifiRTTTelemetry"
  /hooks/useWifiRTT/actions/startRanging:
    post:
      summary: Invoke startRanging (useWifiRTT)
      description: Performs round-trip time distance ranging to target BSSIDs.
      operationId: useWifiRTT_startRanging
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking startRanging.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useWifiRTT_startRanging_Response"
  /hooks/useWifiRTT/actions/refresh:
    post:
      summary: Invoke refresh (useWifiRTT)
      description: Refreshes Wi-Fi RTT service status.
      operationId: useWifiRTT_refresh
      tags:
        - radios-security
      responses:
        200:
          description: Result of invoking refresh.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/useWifiRTT_refresh_Response"
components:
  schemas:
    TelemetrySource:
      type: string
      enum:
        - hardware
        - derived
        - unavailable
      description: "Data provenance indicator. PixelKit strictly adheres to the Zero-Simulation Principle: values are real hardware measurements ('hardware'), computed directly from hardware ('derived'), or unavailable ('unavailable'). Unreadable values return null."
    HookCatalogItem:
      type: object
      properties:
        id:
          type: string
          example: useThermometer
        name:
          type: string
          example: useThermometer
        category:
          type: string
          example: sensors-actuators
        chipBadge:
          type: string
          example: FIR · MLX90632 · thermal
        summary:
          type: string
        description:
          type: string
      required:
        - id
        - name
        - category
        - summary
    Vector3D:
      type: object
      description: 3-dimensional Cartesian vector for spatial orientation.
      properties:
        x:
          type: number
          description: Lateral tilt or movement
        y:
          type: number
          description: Longitudinal tilt or movement
        z:
          type: number
          description: Vertical gravitational force or spin
      required:
        - x
        - y
        - z
    BarometerData:
      type: object
      description: Atmospheric pressure and barometric altitude.
      properties:
        pressure:
          anyOf:
            - type: number
            - type: null
          description: Pressure in hPa
        relativeAltitude:
          anyOf:
            - type: number
            - type: null
          description: Altitude in meters
    MloLinkInfo:
      type: object
      description: Affiliated Wi-Fi 7 Multi-Link Operation (MLO) link.
      properties:
        band:
          type: string
          enum:
            - 2.4GHz
            - 5GHz
            - 6GHz
        channelWidthMHz:
          type: number
        rssi:
          type: number
        txLinkSpeedMbps:
          type: number
        rxLinkSpeedMbps:
          type: number
        state:
          type: string
    WifiRttResult:
      type: object
      description: Wi-Fi RTT 802.11mc/802.11az ranging measurement.
      properties:
        bssid:
          type: string
        distanceMm:
          anyOf:
            - type: number
            - type: null
        distanceStdDevMm:
          anyOf:
            - type: number
            - type: null
        rssi:
          anyOf:
            - type: number
            - type: null
        status:
          type: string
    BlePeripheral:
      type: object
      description: Discovered Bluetooth Low Energy peripheral.
      properties:
        id:
          type: string
        name:
          anyOf:
            - type: string
            - type: null
        rssi:
          type: number
        txPower:
          anyOf:
            - type: number
            - type: null
        isConnectable:
          type: boolean
    MicrophoneInfo:
      type: object
      description: Microphone hardware characteristics from acoustic array.
      properties:
        id:
          type: number
        type:
          type: string
        location:
          type: string
        directionality:
          type: string
        address:
          anyOf:
            - type: string
            - type: null
    CapturedPhoto:
      type: object
      description: Captured high-resolution photo.
      properties:
        uri:
          type: string
        width:
          type: number
        height:
          type: number
        base64:
          anyOf:
            - type: string
            - type: null
    SavedMedia:
      type: object
      description: Media item saved in the gallery.
      properties:
        id:
          type: string
        filename:
          type: string
        uri:
          type: string
        mediaType:
          type: string
        width:
          type: number
        height:
          type: number
        duration:
          type: number
    KeyAgreementKeyPairResult:
      type: object
      description: ECDH key pair generated in Titan M2 hardware.
      properties:
        alias:
          type: string
        publicKeyBase64:
          type: string
        algorithm:
          type: string
        isStrongBoxBacked:
          type: boolean
    SharedSecretResult:
      type: object
      description: Derived ECDH shared secret.
      properties:
        sharedSecretBase64:
          type: string
        keyLengthBits:
          type: number
    SatelliteGuidance:
      type: object
      description: Antenna pointing guidance for non-terrestrial satellite alignment.
      properties:
        azimuthDeg:
          type: number
        elevationDeg:
          type: number
        isAligned:
          type: boolean
    useADPFTelemetry:
      type: object
      description: |
  How much thermal room is left before the phone slows itself down.
  
  thermalHeadroom comes from PowerManager.getThermalHeadroom and is sampled every ten seconds, which is the cadence Google specifies; polling faster returns NaN. A live thermal-status listener reports the coarse state from NONE through SHUTDOWN. On Android 16 and above, SystemHealthManager can also report CPU and GPU headroom, which stays null when the device does not provide it. Frame figures pair the display mode refresh rate as a target with the Choreographer-measured rate as the actual.
      properties:
        thermalHeadroom:
          anyOf:
            - type: number
            - type: null
          description: "0 is cool, 1 means throttling is imminent. The single number to gate heavy work on."
        thermalThresholds:
          anyOf:
            - type: object
              additionalProperties: true
            - type: null
          description: Headroom values at which this specific device enters each thermal status.
        thermalStatus:
          type: string
          enum:
            - nominal
            - light
            - moderate
            - severe
            - critical
          description: "Coarse state, updated by a system listener rather than polling."
        thermalStatusCode:
          type: number
          description: Raw PowerManager constant behind that label.
        cpuHeadroom:
          anyOf:
            - type: number
            - type: null
          description: Android 16+ remaining CPU capacity. Null when the device does not report it.
        gpuHeadroom:
          anyOf:
            - type: number
            - type: null
          description: Same for the GPU.
        targetFps:
          anyOf:
            - type: number
            - type: null
          description: Refresh rate of the current display mode.
        currentFps:
          anyOf:
            - type: number
            - type: null
          description: "Frames actually presented, measured by Choreographer."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useADPF_reportWorkDuration_Request:
      type: object
      description: Request payload for reportWorkDuration on useADPF.
      properties:
        actualWorkDurationMs:
          type: number
          description: "How long the work you just did actually took, in milliseconds."
        targetDurationMs:
          type: number
          description: "Budget to judge it against. Defaults to 1000 / targetFps, or 8.33 ms before the refresh rate has been read."
      required:
        - actualWorkDurationMs
    useADPF_reportWorkDuration_Response:
      type: object
      description: Response payload for reportWorkDuration on useADPF.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "'WITHIN_BUDGET' when the work fits the frame, 'BOOST_REQUESTED' when it overran and you should shed work."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useADPFHintSessionTelemetry:
      type: object
      description: |
  Active frame workload negotiation with Android Dynamic Performance Framework and Tensor EAS.
  
  Interfaces directly with android.os.PerformanceHintManager (Android 12+ API 31+). Manages an active thread hint session allowing apps to report exact frame computation times in nanoseconds. This informs the kernel scheduler in real-time whether the workload is meeting its deadline (e.g. 16.67ms for 60Hz or 8.33ms for 120Hz), scaling frequencies up only when needed.
      properties:
        isSupported:
          type: boolean
          description: Whether ADPF PerformanceHintManager sessions are supported on this device.
        targetFrameDurationMs:
          type: number
          description: Current target frame render budget in milliseconds.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if hint session creation or reporting failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useADPFHintSession_reportWorkDuration_Request:
      type: object
      description: Request payload for reportWorkDuration on useADPFHintSession.
      properties:{}
    useADPFHintSession_reportWorkDuration_Response:
      type: object
      description: Response payload for reportWorkDuration on useADPFHintSession.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useADPFHintSession_updateTargetWorkDuration_Request:
      type: object
      description: Request payload for updateTargetWorkDuration on useADPFHintSession.
      properties:{}
    useADPFHintSession_updateTargetWorkDuration_Response:
      type: object
      description: Response payload for updateTargetWorkDuration on useADPFHintSession.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useADPFHintSession_closeSession_Request:
      type: object
      description: Request payload for closeSession on useADPFHintSession.
      properties:{}
    useADPFHintSession_closeSession_Response:
      type: object
      description: Response payload for closeSession on useADPFHintSession.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAltimeterTelemetry:
      type: object
      description: |
  Precision barometric altimetry, vertical climb/descent velocity, and weather trends.
  
  Derived from the physical air pressure sensor via expo-sensors. Computes altitude above calibrated sea level using the standard barometric formula: h = 44330 * (1 - (P / P0)^0.1903). Automatically computes vertical velocity (rate of climb/descent in m/s) with exponential smoothing, categorizes atmospheric pressure trends (rising, steady, falling, rapid_fall), and supports local QNH calibration.
      properties:
        altitudeM:
          anyOf:
            - type: number
            - type: null
          description: Current barometric altitude in meters above calibrated sea level. Null until first sample.
        altitudeFt:
          anyOf:
            - type: number
            - type: null
          description: Current barometric altitude in feet above calibrated sea level. Null until first sample.
        verticalVelocityMs:
          anyOf:
            - type: number
            - type: null
          description: "Rate of climb or descent in meters per second (m/s), smoothed over recent samples. Null until moving."
        pressureHpa:
          anyOf:
            - type: number
            - type: null
          description: Raw atmospheric pressure in hectopascals (hPa / mbar).
        seaLevelPressureHpa:
          type: number
          description: Calibrated reference sea-level pressure in hPa. Defaults to standard 1013.25.
        pressureTrend:
          anyOf:
            - type: string
              enum:
                - rising
                - steady
                - falling
                - rapid_fall
            - type: null
          description: Short-term pressure change trend indicating weather changes (rapid_fall indicates storm front).
        isAvailable:
          type: boolean
          description: Whether the hardware barometer is present and streaming.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if sensor access or subscription failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'derived' from hardware barometer, or 'unavailable'."
      required:
        - source
    useAltimeter_calibrateSeaLevel_Request:
      type: object
      description: Request payload for calibrateSeaLevel on useAltimeter.
      properties:{}
    useAltimeter_calibrateSeaLevel_Response:
      type: object
      description: Response payload for calibrateSeaLevel on useAltimeter.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAltimeter_resetCalibration_Request:
      type: object
      description: Request payload for resetCalibration on useAltimeter.
      properties:{}
    useAltimeter_resetCalibration_Response:
      type: object
      description: Response payload for resetCalibration on useAltimeter.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAppFunctionsTelemetry:
      type: object
      description: |
  Exposes on-device actions and hardware capabilities to system AI and Gemini Assistant.
  
  Backed by android.app.appfunctions.IAppFunctionManager (system service 133 on Pixel 11 Pro). Exposes built-in hardware actions ('check_phone_thermals', 'purge_memory_cache', 'get_device_silicon_info') and enables developers to register custom AppFunction schemas and handlers dynamically. Reports source: 'hardware' when backed by the real system service.
      properties:
        isSupported:
          type: boolean
          description: "Whether AppFunctions subsystem is supported on this Android OS version (API 36+ / Android 16 QPR & Android 17)."
        serviceFound:
          type: boolean
          description: Whether the android.app.appfunctions.IAppFunctionManager system service is active and discoverable on device.
        apiLevel:
          anyOf:
            - type: number
            - type: null
          description: Android platform API level reported by the device (37 on Pixel 11 Pro).
        serviceName:
          anyOf:
            - type: string
            - type: null
          description: "System service name ('app_function')."
        functions:
          type: array
          items:
            $ref: "#/components/schemas/AppFunctionSchema"
          description: "All registered AppFunction schemas available to Gemini, agents, or local invocation."
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest execution or system service error.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Provenance of AppFunctions state. Real hardware with active app_function service reports 'hardware'."
      required:
        - source
    useAppFunctions_executeFunction_Request:
      type: object
      description: Request payload for executeFunction on useAppFunctions.
      properties:{}
    useAppFunctions_executeFunction_Response:
      type: object
      description: Response payload for executeFunction on useAppFunctions.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAppFunctions_registerFunction_Request:
      type: object
      description: Request payload for registerFunction on useAppFunctions.
      properties:{}
    useAppFunctions_registerFunction_Response:
      type: object
      description: Response payload for registerFunction on useAppFunctions.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAppFunctions_unregisterFunction_Request:
      type: object
      description: Request payload for unregisterFunction on useAppFunctions.
      properties:{}
    useAppFunctions_unregisterFunction_Response:
      type: object
      description: Response payload for unregisterFunction on useAppFunctions.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudioTelemetry:
      type: object
      description: |
  Microphone recording with levels and input choice, plus playback.
  
  Built on expo-audio. The speech profile records 16 kHz mono through the voice_recognition source, which is the path that applies the platform noise suppression and is what speech APIs expect; the studio profile records 48 kHz stereo through unprocessed, the raw microphone with no platform processing. Levels are read every 100 ms from the recorder status in dBFS, where -160 is digital silence and 0 is clipping; level maps that onto 0 to 1 with a floor at -60 dBFS so meters behave sensibly. Microphone enumeration only works once the recorder has been prepared, which is why inputs populate after recording starts. Playback routing between speaker and earpiece is an audio-mode setting, so it applies to the whole app.
      properties:
        isRecording:
          type: boolean
          description: Whether the microphone is open. Stays true while paused.
        isPaused:
          type: boolean
          description: Whether the current take is paused.
        canRecord:
          type: boolean
          description: Whether the recorder reports it is ready to start.
        permissionGranted:
          type: boolean
          description: Whether microphone permission has been granted.
        durationSeconds:
          type: number
          description: Elapsed seconds of the current take.
        quality:
          type: string
          enum:
            - speech
            - studio
          description: Active capture profile.
        meteringDecibels:
          type: number
          description: "Live level in dBFS, -160 silence to 0 clipping."
        peakDecibels:
          type: number
          description: "Loudest level seen during this take, for a peak indicator."
        level:
          type: number
          description: "0 to 1 version of the level, floored at -60 dBFS. Use this to drive a meter."
        isSilent:
          type: boolean
          description: "True while the level sits below the silence threshold. Useful for a \"say something\" hint."
        silenceThresholdDbfs:
          type: number
          description: "Boundary between silence and speech, -45 dBFS by default."
        inputs:
          type: array
          items:
            $ref: "#/components/schemas/RecordingInput"
          description: "Microphones the platform offers, populated once recording has been prepared."
        currentInputUid:
          anyOf:
            - type: string
            - type: null
          description: Which microphone is selected.
        route:
          type: string
          enum:
            - speaker
            - earpiece
          description: Where playback is sent.
        lastRecordingUri:
          anyOf:
            - type: string
            - type: null
          description: File of the last completed recording.
        isPlaying:
          type: boolean
          description: Whether playback is running.
        playbackPositionSeconds:
          type: number
          description: "Playback position, for a scrubber."
        playbackDurationSeconds:
          type: number
          description: Length of the audio being played.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last action failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useAudio_startRecording_Request:
      type: object
      description: Request payload for startRecording on useAudio.
      properties:
        options.maxDurationSeconds:
          type: number
          description: Stop automatically after this many seconds; the recorder finalises the file itself.
        options.quality:
          type: string
          enum:
            - speech
            - studio
          description: "Profile for this take, which also becomes the active profile. speech is 16 kHz mono noise-suppressed, studio is 48 kHz stereo unprocessed."
    useAudio_startRecording_Response:
      type: object
      description: Response payload for startRecording on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when recording started, false with the reason in error when permission was denied or the recorder refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_pauseRecording_Request:
      type: object
      description: Request payload for pauseRecording on useAudio.
      properties:{}
    useAudio_pauseRecording_Response:
      type: object
      description: Response payload for pauseRecording on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns true when the take was paused, false when nothing was recording or it was already paused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_resumeRecording_Request:
      type: object
      description: Request payload for resumeRecording on useAudio.
      properties:{}
    useAudio_resumeRecording_Response:
      type: object
      description: Response payload for resumeRecording on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns true when recording resumed, false when there was nothing paused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_stopRecording_Request:
      type: object
      description: Request payload for stopRecording on useAudio.
      properties:{}
    useAudio_stopRecording_Response:
      type: object
      description: Response payload for stopRecording on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the recorded file URI, also stored in lastRecordingUri, or null when nothing was recording or the stop failed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_setSilenceThresholdDbfs_Request:
      type: object
      description: Request payload for setSilenceThresholdDbfs on useAudio.
      properties:
        dbfs:
          type: number
          description: "Threshold in dBFS, -45 by default. A quiet room sits near -50, so raising it makes isSilent stricter."
      required:
        - dbfs
    useAudio_setSilenceThresholdDbfs_Response:
      type: object
      description: Response payload for setSilenceThresholdDbfs on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isSilent re-evaluates on the next metering sample.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_setQuality_Request:
      type: object
      description: Request payload for setQuality on useAudio.
      properties:
        quality:
          type: string
          enum:
            - speech
            - studio
          description: speech records 16 kHz mono through the noise-suppressed voice path; studio records 48 kHz stereo unprocessed.
      required:
        - quality
    useAudio_setQuality_Response:
      type: object
      description: Response payload for setQuality on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; quality updates immediately.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_refreshInputs_Request:
      type: object
      description: Request payload for refreshInputs on useAudio.
      properties:{}
    useAudio_refreshInputs_Response:
      type: object
      description: Response payload for refreshInputs on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns the list, also written to inputs. Empty when the platform cannot answer."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_selectInput_Request:
      type: object
      description: Request payload for selectInput on useAudio.
      properties:
        uid:
          type: string
          description: A uid from the inputs list.
      required:
        - uid
    useAudio_selectInput_Response:
      type: object
      description: Response payload for selectInput on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns true when the platform accepted it, false with the reason in error otherwise."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_setRoute_Request:
      type: object
      description: Request payload for setRoute on useAudio.
      properties:
        route:
          type: string
          enum:
            - speaker
            - earpiece
          description: "earpiece is the quiet, held-to-the-ear path."
      required:
        - route
    useAudio_setRoute_Response:
      type: object
      description: Response payload for setRoute on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once the audio mode is applied; on failure route is unchanged and error is set.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_playLastRecording_Request:
      type: object
      description: Request payload for playLastRecording on useAudio.
      properties:
        uri:
          type: string
          description: A specific file to play. Defaults to lastRecordingUri.
    useAudio_playLastRecording_Response:
      type: object
      description: Response payload for playLastRecording on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when playback started, false when there is nothing to play or the player refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_pausePlayback_Request:
      type: object
      description: Request payload for pausePlayback on useAudio.
      properties:{}
    useAudio_pausePlayback_Response:
      type: object
      description: Response payload for pausePlayback on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isPlaying becomes false and position polling stops.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_stopPlayback_Request:
      type: object
      description: Request payload for stopPlayback on useAudio.
      properties:{}
    useAudio_stopPlayback_Response:
      type: object
      description: Response payload for stopPlayback on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once rewound; playbackPositionSeconds returns to 0.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useAudio_seekPlayback_Request:
      type: object
      description: Request payload for seekPlayback on useAudio.
      properties:
        seconds:
          type: number
          description: Absolute position; negatives are clamped to 0.
      required:
        - seconds
    useAudio_seekPlayback_Response:
      type: object
      description: Response payload for seekPlayback on useAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once the seek completes; playbackPositionSeconds updates.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBLETelemetry:
      type: object
      description: |
  Bluetooth adapter state, Channel Sounding, bonded devices, and active BLE peripheral discovery.
  
  Adapter state, Channel Sounding support and the bonded device list are read from Android BluetoothAdapter through the native module with source hardware. Live peripheral discovery scans for nearby BLE beacons using Android BluetoothLeScanner, returning verified MAC addresses, RSSI (dBm), and log-distance path loss distance estimations.
      properties:
        isSupported:
          type: boolean
          description: Whether the device has Bluetooth Low Energy.
        isEnabled:
          type: boolean
          description: Whether Bluetooth is switched on in settings.
        state:
          type: string
          enum:
            - ON
            - OFF
            - TURNING_ON
            - TURNING_OFF
          description: "Adapter state, including the transitional values."
        channelSounding:
          type: boolean
          description: "Whether Bluetooth 5.4 Channel Sounding, used for accurate distance, is supported."
        bondedDevices:
          type: array
          items:
            $ref: "#/components/schemas/BondedDevice"
          description: Devices already paired with this phone. Real data.
        isScanning:
          type: boolean
          description: Whether a BLE scan is running.
        peripherals:
          type: array
          items:
            $ref: "#/components/schemas/BLEPeripheral"
          description: Discovered nearby BLE peripherals with genuine RSSI and distance estimate.
        scanError:
          anyOf:
            - type: string
            - type: null
          description: Error message if scanning fails to start or times out.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest adapter-level failure message. Failures are also logged and counted.
      required:
        - source
    useBLE_startScan_Request:
      type: object
      description: Request payload for startScan on useBLE.
      properties:
        timeoutMs:
          type: number
          description: "How long to scan before stopping automatically, in milliseconds. Defaults to 10000."
    useBLE_startScan_Response:
      type: object
      description: Response payload for startScan on useBLE.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the scan started; false with the reason in scanError otherwise. Results appear in peripherals, polled every 500 ms."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBLE_stopScan_Request:
      type: object
      description: Request payload for stopScan on useBLE.
      properties:{}
    useBLE_stopScan_Response:
      type: object
      description: Response payload for stopScan on useBLE.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; a final results sync runs first, so nothing already discovered is lost."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBatteryShareTelemetry:
      type: object
      description: |
  Google Pixel Battery Share (Reverse Wireless Qi Charging) telemetry and actuator.
  
  Directly interfaces with the Google Pixel reverse wireless charging subsystem (/sys/class/power_supply/wireless/reverse_chg_mode). Reports whether wireless power transfer is active, whether a compatible Qi receiver is docked, real-time power transmission in watts, and allows programmatically enabling or disabling power transfer with safety cutoff thresholds.
      properties:
        isSupported:
          type: boolean
          description: Whether this device hardware supports reverse wireless power transmission.
        isActive:
          type: boolean
          description: Whether the Qi TX reverse charging coil is currently energized.
        isReceiverDetected:
          type: boolean
          description: Whether a compatible Qi receiver device is docked on the reverse charging coil.
        transmittedWatts:
          anyOf:
            - type: number
            - type: null
          description: "Real-time power transmitted in watts (W), or null if inactive/unsupported."
        batteryThreshold:
          type: number
          description: Configured battery percentage cutoff threshold (stops sharing below this percentage).
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if reading or toggling the coil failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useBatteryShare_setBatteryShare_Request:
      type: object
      description: Request payload for setBatteryShare on useBatteryShare.
      properties:{}
    useBatteryShare_setBatteryShare_Response:
      type: object
      description: Response payload for setBatteryShare on useBatteryShare.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBatteryShare_setBatteryThreshold_Request:
      type: object
      description: Request payload for setBatteryThreshold on useBatteryShare.
      properties:{}
    useBatteryShare_setBatteryThreshold_Response:
      type: object
      description: Response payload for setBatteryThreshold on useBatteryShare.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBatteryShare_refresh_Request:
      type: object
      description: Request payload for refresh on useBatteryShare.
      properties:{}
    useBatteryShare_refresh_Response:
      type: object
      description: Response payload for refresh on useBatteryShare.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBiometricsTelemetry:
      type: object
      description: |
  Fingerprint and face authentication.
  
  Uses the platform BiometricPrompt through expo-local-authentication, which on a Pixel is backed by the hardware security module. The two checks matter separately: a device can have the sensor but no enrolled credential, in which case authentication cannot succeed and you should fall back to a passcode path.
      properties:
        hasHardware:
          type: boolean
          description: Whether a biometric sensor exists.
        isEnrolled:
          type: boolean
          description: "Whether the user has registered a fingerprint or face. Without this, prompts fail."
        supportedTypes:
          type: array
          items:
            type: string
          description: "Which modalities are available, such as fingerprint or face."
        hasChecked:
          type: boolean
          description: "Whether the capability read has completed. Before it, treat the other flags as unknown rather than false."
        lastResult:
          anyOf:
            - type: string
              enum:
                - success
                - failed
                - cancelled
            - type: null
          description: "Outcome of the last prompt. `null` before the first attempt. Distinguishes a deliberate cancel from a rejected credential."
        error:
          anyOf:
            - type: string
            - type: null
          description: Set only when a call itself failed — not when the user cancelled or was not recognised.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "`'hardware'` once capabilities have been read, `'unavailable'` before that."
      required:
        - source
    useBiometrics_authenticate_Request:
      type: object
      description: Request payload for authenticate on useBiometrics.
      properties:
        promptMessage:
          type: string
          description: "The line shown in the system sheet. Defaults to \"Verify identity with Pixel Biometrics\"."
    useBiometrics_authenticate_Response:
      type: object
      description: Response payload for authenticate on useBiometrics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves true only on success. A cancel or a mismatch resolves false without setting error; missing hardware or no enrolment resolves false and sets error. lastResult tells the three apart.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useBiometrics_refresh_Request:
      type: object
      description: Request payload for refresh on useBiometrics.
      properties:{}
    useBiometrics_refresh_Response:
      type: object
      description: Response payload for refresh on useBiometrics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "`Promise<void>` — updates `hasHardware`, `isEnrolled`, `supportedTypes`"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCPUTelemetry:
      type: object
      description: |
  What the CPU is and how hard it is working right now.
  
  Core identity comes from /proc/cpuinfo and per-core frequencies from the cpufreq sysfs tree, both read through the PixelNative module. Two different load signals are reported and they mean different things: cpuLoadPercent is how close the cores are running to their maximum clock, read from hardware; appCpuPercent is this app's own share of CPU time, computed from process time over wall time. Android does not let apps read system-wide /proc/stat, so a true "system load" figure does not exist here and is not invented.
      properties:
        coreTopology:
          type: string
          description: "Readable summary of the clusters, for example \"1x Arm C1-Ultra @ 4.11 GHz + 4x Arm C1-Pro @ 3.38 GHz\"."
        coreCount:
          type: number
          description: Cores visible to this process. Seven on the Tensor G6.
        cpuLoadPercent:
          anyOf:
            - type: number
            - type: null
          description: "How close the cores are to their maximum clock, averaged. Null when the sysfs files cannot be read."
        appCpuPercent:
          anyOf:
            - type: number
            - type: null
          description: "This app's own CPU usage. Null on the very first sample because it needs two readings."
        cores:
          type: array
          items:
            type: object
            description: "{ index, part, name, curMHz, maxMHz, minMHz }"
          description: "Per-core detail, including the frequency each core is running at right now."
        clusters:
          type: array
          items:
            type: object
            description: "{ part, name, maxMHz, count }"
          description: "Cores grouped by type, which is how you tell the big cores from the efficiency ones."
        governorMode:
          type: string
          description: "Kernel scheduling policy for cpu0, \"sched_pixel\" on this device. Read-only without root."
        lastBenchmarkDurationMs:
          anyOf:
            - type: number
            - type: null
          description: Milliseconds the last benchmark took. Null until you run one.
        isBenchmarking:
          type: boolean
          description: "True while the benchmark is running, so you can disable the button."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useCPU_benchmarkCPU_Request:
      type: object
      description: Request payload for benchmarkCPU on useCPU.
      properties:{}
    useCPU_benchmarkCPU_Response:
      type: object
      description: Response payload for benchmarkCPU on useCPU.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the run duration in milliseconds, which is also written to lastBenchmarkDurationMs. Lower is faster."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCameraTelemetry:
      type: object
      description: |
  Lens, zoom, flash and torch, plus taking photos and recording video.
  
  The hook owns a ref to a CameraView and drives it, so a screen only renders the view and attaches cameraRef and handleCameraReady. takePicture resolves with a file, its dimensions and optionally base64 for the AI hooks; startRecording resolves when the recording ends, either because you called stopRecording or because a duration or size limit was reached. Two things the API does not make obvious: zoom is a 0 to 1 fraction of the lens range rather than an optical multiplier, so a "5x" figure does not map onto it; and Camera Looks, Super Res Zoom and the low-light video mode belong to the Pixel Camera app and cannot be driven from here, so selectedLook is a label for your own interface.
      properties:
        cameraRef:
          $ref: "#/components/schemas/RefObjectCameraViewnull"
          description: Attach to your CameraView. Capture fails without it.
        viewProps:
          type: object
          description: "Spread onto the view so it reflects this hook's state."
        facing:
          type: string
          enum:
            - back
            - front
          description: Which camera is active.
        zoomFactor:
          type: number
          description: "Zoom as a 0 to 1 fraction of the lens range, not an optical multiplier."
        flashMode:
          type: string
          enum:
            - auto
            - on
            - off
          description: Whether the flash fires at capture.
        isTorchOn:
          type: boolean
          description: "Continuous light, as distinct from the capture-time flash."
        mode:
          type: string
          enum:
            - picture
            - video
          description: View configuration. Recording requires video.
        isReady:
          type: boolean
          description: Whether the preview is running and capture is possible.
        hasPermission:
          type: boolean
          description: Whether camera permission was granted.
        isCapturing:
          type: boolean
          description: True while a still is being taken.
        lastPhoto:
          anyOf:
            - $ref: "#/components/schemas/CapturedPhoto"
            - type: null
          description: "Most recent still: uri, width, height and optional base64 and exif."
        isRecording:
          type: boolean
          description: True while video is recording.
        recordingSeconds:
          type: number
          description: Elapsed seconds of the current recording.
        lastVideoUri:
          anyOf:
            - type: string
            - type: null
          description: File of the most recent clip. Hand this to useVideo to play it back.
        availableLenses:
          type: array
          items:
            type: string
          description: "Lens identifiers the device reports, once the preview is running."
        availablePictureSizes:
          type: array
          items:
            type: string
          description: Picture sizes the device supports.
        selectedLook:
          $ref: "#/components/schemas/CameraLook"
          description: Label only. Looks are a Pixel Camera app feature and are not applied here.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last capture failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        maxZoomFactor:
          type: number
          description: "App-side ceiling for that fraction; `1`."
        isUltraLowLightVideoActive:
          type: boolean
          description: "UI flag only, for the same reason."
      required:
        - source
    useCamera_handleCameraReady_Request:
      type: object
      description: Request payload for handleCameraReady on useCamera.
      properties:{}
    useCamera_handleCameraReady_Response:
      type: object
      description: Response payload for handleCameraReady on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once isReady is set and availableLenses and availablePictureSizes have been filled.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_takePicture_Request:
      type: object
      description: Request payload for takePicture on useCamera.
      properties:
        options.quality:
          type: number
          description: JPEG quality 0 to 1. Defaults to 0.85.
        options.base64:
          type: boolean
          description: "Also return the image as base64, which is what the AI hooks consume. Defaults to false."
        options.exif:
          type: boolean
          description: Include EXIF metadata. Defaults to false.
        options.shutterSound:
          type: boolean
          description: Play the shutter sound where the platform allows suppressing it. Defaults to true.
    useCamera_takePicture_Response:
      type: object
      description: Response payload for takePicture on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { uri, width, height, base64?, exif? }, or null when the view is not mounted or the capture failed, with the reason in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_startRecording_Request:
      type: object
      description: Request payload for startRecording on useCamera.
      properties:
        options.maxDurationSeconds:
          type: number
          description: Stop automatically after this many seconds.
        options.maxFileSizeBytes:
          type: number
          description: Stop automatically at this file size.
        options.mirror:
          type: boolean
          description: "Mirror the recording, matching what the user saw on a front-facing preview."
    useCamera_startRecording_Response:
      type: object
      description: Response payload for startRecording on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves with the video file URI when recording ends — through stopRecording() or a limit — or null on failure. recordingSeconds ticks while it runs.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_stopRecording_Request:
      type: object
      description: Request payload for stopRecording on useCamera.
      properties:{}
    useCamera_stopRecording_Response:
      type: object
      description: Response payload for stopRecording on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the promise from startRecording resolves with the video file.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_toggleFacing_Request:
      type: object
      description: Request payload for toggleFacing on useCamera.
      properties:{}
    useCamera_toggleFacing_Response:
      type: object
      description: Response payload for toggleFacing on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; facing flips and viewProps carries it to the view.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_setLook_Request:
      type: object
      description: Request payload for setLook on useCamera.
      properties:
        look:
          $ref: "#/components/schemas/CameraLook"
          description: "One of Original, Natural, Shadows, Vanilla, Editorial, Velvet, Classic, Digi, Black Tie, Minimal."
      required:
        - look
    useCamera_setLook_Response:
      type: object
      description: Response payload for setLook on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; selectedLook updates so your own interface can show it.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_setZoom_Request:
      type: object
      description: Request payload for setZoom on useCamera.
      properties:
        fraction:
          type: number
          description: "0 to 1; values outside are clamped. Do not pass 5 for \"5x\"."
      required:
        - fraction
    useCamera_setZoom_Response:
      type: object
      description: Response payload for setZoom on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; zoomFactor updates and viewProps carries it to the view.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_setZoomStep_Request:
      type: object
      description: Request payload for setZoomStep on useCamera.
      properties:
        step:
          type: number
          description: "Which stop to select, clamped to 0..totalSteps."
        totalSteps:
          type: number
          description: How many stops there are. Defaults to 4.
      required:
        - step
    useCamera_setZoomStep_Response:
      type: object
      description: Response payload for setZoomStep on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; sets zoomFactor to step / totalSteps.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_setFlash_Request:
      type: object
      description: Request payload for setFlash on useCamera.
      properties:
        mode:
          type: string
          enum:
            - auto
            - on
            - off
          description: auto lets the camera decide by scene brightness.
      required:
        - mode
    useCamera_setFlash_Response:
      type: object
      description: Response payload for setFlash on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; flashMode updates.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_toggleTorch_Request:
      type: object
      description: Request payload for toggleTorch on useCamera.
      properties:{}
    useCamera_toggleTorch_Response:
      type: object
      description: Response payload for toggleTorch on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isTorchOn flips.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_setMode_Request:
      type: object
      description: Request payload for setMode on useCamera.
      properties:
        mode:
          type: string
          enum:
            - picture
            - video
          description: Recording requires video; startRecording switches it for you.
      required:
        - mode
    useCamera_setMode_Response:
      type: object
      description: Response payload for setMode on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; mode and viewProps update.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_pausePreview_Request:
      type: object
      description: Request payload for pausePreview on useCamera.
      properties:{}
    useCamera_pausePreview_Response:
      type: object
      description: Response payload for pausePreview on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once applied. Silently no-ops when the view has been unmounted.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_resumePreview_Request:
      type: object
      description: Request payload for resumePreview on useCamera.
      properties:{}
    useCamera_resumePreview_Response:
      type: object
      description: Response payload for resumePreview on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once applied. Silently no-ops when the view has been unmounted.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCamera_toggleUltraLowLightVideo_Request:
      type: object
      description: Request payload for toggleUltraLowLightVideo on useCamera.
      properties:{}
    useCamera_toggleUltraLowLightVideo_Response:
      type: object
      description: Response payload for toggleUltraLowLightVideo on useCamera.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: void
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCameraExtensionsTelemetry:
      type: object
      description: |
  Google computational photography vendor extensions (Night Sight, Ultra HDR, Portrait Bokeh).
  
  Backed by Android CameraExtensionCharacteristics (API 31+). Queries vendor-specific image processing modes for back and front cameras. Nothing is simulated: reads directly from the camera HAL and reports source: 'hardware' on genuine devices.
      properties:
        available:
          type: boolean
          description: Whether CameraExtensionCharacteristics is supported and accessible on the device.
        cameras:
          type: array
          items:
            $ref: "#/components/schemas/CameraExtensionInfo"
          description: List of available cameras and their supported vendor extension modes.
        hasNightSight:
          type: boolean
          description: True if any back or front camera supports Google Night Sight.
        hasUltraHdr:
          type: boolean
          description: True if any camera supports Ultra HDR / HDR+ exposure stacking.
        hasPortraitBokeh:
          type: boolean
          description: True if any camera supports hardware-assisted Portrait mode bokeh blur.
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest error message if the HAL query failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the readings came from. Real hardware reports 'hardware', emulators or unsupported devices report 'unavailable'."
      required:
        - source
    useCameraExtensions_refresh_Request:
      type: object
      description: Request payload for refresh on useCameraExtensions.
      properties:{}
    useCameraExtensions_refresh_Response:
      type: object
      description: Response payload for refresh on useCameraExtensions.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCapabilitiesTelemetry:
      type: object
      description: |
  What this particular phone actually has.
  
  Resolution starts from a model table keyed on the device name, then upgrades to real PackageManager feature checks when the native module is present, at which point verification changes from model-table to device. Fields that can only be answered by the device are null until that upgrade happens. Evaluates verified platform features including android.hardware.npu, BLE Channel Sounding, and StrongBox KeyStore.
      properties:
        modelName:
          type: string
          description: "Marketing model name, for example \"Pixel 11 Pro\"."
        isPixel / isProModel / isFoldable:
          type: boolean
          description: Device family flags used to gate Pro-only features.
        pixelGeneration:
          anyOf:
            - type: number
            - type: null
          description: "Generation number, 11 here. Null on non-Pixel hardware."
        androidApiLevel:
          anyOf:
            - type: number
            - type: null
          description: "API level, 37 for Android 17. Null on web."
        verification:
          type: string
          enum:
            - device
            - model-table
          description: Whether flags were confirmed against the device or inferred from the model name. Prefer acting on device.
        hasHiLight:
          type: boolean
          description: Whether the LED array is present.
        hasUWB:
          type: boolean
          description: Whether an ultra-wideband radio is present.
        hasNFC / hasBleChannelSounding / hasWifiRtt / hasSatelliteTelephony:
          anyOf:
            - type: boolean
            - type: null
          description: Radio features confirmed from PackageManager. Null before device verification.
        hasStrongBox:
          anyOf:
            - type: boolean
            - type: null
          description: Whether keys can be held in the dedicated secure element.
        hasNpuFeature:
          anyOf:
            - type: boolean
            - type: null
          description: Whether a neural processing unit feature is declared (checks both android.hardware.npu and android.hardware.neural_processing_unit).
        geminiNanoTier:
          type: string
          enum:
            - nano-v4
            - nano-v3
            - nano-v2
            - none
          description: Which on-device model generation to expect.
        aicoreVersion:
          anyOf:
            - type: string
            - type: null
          description: Installed AICore build when the native module can read it.
        supportsRangingApi / supportsHapticEnvelopes / supportsAppFunctions / supportsAndroid17Apis:
          type: boolean
          description: Platform API availability gates.
        isPhysicalDevice:
          type: boolean
          description: "`false` on an emulator or on web, where hardware claims cannot be trusted."
        hasTitanM3:
          type: boolean
          description: "Whether the Titan M3 security chip is expected, per Google's specification. It is not readable from the device."
    useCellularTelemetry:
      type: object
      description: |
  Carrier, radio generation and network codes from the modem.
  
  Wraps expo-cellular. generation reflects the current data connection, so it changes as the phone moves and reads unknown when there is no cellular data attached, including on Wi-Fi. Carrier name and the mobile country and network codes need the phone-state permission on Android; without it they stay null rather than being guessed. The country and network codes together identify a carrier globally, which is more reliable than matching on the display name.
      properties:
        generation:
          type: string
          enum:
            - unknown
            - 2G
            - 3G
            - 4G
            - 5G
          description: Radio generation of the current data connection.
        is5G:
          type: boolean
          description: "Convenience for generation === \"5G\"."
        carrierName:
          anyOf:
            - type: string
            - type: null
          description: Carrier display name. Null without the phone-state permission.
        isoCountryCode:
          anyOf:
            - type: string
            - type: null
          description: ISO country of the SIM.
        mobileCountryCode:
          anyOf:
            - type: string
            - type: null
          description: First half of the global carrier identifier.
        mobileNetworkCode:
          anyOf:
            - type: string
            - type: null
          description: Second half. Match on this pair rather than the display name.
        allowsVoip:
          anyOf:
            - type: boolean
            - type: null
          description: Whether the carrier permits voice over IP. Null when undetermined.
        permissionGranted:
          type: boolean
          description: Whether the phone-state permission was granted.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last read failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useCellular_refresh_Request:
      type: object
      description: Request payload for refresh on useCellular.
      properties:{}
    useCellular_refresh_Response:
      type: object
      description: Response payload for refresh on useCellular.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves once generation, carrier and network codes have been updated. Values that need the phone-state permission stay null without it."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useCellular_requestPermission_Request:
      type: object
      description: Request payload for requestPermission on useCellular.
      properties:{}
    useCellular_requestPermission_Response:
      type: object
      description: Response payload for requestPermission on useCellular.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when granted, and refreshes automatically. Generation is readable without it."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useChannelSoundingTelemetry:
      type: object
      description: |
  Bluetooth Core 6.0 high-accuracy centimeter-precision Phase-Based Ranging (PBR).
  
  Backed by android.hardware.bluetooth_le.channel_sounding and the Android 16/17 Ranging HAL service (IBluetoothChannelSounding). Measures distance with sub-decimeter accuracy, complementing UWB for non-line-of-sight spatial positioning. Nothing is simulated: queries actual device hardware capabilities.
      properties:
        isSupported:
          type: boolean
          description: Whether the hardware physically supports BLE 6.0 Channel Sounding.
        isEnabled:
          type: boolean
          description: Whether Channel Sounding is enabled (requires Bluetooth enabled and hardware support).
        serviceFound:
          type: boolean
          description: Whether the underlying Android Ranging HAL service is active on device.
        supportsPbr:
          type: boolean
          description: Whether Phase-Based Ranging (PBR) is supported.
        supportsRtt:
          type: boolean
          description: Whether Round-Trip Time (RTT) ranging is supported.
        channelCount:
          type: number
          description: Number of BLE channels utilized (79 on Bluetooth 6.0).
        precision:
          type: string
          enum:
            - centimeter
            - decimeter
            - unsupported
          description: Distance measurement precision level.
        isRanging:
          type: boolean
          description: Whether an active ranging session is currently underway.
        targets:
          type: array
          items:
            $ref: "#/components/schemas/ChannelSoundingTarget"
          description: List of tracked ranging targets.
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest error message if operation failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Telemetry provenance: 'hardware' when read from physical device."
      required:
        - source
    useChannelSounding_startRanging_Request:
      type: object
      description: Request payload for startRanging on useChannelSounding.
      properties:{}
    useChannelSounding_startRanging_Response:
      type: object
      description: Response payload for startRanging on useChannelSounding.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useChannelSounding_stopRanging_Request:
      type: object
      description: Request payload for stopRanging on useChannelSounding.
      properties:{}
    useChannelSounding_stopRanging_Response:
      type: object
      description: Response payload for stopRanging on useChannelSounding.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useChannelSounding_refresh_Request:
      type: object
      description: Request payload for refresh on useChannelSounding.
      properties:{}
    useChannelSounding_refresh_Response:
      type: object
      description: Response payload for refresh on useChannelSounding.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useChargingIntelligenceTelemetry:
      type: object
      description: |
  Deep battery health, cycle count, manufacturing dates, and charging wattage tiers.
  
  Reads Android 14+ battery health metrics and Google Pixel power supply sysfs telemetry. Provides lifetime charge cycles (BatteryManager.EXTRA_CYCLE_COUNT), state of health percentage (/sys/class/power_supply/battery/soh), factory manufacture date, first-use date, real-time charging wattage, and classifies charging speed into tiers (slow, standard, rapid, ultra_rapid > 30W).
      properties:
        stateOfHealthPercent:
          anyOf:
            - type: number
            - type: null
          description: "Current maximum battery capacity relative to factory design capacity (0-100%), or null if unreadable."
        cycleCount:
          anyOf:
            - type: number
            - type: null
          description: Lifetime physical charge cycles completed by the battery pack.
        manufactureDate:
          anyOf:
            - type: string
            - type: null
          description: Factory manufacture timestamp/date of the physical battery cell.
        firstUsageDate:
          anyOf:
            - type: string
            - type: null
          description: Date the battery was first activated/used in service.
        chargingWattage:
          anyOf:
            - type: number
            - type: null
          description: Real-time charging power in watts (W) delivered to the battery.
        chargingTier:
          type: string
          enum:
            - slow
            - standard
            - rapid
            - ultra_rapid
          description: Classification of charging speed based on delivered wattage.
        chargeLimitActive:
          type: boolean
          description: "Whether the Android battery protect 80% charge limit is currently engaged."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if battery telemetry query failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useChargingIntelligence_refresh_Request:
      type: object
      description: Request payload for refresh on useChargingIntelligence.
      properties:{}
    useChargingIntelligence_refresh_Response:
      type: object
      description: Response payload for refresh on useChargingIntelligence.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useDeviceTelemetry:
      type: object
      description: |
  Device identity, battery level, thermistor temperature, voltage, current, and wattage.
  
  Identity comes from expo-device, live power state from expo-battery listeners, and deep physical battery telemetry from the native fuel gauge PMIC via PixelNative.getBatteryTelemetry(). batteryTemperatureC reads the actual lithium pack NTC thermistor in 0.1 °C units. batteryVoltageMv and batteryCurrentMa give the cell terminal voltage and live current draw (negative discharging, positive charging); batteryPowerWatts computes real-time wattage (V × I). On Android 14+, batteryCycleCount reads lifetime charge cycles from the PMIC EEPROM. Nothing is simulated: unavailable readings are null.
      properties:
        modelName:
          type: string
          description: "Commercial model name (e.g. \"Pixel 11 Pro\")."
        brand:
          type: string
          description: "Hardware manufacturer brand (e.g. \"Google\")."
        osVersion:
          type: string
          description: Android release string.
        batteryPercent:
          anyOf:
            - type: number
            - type: null
          description: "Honest charge percentage, null until the platform answers."
        isCharging:
          type: boolean
          description: "Whether a charger is attached (AC, USB, wireless or dock)."
        lowPowerMode:
          type: boolean
          description: Whether Battery Saver is active. Treat as a direct instruction to do less work.
        networkType:
          type: string
          description: "Active network connection type (e.g. \"WIFI\", \"CELLULAR\")."
        isConnected:
          type: boolean
          description: "Whether a working, reachable internet route exists."
        totalMemoryMB:
          type: number
          description: "Total system LPDDR5X RAM in MB, when the platform reports it."
        batteryTemperatureC:
          anyOf:
            - type: number
            - type: null
          description: Real physical battery temperature in °C from the fuel gauge NTC thermistor.
        batteryVoltageMv:
          anyOf:
            - type: number
            - type: null
          description: Instantaneous battery cell terminal voltage in millivolts (e.g. 4120 mV).
        batteryCurrentMa:
          anyOf:
            - type: number
            - type: null
          description: "Instantaneous current flow in mA (negative discharging, positive charging)."
        batteryCurrentAvgMa:
          anyOf:
            - type: number
            - type: null
          description: Rolling average current flow in mA from the fuel gauge.
        batteryPowerWatts:
          anyOf:
            - type: number
            - type: null
          description: "Real-time power consumption or fast-charging rate in Watts (V × |I|)."
        batteryHealth:
          anyOf:
            - type: string
              enum:
                - GOOD
                - OVERHEAT
                - DEAD
                - OVER_VOLTAGE
                - UNSPECIFIED_FAILURE
                - COLD
                - UNKNOWN
            - type: null
          description: Hardware battery health state reported by the PMIC.
        batteryCycleCount:
          anyOf:
            - type: number
            - type: null
          description: Lifetime charge cycle count stored in the battery EEPROM (Android 14+).
        batteryChargeCounterMah:
          anyOf:
            - type: number
            - type: null
          description: Remaining battery charge capacity in milliampere-hours (mAh).
        batteryEnergyCounterMwh:
          anyOf:
            - type: number
            - type: null
          description: Remaining stored energy in milliwatt-hours (mWh).
        batteryTechnology:
          anyOf:
            - type: string
            - type: null
          description: "Battery cell chemistry string (e.g. \"Li-ion\")."
        pluggedSource:
          anyOf:
            - type: string
              enum:
                - AC
                - USB
                - WIRELESS
                - DOCK
                - NONE
            - type: null
          description: Specific power supply source when charging.
        batteryTelemetry:
          anyOf:
            - $ref: "#/components/schemas/BatteryTelemetry"
            - type: null
          description: Full native battery telemetry structure including probed thermal zones.
        hasRead:
          type: boolean
          description: "Whether any power, battery, or network value has been successfully read."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Error message if the last telemetry read failed, null otherwise."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useDevice_refresh_Request:
      type: object
      description: Request payload for refresh on useDevice.
      properties:{}
    useDevice_refresh_Response:
      type: object
      description: Response payload for refresh on useDevice.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Promise<void> — Resolves once all battery, electrical, and network states are refreshed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useDisplayTelemetry:
      type: object
      description: |
  Refresh rate, HDR capability, brightness and the screen wake lock.
  
  Display mode, supported refresh rates, HDR types and resolution come from the Android Display object through the native module, re-read every two seconds because adaptive refresh rate changes the active mode continuously. Brightness uses expo-brightness and the wake lock uses expo-keep-awake. setPreferredRefreshRate requests a rate; the platform may ignore it, so read refreshRateHz back rather than assuming it took.
      properties:
        refreshRateHz:
          type: number
          description: Rate the panel is running at right now. Changes on its own with adaptive refresh.
        hasArrSupport:
          anyOf:
            - type: boolean
            - type: null
          description: Whether adaptive refresh rate is supported.
        supportedRefreshRates:
          type: array
          items:
            type: number
          description: "Every rate the panel can drive, down to 1 Hz on this device."
        resolution:
          anyOf:
            - type: object
              description: "{ width, height, densityDpi }"
            - type: null
          description: Physical resolution and density of the active mode.
        hdrTypes:
          type: array
          items:
            type: number
          description: "Supported HDR formats: 1 Dolby Vision, 2 HDR10, 3 HLG, 4 HDR10+."
        isHdr:
          type: boolean
          description: Whether the panel reports HDR capability at all.
        maxLuminance:
          anyOf:
            - type: number
            - type: null
          description: "Peak luminance the panel reports, when it reports one."
        brightness:
          type: number
          description: Current screen brightness from 0 to 1.
        isKeepAwake:
          type: boolean
          description: Whether this app is currently holding the screen on.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useDisplay_setPreferredRefreshRate_Request:
      type: object
      description: Request payload for setPreferredRefreshRate on useDisplay.
      properties:
        rateHz:
          type: number
          description: A rate from supportedRefreshRates.
      required:
        - rateHz
    useDisplay_setPreferredRefreshRate_Response:
      type: object
      description: Response payload for setPreferredRefreshRate on useDisplay.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the request was applied. It is a request, not a guarantee: the system may pick another mode."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useDisplay_setScreenBrightness_Request:
      type: object
      description: Request payload for setScreenBrightness on useDisplay.
      properties:
        value:
          type: number
          description: 0 to 1; values outside are clamped.
      required:
        - value
    useDisplay_setScreenBrightness_Response:
      type: object
      description: Response payload for setScreenBrightness on useDisplay.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once applied. No-op on web; on failure brightness is left unchanged.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useDisplay_toggleKeepAwake_Request:
      type: object
      description: Request payload for toggleKeepAwake on useDisplay.
      properties:{}
    useDisplay_toggleKeepAwake_Response:
      type: object
      description: Response payload for toggleKeepAwake on useDisplay.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once the lock state has flipped; isKeepAwake reflects it. Release it when you no longer need it.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useEmbeddingsTelemetry:
      type: object
      description: |
  On-device vector embeddings and semantic cosine similarity scoring via Tensor EdgeTPU.
  
  Executes on-device text embedding generation on the Google Tensor EdgeTPU / NPU through ML Kit GenAI. Produces normalized 512-dimensional floating point vectors from input text in milliseconds. Includes an in-memory cosine similarity calculation helper to compare semantic proximity between vectors entirely offline.
      properties:
        isAvailable:
          type: boolean
          description: Whether the on-device text embedding model is installed and ready for inference.
        isLoading:
          type: boolean
          description: Whether an embedding inference operation is actively computing on the NPU/TPU.
        vectorDimension:
          type: number
          description: Dimension size of the output embedding vector (512).
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if embedding inference failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useEmbeddings_embed_Request:
      type: object
      description: Request payload for embed on useEmbeddings.
      properties:{}
    useEmbeddings_embed_Response:
      type: object
      description: Response payload for embed on useEmbeddings.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useEmbeddings_cosineSimilarity_Request:
      type: object
      description: Request payload for cosineSimilarity on useEmbeddings.
      properties:{}
    useEmbeddings_cosineSimilarity_Response:
      type: object
      description: Response payload for cosineSimilarity on useEmbeddings.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGPUTelemetry:
      type: object
      description: |
  Which GPU this is, and whether your frames are arriving on time.
  
  The renderer, vendor and OpenGL version are read through a real offscreen EGL context; the Vulkan version comes from the android.hardware.vulkan.version system feature. Frame timing is measured on the UI thread with Choreographer in one-second windows: average and worst frame interval, frames presented per second, and a jank count for frames that took more than 1.5x the expected interval. Android does not expose GPU memory usage to apps, so that field is always null rather than estimated.
      properties:
        gpuRenderer:
          anyOf:
            - type: string
            - type: null
          description: GPU name from the driver. Null until the EGL context has been created.
        gpuVendor:
          anyOf:
            - type: string
            - type: null
          description: Driver vendor string.
        graphicsApi:
          anyOf:
            - type: string
            - type: null
          description: "OpenGL ES version and, where present, the Vulkan version."
        frameRenderTimeMs:
          anyOf:
            - type: number
            - type: null
          description: Average gap between presented frames over the last second. Compare against targetBudgetMs.
        maxFrameMs:
          anyOf:
            - type: number
            - type: null
          description: "Worst single frame in that window, which is what a user actually perceives as a stutter."
        measuredFps:
          anyOf:
            - type: number
            - type: null
          description: "Frames actually presented per second, not the display mode."
        droppedFrameCount:
          type: number
          description: Running total of janky frames since the hook mounted.
        jankFramesLastSecond:
          type: number
          description: Janky frames in the most recent window only.
        targetBudgetMs:
          type: number
          description: "Time available per frame at the current refresh rate: 8.33 ms at 120 Hz, 16.67 ms at 60 Hz."
        isStuttering:
          type: boolean
          description: True when the average frame is running more than 1.5x over budget.
        gpuMemoryUsageMB:
          type: null
          description: Always null. Android does not expose this to apps.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useGeminiTelemetry:
      type: object
      description: |
  Cloud Gemini chat with real multi-turn history.
  
  Wraps ai.chats.create from @google/genai on gemini-3.8-flash with a system instruction, so history is maintained by the SDK rather than re-sent by hand. Token counts come from the response usageMetadata and latency is measured around the call. Replies stream through sendMessageStream, so partial fills in as chunks arrive and lastFirstChunkMs records time to first token. There is no simulated fallback: without a key, sendMessage appends a system-role message explaining how to configure one. The key is read from SecureStore, never from source.
      properties:
        messages:
          type: array
          items:
            $ref: "#/components/schemas/AIMessage"
          description: "Conversation so far. Role system means a local error, not model output."
        isLoading:
          type: boolean
          description: True while a reply is in flight.
        hasApiKey:
          type: boolean
          description: Whether a key is configured. Check this before offering cloud features.
        model:
          type: string
          description: "Model id in use, gemini-3.8-flash."
        partial:
          type: string
          description: Text streamed so far for the in-flight reply. Empty between turns; render it for a live typing effect.
        lastFirstChunkMs:
          anyOf:
            - type: number
            - type: null
          description: "Time to the first streamed chunk of the last reply, in ms. Null before the first reply."
        lastPromptTokens:
          anyOf:
            - type: number
            - type: null
          description: Token count returned by the last countTokens() call. Null until you call it.
        lastGrounding:
          anyOf:
            - $ref: "#/components/schemas/GroundingSummary"
            - type: null
          description: What the last grounded reply searched for (queries) and which URIs it used (sources). Null when grounding was off or the model chose not to search.
        safetyThreshold:
          $ref: "#/components/schemas/defaultHarmBlockThreshold"
          description: Blocking threshold applied to all four harm categories. Default leaves the API defaults in place.
        searchGrounding:
          type: boolean
          description: Whether the googleSearch tool is attached to the session.
        availableModels:
          type: array
          items:
            type: string
          description: "Models the API lists for this key, filtered to Gemini text models. Falls back to a curated default list when offline or unconfigured."
        temperature:
          type: number
          description: "Sampling temperature sent with the session, default `0.4`."
        topP:
          type: number
          description: "Nucleus sampling cutoff, default `0.95`."
        topK:
          type: number
          description: "Top-k sampling cutoff, default `40`."
        maxOutputTokens:
          type: number
          description: "Ceiling on reply length, default `2048`."
        systemInstruction:
          type: string
          description: The instruction the session was created with. Defaults to the PixelKit assistant instruction.
        thinkingBudget:
          type: number
          description: "Thinking tokens requested, default `0` (off). Above zero, `thinkingConfig` is sent with the session."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Latest failure message, or `null`. Failures are also logged and counted."
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Cloud model: reachable only with a key and a network route."
      required:
        - source
    useGemini_sendMessage_Request:
      type: object
      description: Request payload for sendMessage on useGemini.
      properties:
        prompt:
          type: string
          description: "The user's turn. Blank input is ignored."
      required:
        - prompt
    useGemini_sendMessage_Response:
      type: object
      description: Response payload for sendMessage on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves when the reply arrives. Without an API key it appends a system-role message explaining that instead; API errors arrive the same way rather than as a rejection.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setSelectedModel_Request:
      type: object
      description: Request payload for setSelectedModel on useGemini.
      properties:
        model:
          type: string
          description: "An id from availableModels, which the API lists for your key."
      required:
        - model
    useGemini_setSelectedModel_Response:
      type: object
      description: Response payload for setSelectedModel on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the next turn starts a new session on that model.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setTopP_Request:
      type: object
      description: Request payload for setTopP on useGemini.
      properties:
        value:
          type: number
          description: "Top-p 0 to 1, top-k a positive integer, temperature typically 0 to 2, max output tokens the reply ceiling."
      required:
        - value
    useGemini_setTopP_Response:
      type: object
      description: Response payload for setTopP on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setTopK_Request:
      type: object
      description: Request payload for setTopK on useGemini.
      properties:
        value:
          type: number
          description: "Top-p 0 to 1, top-k a positive integer, temperature typically 0 to 2, max output tokens the reply ceiling."
      required:
        - value
    useGemini_setTopK_Response:
      type: object
      description: Response payload for setTopK on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setTemperature_Request:
      type: object
      description: Request payload for setTemperature on useGemini.
      properties:
        value:
          type: number
          description: "Top-p 0 to 1, top-k a positive integer, temperature typically 0 to 2, max output tokens the reply ceiling."
      required:
        - value
    useGemini_setTemperature_Response:
      type: object
      description: Response payload for setTemperature on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setMaxOutputTokens_Request:
      type: object
      description: Request payload for setMaxOutputTokens on useGemini.
      properties:
        value:
          type: number
          description: "Top-p 0 to 1, top-k a positive integer, temperature typically 0 to 2, max output tokens the reply ceiling."
      required:
        - value
    useGemini_setMaxOutputTokens_Response:
      type: object
      description: Response payload for setMaxOutputTokens on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setThinkingBudget_Request:
      type: object
      description: Request payload for setThinkingBudget on useGemini.
      properties:
        tokens:
          type: number
          description: Token budget for reasoning before the reply. Costs latency and tokens.
      required:
        - tokens
    useGemini_setThinkingBudget_Response:
      type: object
      description: Response payload for setThinkingBudget on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; applied to the next session.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setSystemInstruction_Request:
      type: object
      description: Request payload for setSystemInstruction on useGemini.
      properties:
        text:
          type: string
          description: How the model should behave. Empty falls back to the PixelKit assistant instruction.
      required:
        - text
    useGemini_setSystemInstruction_Response:
      type: object
      description: Response payload for setSystemInstruction on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the next turn starts a fresh session carrying that instruction.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setSafety_Request:
      type: object
      description: Request payload for setSafety on useGemini.
      properties:
        threshold:
          $ref: "#/components/schemas/defaultHarmBlockThreshold"
          description: "'default' sends no safetySettings at all. Otherwise BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE or BLOCK_LOW_AND_ABOVE from @google/genai."
      required:
        - threshold
    useGemini_setSafety_Response:
      type: object
      description: Response payload for setSafety on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the next turn starts a fresh session carrying that threshold.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setSearchGroundingEnabled_Request:
      type: object
      description: Request payload for setSearchGroundingEnabled on useGemini.
      properties:
        enabled:
          type: boolean
          description: True to ground replies in Google Search. The model decides per turn whether to actually search.
      required:
        - enabled
    useGemini_setSearchGroundingEnabled_Response:
      type: object
      description: Response payload for setSearchGroundingEnabled on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing. When a turn does search, lastGrounding carries the queries and source URIs."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_countTokens_Request:
      type: object
      description: Request payload for countTokens on useGemini.
      properties:
        text:
          type: string
          description: The prompt to measure. Blank input returns null without a network call.
      required:
        - text
    useGemini_countTokens_Response:
      type: object
      description: Response payload for countTokens on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves to the token count, or null without a key or when the call fails. Also written to lastPromptTokens."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_clearMessages_Request:
      type: object
      description: Request payload for clearMessages on useGemini.
      properties:{}
    useGemini_clearMessages_Response:
      type: object
      description: Response payload for clearMessages on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGemini_setApiKey_Request:
      type: object
      description: Request payload for setApiKey on useGemini.
      properties:
        key:
          anyOf:
            - type: string
            - type: null
          description: "The Gemini API key, or null to clear it. Persisting it is the job of saveApiKey()."
      required:
        - key
    useGemini_setApiKey_Response:
      type: object
      description: Response payload for setApiKey on useGemini.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing. hasApiKey updates immediately and availableModels is refreshed in the background.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNanoTelemetry:
      type: object
      description: |
  Gemini Nano running on the phone, with no network and no API key.
  
  Wraps the ML Kit GenAI Prompt API on AICore through the pixel-nano module. The model is owned by the system, not bundled with the app, so checkStatus can report that a download is required; download reports progress as it runs. AICore keeps no conversation history, so each turn re-sends a capped transcript built by buildNanoTurn. Latency and time to first token are measured around the native call, and output token counts come from the on-device tokenizer, so the performance figures are real rather than estimated. There is no cloud fallback: if the model is unavailable, sendMessage appends an error entry.
      properties:
        status:
          type: string
          enum:
            - available
            - downloadable
            - downloading
            - unavailable
          description: Model readiness. Gate every call on this.
        isAvailable:
          type: boolean
          description: "Convenience for status === \"available\"."
        info:
          anyOf:
            - $ref: "#/components/schemas/NanoModelInfo"
            - type: null
          description: "Base model name, token limit, and which features this build supports (system prompt, thinking mode, structured output, caching)."
        messages:
          type: array
          items:
            $ref: "#/components/schemas/AIMessage"
          description: "Conversation so far. Entries with role system are local errors, not model output."
        partial:
          type: string
          description: Text streamed so far for the in-flight reply. Render this for a live typing effect.
        thoughts:
          type: array
          items:
            type: string
          description: Reasoning steps when thinking mode is enabled and supported.
        isGenerating:
          type: boolean
          description: True while a reply is being produced.
        downloadedBytes:
          anyOf:
            - type: number
            - type: null
          description: Progress while the model downloads.
        isDownloading:
          type: boolean
          description: True during download.
        isWarmingUp:
          type: boolean
          description: "Whether a warm-up is running. Pairs with `warmupMs`, which reports how long the last one took."
        warmupMs:
          anyOf:
            - type: number
            - type: null
          description: How long the last warm-up took to load the model into memory.
        lastLatencyMs:
          anyOf:
            - type: number
            - type: null
          description: "Wall time of the last call, measured natively."
        lastFirstTokenMs:
          anyOf:
            - type: number
            - type: null
          description: "Time to the first streamed token, which is what perceived responsiveness depends on."
        lastOutputTokens:
          anyOf:
            - type: number
            - type: null
          description: "Tokens produced, counted by the on-device tokenizer."
        lastDecodeTokensPerSec:
          anyOf:
            - type: number
            - type: null
          description: Generation speed after the first token. Derived from the two figures above.
        error:
          anyOf:
            - type: string
            - type: null
          description: "Last failure message, for example a busy model or a request over the token limit."
        temperature:
          type: number
          description: "Sampling temperature applied to every turn, 0.7 by default. Lower is more deterministic."
        topK:
          type: number
          description: "Top-k sampling cutoff, 40 by default."
        candidateCount:
          type: number
          description: "How many candidates the model generates, 1 by default. Each one costs latency."
        maxOutputTokens:
          type: number
          description: "Ceiling on the reply, 1024 by default. It shares info.tokenLimit with the prompt and the re-sent transcript."
        thinkingMode:
          type: boolean
          description: Whether thinking is requested. Only honoured when info.thinkingModeAvailable is true; elsewhere thoughts comes back empty.
        systemInstruction:
          type: string
          description: "The standing instruction. Sent as a SystemInstruction part when AICore supports one, otherwise prefixed to the prompt — either way it is re-sent every turn, because AICore keeps no history."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useGeminiNano_setSystemInstruction_Request:
      type: object
      description: Request payload for setSystemInstruction on useGeminiNano.
      properties:
        text:
          type: string
          description: "How the model should behave. It counts against info.tokenLimit on every turn, so keep it short."
      required:
        - text
    useGeminiNano_setSystemInstruction_Response:
      type: object
      description: Response payload for setSystemInstruction on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the next sendMessage uses it.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setTemperature_Request:
      type: object
      description: Request payload for setTemperature on useGeminiNano.
      properties:
        value:
          type: number
          description: "Temperature 0 to 1, top-k a positive integer, candidate count how many replies to generate, max output tokens the reply ceiling within info.tokenLimit."
      required:
        - value
    useGeminiNano_setTemperature_Response:
      type: object
      description: Response payload for setTemperature on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the values are read on the next call.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setTopK_Request:
      type: object
      description: Request payload for setTopK on useGeminiNano.
      properties:
        value:
          type: number
          description: "Temperature 0 to 1, top-k a positive integer, candidate count how many replies to generate, max output tokens the reply ceiling within info.tokenLimit."
      required:
        - value
    useGeminiNano_setTopK_Response:
      type: object
      description: Response payload for setTopK on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the values are read on the next call.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setCandidateCount_Request:
      type: object
      description: Request payload for setCandidateCount on useGeminiNano.
      properties:
        value:
          type: number
          description: "Temperature 0 to 1, top-k a positive integer, candidate count how many replies to generate, max output tokens the reply ceiling within info.tokenLimit."
      required:
        - value
    useGeminiNano_setCandidateCount_Response:
      type: object
      description: Response payload for setCandidateCount on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the values are read on the next call.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setMaxOutputTokens_Request:
      type: object
      description: Request payload for setMaxOutputTokens on useGeminiNano.
      properties:
        value:
          type: number
          description: "Temperature 0 to 1, top-k a positive integer, candidate count how many replies to generate, max output tokens the reply ceiling within info.tokenLimit."
      required:
        - value
    useGeminiNano_setMaxOutputTokens_Response:
      type: object
      description: Response payload for setMaxOutputTokens on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; the values are read on the next call.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setThinkingMode_Request:
      type: object
      description: Request payload for setThinkingMode on useGeminiNano.
      properties:
        on:
          type: boolean
          description: Whether to ask the model to think before answering.
      required:
        - on
    useGeminiNano_setThinkingMode_Response:
      type: object
      description: Response payload for setThinkingMode on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_download_Request:
      type: object
      description: Request payload for download on useGeminiNano.
      properties:{}
    useGeminiNano_download_Response:
      type: object
      description: Response payload for download on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the status after the attempt, or \"unavailable\" when it failed. Progress arrives in downloadedBytes while it runs."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_warmup_Request:
      type: object
      description: Request payload for warmup on useGeminiNano.
      properties:{}
    useGeminiNano_warmup_Response:
      type: object
      description: Response payload for warmup on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the wall time in milliseconds, or null when the warm-up failed. The same value lands in warmupMs."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_sendMessage_Request:
      type: object
      description: Request payload for sendMessage on useGeminiNano.
      properties:
        prompt:
          type: string
          description: "The user's turn. Blank or whitespace-only input is ignored."
      required:
        - prompt
    useGeminiNano_sendMessage_Response:
      type: object
      description: Response payload for sendMessage on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves when the reply is complete. Tokens accumulate in partial while it streams; failures arrive as a system-role entry in messages, never as a rejection."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_generate_Request:
      type: object
      description: Request payload for generate on useGeminiNano.
      properties:
        prompt:
          type: string
          description: The complete prompt; no history is added.
        options:
          $ref: "#/components/schemas/NanoOptions"
          description: "Per-call overrides: systemInstruction, temperature, topK, candidateCount, maxOutputTokens, seed, thinking, imageBase64 for a multimodal turn."
      required:
        - prompt
    useGeminiNano_generate_Response:
      type: object
      description: Response payload for generate on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { text, finishReason, thoughts, latencyMs, firstTokenMs }. Throws E_NANO_* on failure; there is no fallback."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_countTokens_Request:
      type: object
      description: Request payload for countTokens on useGeminiNano.
      properties:
        prompt:
          type: string
          description: Text exactly as it would be sent.
        options:
          $ref: "#/components/schemas/NanoOptions"
          description: "The same options the real call would use, since they affect the count."
      required:
        - prompt
    useGeminiNano_countTokens_Response:
      type: object
      description: Response payload for countTokens on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the token count, or null when the tokenizer is unavailable. Compare it against info.tokenLimit."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_clearMessages_Request:
      type: object
      description: Request payload for clearMessages on useGeminiNano.
      properties:{}
    useGeminiNano_clearMessages_Response:
      type: object
      description: Response payload for clearMessages on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing. AICore keeps no history of its own, so this is the whole reset."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_setModelConfig_Request:
      type: object
      description: Request payload for setModelConfig on useGeminiNano.
      properties:
        stage:
          type: string
          enum:
            - stable
            - preview
          description: Production build or the Developer Preview track. Preview models are slower and refuse more often.
        preference:
          type: string
          enum:
            - full
            - fast
          description: "Full favours quality, fast favours latency."
      required:
        - stage
        - preference
    useGeminiNano_setModelConfig_Response:
      type: object
      description: Response payload for setModelConfig on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once the config is applied and status and info have been re-read.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_refresh_Request:
      type: object
      description: Request payload for refresh on useGeminiNano.
      properties:{}
    useGeminiNano_refresh_Response:
      type: object
      description: Response payload for refresh on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once status and info have been updated. On failure status becomes unavailable and error is set.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_summarize_Request:
      type: object
      description: Request payload for summarize on useGeminiNano.
      properties:{}
    useGeminiNano_summarize_Response:
      type: object
      description: Response payload for summarize on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "`Promise<SummarizeResult>` — `{ summary, latencyMs, engine, source }`; **throws** on failure"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_proofread_Request:
      type: object
      description: Request payload for proofread on useGeminiNano.
      properties:{}
    useGeminiNano_proofread_Response:
      type: object
      description: Response payload for proofread on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "`Promise<ProofreadResult>` — `{ correctedText, suggestions, latencyMs, engine, source }`"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGeminiNano_rewrite_Request:
      type: object
      description: Request payload for rewrite on useGeminiNano.
      properties:{}
    useGeminiNano_rewrite_Response:
      type: object
      description: Response payload for rewrite on useGeminiNano.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "`Promise<RewriteResult>` — `{ rewrittenText, suggestions, latencyMs, engine, source }`"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGenAITasksTelemetry:
      type: object
      description: |
  Four focused text tasks that run locally: summarise, proofread, rewrite, describe.
  
  Wraps the ML Kit GenAI task modules on AICore through pixel-nano: genai-summarization, genai-proofreading and genai-rewriting, plus image description. Because each task ships a tuned model rather than a free-form prompt, the output is more consistent than asking a chat model, and it works on more devices. Every call reports its own measured latency and the engine that served it.
      properties:
        isRunning:
          type: boolean
          description: True while any task is executing.
        summaryResult:
          anyOf:
            - $ref: "#/components/schemas/SummarizeResult"
            - type: null
          description: Bullet summary with latency and engine name.
        proofreadResult:
          anyOf:
            - $ref: "#/components/schemas/ProofreadResult"
            - type: null
          description: Corrected text plus the individual suggestions.
        rewriteResult:
          anyOf:
            - $ref: "#/components/schemas/RewriteResult"
            - type: null
          description: Rewritten text in the requested tone.
        imageDescriptionResult:
          anyOf:
            - $ref: "#/components/schemas/ImageDescriptionResult"
            - type: null
          description: Generated description of a supplied image.
        error:
          anyOf:
            - type: string
            - type: null
          description: "Why the last task failed, for example the model not being downloaded."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useGenAITasks_summarize_Request:
      type: object
      description: Request payload for summarize on useGenAITasks.
      properties:
        text:
          type: string
          description: The article or transcript to condense.
        options:
          $ref: "#/components/schemas/SummarizeOptions"
          description: "inputType: 'article' or 'conversation' tells the model how to read it; outputType: 'one_bullet', 'two_bullets' or 'three_bullets' sets the length."
      required:
        - text
    useGenAITasks_summarize_Response:
      type: object
      description: Response payload for summarize on useGenAITasks.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { summary, latencyMs, engine, source }, or null on failure with the reason in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGenAITasks_proofread_Request:
      type: object
      description: Request payload for proofread on useGenAITasks.
      properties:
        text:
          type: string
          description: The text to correct.
      required:
        - text
    useGenAITasks_proofread_Response:
      type: object
      description: Response payload for proofread on useGenAITasks.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { correctedText, suggestions, latencyMs, engine, source } — suggestions lists the individual changes — or null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGenAITasks_rewrite_Request:
      type: object
      description: Request payload for rewrite on useGenAITasks.
      properties:
        text:
          type: string
          description: The text to transform.
        tone:
          $ref: "#/components/schemas/TaskTone"
          description: "One of elaborate, emojify, shorten, friendly, professional, rephrase. Defaults to professional."
      required:
        - text
    useGenAITasks_rewrite_Response:
      type: object
      description: Response payload for rewrite on useGenAITasks.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { rewrittenText, suggestions, latencyMs, engine, source }, or null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useGenAITasks_describeImage_Request:
      type: object
      description: Request payload for describeImage on useGenAITasks.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
        style:
          type: string
          description: "detailed, caption, labels or concise. Defaults to concise."
      required:
        - imageInput
    useGenAITasks_describeImage_Response:
      type: object
      description: Response payload for describeImage on useGenAITasks.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { description, finishReason, latencyMs, engine, source }, or null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHapticsTelemetry:
      type: object
      description: |
  Vibration, from simple taps to custom-shaped waveforms.
  
  Standard patterns come from expo-haptics. Beyond that, the native module reports the actual vibrator hardware: whether amplitude can be varied, its resonant frequency, and which composition primitives it supports. Android 16 envelope effects are built with BasicEnvelopeBuilder from intensity and sharpness control points and must finish at zero intensity. This Pixel supports them, which is how the thinking ramp and alert pulses are produced.
      properties:
        hasAmplitudeControl:
          anyOf:
            - type: boolean
            - type: null
          description: Whether vibration strength can be varied rather than just on and off.
        envelopeSupported:
          type: boolean
          description: Whether custom envelope waveforms can be played.
        resonantFrequencyHz:
          anyOf:
            - type: number
            - type: null
          description: The frequency at which the actuator is most efficient. Around 134 Hz here.
        supportedPrimitives:
          type: array
          items:
            type: string
          description: "Composition building blocks the hardware provides, such as click, tick, thud and rise."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useHaptics_selection_Request:
      type: object
      description: Request payload for selection on useHaptics.
      properties:{}
    useHaptics_selection_Response:
      type: object
      description: Response payload for selection on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web; failures are logged rather than thrown.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_light_Request:
      type: object
      description: Request payload for light on useHaptics.
      properties:{}
    useHaptics_light_Response:
      type: object
      description: Response payload for light on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_medium_Request:
      type: object
      description: Request payload for medium on useHaptics.
      properties:{}
    useHaptics_medium_Response:
      type: object
      description: Response payload for medium on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_heavy_Request:
      type: object
      description: Request payload for heavy on useHaptics.
      properties:{}
    useHaptics_heavy_Response:
      type: object
      description: Response payload for heavy on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_success_Request:
      type: object
      description: Request payload for success on useHaptics.
      properties:{}
    useHaptics_success_Response:
      type: object
      description: Response payload for success on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_warning_Request:
      type: object
      description: Request payload for warning on useHaptics.
      properties:{}
    useHaptics_warning_Response:
      type: object
      description: Response payload for warning on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_error_Request:
      type: object
      description: Request payload for error on useHaptics.
      properties:{}
    useHaptics_error_Response:
      type: object
      description: Response payload for error on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once dispatched. No-op on web.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_playEnvelope_Request:
      type: object
      description: Request payload for playEnvelope on useHaptics.
      properties:
        points:
          type: array
          items:
            type: object
            description: "{ intensity: number; sharpness: number; durationMs: number }"
          description: "Steps of the curve; intensity and sharpness are 0 to 1. The envelope must end at intensity 0, which the module appends for you."
        initialSharpness:
          type: number
          description: "Sharpness to start from, 0 to 1."
      required:
        - points
    useHaptics_playEnvelope_Response:
      type: object
      description: Response payload for playEnvelope on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns true when the effect was dispatched, false when envelopes are unsupported or the call failed. It never throws."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_playPrimitives_Request:
      type: object
      description: Request payload for playPrimitives on useHaptics.
      properties:
        steps:
          type: array
          items:
            type: object
            description: "{ primitive: string; scale?: number; delayMs?: number }"
          description: primitive is one of supportedPrimitives; scale sets strength 0 to 1; delayMs is the gap before that step.
    useHaptics_playPrimitives_Response:
      type: object
      description: Response payload for playPrimitives on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns true when the composition was dispatched, false when the native module is absent or the call failed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_cancel_Request:
      type: object
      description: Request payload for cancel on useHaptics.
      properties:{}
    useHaptics_cancel_Response:
      type: object
      description: Response payload for cancel on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHaptics_triggerHaptic_Request:
      type: object
      description: Request payload for triggerHaptic on useHaptics.
      properties:{}
    useHaptics_triggerHaptic_Response:
      type: object
      description: Response payload for triggerHaptic on useHaptics.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "`Promise<void>` — resolves when dispatched; failures are logged, not thrown"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHealthConnectTelemetry:
      type: object
      description: |
  Platform health records, steps, and sensor vitals telemetry.
  
  Backed by android.health.connect system framework on Android 14+, PackageManager healthdata provider detection, and hardware Sensor.TYPE_STEP_COUNTER / Sensor.TYPE_HEART_RATE HAL drivers. Nothing is simulated: reports real device health telemetry availability.
      properties:
        isAvailable:
          type: boolean
          description: Whether Health Connect is available on the device.
        sdkStatus:
          type: string
          enum:
            - SDK_AVAILABLE
            - SDK_UNAVAILABLE
            - SDK_UNAVAILABLE_PROVIDER_UPDATE_REQUIRED
          description: Platform SDK availability status.
        hasStepCounter:
          type: boolean
          description: Whether physical hardware step counter sensor is present.
        hasHeartRateSensor:
          type: boolean
          description: Whether hardware heart rate sensor is present.
        stepSensorName:
          anyOf:
            - type: string
            - type: null
          description: Hardware sensor name (e.g. Google Step Counter).
        heartRateSensorName:
          anyOf:
            - type: string
            - type: null
          description: Hardware heart rate sensor name.
        isFrameworkIntegrated:
          type: boolean
          description: Whether Health Connect is built into the OS (Android 14+).
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if unavailable.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: Telemetry provenance.
      required:
        - source
    useHealthConnect_refresh_Request:
      type: object
      description: Request payload for refresh on useHealthConnect.
      properties:{}
    useHealthConnect_refresh_Response:
      type: object
      description: Response payload for refresh on useHealthConnect.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLightTelemetry:
      type: object
      description: |
  The eight-LED ring around the rear camera flash. Real LEDs or nothing.
  
  Android 17 exposes the array as eight lights of type Light.LIGHT_TYPE_APPLICATION, but every lights session needs CONTROL_DEVICE_LIGHTS, which is signature|privileged and cannot be held by a normal app. PixelKit therefore ships a small Java daemon that runs as the adb shell user and listens on 127.0.0.1:11080; start it with npm run hilight:daemon. With the daemon up, availability is hardware and the calls drive real LEDs. Without it, availability is simulated: the colour and pattern state is still tracked and mirrored on screen with haptics, and nothing pretends the lights are on.
      properties:
        availability:
          type: string
          enum:
            - hardware
            - unavailable
            - unsupported
          description: "Whether calls reach the LEDs ('hardware'), the daemon is not running ('unavailable'), or this device has no array."
        isHardwareSupported:
          type: boolean
          description: Whether this device physically has the LED array.
        isDaemonConnected:
          type: boolean
          description: "Whether the local daemon answered its last status check, polled every five seconds."
        isActive:
          type: boolean
          description: Whether the ring is currently lit.
        currentColor:
          type: string
          description: Active colour as a hex string.
        mode:
          $ref: "#/components/schemas/HiLightMode"
          description: "Pattern label: off, glow, breathing, pulse, gemini_thinking, incoming_call or notification."
        brightness:
          type: number
          description: "0 to 1. The hardware has no brightness channel, so this scales the RGB values."
        isFaceDownMode:
          type: boolean
          description: Whether glanceable face-down behaviour is engaged.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Latest failure message, or `null`. Failures are also logged and counted."
      required:
        - source
    useHiLight_refreshDaemonStatus_Request:
      type: object
      description: Request payload for refreshDaemonStatus on useHiLight.
      properties:{}
    useHiLight_refreshDaemonStatus_Response:
      type: object
      description: Response payload for refreshDaemonStatus on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the daemon answered, false otherwise. The same value lands in isDaemonConnected."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_setColor_Request:
      type: object
      description: Request payload for setColor on useHiLight.
      properties:
        hexColor:
          type: string
          description: "RGB hex string such as \"#81C995\". Sent to the daemon as-is, scaled by brightness."
      required:
        - hexColor
    useHiLight_setColor_Response:
      type: object
      description: Response payload for setColor on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing. Nothing lights unless availability is hardware.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_setMode_Request:
      type: object
      description: Request payload for setMode on useHiLight.
      properties:
        mode:
          $ref: "#/components/schemas/HiLightMode"
          description: "One of off, glow, breathing, pulse, gemini_thinking, incoming_call, notification. Passing 'off' extinguishes the ring."
      required:
        - mode
    useHiLight_setMode_Response:
      type: object
      description: Response payload for setMode on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; mode and isActive update immediately.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_setBrightness_Request:
      type: object
      description: Request payload for setBrightness on useHiLight.
      properties:
        level:
          type: number
          description: 0.0 to 1.0; values outside are clamped.
      required:
        - level
    useHiLight_setBrightness_Response:
      type: object
      description: Response payload for setBrightness on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing. Applied immediately when the ring is lit, stored otherwise."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_triggerGeminiPulse_Request:
      type: object
      description: Request payload for triggerGeminiPulse on useHiLight.
      properties:
        durationMs:
          type: number
          description: "How long to hold before clearing, in milliseconds. Defaults to 4000."
    useHiLight_triggerGeminiPulse_Response:
      type: object
      description: Response payload for triggerGeminiPulse on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing. A pending timer from an earlier call is cancelled first.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_triggerContactAlert_Request:
      type: object
      description: Request payload for triggerContactAlert on useHiLight.
      properties:
        hexColor:
          type: string
          description: RGB hex for the alert colour.
        durationMs:
          type: number
          description: Hold time in milliseconds. Defaults to 5000.
      required:
        - hexColor
    useHiLight_triggerContactAlert_Response:
      type: object
      description: Response payload for triggerContactAlert on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing. Replaces any hold already running.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_turnOff_Request:
      type: object
      description: Request payload for turnOff on useHiLight.
      properties:{}
    useHiLight_turnOff_Response:
      type: object
      description: Response payload for turnOff on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; mode becomes off and isActive false.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useHiLight_toggle_Request:
      type: object
      description: Request payload for toggle on useHiLight.
      properties:{}
    useHiLight_toggle_Response:
      type: object
      description: Response payload for toggle on useHiLight.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isActive flips.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useKeyAgreementTelemetry:
      type: object
      description: |
  Hardware-isolated Elliptic Curve Diffie-Hellman session key derivation via Titan M2.
  
  Utilizes AndroidKeyStore and Java Cryptography Architecture (JCA) backed by the Google Titan M2 StrongBox hardware security module. Implements Elliptic Curve Diffie-Hellman (ECDH) on the NIST P-256 (secp256r1) curve with PURPOSE_AGREE_KEY. Generates hardware-isolated keypairs and derives symmetrical AES shared secrets against external peer public keys.
      properties:
        isStrongBoxSupported:
          type: boolean
          description: Whether the device hardware includes a dedicated StrongBox Keymaster module (Titan M2).
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest error message if keypair generation or secret derivation failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useKeyAgreement_generateKeyPair_Request:
      type: object
      description: Request payload for generateKeyPair on useKeyAgreement.
      properties:{}
    useKeyAgreement_generateKeyPair_Response:
      type: object
      description: Response payload for generateKeyPair on useKeyAgreement.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useKeyAgreement_deriveSharedSecret_Request:
      type: object
      description: Request payload for deriveSharedSecret on useKeyAgreement.
      properties:{}
    useKeyAgreement_deriveSharedSecret_Response:
      type: object
      description: Response payload for deriveSharedSecret on useKeyAgreement.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useLocationTelemetry:
      type: object
      description: |
  Position, altitude, heading and speed from the satellite receiver.
  
  Streams from expo-location using the high-accuracy provider, which on a Pixel uses the dual-band receiver. The accuracy value is the radius in metres that the platform believes the position lies within; indoors it can be tens of metres and should gate any decision made from the coordinates. Heading and speed are only meaningful while actually moving.
      properties:
        latitude:
          type: number
          description: Decimal degrees north.
        longitude:
          type: number
          description: Decimal degrees east.
        altitude:
          anyOf:
            - type: number
            - type: null
          description: "Metres above sea level, less reliable than the horizontal position."
        accuracy:
          anyOf:
            - type: number
            - type: null
          description: Radius in metres the fix is confident within. Check this before trusting the position.
        heading:
          anyOf:
            - type: number
            - type: null
          description: "Direction of travel in degrees, meaningful only while moving."
        speed:
          anyOf:
            - type: number
            - type: null
          description: Ground speed in metres per second.
        hasPermission:
          type: boolean
          description: Whether fine location permission was granted.
        isLocating:
          type: boolean
          description: "`true` while a fix is being acquired, which can take seconds on a cold start."
        hasFix:
          type: boolean
          description: "Whether a position has been obtained this session. This, not `latitude`, is the \"do I have a location\" flag."
        lastFixAt:
          anyOf:
            - type: number
            - type: null
          description: "Epoch milliseconds when the last fix arrived, for showing how stale it is."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Why the last attempt failed, including `'Location permission denied'`."
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "`'hardware'` once a fix exists, `'unavailable'` before that."
      required:
        - source
    useLocation_refreshLocation_Request:
      type: object
      description: Request payload for refreshLocation on useLocation.
      properties:{}
    useLocation_refreshLocation_Response:
      type: object
      description: Response payload for refreshLocation on useLocation.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when a fix arrived, false when permission was denied or the fix failed, with the reason in error. Coordinates never reach the log."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMediaLibraryTelemetry:
      type: object
      description: |
  Saving captures to the gallery, and reading what is there.
  
  Wraps expo-media-library. SDK 57 uses the class API (Asset.create, Album.create, Query) rather than the deprecated createAssetAsync helpers, which now throw at runtime. Asset fields are async accessors, so the hook flattens each into a plain SavedMedia object that a list can render directly. Permission is more subtle than a yes or no on modern Android: access is granted per media type, and the user can share only selected items, which is what hasLimitedAccess reports.
      properties:
        permissionGranted:
          type: boolean
          description: Whether library access was granted.
        hasLimitedAccess:
          type: boolean
          description: "Android 13+: the user shared only selected items, so the library is not fully visible."
        isSaving:
          type: boolean
          description: True while a file is being written.
        isLoading:
          type: boolean
          description: True while the library is being read.
        recent:
          type: array
          items:
            $ref: "#/components/schemas/SavedMedia"
          description: "Newest items from the last loadRecent call, most recent first."
        lastSaved:
          anyOf:
            - $ref: "#/components/schemas/SavedMedia"
            - type: null
          description: The item this app most recently wrote.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last operation failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useMediaLibrary_requestPermission_Request:
      type: object
      description: Request payload for requestPermission on useMediaLibrary.
      properties:
        writeOnly:
          type: boolean
          description: "True asks only for write access, for an app that saves but never browses. Defaults to false."
    useMediaLibrary_requestPermission_Response:
      type: object
      description: Response payload for requestPermission on useMediaLibrary.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when granted. hasLimitedAccess becomes true when the user shared only selected items, so a grant is not full access."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMediaLibrary_save_Request:
      type: object
      description: Request payload for save on useMediaLibrary.
      properties:
        localUri:
          type: string
          description: The file useCamera or useAudio returned.
        albumName:
          type: string
          description: Album to file it under. Created when it does not exist.
      required:
        - localUri
    useMediaLibrary_save_Response:
      type: object
      description: Response payload for save on useMediaLibrary.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { id, uri, filename, width, height, durationSeconds, creationTime }, or null when permission was denied or the write failed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMediaLibrary_loadRecent_Request:
      type: object
      description: Request payload for loadRecent on useMediaLibrary.
      properties:
        limit:
          type: number
          description: How many items to read. Defaults to 20.
    useMediaLibrary_loadRecent_Response:
      type: object
      description: Response payload for loadRecent on useMediaLibrary.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the items, also written to recent. Empty array when permission was denied."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMediaLibrary_remove_Request:
      type: object
      description: Request payload for remove on useMediaLibrary.
      properties:
        media:
          $ref: "#/components/schemas/SavedMedia"
          description: An item from recent or lastSaved.
      required:
        - media
    useMediaLibrary_remove_Response:
      type: object
      description: Response payload for remove on useMediaLibrary.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the item was deleted, and it is dropped from recent."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMemoryTelemetry:
      type: object
      description: |
  System RAM, this app's heaps, and how close the system is to killing you.
  
  System totals come from ActivityManager.getMemoryInfo, polled every two seconds: total RAM, available RAM, the low-memory threshold and the kernel's own low-memory flag. App figures come from Runtime for the Java heap and Debug.getNativeHeapAllocatedSize for the native heap, which is where Hermes, decoded images and JSI allocations live. purgeCaches requests a garbage collection and re-reads; it does not claim to free system RAM, because an app cannot do that.
      properties:
        totalRAMMB:
          type: number
          description: "Physical RAM the system reports, about 11,647 MB on a 12 GB device."
        freeRAMMB:
          type: number
          description: Memory currently available to start new work.
        usedRAMMB:
          type: number
          description: "Total minus available. Includes reclaimable caches, so it reads higher than you might expect."
        isLowMemory:
          type: boolean
          description: "Kernel low-memory flag. When true, free buffers now."
        lowMemoryThresholdMB:
          type: number
          description: The level at which the system starts killing background processes.
        appJavaHeapMB:
          type: number
          description: "This app's Java heap in use."
        appJavaHeapMaxMB:
          type: number
          description: Ceiling for that heap. Crossing it throws OutOfMemoryError.
        appNativeHeapMB:
          type: number
          description: "Native allocations: the JS engine, decoded bitmaps, native modules."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useMemory_purgeCaches_Request:
      type: object
      description: Request payload for purgeCaches on useMemory.
      properties:{}
    useMemory_purgeCaches_Response:
      type: object
      description: Response payload for purgeCaches on useMemory.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing. The refreshed reading lands in the hook fields, and the amount reclaimed is logged as freedMB."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMicrophoneArrayTelemetry:
      type: object
      description: |
  Multi-mic acoustic array topology, polar directivity, and beamforming controls.
  
  Directly queries the Android AudioManager for connected hardware microphones and their geometric coordinates, group mappings, and directivity patterns (omnidirectional, cardioid, hypercardioid). On supported Pixel devices, provides controls to steer acoustic beamforming (towards user, away from user, external) and adjust acoustic zoom field dimension.
      properties:
        microphones:
          type: array
          items:
            $ref: "#/components/schemas/MicrophoneInfo"
          description: Array of physical microphones detected on the device chassis with 3D positions and polar patterns.
        direction:
          type: string
          enum:
            - user
            - away
            - external
            - omni
          description: Current beam direction configured for the microphone array.
        fieldZoom:
          type: number
          description: Acoustic field zoom dimension ratio from 0.0 (wide) to 1.0 (narrow focus).
        isSupported:
          type: boolean
          description: Whether the hardware and platform support acoustic array inspection and beamforming.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if microphone array query or direction setting failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useMicrophoneArray_setDirection_Request:
      type: object
      description: Request payload for setDirection on useMicrophoneArray.
      properties:{}
    useMicrophoneArray_setDirection_Response:
      type: object
      description: Response payload for setDirection on useMicrophoneArray.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMicrophoneArray_setFieldZoom_Request:
      type: object
      description: Request payload for setFieldZoom on useMicrophoneArray.
      properties:{}
    useMicrophoneArray_setFieldZoom_Response:
      type: object
      description: Response payload for setFieldZoom on useMicrophoneArray.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useMicrophoneArray_refresh_Request:
      type: object
      description: Request payload for refresh on useMicrophoneArray.
      properties:{}
    useMicrophoneArray_refresh_Response:
      type: object
      description: Response payload for refresh on useMicrophoneArray.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNFCTelemetry:
      type: object
      description: |
  Reading and writing real NFC tags through reader mode.
  
  Enables NfcAdapter reader mode on the foreground Activity through the native module. Every tag entering the field raises an event carrying its identifier, supported technologies, NDEF capacity, writability and decoded records; text records have their language prefix stripped and URI records are resolved. Two platform constraints are surfaced rather than hidden: reader mode is bound to the Activity, so it stops when the app is backgrounded and must be started again on resume; and a tag is only readable while physically in the field, so a read either happens in that window or reports why it did not.
      properties:
        isSupported:
          type: boolean
          description: Whether this device has an NFC radio.
        isEnabled:
          type: boolean
          description: Whether NFC is switched on in system settings.
        observeModeSupported:
          type: boolean
          description: "Whether Android 15 Observe Mode is available, which lets an app watch reader field activity."
        antennaState:
          type: string
          enum:
            - ENABLED
            - DISABLED
            - UNAVAILABLE
          description: Current antenna state.
        isReading:
          type: boolean
          description: Whether reader mode is running. Stops when the app leaves the foreground.
        lastScannedTag:
          anyOf:
            - $ref: "#/components/schemas/ScannedTag"
            - type: null
          description: "The last physical tag read: id, technologies, capacity, writability and decoded NDEF records."
        tagCount:
          type: number
          description: How many tags have been read this session.
        pendingWrite:
          anyOf:
            - type: string
            - type: null
          description: Text waiting to be written to the next tag presented.
        lastWriteOk:
          anyOf:
            - type: boolean
            - type: null
          description: Whether the last queued write succeeded. Null before any attempt.
        error:
          anyOf:
            - type: string
            - type: null
          description: "Why the last operation failed, for example a read-only tag or one too small for the message."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useNFC_startReader_Request:
      type: object
      description: Request payload for startReader on useNFC.
      properties:{}
    useNFC_startReader_Response:
      type: object
      description: Response payload for startReader on useNFC.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when reader mode started; false with the reason in error when the device has no radio, NFC is switched off, or the build has no reader. Tags then arrive in lastScannedTag."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNFC_stopReader_Request:
      type: object
      description: Request payload for stopReader on useNFC.
      properties:{}
    useNFC_stopReader_Response:
      type: object
      description: Response payload for stopReader on useNFC.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once released; isReading becomes false and any pending write is dropped.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNFC_writeText_Request:
      type: object
      description: Request payload for writeText on useNFC.
      properties:
        text:
          type: string
          description: The NDEF text record to write.
      required:
        - text
    useNFC_writeText_Response:
      type: object
      description: Response payload for writeText on useNFC.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the write was queued, not when it completed; the outcome arrives later in lastWriteOk. False with the reason in error when it could not be queued."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNFC_clearTag_Request:
      type: object
      description: Request payload for clearTag on useNFC.
      properties:{}
    useNFC_clearTag_Response:
      type: object
      description: Response payload for clearTag on useNFC.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; lastScannedTag and lastWriteOk become null.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNaturalLanguageAITelemetry:
      type: object
      description: |
  Translation, language detection, smart replies and entity extraction, all offline.
  
  Wraps the ML Kit language stack through pixel-nano: language-id, translate, smart-reply and entity-extraction. Translation models download per language pair on first use and then run entirely offline, which is why the first call for a new pair is slower. Smart reply takes a short conversation history and proposes replies. Entity extraction returns typed spans with their positions in the original string.
      properties:
        isProcessing:
          type: boolean
          description: True while any language operation runs.
        languageResult:
          anyOf:
            - $ref: "#/components/schemas/LanguageIdResult"
            - type: null
          description: Detected BCP-47 code plus alternatives with confidence scores.
        translationResult:
          anyOf:
            - $ref: "#/components/schemas/TranslationResult"
            - type: null
          description: Translated text with the source and target languages.
        smartReplyResult:
          anyOf:
            - $ref: "#/components/schemas/SmartReplyResult"
            - type: null
          description: Suggested replies for the supplied conversation.
        entityResult:
          anyOf:
            - $ref: "#/components/schemas/EntityExtractionResult"
            - type: null
          description: Typed entities with their start and end offsets.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last operation failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useNaturalLanguageAI_identifyLanguage_Request:
      type: object
      description: Request payload for identifyLanguage on useNaturalLanguageAI.
      properties:
        text:
          type: string
          description: A sample; a few words is usually enough.
      required:
        - text
    useNaturalLanguageAI_identifyLanguage_Response:
      type: object
      description: Response payload for identifyLanguage on useNaturalLanguageAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { languageCode, possibleLanguages, latencyMs, source } — languageCode is null when nothing was confident enough — or null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNaturalLanguageAI_translate_Request:
      type: object
      description: Request payload for translate on useNaturalLanguageAI.
      properties:
        text:
          type: string
          description: The text to translate.
        sourceLang:
          type: string
          description: "BCP-47 language code of the input. Defaults to 'en'."
        targetLang:
          type: string
          description: "BCP-47 language code to translate into. Defaults to 'es'."
      required:
        - text
    useNaturalLanguageAI_translate_Response:
      type: object
      description: Response payload for translate on useNaturalLanguageAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { translatedText, sourceLanguage, targetLanguage, latencyMs, source }, or null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNaturalLanguageAI_suggestReplies_Request:
      type: object
      description: Request payload for suggestReplies on useNaturalLanguageAI.
      properties:
        history:
          type: array
          items:
            type: object
            description: "{ text, timestamp?, isLocalUser?, sender? }"
          description: "Messages in order. isLocalUser marks this user's own messages, so the model replies to the other party."
    useNaturalLanguageAI_suggestReplies_Response:
      type: object
      description: Response payload for suggestReplies on useNaturalLanguageAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { suggestions, status, latencyMs, source }. suggestions is empty when the model has nothing confident to offer; null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNaturalLanguageAI_extractEntities_Request:
      type: object
      description: Request payload for extractEntities on useNaturalLanguageAI.
      properties:
        text:
          type: string
          description: The text to scan.
      required:
        - text
    useNaturalLanguageAI_extractEntities_Response:
      type: object
      description: Response payload for extractEntities on useNaturalLanguageAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { entities, latencyMs, source }; each entity carries type, text and the start and end offsets into your input. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useNetworkTelemetry:
      type: object
      description: |
  Connection type, address and whether traffic actually goes anywhere.
  
  Reads from expo-network: interface type, IP address, reachability and airplane mode. Being connected to Wi-Fi is not the same as having internet, which is why isConnected reflects a usable route rather than merely an attached interface. isMetered marks connections where the user pays per byte, typically cellular or a hotspot.
      properties:
        networkType:
          type: string
          description: "WIFI, CELLULAR, NONE or UNKNOWN."
        ipAddress:
          anyOf:
            - type: string
            - type: null
          description: Address on the current interface.
        isConnected:
          type: boolean
          description: "Whether a usable internet route exists, not merely an attached interface."
        isMetered:
          type: boolean
          description: Whether the user pays for this traffic. Gate large transfers on it.
        isAirplaneMode:
          type: boolean
          description: Whether airplane mode is on.
        hasRead:
          type: boolean
          description: "Whether a read has completed. Before it, the values above are defaults."
        isChecking:
          type: boolean
          description: "`true` while a check is running."
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last read failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "`'hardware'` once a read has completed, `'unavailable'` before that."
      required:
        - source
    useNetwork_refreshNetwork_Request:
      type: object
      description: Request payload for refreshNetwork on useNetwork.
      properties:{}
    useNetwork_refreshNetwork_Response:
      type: object
      description: Response payload for refreshNetwork on useNetwork.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves once the read completes. Each sub-read fails independently, so one missing value does not blank the rest."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfettoTelemetry:
      type: object
      description: |
  System-level kernel and app performance profiling via Perfetto v54.
  
  Backed by android.os.Trace, the system Perfetto binary (v54), and Android kernel trace categories (sched, freq, idle, gfx, view, am, wm, camera, hal). Emits zero-overhead hardware trace markers and captures system trace buffers without requiring root privileges. Nothing is simulated: operates directly on physical Android tracing infrastructure.
      properties:
        isSupported:
          type: boolean
          description: Whether Perfetto and system tracing are available on device.
        isTracing:
          type: boolean
          description: Whether an active system trace session is currently recording.
        perfettoVersion:
          anyOf:
            - type: string
            - type: null
          description: "Perfetto daemon version ('v54.0' on Android 17 / Pixel 11 Pro)."
        availableCategories:
          type: array
          items:
            type: string
          description: Supported trace categories.
        activeCategories:
          type: array
          items:
            type: string
          description: Categories currently being captured in active trace.
        lastTraceUri:
          anyOf:
            - type: string
            - type: null
          description: Local file URI of the last saved .perfetto-trace file.
        traceDurationMs:
          anyOf:
            - type: number
            - type: null
          description: Duration of the last completed trace session in milliseconds.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if tracing failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: Telemetry provenance.
      required:
        - source
    usePerfetto_startTrace_Request:
      type: object
      description: Request payload for startTrace on usePerfetto.
      properties:{}
    usePerfetto_startTrace_Response:
      type: object
      description: Response payload for startTrace on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfetto_stopTrace_Request:
      type: object
      description: Request payload for stopTrace on usePerfetto.
      properties:{}
    usePerfetto_stopTrace_Response:
      type: object
      description: Response payload for stopTrace on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfetto_beginSection_Request:
      type: object
      description: Request payload for beginSection on usePerfetto.
      properties:{}
    usePerfetto_beginSection_Response:
      type: object
      description: Response payload for beginSection on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfetto_endSection_Request:
      type: object
      description: Request payload for endSection on usePerfetto.
      properties:{}
    usePerfetto_endSection_Response:
      type: object
      description: Response payload for endSection on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfetto_setCounter_Request:
      type: object
      description: Request payload for setCounter on usePerfetto.
      properties:{}
    usePerfetto_setCounter_Response:
      type: object
      description: Response payload for setCounter on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePerfetto_refresh_Request:
      type: object
      description: Request payload for refresh on usePerfetto.
      properties:{}
    usePerfetto_refresh_Response:
      type: object
      description: Response payload for refresh on usePerfetto.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePlayIntegrityTelemetry:
      type: object
      description: |
  Hardware Key Attestation and Google Play Integrity verdicts via Titan M2.
  
  Backed by android.hardware.strongbox_keystore (Titan M2 KeyMint 400), android.hardware.hardware_keystore (500), and Android KeyStore KeyGenParameterSpec attestation. Provides cryptographic hardware verification proving the device is a genuine physical Pixel without root compromise or simulation.
      properties:
        isSupported:
          type: boolean
          description: Whether hardware attestation and Play Integrity are supported on device.
        hasStrongBox:
          type: boolean
          description: Whether Titan M2 hardware StrongBox security chip is present.
        strongBoxVersion:
          anyOf:
            - type: number
            - type: null
          description: StrongBox KeyMint version (400 on Pixel 11 Pro).
        hardwareKeystoreVersion:
          anyOf:
            - type: number
            - type: null
          description: Hardware KeyStore version (500 on Android 17 / Pixel 11 Pro).
        hasAppAttestKey:
          type: boolean
          description: Whether device supports individual key attestation (android.hardware.keystore.app_attest_key).
        securityModelCompatible:
          type: boolean
          description: Whether device satisfies Android hardware security model.
        playServicesAvailable:
          type: boolean
          description: Whether Google Play Services is available and active.
        playServicesVersion:
          anyOf:
            - type: string
            - type: null
          description: Google Play Services version string.
        deviceIntegrity:
          type: string
          enum:
            - MEETS_STRONG_INTEGRITY
            - MEETS_DEVICE_INTEGRITY
            - MEETS_BASIC_INTEGRITY
            - UNVERIFIED
          description: Hardware integrity tier verdict.
        isAttesting:
          type: boolean
          description: Whether a cryptographic attestation operation is running.
        lastAttestation:
          anyOf:
            - $ref: "#/components/schemas/HardwareAttestationResult"
            - type: null
          description: Result of last hardware key attestation.
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest error if attestation failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: Telemetry provenance.
      required:
        - source
    usePlayIntegrity_requestAttestation_Request:
      type: object
      description: Request payload for requestAttestation on usePlayIntegrity.
      properties:{}
    usePlayIntegrity_requestAttestation_Response:
      type: object
      description: Response payload for requestAttestation on usePlayIntegrity.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePlayIntegrity_refresh_Request:
      type: object
      description: Request payload for refresh on usePlayIntegrity.
      properties:{}
    usePlayIntegrity_refresh_Response:
      type: object
      description: Response payload for refresh on usePlayIntegrity.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    usePrivateSpaceTelemetry:
      type: object
      description: |
  Android 15+ Private Space profile isolation detection and vault policy.
  
  Utilizes android.os.UserManager.isPrivateProfile() introduced in Android 15 (API 35). Identifies whether the current application process has been launched within the isolated user profile partition (Private Space), detects whether Private Space has been set up on the device, and reports the active lock policy (immediate, screen_off, device_reboot).
      properties:
        isInsidePrivateSpace:
          type: boolean
          description: Whether the current application process is executing inside the isolated Private Space profile.
        isPrivateSpaceConfigured:
          type: boolean
          description: Whether the device currently has a Private Space secure profile configured.
        autoLockPolicy:
          type: string
          enum:
            - immediate
            - screen_off
            - device_reboot
            - unknown
          description: Configured auto-lock timeout policy for the private space vault.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if private profile querying failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    usePrivateSpace_refresh_Request:
      type: object
      description: Request payload for refresh on usePrivateSpace.
      properties:{}
    usePrivateSpace_refresh_Response:
      type: object
      description: Response payload for refresh on usePrivateSpace.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useRadiosTelemetry:
      type: object
      description: |
  Every radio subsystem in one read.
  
  One native call gathers state from NfcAdapter, BluetoothManager, UwbManager, WifiRttManager and PackageManager, refreshed every five seconds. Everything here is read from the platform, so the whole object carries source hardware. It overlaps with useNFC, useBLE and useUWB on purpose: those add per-radio actions, this one is purely for reading state.
      properties:
        nfc:
          type: object
          description: NFC controller state.
        bluetooth:
          type: object
          description: Adapter state plus paired devices and Channel Sounding support.
        uwb:
          type: object
          description: Ultra-wideband chip state.
        wifiRtt:
          type: object
          description: "Wi-Fi round-trip-time ranging, used for indoor positioning."
        thread:
          type: object
          description: Thread 802.15.4 mesh radio (chip0) and Android ThreadNetworkManager state.
        satellite:
          type: object
          description: Satellite radio and Google Satellite SOS provider state.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useRadios_refresh_Request:
      type: object
      description: Request payload for refresh on useRadios.
      properties:{}
    useRadios_refresh_Response:
      type: object
      description: Response payload for refresh on useRadios.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; the nfc, bluetooth, uwb, wifiRtt and satellite blocks update. Call it after sending the user to Settings."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSatelliteNTNTelemetry:
      type: object
      description: |
  3GPP Release-17 Non-Terrestrial Network (satellite SOS) status and alignment telemetry.
  
  Interfaces with Android 15+ (API 35+) satellite telephony services and 3GPP Rel-17 NTN modems. Monitors real-time satellite connection states (disconnected, searching, connected, pointing_assist), provider network names, signal quality bars (0 to 4), emergency SOS packet readiness, and surfaces azimuth and elevation vectors to assist pointing the phone at the horizon satellite constellation.
      properties:
        isSupported:
          type: boolean
          description: Whether this device hardware and modem support Non-Terrestrial Network satellite links.
        connectionState:
          type: string
          enum:
            - disconnected
            - searching
            - connected
            - pointing_assist
          description: Current lifecycle connection state with the satellite constellation.
        carrier:
          anyOf:
            - type: string
            - type: null
          description: "Satellite network provider name (e.g. Skylo, T-Mobile Starlink, Iridium), or null."
        signalQualityBars:
          anyOf:
            - type: number
            - type: null
          description: "Signal quality indicator bars (0 to 4), or null if disconnected."
        pointingGuidance:
          anyOf:
            - $ref: "#/components/schemas/SatelliteGuidance"
            - type: null
          description: "Antenna pointing guidance with azimuth, elevation, and alignment flag, or null."
        emergencyServicesReady:
          type: boolean
          description: Whether the satellite link is ready for emergency SOS packet transmission.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if satellite modem querying failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useSatelliteNTN_refresh_Request:
      type: object
      description: Request payload for refresh on useSatelliteNTN.
      properties:{}
    useSatelliteNTN_refresh_Response:
      type: object
      description: Response payload for refresh on useSatelliteNTN.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSecurityTelemetry:
      type: object
      description: |
  Encrypted storage for secrets, backed by hardware.
  
  Wraps expo-secure-store, which encrypts values using a key held in the Android Keystore and, on devices that have it, StrongBox. Whether this device actually has StrongBox is verified separately by useCapabilities().hasStrongBox. Android 17 does have post-quantum key types, but SecureStore does not use them, so isPostQuantumProtected is false rather than implying protection that is not there.
      properties:
        isHardwareBacked:
          type: boolean
          description: "True on Android, where the encryption key lives in the Keystore."
        securityModule:
          type: string
          description: "Backend name the platform reports, \"Android Keystore\" here."
        isPostQuantumProtected:
          type: boolean
          description: Always false. SecureStore uses classical AES; do not claim otherwise.
        error:
          anyOf:
            - type: string
            - type: null
          description: Message from the last failed operation.
        lastOperation:
          anyOf:
            - type: string
            - type: null
          description: "Description of the last operation for a diagnostics panel, e.g. `\"saved PIXELKIT_GEMINI_API_KEY\"`. Never contains the value."
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "`'hardware'` on Android, `'unavailable'` elsewhere."
      required:
        - source
    useSecurity_saveSecureItem_Request:
      type: object
      description: Request payload for saveSecureItem on useSecurity.
      properties:
        key:
          type: string
          description: "Storage key: alphanumerics, dot, dash and underscore."
        value:
          type: string
          description: The secret itself. It is never written to the log.
      required:
        - key
        - value
    useSecurity_saveSecureItem_Response:
      type: object
      description: Response payload for saveSecureItem on useSecurity.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true on success, false with the reason in error on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSecurity_getSecureItem_Request:
      type: object
      description: Request payload for getSecureItem on useSecurity.
      properties:
        key:
          type: string
          description: The key used when saving.
      required:
        - key
    useSecurity_getSecureItem_Response:
      type: object
      description: Response payload for getSecureItem on useSecurity.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the value, or null when nothing is stored under that key or the read failed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSecurity_deleteSecureItem_Request:
      type: object
      description: Request payload for deleteSecureItem on useSecurity.
      properties:
        key:
          type: string
          description: The key to delete.
      required:
        - key
    useSecurity_deleteSecureItem_Response:
      type: object
      description: Response payload for deleteSecureItem on useSecurity.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the delete completed, false with the reason in error otherwise."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSensorsTelemetry:
      type: object
      description: |
  Motion, orientation, air pressure and ambient light, streaming live.
  
  Streams from expo-sensors: accelerometer and gyroscope for the six-axis IMU, magnetometer for heading, barometer for pressure, and the ambient light sensor. Relative altitude is computed from pressure with the international hypsometric formula, so it is a derived value and drifts with weather. The sampling interval applies to all streams; shorter intervals cost battery and wake the sensor hub more often.
      properties:
        accelerometer:
          type: object
          description: "Acceleration in g, including gravity. This is how you detect tilt and shake."
        gyroscope:
          type: object
          description: Rotation rate in radians per second.
        magnetometer:
          type: object
          description: "Magnetic field in microtesla, used for compass heading."
        barometer:
          type: object
          description: "Pressure in hectopascal, plus an altitude estimate derived from it."
        lightLux:
          type: number
          description: Ambient brightness in lux. Undefined until the first sample arrives.
        isAvailable:
          type: boolean
          description: Whether the sensors are present and streaming.
        hasMotionSample:
          type: boolean
          description: "`true` once a real accelerometer sample has arrived. Until then the vectors are zeroed, so use this to distinguish \"still\" from \"not started\"."
        barometerAvailable:
          anyOf:
            - type: boolean
            - type: null
          description: "Whether this device has a barometer. `null` until probed."
        lightAvailable:
          anyOf:
            - type: boolean
            - type: null
          description: "Whether this device has an ambient light sensor. `null` until probed."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Why subscribing failed, if it did. `null` when healthy."
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "`'hardware'` once a motion sample has arrived, `'unavailable'` before that."
      required:
        - source
    useSpatialAudioTelemetry:
      type: object
      description: |
  Android Spatializer status, binaural rendering, and dynamic head tracking telemetry.
  
  Backed by android.media.Spatializer from the platform AudioManager. Queries audio DSP spatialization effects and checks whether the dynamic head tracker sensor is physically reporting. Nothing is simulated: reads directly from the audio HAL and reports source: 'hardware' on genuine devices.
      properties:
        isSupported:
          type: boolean
          description: Whether the platform supports the Android Spatializer API (API 32+).
        isAvailable:
          type: boolean
          description: Whether spatial audio processing is available for the current audio routing path (e.g. A2DP headphones vs earpiece).
        isEnabled:
          type: boolean
          description: Whether spatial audio is enabled in user system sound settings.
        hasHeadTracker:
          type: boolean
          description: Whether a dynamic head tracker sensor (e.g. Pixel Buds Pro) is currently paired and reporting orientation.
        headTrackingMode:
          type: string
          enum:
            - unsupported
            - disabled
            - relative_world
            - relative_device
          description: Active head tracking coordinate mode reported by the audio HAL.
        immersiveAudioLevel:
          type: number
          description: "Level of immersive spatialization applied by the audio DSP (0: none, 1: multichannel, 2: other)."
        hasDynamicHeadTrackerFeature:
          type: boolean
          description: "Whether the device declares feature:android.hardware.sensor.dynamic.head_tracker."
        error:
          anyOf:
            - type: string
            - type: null
          description: Latest error message if the Spatializer query failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the readings came from. Genuine hardware reports 'hardware', unsupported platforms report 'unavailable'."
      required:
        - source
    useSpatialAudio_refresh_Request:
      type: object
      description: Request payload for refresh on useSpatialAudio.
      properties:{}
    useSpatialAudio_refresh_Response:
      type: object
      description: Response payload for refresh on useSpatialAudio.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeechTelemetry:
      type: object
      description: |
  Speaking text aloud with the voices the phone has installed.
  
  Wraps expo-speech, which drives the platform speech service. speak resolves when the engine finishes, so utterances can be awaited in sequence rather than overlapping. Text longer than maxInputLength is rejected rather than silently truncated, because a cut-off sentence is worse than an error. The hook stops the engine on unmount so speech does not continue after the screen is gone.
      properties:
        isSpeaking:
          type: boolean
          description: Whether the engine is talking.
        isPaused:
          type: boolean
          description: Whether speech is paused rather than stopped.
        voices:
          type: array
          items:
            $ref: "#/components/schemas/Voice"
          description: "Installed voices, each with an identifier, name, language and quality."
        voice:
          anyOf:
            - type: string
            - type: null
          description: "Selected voice identifier, or null for the system default."
        rate:
          type: number
          description: Speaking speed; 1 is normal.
        pitch:
          type: number
          description: Voice pitch; 1 is normal.
        maxInputLength:
          type: number
          description: Longest string the engine accepts in one call.
        lastSpokenText:
          anyOf:
            - type: string
            - type: null
          description: Text of the most recent utterance.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last utterance failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useSpeech_speak_Request:
      type: object
      description: Request payload for speak on useSpeech.
      properties:
        text:
          type: string
          description: "What to say. Trimmed first; blank resolves immediately. Longer than maxInputLength is rejected, not truncated."
        options.language:
          type: string
          description: BCP-47 tag such as en-GB. Defaults to the system language.
        options.voice:
          type: string
          description: Identifier from voices; overrides language when both are given.
        options.rate:
          type: number
          description: Speaking speed; 1 is normal. Falls back to the hook rate.
        options.pitch:
          type: number
          description: Voice pitch; 1 is normal. Falls back to the hook pitch.
        options.volume:
          type: number
          description: 0 to 1 for this utterance.
      required:
        - text
    useSpeech_speak_Response:
      type: object
      description: Response payload for speak on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves when the engine finishes or is stopped. Rejects when the text is too long or the engine errors, with the message also in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_stop_Request:
      type: object
      description: Request payload for stop on useSpeech.
      properties:{}
    useSpeech_stop_Response:
      type: object
      description: Response payload for stop on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves once stopped; isSpeaking and isPaused become false. Any pending speak promise resolves rather than rejecting.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_pause_Request:
      type: object
      description: Request payload for pause on useSpeech.
      properties:{}
    useSpeech_pause_Response:
      type: object
      description: Response payload for pause on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves once applied; where the engine does not support it, error explains that and isPaused is unchanged."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_resume_Request:
      type: object
      description: Request payload for resume on useSpeech.
      properties:{}
    useSpeech_resume_Response:
      type: object
      description: Response payload for resume on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves once applied; where the engine does not support it, error explains that and isPaused is unchanged."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_checkSpeaking_Request:
      type: object
      description: Request payload for checkSpeaking on useSpeech.
      properties:{}
    useSpeech_checkSpeaking_Response:
      type: object
      description: Response payload for checkSpeaking on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the engine answer, which is also written to isSpeaking. False when the engine cannot be reached."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_refreshVoices_Request:
      type: object
      description: Request payload for refreshVoices on useSpeech.
      properties:{}
    useSpeech_refreshVoices_Response:
      type: object
      description: Response payload for refreshVoices on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the list, also written to voices. Empty array on failure, with the reason in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_voicesForLanguage_Request:
      type: object
      description: Request payload for voicesForLanguage on useSpeech.
      properties:
        languageTag:
          type: string
          description: "A prefix such as 'en' or a full tag such as 'en-GB'. Matched case-insensitively."
      required:
        - languageTag
    useSpeech_voicesForLanguage_Response:
      type: object
      description: Response payload for voicesForLanguage on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns the matching voices; empty when none are installed for that language.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_setVoice_Request:
      type: object
      description: Request payload for setVoice on useSpeech.
      properties:
        value:
          anyOf:
            - $ref: "#/components/schemas/stringnumber"
            - type: null
          description: "A voice identifier from voices, or null for the system default; for rate and pitch, 1 is normal."
      required:
        - value
    useSpeech_setVoice_Response:
      type: object
      description: Response payload for setVoice on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; voice, rate and pitch update."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_setRate_Request:
      type: object
      description: Request payload for setRate on useSpeech.
      properties:
        value:
          anyOf:
            - $ref: "#/components/schemas/stringnumber"
            - type: null
          description: "A voice identifier from voices, or null for the system default; for rate and pitch, 1 is normal."
      required:
        - value
    useSpeech_setRate_Response:
      type: object
      description: Response payload for setRate on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; voice, rate and pitch update."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeech_setPitch_Request:
      type: object
      description: Request payload for setPitch on useSpeech.
      properties:
        value:
          anyOf:
            - $ref: "#/components/schemas/stringnumber"
            - type: null
          description: "A voice identifier from voices, or null for the system default; for rate and pitch, 1 is normal."
      required:
        - value
    useSpeech_setPitch_Response:
      type: object
      description: Response payload for setPitch on useSpeech.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; voice, rate and pitch update."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeechAITelemetry:
      type: object
      description: |
  Turning speech into text, on the device or in the cloud.
  
  Capture runs through useAudio at 16 kHz mono on the voice_recognition source, which is the path that applies the platform noise suppression. In offline mode the native module drives Android System Intelligence streaming recognition and emits partial results as the user speaks. In cloud mode the finished clip is sent to Gemini audio understanding. Neither path fabricates a transcript: without a key, cloud mode keeps the recording and returns an error.
      properties:
        isListening:
          type: boolean
          description: True while the microphone is capturing.
        isTranscribing:
          type: boolean
          description: True while audio is being converted to text.
        recognitionMode:
          type: string
          enum:
            - offline
            - cloud
          description: Which engine will handle the next transcription.
        isOfflineAvailable:
          type: boolean
          description: Whether on-device recognition is installed for the current language.
        streamingPartial:
          type: string
          description: "Live text as the user is still speaking, offline mode only."
        voiceDecibels:
          type: number
          description: "Current input level, for a meter or a speaking indicator."
        lastTranscript:
          anyOf:
            - $ref: "#/components/schemas/SpeechTranscriptionResult"
            - type: null
          description: "Final text with confidence, audio duration and latency."
        lastRecordingUri:
          anyOf:
            - type: string
            - type: null
          description: "File of the last capture, kept even when transcription fails."
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last attempt failed.
        model:
          type: string
          description: Engine used for the last cloud transcription.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Provenance of the transcript: on-device or cloud; `'unavailable'` before either is ready."
      required:
        - source
    useSpeechAI_startListening_Request:
      type: object
      description: Request payload for startListening on useSpeechAI.
      properties:{}
    useSpeechAI_startListening_Response:
      type: object
      description: Response payload for startListening on useSpeechAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the microphone opened, false with the reason in error when permission was denied or the recognizer refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeechAI_stopListeningAndTranscribe_Request:
      type: object
      description: Request payload for stopListeningAndTranscribe on useSpeechAI.
      properties:{}
    useSpeechAI_stopListeningAndTranscribe_Response:
      type: object
      description: Response payload for stopListeningAndTranscribe on useSpeechAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { transcript, confidence, durationSeconds, latencyMs, language } — confidence is null for cloud transcripts — or null when nothing was captured or transcription failed. In cloud mode the audio file is kept in lastRecordingUri either way."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useSpeechAI_setRecognitionMode_Request:
      type: object
      description: Request payload for setRecognitionMode on useSpeechAI.
      properties:
        mode:
          type: string
          enum:
            - on-device
            - cloud
          description: On-device keeps audio on the phone and streams partials; cloud records first and needs an API key.
      required:
        - mode
    useSpeechAI_setRecognitionMode_Response:
      type: object
      description: Response payload for setRecognitionMode on useSpeechAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing. model updates to name the engine that will be used.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useTPUTelemetry:
      type: object
      description: |
  Whether the on-device AI stack is installed and usable.
  
  The Tensor TPU is only reachable through AICore (Gemini Nano, via ML Kit) or LiteRT, so this hook reports what is verifiably installed rather than guessing at hardware. AICore and Private Compute Services versions come from PackageManager, which needs a <queries> entry to see them at all. Inference timings deliberately stay null here; real measured latency lives in useGeminiNano. benchmarkTPU runs a genuine matrix multiplication on the JS thread and is labelled CPU fallback, because that is what it is.
      properties:
        aicoreInstalled:
          type: boolean
          description: "Whether AICore, the system service that hosts Gemini Nano, is present."
        aicoreVersion:
          anyOf:
            - type: string
            - type: null
          description: Installed AICore build. Useful when a model feature depends on a minimum version.
        privateComputeServicesVersion:
          anyOf:
            - type: string
            - type: null
          description: Version of the service that delivers model weights privately.
        hasNpuFeature:
          anyOf:
            - type: boolean
            - type: null
          description: "Whether the device declares a neural processing unit feature. False on this Pixel, which does not declare it."
        activeDelegate:
          type: string
          enum:
            - Tensor TPU
            - NPU
            - GPU
            - CPU Fallback
          description: "What last executed work from this hook. Only ever CPU fallback, because the benchmark is JS."
        isHardwareAccelerated:
          type: boolean
          description: Always false here. This hook runs nothing on the TPU.
        lastInferenceLatencyMs:
          anyOf:
            - type: number
            - type: null
          description: Always null by design. Use useGeminiNano for real on-device latency.
        cpuFallbackLatencyMs:
          anyOf:
            - type: number
            - type: null
          description: "Duration of the last JS matrix multiplication, in milliseconds."
        isBenchmarking:
          type: boolean
          description: True while the fallback benchmark runs.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        throughputTokensPerSec:
          anyOf:
            - type: number
            - type: null
          description: "Always `null` here. See `useGeminiNano().lastDecodeTokensPerSec`."
        memoryFootprintMB:
          anyOf:
            - type: number
            - type: null
          description: "Always `null`: AICore does not report model memory to apps."
      required:
        - source
    useTPU_benchmarkTPU_Request:
      type: object
      description: Request payload for benchmarkTPU on useTPU.
      properties:{}
    useTPU_benchmarkTPU_Response:
      type: object
      description: Response payload for benchmarkTPU on useTPU.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { activeDelegate: \"CPU Fallback\", isHardwareAccelerated: false, lastInferenceLatencyMs, throughputTokensPerSec: null, memoryFootprintMB: null }. Label it as a CPU number wherever you show it."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useThermometerTelemetry:
      type: object
      description: |
  Non-contact infrared temperature measurement on Google Pixel Pro hardware.
  
  Interfaces with the Melexis MLX90632 non-contact FIR temperature sensor integrated into Google Pixel Pro camera visors. Surfaces calibrated surface temperatures in both Celsius and Fahrenheit along with ambient die temperature. Supports configurable emissivity correction factors (0.10 to 1.00) and measurement modes (object, body, ambient). Reports unavailable on non-Pro models.
      properties:
        isSupported:
          type: boolean
          description: Whether the device hardware features the FIR non-contact temperature sensor.
        surfaceTemperatureC:
          anyOf:
            - type: number
            - type: null
          description: "Calibrated surface temperature in degrees Celsius (°C), or null if absent/unmeasured."
        surfaceTemperatureF:
          anyOf:
            - type: number
            - type: null
          description: "Calibrated surface temperature in degrees Fahrenheit (°F), or null."
        ambientTemperatureC:
          anyOf:
            - type: number
            - type: null
          description: "Sensor die / internal ambient temperature in degrees Celsius (°C), or null."
        emissivity:
          type: number
          description: Current material surface emissivity coefficient (0.1 to 1.0).
        mode:
          type: string
          enum:
            - object
            - body
            - ambient
          description: "Target measurement mode: 'object', 'body', or 'ambient'."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if sensor probing failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useThermometer_setEmissivity_Request:
      type: object
      description: Request payload for setEmissivity on useThermometer.
      properties:{}
    useThermometer_setEmissivity_Response:
      type: object
      description: Response payload for setEmissivity on useThermometer.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useThermometer_setMode_Request:
      type: object
      description: Request payload for setMode on useThermometer.
      properties:{}
    useThermometer_setMode_Response:
      type: object
      description: Response payload for setMode on useThermometer.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useThermometer_refresh_Request:
      type: object
      description: Request payload for refresh on useThermometer.
      properties:{}
    useThermometer_refresh_Response:
      type: object
      description: Response payload for refresh on useThermometer.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useTorchTelemetry:
      type: object
      description: |
  The rear flashlight, including variable brightness and an SOS strobe.
  
  Backed by CameraManager.setTorchMode, with turnOnTorchWithStrengthLevel on Android 13 and above for variable brightness. A registered torch callback means external changes are reflected rather than the hook holding a stale belief. Nothing is simulated: when the native module is absent, isAvailable is false and every action rejects instead of pretending.
      properties:
        isAvailable:
          type: boolean
          description: Whether a rear flash unit exists and the native module is present.
        isTorchOn:
          type: boolean
          description: "Whether the light is on, according to the system callback."
        isStrobing:
          type: boolean
          description: Whether the SOS strobe is running.
        maxStrengthLevel:
          anyOf:
            - type: number
            - type: null
          description: "Number of brightness steps, 21 on this device. Null when variable brightness is unsupported."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Why the last action failed, for example the camera being in use."
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useTorch_setTorch_Request:
      type: object
      description: Request payload for setTorch on useTorch.
      properties:
        on:
          type: boolean
          description: Desired state.
        strengthLevel:
          type: number
          description: "1 to maxStrengthLevel, honoured on Android 13 and later and ignored below it. Omit for the device default."
      required:
        - on
    useTorch_setTorch_Response:
      type: object
      description: Response payload for setTorch on useTorch.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the call was accepted, false when the hardware is unavailable or the call threw, with the reason in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useTorch_toggleTorch_Request:
      type: object
      description: Request payload for toggleTorch on useTorch.
      properties:{}
    useTorch_toggleTorch_Response:
      type: object
      description: Response payload for toggleTorch on useTorch.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves with the state the torch is in afterwards.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useTorch_startStrobe_Request:
      type: object
      description: Request payload for startStrobe on useTorch.
      properties:
        intervalMs:
          type: number
          description: "Half-period in milliseconds. Defaults to 150 and is clamped to at least 120, because the camera HAL needs roughly 50 to 100 ms per switch."
    useTorch_startStrobe_Response:
      type: object
      description: Response payload for startStrobe on useTorch.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isStrobing becomes true. Replaces any strobe already running.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useTorch_stopStrobe_Request:
      type: object
      description: Request payload for stopStrobe on useTorch.
      properties:{}
    useTorch_stopStrobe_Response:
      type: object
      description: Response payload for stopStrobe on useTorch.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isStrobing becomes false.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useUWBTelemetry:
      type: object
      description: |
  Ultra-wideband radio state, hardware ranging sessions, and spatial diagnostics.
  
  Chip presence, enabled state, chip id and ranging service readiness are queried from Android UwbManager and PackageManager through the native module, carrying source hardware. Hardware ranging sessions are initiated via startRanging(), exposing session diagnostics (session ID, protocol status, HAL direct vs declared feature) without mock placeholders.
      properties:
        isSupported:
          type: boolean
          description: Whether the UWB chip exists on this device.
        isEnabled:
          type: boolean
          description: Whether the radio is switched on in system settings.
        chipId:
          anyOf:
            - type: string
            - type: null
          description: "Chip identifier the platform reports, \"default\" on this Pixel."
        rangingApiSupported:
          type: boolean
          description: Whether the Android 16 RangingManager feature is declared. False on this unit.
        isRanging:
          type: boolean
          description: Whether a ranging session is actively running.
        sessionInfo:
          anyOf:
            - $ref: "#/components/schemas/UwbRangingResult"
            - type: null
          description: "Hardware session diagnostics: status, serviceName, technology, and timestamp."
        sessionError:
          anyOf:
            - type: string
            - type: null
          description: Error message if session creation or ranging fails.
        activeTargets:
          type: array
          items:
            $ref: "#/components/schemas/UWBSpatialTarget"
          description: Tracked responder anchors and devices with distance and angles.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        error:
          anyOf:
            - type: string
            - type: null
          description: "Latest failure message, or `null`. Failures are also logged and counted."
      required:
        - source
    useUWB_startRanging_Request:
      type: object
      description: Request payload for startRanging on useUWB.
      properties:
        sessionId:
          type: number
          description: "Identifier for the session, default 1001. Use distinct ids for concurrent sessions."
    useUWB_startRanging_Response:
      type: object
      description: Response payload for startRanging on useUWB.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Resolves true when the session opened; false with the reason in sessionError when the service is missing or the hardware refused. Diagnostics land in sessionInfo either way.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useUWB_stopRanging_Request:
      type: object
      description: Request payload for stopRanging on useUWB.
      properties:{}
    useUWB_stopRanging_Response:
      type: object
      description: Response payload for stopRanging on useUWB.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isRanging becomes false.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideoTelemetry:
      type: object
      description: |
  Playing video back, with position, seeking and thumbnails.
  
  Wraps expo-video, the SDK 57 replacement for the removed expo-av. The hook owns the player and a screen renders VideoView with it. Position, duration, buffered position and status are polled four times a second, which is enough for a scrubber without waking the JS thread every frame. Everything reported comes from the player rather than being tracked locally, so a seek made elsewhere still shows up.
      properties:
        player:
          $ref: "#/components/schemas/VideoPlayer"
          description: "Pass to <VideoView player={player} />. The view renders nothing without it."
        hasSource:
          type: boolean
          description: Whether a source has been loaded.
        isPlaying:
          type: boolean
          description: Whether playback is running.
        positionSeconds:
          type: number
          description: Seconds into the clip. Drives a scrubber.
        durationSeconds:
          type: number
          description: Total length. 0 until the source reports it.
        bufferedSeconds:
          type: number
          description: "How far ahead the player has buffered, which matters for a remote source."
        status:
          type: string
          description: "Player status, for example loading, readyToPlay or error."
        isMuted:
          type: boolean
          description: Whether audio is muted.
        isLooping:
          type: boolean
          description: Whether the clip restarts at the end.
        playbackRate:
          type: number
          description: Speed multiplier; 1 is normal. Pitch is preserved.
        volume:
          type: number
          description: Player volume from 0 to 1.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last operation failed.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
      required:
        - source
    useVideo_load_Request:
      type: object
      description: Request payload for load on useVideo.
      properties:
        next:
          $ref: "#/components/schemas/VideoSource"
          description: "A file URI, a remote URL, a required asset, or null to clear."
        options.autoplay:
          type: boolean
          description: Start playing as soon as the source is ready.
        options.loop:
          type: boolean
          description: Restart from the beginning at the end.
        options.muted:
          type: boolean
          description: Start muted.
      required:
        - next
    useVideo_load_Response:
      type: object
      description: Response payload for load on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves true when the source was replaced, false with the reason in error otherwise."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_play_Request:
      type: object
      description: Request payload for play on useVideo.
      properties:{}
    useVideo_play_Response:
      type: object
      description: Response payload for play on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_pause_Request:
      type: object
      description: Request payload for pause on useVideo.
      properties:{}
    useVideo_pause_Response:
      type: object
      description: Response payload for pause on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_togglePlay_Request:
      type: object
      description: Request payload for togglePlay on useVideo.
      properties:{}
    useVideo_togglePlay_Response:
      type: object
      description: Response payload for togglePlay on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Returns nothing; isPlaying updates on the next poll or immediately, and error is set when the player refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_seekTo_Request:
      type: object
      description: Request payload for seekTo on useVideo.
      properties:
        seconds:
          type: number
          description: "Position in seconds, clamped to 0 and the clip duration."
      required:
        - seconds
    useVideo_seekTo_Response:
      type: object
      description: Response payload for seekTo on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; positionSeconds updates immediately.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_seekBy_Request:
      type: object
      description: Request payload for seekBy on useVideo.
      properties:
        seconds:
          type: number
          description: Offset in seconds; negative rewinds.
      required:
        - seconds
    useVideo_seekBy_Response:
      type: object
      description: Response payload for seekBy on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; on failure error is set.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_replay_Request:
      type: object
      description: Request payload for replay on useVideo.
      properties:{}
    useVideo_replay_Response:
      type: object
      description: Response payload for replay on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; positionSeconds returns to 0.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_setMuted_Request:
      type: object
      description: Request payload for setMuted on useVideo.
      properties:
        value:
          type: boolean
          description: "True mutes, or makes the clip restart at the end."
      required:
        - value
    useVideo_setMuted_Response:
      type: object
      description: Response payload for setMuted on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isMuted and isLooping reflect it. Muting does not change volume.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_setLoop_Request:
      type: object
      description: Request payload for setLoop on useVideo.
      properties:
        value:
          type: boolean
          description: "True mutes, or makes the clip restart at the end."
      required:
        - value
    useVideo_setLoop_Response:
      type: object
      description: Response payload for setLoop on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; isMuted and isLooping reflect it. Muting does not change volume.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_setPlaybackRate_Request:
      type: object
      description: Request payload for setPlaybackRate on useVideo.
      properties:
        rate:
          type: number
          description: Clamped between 0.25 and 4; 1 is normal speed.
      required:
        - rate
    useVideo_setPlaybackRate_Response:
      type: object
      description: Response payload for setPlaybackRate on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; playbackRate reflects the clamped value.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_setVolume_Request:
      type: object
      description: Request payload for setVolume on useVideo.
      properties:
        value:
          type: number
          description: 0 to 1; values outside are clamped.
      required:
        - value
    useVideo_setVolume_Response:
      type: object
      description: Response payload for setVolume on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing; volume updates.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_setKeepScreenOn_Request:
      type: object
      description: Request payload for setKeepScreenOn on useVideo.
      properties:
        keep:
          type: boolean
          description: True while a video is playing; release it afterwards.
      required:
        - keep
    useVideo_setKeepScreenOn_Response:
      type: object
      description: Response payload for setKeepScreenOn on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Returns nothing.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVideo_generateThumbnails_Request:
      type: object
      description: Request payload for generateThumbnails on useVideo.
      properties:
        times:
          type: array
          items:
            $ref: "#/components/schemas/numbernumber"
          description: "One position in seconds, or several."
      required:
        - times
    useVideo_generateThumbnails_Response:
      type: object
      description: Response payload for generateThumbnails on useVideo.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the extracted frames, or an empty array on failure with the reason in error."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAITelemetry:
      type: object
      description: |
  Nine on-device vision capabilities, plus cloud scene understanding.
  
  The on-device half wraps the ML Kit vision models through pixel-nano and runs without a network: barcode scanning, text recognition v2, face detection with landmarks and head angles, 468-point face mesh, image labelling, object detection with tracking, 33-point pose detection, selfie and subject segmentation, and digital ink recognition. The cloud half sends a captured or picked image to Gemini and asks for a description plus structured labels. Each on-device call reports its own latency.
      properties:
        selectedImageUri:
          anyOf:
            - type: string
            - type: null
          description: "Image currently loaded, from the camera or the picker."
        analysis:
          anyOf:
            - $ref: "#/components/schemas/VisionAnalysisResult"
            - type: null
          description: Cloud description and labels with latency.
        isAnalyzing:
          type: boolean
          description: True during a cloud call.
        isOnDeviceProcessing:
          type: boolean
          description: True during any local vision call.
        ocrResult:
          anyOf:
            - $ref: "#/components/schemas/TextRecognitionResult"
            - type: null
          description: Recognised text with per-block bounding boxes.
        barcodeResult:
          anyOf:
            - $ref: "#/components/schemas/BarcodeScanResult"
            - type: null
          description: Decoded barcodes with format and position.
        facesResult:
          anyOf:
            - $ref: "#/components/schemas/FaceDetectionResult"
            - type: null
          description: "Faces with head angles, smile and eye-open probabilities."
        faceMeshResult:
          anyOf:
            - $ref: "#/components/schemas/FaceMeshResult"
            - type: null
          description: 468-point mesh for close-range faces.
        labelsResult:
          anyOf:
            - $ref: "#/components/schemas/ImageLabelResult"
            - type: null
          description: Concept labels with confidence.
        objectsResult:
          anyOf:
            - $ref: "#/components/schemas/ObjectDetectionResult"
            - type: null
          description: Detected objects with tracking ids across frames.
        poseResult:
          anyOf:
            - $ref: "#/components/schemas/PoseDetectionResult"
            - type: null
          description: 33 skeletal landmarks with in-frame likelihood.
        selfieResult:
          anyOf:
            - $ref: "#/components/schemas/SelfieSegmentationResult"
            - type: null
          description: Person-versus-background mask dimensions.
        subjectResult:
          anyOf:
            - $ref: "#/components/schemas/SubjectSegmentationResult"
            - type: null
          description: Foreground subject cut-out result.
        digitalInkResult:
          anyOf:
            - $ref: "#/components/schemas/DigitalInkResult"
            - type: null
          description: Handwriting candidates from stroke input.
        error:
          anyOf:
            - type: string
            - type: null
          description: Why the last call failed.
        model:
          type: string
          description: Cloud model used for scene analysis.
        source:
          type: string
          enum:
            - hardware
            - derived
            - unavailable
          description: "Where the numbers came from. There is no 'simulated' value: a reading is real, derived from real readings, or unavailable."
        selectedImageBase64:
          anyOf:
            - type: string
            - type: null
          description: "The same image as base64, which is what the model calls consume."
      required:
        - source
    useVisionAI_captureAndAnalyze_Request:
      type: object
      description: Request payload for captureAndAnalyze on useVisionAI.
      properties:
        useCamera:
          type: boolean
          description: "True opens the camera and asks for permission, false opens the library. Defaults to true."
    useVisionAI_captureAndAnalyze_Response:
      type: object
      description: Response payload for captureAndAnalyze on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { description, labels, latencyMs, timestamp }, or null when the user cancelled, no API key is configured, or the call failed."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_pickImage_Request:
      type: object
      description: Request payload for pickImage on useVisionAI.
      properties:
        useCamera:
          type: boolean
          description: "True for the camera, false for the library. Defaults to true."
    useVisionAI_pickImage_Response:
      type: object
      description: Response payload for pickImage on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with the file URI and base64 copy, also stored in selectedImageUri and selectedImageBase64. Null when cancelled or permission was refused."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_recognizeText_Request:
      type: object
      description: Request payload for recognizeText on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_recognizeText_Response:
      type: object
      description: Response payload for recognizeText on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { text, blocks, latencyMs, source }; blocks keep the line and bounding-box structure. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_scanBarcodes_Request:
      type: object
      description: Request payload for scanBarcodes on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_scanBarcodes_Response:
      type: object
      description: Response payload for scanBarcodes on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { barcodes, latencyMs, source }; each barcode carries rawValue, displayValue, format, valueType and a bounding box. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_detectFaces_Request:
      type: object
      description: Request payload for detectFaces on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_detectFaces_Response:
      type: object
      description: Response payload for detectFaces on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { faces, latencyMs, source }; each face carries a tracking id, head Euler angles, a bounding box, and smile and eye-open probabilities that are null when classification is off. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_detectObjects_Request:
      type: object
      description: Request payload for detectObjects on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_detectObjects_Response:
      type: object
      description: Response payload for detectObjects on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { objects, latencyMs, source }; each object carries a tracking id, a bounding box and labels with confidences. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_detectPose_Request:
      type: object
      description: Request payload for detectPose on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_detectPose_Response:
      type: object
      description: Response payload for detectPose on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { landmarks, latencyMs, source } — 33 landmarks, each with a type, x, y and an in-frame likelihood. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_segmentSubject_Request:
      type: object
      description: Request payload for segmentSubject on useVisionAI.
      properties:
        imageInput:
          type: string
          description: A file URI or a base64 image.
      required:
        - imageInput
    useVisionAI_segmentSubject_Response:
      type: object
      description: Response payload for segmentSubject on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Resolves with { subjectsCount, foregroundConfidence, latencyMs, source }. Null on failure."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_detectFaceMesh_Request:
      type: object
      description: Request payload for detectFaceMesh on useVisionAI.
      properties:{}
    useVisionAI_detectFaceMesh_Response:
      type: object
      description: Response payload for detectFaceMesh on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Promise<FaceMeshResult | null>"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_labelImage_Request:
      type: object
      description: Request payload for labelImage on useVisionAI.
      properties:{}
    useVisionAI_labelImage_Response:
      type: object
      description: Response payload for labelImage on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Promise<ImageLabelResult | null>"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_segmentSelfie_Request:
      type: object
      description: Request payload for segmentSelfie on useVisionAI.
      properties:{}
    useVisionAI_segmentSelfie_Response:
      type: object
      description: Response payload for segmentSelfie on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Promise<SelfieSegmentationResult | null>"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useVisionAI_recognizeDigitalInk_Request:
      type: object
      description: Request payload for recognizeDigitalInk on useVisionAI.
      properties:{}
    useVisionAI_recognizeDigitalInk_Response:
      type: object
      description: Response payload for recognizeDigitalInk on useVisionAI.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: "Promise<DigitalInkResult | null>"
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useWifi7MLOTelemetry:
      type: object
      description: |
  Wi-Fi 7 (802.11be) Multi-Link Operation and 320 MHz channel telemetry.
  
  Reads Multi-Link Operation (MLO) telemetry introduced in Android 14+ (API 34+) for 802.11be Wi-Fi 7 routers and modems. Surfaces the array of active affiliated links, their respective channel widths (including ultra-wide 320 MHz channels on 6 GHz), per-link transmit and receive speeds, and calculates combined aggregate throughput. Reports inactive on Wi-Fi 6 or earlier.
      properties:
        isSupported:
          type: boolean
          description: Whether the device hardware and platform support Wi-Fi 7 MLO querying.
        isMloActive:
          type: boolean
          description: Whether multiple simultaneous radio links are currently bonded.
        links:
          type: array
          items:
            $ref: "#/components/schemas/MloLinkInfo"
          description: "Array of affiliated radio links with frequency band, channel width, RSSI, and link speeds."
        aggregateSpeedMbps:
          anyOf:
            - type: number
            - type: null
          description: "Combined theoretical PHY throughput across all bonded links in Mbps, or null."
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if Wi-Fi link inspection failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useWifi7MLO_refresh_Request:
      type: object
      description: Request payload for refresh on useWifi7MLO.
      properties:{}
    useWifi7MLO_refresh_Response:
      type: object
      description: Response payload for refresh on useWifi7MLO.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useWifiRTTTelemetry:
      type: object
      description: |
  Fine Timing Measurement (FTM / 802.11az) indoor centimeter-level positioning.
  
  Utilizes android.net.wifi.rtt.WifiRttManager for 802.11mc / 802.11az Fine Timing Measurement ranging. Discovers RTT-capable access points and measures exact flight time in picoseconds, returning calculated distances in millimeters with standard deviation accuracy metrics. Operates indoors where satellite GNSS signals are obstructed.
      properties:
        isSupported:
          type: boolean
          description: Whether the device hardware features the Wi-Fi RTT ranging subsystem.
        isAvailable:
          type: boolean
          description: Whether the Wi-Fi RTT ranging service is currently active and available.
        isRanging:
          type: boolean
          description: Whether an active RTT ranging sweep is currently in progress.
        rangingResults:
          type: array
          items:
            $ref: "#/components/schemas/WifiRttResult"
          description: Latest distance measurements to specified AP BSSIDs in millimeters.
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if RTT service probing or ranging execution failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
          description: "Data provenance: 'hardware' or 'unavailable'."
      required:
        - source
    useWifiRTT_startRanging_Request:
      type: object
      description: Request payload for startRanging on useWifiRTT.
      properties:{}
    useWifiRTT_startRanging_Response:
      type: object
      description: Response payload for startRanging on useWifiRTT.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    useWifiRTT_refresh_Request:
      type: object
      description: Request payload for refresh on useWifiRTT.
      properties:{}
    useWifiRTT_refresh_Response:
      type: object
      description: Response payload for refresh on useWifiRTT.
      properties:
        success:
          type: boolean
          description: Whether the hardware accepted the command.
        output:
          description: Result description
        error:
          anyOf:
            - type: string
            - type: null
          description: Error message if failed.
        source:
          $ref: "#/components/schemas/TelemetrySource"
      required:
        - success
        - source
    HardwareStateSnapshot:
      type: object
      description: Instantaneous snapshot of all 51 PixelKit hardware telemetry states.
      properties:
        useADPF:
          $ref: "#/components/schemas/useADPFTelemetry"
        useADPFHintSession:
          $ref: "#/components/schemas/useADPFHintSessionTelemetry"
        useAltimeter:
          $ref: "#/components/schemas/useAltimeterTelemetry"
        useAppFunctions:
          $ref: "#/components/schemas/useAppFunctionsTelemetry"
        useAudio:
          $ref: "#/components/schemas/useAudioTelemetry"
        useBLE:
          $ref: "#/components/schemas/useBLETelemetry"
        useBatteryShare:
          $ref: "#/components/schemas/useBatteryShareTelemetry"
        useBiometrics:
          $ref: "#/components/schemas/useBiometricsTelemetry"
        useCPU:
          $ref: "#/components/schemas/useCPUTelemetry"
        useCamera:
          $ref: "#/components/schemas/useCameraTelemetry"
        useCameraExtensions:
          $ref: "#/components/schemas/useCameraExtensionsTelemetry"
        useCapabilities:
          $ref: "#/components/schemas/useCapabilitiesTelemetry"
        useCellular:
          $ref: "#/components/schemas/useCellularTelemetry"
        useChannelSounding:
          $ref: "#/components/schemas/useChannelSoundingTelemetry"
        useChargingIntelligence:
          $ref: "#/components/schemas/useChargingIntelligenceTelemetry"
        useDevice:
          $ref: "#/components/schemas/useDeviceTelemetry"
        useDisplay:
          $ref: "#/components/schemas/useDisplayTelemetry"
        useEmbeddings:
          $ref: "#/components/schemas/useEmbeddingsTelemetry"
        useGPU:
          $ref: "#/components/schemas/useGPUTelemetry"
        useGemini:
          $ref: "#/components/schemas/useGeminiTelemetry"
        useGeminiNano:
          $ref: "#/components/schemas/useGeminiNanoTelemetry"
        useGenAITasks:
          $ref: "#/components/schemas/useGenAITasksTelemetry"
        useHaptics:
          $ref: "#/components/schemas/useHapticsTelemetry"
        useHealthConnect:
          $ref: "#/components/schemas/useHealthConnectTelemetry"
        useHiLight:
          $ref: "#/components/schemas/useHiLightTelemetry"
        useKeyAgreement:
          $ref: "#/components/schemas/useKeyAgreementTelemetry"
        useLocation:
          $ref: "#/components/schemas/useLocationTelemetry"
        useMediaLibrary:
          $ref: "#/components/schemas/useMediaLibraryTelemetry"
        useMemory:
          $ref: "#/components/schemas/useMemoryTelemetry"
        useMicrophoneArray:
          $ref: "#/components/schemas/useMicrophoneArrayTelemetry"
        useNFC:
          $ref: "#/components/schemas/useNFCTelemetry"
        useNaturalLanguageAI:
          $ref: "#/components/schemas/useNaturalLanguageAITelemetry"
        useNetwork:
          $ref: "#/components/schemas/useNetworkTelemetry"
        usePerfetto:
          $ref: "#/components/schemas/usePerfettoTelemetry"
        usePlayIntegrity:
          $ref: "#/components/schemas/usePlayIntegrityTelemetry"
        usePrivateSpace:
          $ref: "#/components/schemas/usePrivateSpaceTelemetry"
        useRadios:
          $ref: "#/components/schemas/useRadiosTelemetry"
        useSatelliteNTN:
          $ref: "#/components/schemas/useSatelliteNTNTelemetry"
        useSecurity:
          $ref: "#/components/schemas/useSecurityTelemetry"
        useSensors:
          $ref: "#/components/schemas/useSensorsTelemetry"
        useSpatialAudio:
          $ref: "#/components/schemas/useSpatialAudioTelemetry"
        useSpeech:
          $ref: "#/components/schemas/useSpeechTelemetry"
        useSpeechAI:
          $ref: "#/components/schemas/useSpeechAITelemetry"
        useTPU:
          $ref: "#/components/schemas/useTPUTelemetry"
        useThermometer:
          $ref: "#/components/schemas/useThermometerTelemetry"
        useTorch:
          $ref: "#/components/schemas/useTorchTelemetry"
        useUWB:
          $ref: "#/components/schemas/useUWBTelemetry"
        useVideo:
          $ref: "#/components/schemas/useVideoTelemetry"
        useVisionAI:
          $ref: "#/components/schemas/useVisionAITelemetry"
        useWifi7MLO:
          $ref: "#/components/schemas/useWifi7MLOTelemetry"
        useWifiRTT:
          $ref: "#/components/schemas/useWifiRTTTelemetry"
    VideoSource:
      type: object
      description: "Typed entity: VideoSource"
      additionalProperties: true
    AppFunctionSchema:
      type: object
      description: "Typed entity: AppFunctionSchema"
      additionalProperties: true
    RecordingInput:
      type: object
      description: "Typed entity: RecordingInput"
      additionalProperties: true
    BondedDevice:
      type: object
      description: "Typed entity: BondedDevice"
      additionalProperties: true
    BLEPeripheral:
      type: object
      description: "Typed entity: BLEPeripheral"
      additionalProperties: true
    RefObjectCameraViewnull:
      type: object
      description: "Typed entity: RefObjectCameraViewnull"
      additionalProperties: true
    CameraLook:
      type: object
      description: "Typed entity: CameraLook"
      additionalProperties: true
    CameraExtensionInfo:
      type: object
      description: "Typed entity: CameraExtensionInfo"
      additionalProperties: true
    ChannelSoundingTarget:
      type: object
      description: "Typed entity: ChannelSoundingTarget"
      additionalProperties: true
    BatteryTelemetry:
      type: object
      description: "Typed entity: BatteryTelemetry"
      additionalProperties: true
    AIMessage:
      type: object
      description: "Typed entity: AIMessage"
      additionalProperties: true
    GroundingSummary:
      type: object
      description: "Typed entity: GroundingSummary"
      additionalProperties: true
    defaultHarmBlockThreshold:
      type: object
      description: "Typed entity: defaultHarmBlockThreshold"
      additionalProperties: true
    NanoModelInfo:
      type: object
      description: "Typed entity: NanoModelInfo"
      additionalProperties: true
    NanoOptions:
      type: object
      description: "Typed entity: NanoOptions"
      additionalProperties: true
    SummarizeResult:
      type: object
      description: "Typed entity: SummarizeResult"
      additionalProperties: true
    ProofreadResult:
      type: object
      description: "Typed entity: ProofreadResult"
      additionalProperties: true
    RewriteResult:
      type: object
      description: "Typed entity: RewriteResult"
      additionalProperties: true
    ImageDescriptionResult:
      type: object
      description: "Typed entity: ImageDescriptionResult"
      additionalProperties: true
    SummarizeOptions:
      type: object
      description: "Typed entity: SummarizeOptions"
      additionalProperties: true
    TaskTone:
      type: object
      description: "Typed entity: TaskTone"
      additionalProperties: true
    HiLightMode:
      type: object
      description: "Typed entity: HiLightMode"
      additionalProperties: true
    ScannedTag:
      type: object
      description: "Typed entity: ScannedTag"
      additionalProperties: true
    LanguageIdResult:
      type: object
      description: "Typed entity: LanguageIdResult"
      additionalProperties: true
    TranslationResult:
      type: object
      description: "Typed entity: TranslationResult"
      additionalProperties: true
    SmartReplyResult:
      type: object
      description: "Typed entity: SmartReplyResult"
      additionalProperties: true
    EntityExtractionResult:
      type: object
      description: "Typed entity: EntityExtractionResult"
      additionalProperties: true
    HardwareAttestationResult:
      type: object
      description: "Typed entity: HardwareAttestationResult"
      additionalProperties: true
    Voice:
      type: object
      description: "Typed entity: Voice"
      additionalProperties: true
    stringnumber:
      type: object
      description: "Typed entity: stringnumber"
      additionalProperties: true
    SpeechTranscriptionResult:
      type: object
      description: "Typed entity: SpeechTranscriptionResult"
      additionalProperties: true
    UwbRangingResult:
      type: object
      description: "Typed entity: UwbRangingResult"
      additionalProperties: true
    UWBSpatialTarget:
      type: object
      description: "Typed entity: UWBSpatialTarget"
      additionalProperties: true
    VideoPlayer:
      type: object
      description: "Typed entity: VideoPlayer"
      additionalProperties: true
    numbernumber:
      type: object
      description: "Typed entity: numbernumber"
      additionalProperties: true
    VisionAnalysisResult:
      type: object
      description: "Typed entity: VisionAnalysisResult"
      additionalProperties: true
    TextRecognitionResult:
      type: object
      description: "Typed entity: TextRecognitionResult"
      additionalProperties: true
    BarcodeScanResult:
      type: object
      description: "Typed entity: BarcodeScanResult"
      additionalProperties: true
    FaceDetectionResult:
      type: object
      description: "Typed entity: FaceDetectionResult"
      additionalProperties: true
    FaceMeshResult:
      type: object
      description: "Typed entity: FaceMeshResult"
      additionalProperties: true
    ImageLabelResult:
      type: object
      description: "Typed entity: ImageLabelResult"
      additionalProperties: true
    ObjectDetectionResult:
      type: object
      description: "Typed entity: ObjectDetectionResult"
      additionalProperties: true
    PoseDetectionResult:
      type: object
      description: "Typed entity: PoseDetectionResult"
      additionalProperties: true
    SelfieSegmentationResult:
      type: object
      description: "Typed entity: SelfieSegmentationResult"
      additionalProperties: true
    SubjectSegmentationResult:
      type: object
      description: "Typed entity: SubjectSegmentationResult"
      additionalProperties: true
    DigitalInkResult:
      type: object
      description: "Typed entity: DigitalInkResult"
      additionalProperties: true
