/** * Single unified cross-kind scan+picker for Tauri Android, the counterpart * to `@dg-kit/transport-webbluetooth`'s `requestDgLabDevice()`. Runs ONE * plugin-blec scan across every known DG-Lab device kind's name prefix, * presents ONE host-supplied picker (`scanAndSelectDevice()` — the same * `selectDevice`/`DeviceSelectionController` pattern `TauriBlecDeviceClient` * and `connectTauriAuxDevice()` already use), and auto-detects which kind * was picked via `detectDeviceKind()` — instead of the caller having to * already know the kind before scanning (which is what forced the * interim "pick a kind first" flow both DG-Agent's and DG-Chat's Android * shells shipped with). * * Unlike the Web Bluetooth version, kind detection happens BEFORE connecting * — plugin-blec's scan already hands back each device's advertised name, so * an unrecognized device is rejected without ever dialing plugin-blec's * `connect()`, rather than connecting first and disconnecting on a bad kind. * * Returns `{ kind, device, server }`, mirroring `requestDgLabDevice()`'s * return shape as closely as this package's `(device, server)` pair shape * (see `createGattShim()`) allows. Route the result to the matching client's * `connectDevice(device, server)` passthrough — `TauriBlecDeviceClient` for * `coyote`, `TauriBlecOpossumClient` for `opossum`, `TauriBlecPawPrintsClient` * / `TauriBlecCivetEdgingClient` (via the shared `TauriBlecSensorClient` * base) for `paw-prints` / `civet-edging`. */ import { detectDeviceKind, type RequestedDevice } from '@dg-kit/protocol'; import { type DeviceSelectionController } from './scan.js'; /** * Combined name-prefix filter covering every known DG-Lab device kind — * the plugin-blec scan counterpart to `@dg-kit/protocol`'s * `DG_LAB_REQUEST_DEVICE_OPTIONS` (which scopes the Web Bluetooth chooser * to the same set via `filters`). */ export declare const DG_LAB_TAURI_NAME_PREFIXES: string[]; /** Start a permission-silent all-kind scan for the Android shell cache. */ export declare function prewarmDgLabDeviceScan(scanDurationMs?: number): Promise; export interface RequestDgLabDeviceTauriOptions { /** * Called immediately after scan starts. The host UI opens the device * picker and subscribes to live updates via the controller. Resolves with * the chosen device address, or `null` if the user cancels. */ selectDevice: (controller: DeviceSelectionController) => Promise; /** * Overrides the combined all-kind scan filter — mainly for tests. Default: * `DG_LAB_TAURI_NAME_PREFIXES`. */ namePrefixes?: string[]; /** Scan window in milliseconds. Defaults to 8000. */ scanDurationMs?: number; } /** @see RequestedDevice — the shared shape every cross-kind picker returns. */ export type RequestedDgLabDeviceTauri = RequestedDevice; /** * Identifies the nameless Coyote V3 hardware seen on Android by its complete * service fingerprint. The generic 0x180c service is shared by other DG-Lab * devices, so it must never be enough on its own to guess a device kind. */ export declare function detectAnonymousDgLabKind(services: string[]): ReturnType; /** * Opens ONE plugin-blec scan scoped to every known DG-Lab device kind, * lets the host UI pick a device, connects it, and identifies which kind * was picked via `detectDeviceKind()`. * * Rejects (without ever calling `api.connect()`) on an unrecognized device * name — the scan filter already scopes results to DG-Lab prefixes, so this * should only trigger if a device happens to advertise a matching prefix * without actually being a DG-Lab device. */ export declare function requestDgLabDeviceTauri(options: RequestDgLabDeviceTauriOptions): Promise; //# sourceMappingURL=request-device.d.ts.map