unified-ble-manager 4.0.4 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (448) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/MIGRATION_4.0.md +1 -1
  3. package/README.md +1 -1
  4. package/RELEASE.md +5 -5
  5. package/SBOM.cdx.json +29 -5
  6. package/THIRD_PARTY_LICENSES.json +9 -2
  7. package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/UnifiedBleProtocolAndroidDispatcher.kt +7 -1
  8. package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/generated/NativeProtocolV2Schema.kt +2 -1
  9. package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedAndroidGattRadio.kt +30 -3
  10. package/docs/ELECTRON.md +1 -1
  11. package/docs/EXPO_PLUGIN.md +2 -2
  12. package/docs/GAPS.4.0.md +1 -1
  13. package/docs/GETTING_STARTED.md +4 -4
  14. package/docs/NODE.md +1 -1
  15. package/docs/PLATFORMS.md +1 -1
  16. package/docs/WEB.md +1 -1
  17. package/docs/generated/PLATFORM_SUPPORT.md +1 -1
  18. package/ios/Generated/NativeProtocolV2Schema.swift +2 -1
  19. package/lib/commonjs/backend-contract/advertisement.js +19 -0
  20. package/lib/commonjs/backend-contract/advertisement.js.map +1 -1
  21. package/lib/commonjs/backend-contract/backend.js +6 -0
  22. package/lib/commonjs/backend-contract/backend.js.map +1 -1
  23. package/lib/commonjs/backend-contract/capabilities.js +7 -0
  24. package/lib/commonjs/backend-contract/capabilities.js.map +1 -1
  25. package/lib/commonjs/backend-contract/primitives.js +14 -0
  26. package/lib/commonjs/backend-contract/primitives.js.map +1 -1
  27. package/lib/commonjs/backend-contract/scan-planning.js +8 -2
  28. package/lib/commonjs/backend-contract/scan-planning.js.map +1 -1
  29. package/lib/commonjs/backend-contract/scan-query.js +18 -3
  30. package/lib/commonjs/backend-contract/scan-query.js.map +1 -1
  31. package/lib/commonjs/backends/bluez/bluez-backend-handles.js +62 -30
  32. package/lib/commonjs/backends/bluez/bluez-backend-handles.js.map +1 -1
  33. package/lib/commonjs/backends/bluez/bluez-backend-runtime.js +33 -1
  34. package/lib/commonjs/backends/bluez/bluez-backend-runtime.js.map +1 -1
  35. package/lib/commonjs/backends/bluez/bluez-backend.js +7 -0
  36. package/lib/commonjs/backends/bluez/bluez-backend.js.map +1 -1
  37. package/lib/commonjs/backends/bluez/bluez-connection-runtime.js +164 -2
  38. package/lib/commonjs/backends/bluez/bluez-connection-runtime.js.map +1 -1
  39. package/lib/commonjs/backends/bluez/bluez-dbus-next-boundary.js +21 -3
  40. package/lib/commonjs/backends/bluez/bluez-dbus-next-boundary.js.map +1 -1
  41. package/lib/commonjs/backends/bluez/bluez-property-waiters.js +45 -1
  42. package/lib/commonjs/backends/bluez/bluez-property-waiters.js.map +1 -1
  43. package/lib/commonjs/backends/bluez/bluez-runtime-models.js +7 -6
  44. package/lib/commonjs/backends/bluez/bluez-runtime-models.js.map +1 -1
  45. package/lib/commonjs/backends/bluez/bluez-scan-planner.js +1 -1
  46. package/lib/commonjs/backends/bluez/bluez-scan-planner.js.map +1 -1
  47. package/lib/commonjs/backends/corebluetooth/corebluetooth-adapter-loss-cleanup.js +4 -4
  48. package/lib/commonjs/backends/corebluetooth/corebluetooth-adapter-loss-cleanup.js.map +1 -1
  49. package/lib/commonjs/backends/corebluetooth/corebluetooth-backend.js +95 -56
  50. package/lib/commonjs/backends/corebluetooth/corebluetooth-backend.js.map +1 -1
  51. package/lib/commonjs/backends/corebluetooth/corebluetooth-cleanup.js +2 -2
  52. package/lib/commonjs/backends/corebluetooth/corebluetooth-cleanup.js.map +1 -1
  53. package/lib/commonjs/backends/corebluetooth/corebluetooth-connection-controls.js +53 -53
  54. package/lib/commonjs/backends/corebluetooth/corebluetooth-connection-controls.js.map +1 -1
  55. package/lib/commonjs/backends/corebluetooth/corebluetooth-gatt-operations.js +48 -48
  56. package/lib/commonjs/backends/corebluetooth/corebluetooth-gatt-operations.js.map +1 -1
  57. package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js +12 -12
  58. package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js.map +1 -1
  59. package/lib/commonjs/backends/corebluetooth/corebluetooth-late-connect-cleanup.js +1 -1
  60. package/lib/commonjs/backends/corebluetooth/corebluetooth-late-connect-cleanup.js.map +1 -1
  61. package/lib/commonjs/backends/corebluetooth/corebluetooth-provider.js +1 -1
  62. package/lib/commonjs/backends/corebluetooth/corebluetooth-provider.js.map +1 -1
  63. package/lib/commonjs/backends/corebluetooth/corebluetooth-runtime-capabilities.js +3 -3
  64. package/lib/commonjs/backends/corebluetooth/corebluetooth-runtime-capabilities.js.map +1 -1
  65. package/lib/commonjs/backends/reactnative/react-native-android-provider.js +26 -2
  66. package/lib/commonjs/backends/reactnative/react-native-android-provider.js.map +1 -1
  67. package/lib/commonjs/backends/reactnative/react-native-scan-planner.js +2 -1
  68. package/lib/commonjs/backends/reactnative/react-native-scan-planner.js.map +1 -1
  69. package/lib/commonjs/backends/scan-planning/service-uuid-scan-planner.js +36 -4
  70. package/lib/commonjs/backends/scan-planning/service-uuid-scan-planner.js.map +1 -1
  71. package/lib/commonjs/core/unified-ble-core.js +12 -0
  72. package/lib/commonjs/core/unified-ble-core.js.map +1 -1
  73. package/lib/commonjs/expo.js +22 -1
  74. package/lib/commonjs/expo.js.map +1 -1
  75. package/lib/commonjs/implementation-version.js +1 -1
  76. package/lib/commonjs/index.js.map +1 -1
  77. package/lib/commonjs/ipc/manager.js +68 -13
  78. package/lib/commonjs/ipc/manager.js.map +1 -1
  79. package/lib/commonjs/ipc/public-manager.js +207 -106
  80. package/lib/commonjs/ipc/public-manager.js.map +1 -1
  81. package/lib/commonjs/native-protocol/generated/native-protocol-v2-schema.js +2 -2
  82. package/lib/commonjs/native-protocol/generated/native-protocol-v2-schema.js.map +1 -1
  83. package/lib/commonjs/native-protocol/rn-android-boundary.js +27 -2
  84. package/lib/commonjs/native-protocol/rn-android-boundary.js.map +1 -1
  85. package/lib/commonjs/native-protocol/rn-apple-boundary.js +7 -1
  86. package/lib/commonjs/native-protocol/rn-apple-boundary.js.map +1 -1
  87. package/lib/commonjs/node-corebluetooth.js +4 -4
  88. package/lib/commonjs/node-corebluetooth.js.map +1 -1
  89. package/lib/commonjs/public/ble-manager.js +122 -49
  90. package/lib/commonjs/public/ble-manager.js.map +1 -1
  91. package/lib/commonjs/public/cleanup.js +154 -0
  92. package/lib/commonjs/public/cleanup.js.map +1 -0
  93. package/lib/commonjs/public/connection-supervisor.js +39 -3
  94. package/lib/commonjs/public/connection-supervisor.js.map +1 -1
  95. package/lib/commonjs/public/diagnostics.js +21 -0
  96. package/lib/commonjs/public/diagnostics.js.map +1 -1
  97. package/lib/commonjs/public/error-bridge.js +25 -9
  98. package/lib/commonjs/public/error-bridge.js.map +1 -1
  99. package/lib/commonjs/public/errors.js +2 -28
  100. package/lib/commonjs/public/errors.js.map +1 -1
  101. package/lib/commonjs/public/gatt.js +53 -77
  102. package/lib/commonjs/public/gatt.js.map +1 -1
  103. package/lib/commonjs/public/index.js.map +1 -1
  104. package/lib/commonjs/public/scan-query.js +70 -3
  105. package/lib/commonjs/public/scan-query.js.map +1 -1
  106. package/lib/commonjs/public/stream-capacity.js +14 -0
  107. package/lib/commonjs/public/stream-capacity.js.map +1 -0
  108. package/lib/commonjs/public/stream-presets.js +9 -2
  109. package/lib/commonjs/public/stream-presets.js.map +1 -1
  110. package/lib/commonjs/public/streams.js +214 -0
  111. package/lib/commonjs/public/streams.js.map +1 -0
  112. package/lib/commonjs/react.js +63 -33
  113. package/lib/commonjs/react.js.map +1 -1
  114. package/lib/commonjs/testing/deterministic/deterministic-scan-planner.js +1 -1
  115. package/lib/commonjs/testing/deterministic/deterministic-scan-planner.js.map +1 -1
  116. package/lib/module/backend-contract/advertisement.js +19 -0
  117. package/lib/module/backend-contract/advertisement.js.map +1 -1
  118. package/lib/module/backend-contract/backend.js +6 -0
  119. package/lib/module/backend-contract/backend.js.map +1 -1
  120. package/lib/module/backend-contract/capabilities.js +7 -0
  121. package/lib/module/backend-contract/capabilities.js.map +1 -1
  122. package/lib/module/backend-contract/primitives.js +13 -0
  123. package/lib/module/backend-contract/primitives.js.map +1 -1
  124. package/lib/module/backend-contract/scan-planning.js +8 -2
  125. package/lib/module/backend-contract/scan-planning.js.map +1 -1
  126. package/lib/module/backend-contract/scan-query.js +19 -4
  127. package/lib/module/backend-contract/scan-query.js.map +1 -1
  128. package/lib/module/backends/bluez/bluez-backend-handles.js +62 -30
  129. package/lib/module/backends/bluez/bluez-backend-handles.js.map +1 -1
  130. package/lib/module/backends/bluez/bluez-backend-runtime.js +34 -2
  131. package/lib/module/backends/bluez/bluez-backend-runtime.js.map +1 -1
  132. package/lib/module/backends/bluez/bluez-backend.js +7 -0
  133. package/lib/module/backends/bluez/bluez-backend.js.map +1 -1
  134. package/lib/module/backends/bluez/bluez-connection-runtime.js +167 -5
  135. package/lib/module/backends/bluez/bluez-connection-runtime.js.map +1 -1
  136. package/lib/module/backends/bluez/bluez-dbus-next-boundary.js +21 -3
  137. package/lib/module/backends/bluez/bluez-dbus-next-boundary.js.map +1 -1
  138. package/lib/module/backends/bluez/bluez-property-waiters.js +44 -1
  139. package/lib/module/backends/bluez/bluez-property-waiters.js.map +1 -1
  140. package/lib/module/backends/bluez/bluez-runtime-models.js +7 -6
  141. package/lib/module/backends/bluez/bluez-runtime-models.js.map +1 -1
  142. package/lib/module/backends/bluez/bluez-scan-planner.js +1 -1
  143. package/lib/module/backends/bluez/bluez-scan-planner.js.map +1 -1
  144. package/lib/module/backends/corebluetooth/corebluetooth-adapter-loss-cleanup.js +4 -4
  145. package/lib/module/backends/corebluetooth/corebluetooth-adapter-loss-cleanup.js.map +1 -1
  146. package/lib/module/backends/corebluetooth/corebluetooth-backend.js +96 -57
  147. package/lib/module/backends/corebluetooth/corebluetooth-backend.js.map +1 -1
  148. package/lib/module/backends/corebluetooth/corebluetooth-cleanup.js +2 -2
  149. package/lib/module/backends/corebluetooth/corebluetooth-cleanup.js.map +1 -1
  150. package/lib/module/backends/corebluetooth/corebluetooth-connection-controls.js +53 -53
  151. package/lib/module/backends/corebluetooth/corebluetooth-connection-controls.js.map +1 -1
  152. package/lib/module/backends/corebluetooth/corebluetooth-gatt-operations.js +48 -48
  153. package/lib/module/backends/corebluetooth/corebluetooth-gatt-operations.js.map +1 -1
  154. package/lib/module/backends/corebluetooth/corebluetooth-handles.js +12 -12
  155. package/lib/module/backends/corebluetooth/corebluetooth-handles.js.map +1 -1
  156. package/lib/module/backends/corebluetooth/corebluetooth-late-connect-cleanup.js +1 -1
  157. package/lib/module/backends/corebluetooth/corebluetooth-late-connect-cleanup.js.map +1 -1
  158. package/lib/module/backends/corebluetooth/corebluetooth-provider.js +1 -1
  159. package/lib/module/backends/corebluetooth/corebluetooth-provider.js.map +1 -1
  160. package/lib/module/backends/corebluetooth/corebluetooth-runtime-capabilities.js +3 -3
  161. package/lib/module/backends/corebluetooth/corebluetooth-runtime-capabilities.js.map +1 -1
  162. package/lib/module/backends/reactnative/react-native-android-provider.js +26 -2
  163. package/lib/module/backends/reactnative/react-native-android-provider.js.map +1 -1
  164. package/lib/module/backends/reactnative/react-native-scan-planner.js +2 -1
  165. package/lib/module/backends/reactnative/react-native-scan-planner.js.map +1 -1
  166. package/lib/module/backends/scan-planning/service-uuid-scan-planner.js +36 -4
  167. package/lib/module/backends/scan-planning/service-uuid-scan-planner.js.map +1 -1
  168. package/lib/module/core/unified-ble-core.js +12 -0
  169. package/lib/module/core/unified-ble-core.js.map +1 -1
  170. package/lib/module/expo.js +22 -1
  171. package/lib/module/expo.js.map +1 -1
  172. package/lib/module/implementation-version.js +1 -1
  173. package/lib/module/index.js.map +1 -1
  174. package/lib/module/ipc/manager.js +68 -13
  175. package/lib/module/ipc/manager.js.map +1 -1
  176. package/lib/module/ipc/public-manager.js +210 -110
  177. package/lib/module/ipc/public-manager.js.map +1 -1
  178. package/lib/module/native-protocol/generated/native-protocol-v2-schema.js +2 -2
  179. package/lib/module/native-protocol/generated/native-protocol-v2-schema.js.map +1 -1
  180. package/lib/module/native-protocol/rn-android-boundary.js +27 -2
  181. package/lib/module/native-protocol/rn-android-boundary.js.map +1 -1
  182. package/lib/module/native-protocol/rn-apple-boundary.js +7 -1
  183. package/lib/module/native-protocol/rn-apple-boundary.js.map +1 -1
  184. package/lib/module/node-corebluetooth.js +4 -4
  185. package/lib/module/node-corebluetooth.js.map +1 -1
  186. package/lib/module/public/ble-manager.js +124 -52
  187. package/lib/module/public/ble-manager.js.map +1 -1
  188. package/lib/module/public/cleanup.js +150 -0
  189. package/lib/module/public/cleanup.js.map +1 -0
  190. package/lib/module/public/connection-supervisor.js +39 -3
  191. package/lib/module/public/connection-supervisor.js.map +1 -1
  192. package/lib/module/public/diagnostics.js +20 -0
  193. package/lib/module/public/diagnostics.js.map +1 -1
  194. package/lib/module/public/error-bridge.js +25 -9
  195. package/lib/module/public/error-bridge.js.map +1 -1
  196. package/lib/module/public/errors.js +2 -27
  197. package/lib/module/public/errors.js.map +1 -1
  198. package/lib/module/public/gatt.js +54 -78
  199. package/lib/module/public/gatt.js.map +1 -1
  200. package/lib/module/public/index.js.map +1 -1
  201. package/lib/module/public/scan-query.js +70 -4
  202. package/lib/module/public/scan-query.js.map +1 -1
  203. package/lib/module/public/stream-capacity.js +10 -0
  204. package/lib/module/public/stream-capacity.js.map +1 -0
  205. package/lib/module/public/stream-presets.js +9 -2
  206. package/lib/module/public/stream-presets.js.map +1 -1
  207. package/lib/module/public/streams.js +210 -0
  208. package/lib/module/public/streams.js.map +1 -0
  209. package/lib/module/react.js +63 -33
  210. package/lib/module/react.js.map +1 -1
  211. package/lib/module/testing/deterministic/deterministic-scan-planner.js +1 -1
  212. package/lib/module/testing/deterministic/deterministic-scan-planner.js.map +1 -1
  213. package/lib/typescript/commonjs/src/backend-contract/advertisement.d.ts +9 -0
  214. package/lib/typescript/commonjs/src/backend-contract/advertisement.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/src/backend-contract/backend.d.ts +15 -0
  216. package/lib/typescript/commonjs/src/backend-contract/backend.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/src/backend-contract/capabilities.d.ts +7 -0
  218. package/lib/typescript/commonjs/src/backend-contract/capabilities.d.ts.map +1 -1
  219. package/lib/typescript/commonjs/src/backend-contract/primitives.d.ts +8 -0
  220. package/lib/typescript/commonjs/src/backend-contract/primitives.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/src/backend-contract/scan-planning.d.ts +2 -2
  222. package/lib/typescript/commonjs/src/backend-contract/scan-planning.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/src/backend-contract/scan-query.d.ts +12 -0
  224. package/lib/typescript/commonjs/src/backend-contract/scan-query.d.ts.map +1 -1
  225. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-handles.d.ts +1 -1
  226. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-handles.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
  228. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-runtime.d.ts +11 -2
  229. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-runtime.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/src/backends/bluez/bluez-connection-runtime.d.ts +1 -1
  232. package/lib/typescript/commonjs/src/backends/bluez/bluez-connection-runtime.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-contract.d.ts +1 -1
  234. package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-contract.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-next-boundary.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/src/backends/bluez/bluez-property-waiters.d.ts +2 -0
  237. package/lib/typescript/commonjs/src/backends/bluez/bluez-property-waiters.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-models.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-types.d.ts +2 -0
  240. package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-types.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/src/backends/bluez/bluez-scan-planner.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-backend.d.ts +9 -0
  243. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-backend.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-boundary.d.ts +17 -1
  245. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-boundary.d.ts.map +1 -1
  246. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-cleanup.d.ts +2 -1
  247. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-cleanup.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
  250. package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
  251. package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
  253. package/lib/typescript/commonjs/src/backends/reactnative/react-native-scan-planner.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/src/backends/scan-planning/service-uuid-scan-planner.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts +1 -1
  256. package/lib/typescript/commonjs/src/core/unified-ble-core.d.ts +3 -1
  257. package/lib/typescript/commonjs/src/core/unified-ble-core.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/expo.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/src/implementation-version.d.ts +1 -1
  260. package/lib/typescript/commonjs/src/index.d.ts +3 -2
  261. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/src/ipc/manager.d.ts +5 -2
  263. package/lib/typescript/commonjs/src/ipc/manager.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/src/ipc/public-manager.d.ts +13 -4
  265. package/lib/typescript/commonjs/src/ipc/public-manager.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/native-protocol/generated/native-protocol-v2-schema.d.ts +1 -1
  267. package/lib/typescript/commonjs/src/native-protocol/generated/native-protocol-v2-schema.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/src/native-protocol/rn-android-boundary.d.ts +2 -2
  269. package/lib/typescript/commonjs/src/native-protocol/rn-android-boundary.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/native-protocol/rn-apple-boundary.d.ts +2 -2
  271. package/lib/typescript/commonjs/src/native-protocol/rn-apple-boundary.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/src/public/ble-adapter.d.ts +3 -3
  273. package/lib/typescript/commonjs/src/public/ble-adapter.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/src/public/ble-manager.d.ts +30 -13
  275. package/lib/typescript/commonjs/src/public/ble-manager.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/src/public/cleanup.d.ts +35 -0
  277. package/lib/typescript/commonjs/src/public/cleanup.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/src/public/connection-supervisor.d.ts +5 -5
  279. package/lib/typescript/commonjs/src/public/connection-supervisor.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/src/public/diagnostics.d.ts +20 -2
  281. package/lib/typescript/commonjs/src/public/diagnostics.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/src/public/error-bridge.d.ts +5 -11
  283. package/lib/typescript/commonjs/src/public/error-bridge.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/src/public/errors.d.ts +4 -3
  285. package/lib/typescript/commonjs/src/public/errors.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/src/public/gatt.d.ts +7 -13
  287. package/lib/typescript/commonjs/src/public/gatt.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/public/index.d.ts +2 -0
  289. package/lib/typescript/commonjs/src/public/index.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/src/public/scan-query.d.ts +8 -0
  291. package/lib/typescript/commonjs/src/public/scan-query.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/src/public/stream-capacity.d.ts +5 -0
  293. package/lib/typescript/commonjs/src/public/stream-capacity.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/public/stream-presets.d.ts +3 -2
  295. package/lib/typescript/commonjs/src/public/stream-presets.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/public/streams.d.ts +44 -0
  297. package/lib/typescript/commonjs/src/public/streams.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/react.d.ts.map +1 -1
  299. package/lib/typescript/module/src/backend-contract/advertisement.d.ts +9 -0
  300. package/lib/typescript/module/src/backend-contract/advertisement.d.ts.map +1 -1
  301. package/lib/typescript/module/src/backend-contract/backend.d.ts +15 -0
  302. package/lib/typescript/module/src/backend-contract/backend.d.ts.map +1 -1
  303. package/lib/typescript/module/src/backend-contract/capabilities.d.ts +7 -0
  304. package/lib/typescript/module/src/backend-contract/capabilities.d.ts.map +1 -1
  305. package/lib/typescript/module/src/backend-contract/primitives.d.ts +8 -0
  306. package/lib/typescript/module/src/backend-contract/primitives.d.ts.map +1 -1
  307. package/lib/typescript/module/src/backend-contract/scan-planning.d.ts +2 -2
  308. package/lib/typescript/module/src/backend-contract/scan-planning.d.ts.map +1 -1
  309. package/lib/typescript/module/src/backend-contract/scan-query.d.ts +12 -0
  310. package/lib/typescript/module/src/backend-contract/scan-query.d.ts.map +1 -1
  311. package/lib/typescript/module/src/backends/bluez/bluez-backend-handles.d.ts +1 -1
  312. package/lib/typescript/module/src/backends/bluez/bluez-backend-handles.d.ts.map +1 -1
  313. package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
  314. package/lib/typescript/module/src/backends/bluez/bluez-backend-runtime.d.ts +11 -2
  315. package/lib/typescript/module/src/backends/bluez/bluez-backend-runtime.d.ts.map +1 -1
  316. package/lib/typescript/module/src/backends/bluez/bluez-backend.d.ts.map +1 -1
  317. package/lib/typescript/module/src/backends/bluez/bluez-connection-runtime.d.ts +1 -1
  318. package/lib/typescript/module/src/backends/bluez/bluez-connection-runtime.d.ts.map +1 -1
  319. package/lib/typescript/module/src/backends/bluez/bluez-dbus-contract.d.ts +1 -1
  320. package/lib/typescript/module/src/backends/bluez/bluez-dbus-contract.d.ts.map +1 -1
  321. package/lib/typescript/module/src/backends/bluez/bluez-dbus-next-boundary.d.ts.map +1 -1
  322. package/lib/typescript/module/src/backends/bluez/bluez-property-waiters.d.ts +2 -0
  323. package/lib/typescript/module/src/backends/bluez/bluez-property-waiters.d.ts.map +1 -1
  324. package/lib/typescript/module/src/backends/bluez/bluez-runtime-models.d.ts.map +1 -1
  325. package/lib/typescript/module/src/backends/bluez/bluez-runtime-types.d.ts +2 -0
  326. package/lib/typescript/module/src/backends/bluez/bluez-runtime-types.d.ts.map +1 -1
  327. package/lib/typescript/module/src/backends/bluez/bluez-scan-planner.d.ts.map +1 -1
  328. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-backend.d.ts +9 -0
  329. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-backend.d.ts.map +1 -1
  330. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-boundary.d.ts +17 -1
  331. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-boundary.d.ts.map +1 -1
  332. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-cleanup.d.ts +2 -1
  333. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-cleanup.d.ts.map +1 -1
  334. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts.map +1 -1
  335. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
  336. package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
  337. package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -1
  338. package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
  339. package/lib/typescript/module/src/backends/reactnative/react-native-scan-planner.d.ts.map +1 -1
  340. package/lib/typescript/module/src/backends/scan-planning/service-uuid-scan-planner.d.ts.map +1 -1
  341. package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts +1 -1
  342. package/lib/typescript/module/src/core/unified-ble-core.d.ts +3 -1
  343. package/lib/typescript/module/src/core/unified-ble-core.d.ts.map +1 -1
  344. package/lib/typescript/module/src/expo.d.ts.map +1 -1
  345. package/lib/typescript/module/src/implementation-version.d.ts +1 -1
  346. package/lib/typescript/module/src/index.d.ts +3 -2
  347. package/lib/typescript/module/src/index.d.ts.map +1 -1
  348. package/lib/typescript/module/src/ipc/manager.d.ts +5 -2
  349. package/lib/typescript/module/src/ipc/manager.d.ts.map +1 -1
  350. package/lib/typescript/module/src/ipc/public-manager.d.ts +13 -4
  351. package/lib/typescript/module/src/ipc/public-manager.d.ts.map +1 -1
  352. package/lib/typescript/module/src/native-protocol/generated/native-protocol-v2-schema.d.ts +1 -1
  353. package/lib/typescript/module/src/native-protocol/generated/native-protocol-v2-schema.d.ts.map +1 -1
  354. package/lib/typescript/module/src/native-protocol/rn-android-boundary.d.ts +2 -2
  355. package/lib/typescript/module/src/native-protocol/rn-android-boundary.d.ts.map +1 -1
  356. package/lib/typescript/module/src/native-protocol/rn-apple-boundary.d.ts +2 -2
  357. package/lib/typescript/module/src/native-protocol/rn-apple-boundary.d.ts.map +1 -1
  358. package/lib/typescript/module/src/public/ble-adapter.d.ts +3 -3
  359. package/lib/typescript/module/src/public/ble-adapter.d.ts.map +1 -1
  360. package/lib/typescript/module/src/public/ble-manager.d.ts +30 -13
  361. package/lib/typescript/module/src/public/ble-manager.d.ts.map +1 -1
  362. package/lib/typescript/module/src/public/cleanup.d.ts +35 -0
  363. package/lib/typescript/module/src/public/cleanup.d.ts.map +1 -0
  364. package/lib/typescript/module/src/public/connection-supervisor.d.ts +5 -5
  365. package/lib/typescript/module/src/public/connection-supervisor.d.ts.map +1 -1
  366. package/lib/typescript/module/src/public/diagnostics.d.ts +20 -2
  367. package/lib/typescript/module/src/public/diagnostics.d.ts.map +1 -1
  368. package/lib/typescript/module/src/public/error-bridge.d.ts +5 -11
  369. package/lib/typescript/module/src/public/error-bridge.d.ts.map +1 -1
  370. package/lib/typescript/module/src/public/errors.d.ts +4 -3
  371. package/lib/typescript/module/src/public/errors.d.ts.map +1 -1
  372. package/lib/typescript/module/src/public/gatt.d.ts +7 -13
  373. package/lib/typescript/module/src/public/gatt.d.ts.map +1 -1
  374. package/lib/typescript/module/src/public/index.d.ts +2 -0
  375. package/lib/typescript/module/src/public/index.d.ts.map +1 -1
  376. package/lib/typescript/module/src/public/scan-query.d.ts +8 -0
  377. package/lib/typescript/module/src/public/scan-query.d.ts.map +1 -1
  378. package/lib/typescript/module/src/public/stream-capacity.d.ts +5 -0
  379. package/lib/typescript/module/src/public/stream-capacity.d.ts.map +1 -0
  380. package/lib/typescript/module/src/public/stream-presets.d.ts +3 -2
  381. package/lib/typescript/module/src/public/stream-presets.d.ts.map +1 -1
  382. package/lib/typescript/module/src/public/streams.d.ts +44 -0
  383. package/lib/typescript/module/src/public/streams.d.ts.map +1 -0
  384. package/lib/typescript/module/src/react.d.ts.map +1 -1
  385. package/native/PREBUILDS.json +5 -5
  386. package/native/electron/corebluetooth/prebuilds/darwin-arm64/unified_ble_corebluetooth.node +0 -0
  387. package/native/electron/corebluetooth/prebuilds/darwin-x64/unified_ble_corebluetooth.node +0 -0
  388. package/native/electron/winrt/prebuilds/win32-arm64/unified_ble_winrt.node +0 -0
  389. package/native/electron/winrt/prebuilds/win32-x64/unified_ble_winrt.node +0 -0
  390. package/native/protocol/generated/NativeProtocolV2Schema.hpp +3 -2
  391. package/native/protocol/schema/native-protocol-v2-abi.json +9 -2
  392. package/native/protocol/schema/native-protocol-v2.json +3 -2
  393. package/native/tauri/src/capabilities.rs +3 -1
  394. package/package.json +7 -4
  395. package/src/backend-contract/advertisement.ts +28 -0
  396. package/src/backend-contract/backend.ts +15 -0
  397. package/src/backend-contract/capabilities.ts +7 -0
  398. package/src/backend-contract/primitives.ts +13 -0
  399. package/src/backend-contract/scan-planning.ts +6 -0
  400. package/src/backend-contract/scan-query.ts +33 -3
  401. package/src/backends/bluez/bluez-backend-handles.ts +110 -49
  402. package/src/backends/bluez/bluez-backend-runtime.ts +36 -1
  403. package/src/backends/bluez/bluez-backend.ts +8 -0
  404. package/src/backends/bluez/bluez-connection-runtime.ts +203 -8
  405. package/src/backends/bluez/bluez-dbus-contract.ts +1 -1
  406. package/src/backends/bluez/bluez-dbus-next-boundary.ts +26 -3
  407. package/src/backends/bluez/bluez-property-waiters.ts +50 -1
  408. package/src/backends/bluez/bluez-runtime-models.ts +6 -5
  409. package/src/backends/bluez/bluez-runtime-types.ts +2 -0
  410. package/src/backends/bluez/bluez-scan-planner.ts +6 -1
  411. package/src/backends/corebluetooth/corebluetooth-adapter-loss-cleanup.ts +4 -4
  412. package/src/backends/corebluetooth/corebluetooth-backend.ts +118 -58
  413. package/src/backends/corebluetooth/corebluetooth-boundary.ts +20 -1
  414. package/src/backends/corebluetooth/corebluetooth-cleanup.ts +4 -3
  415. package/src/backends/corebluetooth/corebluetooth-connection-controls.ts +53 -57
  416. package/src/backends/corebluetooth/corebluetooth-gatt-operations.ts +48 -48
  417. package/src/backends/corebluetooth/corebluetooth-handles.ts +12 -12
  418. package/src/backends/corebluetooth/corebluetooth-late-connect-cleanup.ts +1 -1
  419. package/src/backends/corebluetooth/corebluetooth-provider.ts +1 -1
  420. package/src/backends/corebluetooth/corebluetooth-runtime-capabilities.ts +3 -3
  421. package/src/backends/reactnative/react-native-android-provider.ts +38 -1
  422. package/src/backends/reactnative/react-native-scan-planner.ts +11 -1
  423. package/src/backends/scan-planning/service-uuid-scan-planner.ts +54 -3
  424. package/src/core/unified-ble-core.ts +13 -0
  425. package/src/expo.ts +29 -1
  426. package/src/implementation-version.ts +1 -1
  427. package/src/index.ts +26 -2
  428. package/src/ipc/manager.ts +59 -18
  429. package/src/ipc/public-manager.ts +284 -116
  430. package/src/native-protocol/generated/native-protocol-v2-schema.ts +2 -1
  431. package/src/native-protocol/rn-android-boundary.ts +37 -5
  432. package/src/native-protocol/rn-apple-boundary.ts +11 -2
  433. package/src/node-corebluetooth.ts +4 -4
  434. package/src/public/ble-adapter.ts +5 -3
  435. package/src/public/ble-manager.ts +206 -84
  436. package/src/public/cleanup.ts +255 -0
  437. package/src/public/connection-supervisor.ts +62 -28
  438. package/src/public/diagnostics.ts +46 -2
  439. package/src/public/error-bridge.ts +40 -24
  440. package/src/public/errors.ts +5 -35
  441. package/src/public/gatt.ts +60 -104
  442. package/src/public/index.ts +19 -0
  443. package/src/public/scan-query.ts +82 -4
  444. package/src/public/stream-capacity.ts +7 -0
  445. package/src/public/stream-presets.ts +21 -3
  446. package/src/public/streams.ts +315 -0
  447. package/src/react.ts +81 -38
  448. package/src/testing/deterministic/deterministic-scan-planner.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ All notable changes to `unified-ble-manager` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [4.0.5] - 2026-08-25
8
+
9
+ First release cut against a live peripheral. Every fix below came from driving a real CGM from an Android phone and a Linux/BlueZ host, and several are defects no unit test had reason to catch. Does not retag `v4.0.4`.
10
+
11
+ ### Fixes
12
+
13
+ - `readiness()` no longer reports a working radio as `unavailable` before the Android adapter publishes its authoritative state; a boundary that has not yet been told the radio's state is a pending condition, not an absent radio (#116, #128).
14
+ - The direct-GATT backend is shared by CoreBluetooth and React Native Android, so its diagnostics now name the platform that is actually running — `[unified-ble:android-gatt.*]` rather than `[CoreBluetoothBackend.*]` — and its operation ids are `direct-gatt.*` instead of `corebluetooth.*`. Scan-stop cleanup timeouts carry the platform identity instead of `platform: null` (#117, #128, #132).
15
+ - An address known out of band can now enter the system: `ScanClause.addresses` and `connect({ address })`, gated on the reported `peer:address-targeting` capability, with pending BlueZ semantics that complete whenever the peripheral next advertises, and Android `ScanFilter.setDeviceAddress`. Hosts that cannot express a radio address — CoreBluetooth, Web, and the IPC transport — report the capability unsupported and fail closed rather than advertising something they cannot honour (#118, #128, #131, #133).
16
+ - `ScanOptions.platform` is honoured instead of unconditionally rejected, so consumers can select Android scan mode; peripherals that advertise infrequently are no longer effectively undiscoverable behind the platform default duty cycle. Gated on `scan:platform-options` in the public, core and IPC paths; `match-lost` and pre-26 `legacy: false` fail closed rather than silently doing something else (#120, #130).
17
+ - BlueZ GATT works again: occurrences are decimal indices rather than D-Bus object paths, so `discover()` no longer fails with `protocol.violation: public-gatt.occurrence` on every device — a regression introduced when the public validator was tightened without migrating the backend. Two same-UUID services are now distinctly addressable, which neither the old leniency nor the strict check managed (#123, #129).
18
+ - The BlueZ boundary decodes the `y` and `a{qv}` D-Bus variants that BlueZ 5.85 actually sends, and routes `Adapter1.ConnectDevice` through the boundary instead of rejecting it as locally unsupported; without these the backend could not attach at all (#128).
19
+ - Public BLE resources are portable across copies, and closing an adapter watch's value stream tears the watch down instead of leaving a 25 ms poll timer and an abort listener alive (#122).
20
+ - `@babel/runtime` is declared as a production dependency. The emitted CommonJS imports its helpers, so an external linked checkout failed with `MODULE_NOT_FOUND` while repository-local tests passed against a transitive copy — a packaging gap only a real consumer could surface (#134, #135).
21
+ - A database stream is finalized after an invalidation retry succeeds, and per-subscription React cleanup and failed IPC CCCDs stay owned (#127).
22
+
23
+ ### Compatibility
24
+
25
+ - Native protocol ABI 3 → 4. A JavaScript bundle carrying the new scan fields now fails attachment negotiation against an older native binary instead of failing at scan-start — or, worse, silently selecting the opposite scan mode.
26
+
27
+ ### Release integrity
28
+
29
+ - Cut from the exact `main` merge commit through the tag-driven trusted-publishing workflow.
30
+ - Intended for publication as `latest`; this does not promote backend support labels. The live-hardware runs behind these fixes are development evidence, not qualification evidence.
31
+
7
32
  ## [4.0.4] - 2026-08-25
8
33
 
9
34
  Post-4.0.3 audit: wire/scan/IPC ownership, Android 16 KB ELF alignment, Apple teardown, abortable Web chooser honesty, React remount-owned cleanup, and React Native entropy without WebCrypto. Does not retag `v4.0.3`.
package/MIGRATION_4.0.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Migrating from react-native-ble-plx
4
4
 
5
- The current package is `4.0.4`. The `4.0.0` release is a new package and a new contract. It is **not a source-compatible rename**. There is no `new BleManager()` facade, no Base64 characteristic values, and no public transaction IDs.
5
+ The current package is `4.0.5`. The `4.0.0` release is a new package and a new contract. It is **not a source-compatible rename**. There is no `new BleManager()` facade, no Base64 characteristic values, and no public transaction IDs.
6
6
 
7
7
  This page is for a React Native app that already uses `react-native-ble-plx`. Web, Electron, Node, and Tauri are new hosts — use those pages after you understand the RN rewrite.
8
8
 
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  It is an evolution of `react-native-ble-plx`, rewritten as a **cross-platform unified product**. One bytes-first BLE model and lifecycle semantics across hosts, with host-specific construction and ownership. The root package never picks a radio for you, and it will not quietly fall back to a simulator or a different backend.
8
8
 
9
- Install `unified-ble-manager` from npm (`4.0.4` on `latest`). The root import does not pick a radio. Package SemVer and backend support labels are independent: each radio backend stays Experimental until live-radio evidence says otherwise. See [`docs/PLATFORMS.md`](docs/PLATFORMS.md).
9
+ Install `unified-ble-manager` from npm (`4.0.5` on `latest`). The root import does not pick a radio. Package SemVer and backend support labels are independent: each radio backend stays Experimental until live-radio evidence says otherwise. See [`docs/PLATFORMS.md`](docs/PLATFORMS.md).
10
10
 
11
11
  > Sponsored by [Imagi Explain](https://imagiexplain.com) — researched, narrated whiteboard explainers from a prompt, a PDF, or your notes.
12
12
 
package/RELEASE.md CHANGED
@@ -81,7 +81,7 @@ Active `4.0.0-rc.*` release-train candidates publish to npm `latest` so a bare `
81
81
 
82
82
  On release day, set `release_candidate` to the exact candidate required by the
83
83
  release plan. RC2, RC3, RC4, `4.0.0-rc.4.1`, and RC5 are already immutable
84
- once tagged. Stable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` are immutable. `4.0.4` is the current train head.
84
+ once tagged. Stable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` are immutable. `4.0.5` is the current train head.
85
85
 
86
86
  ```sh
87
87
  release_candidate=4.0.0-rc.N
@@ -133,7 +133,7 @@ The `v4.0.3` tag is immutable published history. Do not recreate or move it.
133
133
  git tag -a v4.0.3 -m "v4.0.3"
134
134
  ```
135
135
 
136
- ## Releasing 4.0.4
136
+ ## Releasing 4.0.5
137
137
 
138
138
  The source version is prepared on `main` before the tag. The release workflow verifies that every initial release tag points at the exact current `main` commit before publication; do not create that tag from a side branch or an older commit. Do not retag immutable `v4.0.0`, `v4.0.1`, `v4.0.2`, or `v4.0.3`.
139
139
 
@@ -145,12 +145,12 @@ git checkout main
145
145
  git pull --ff-only origin main
146
146
 
147
147
  test "$(git branch --show-current)" = "main"
148
- test "$(node -p "require('./package.json').version")" = "4.0.4"
148
+ test "$(node -p "require('./package.json').version")" = "4.0.5"
149
149
  git diff --exit-code
150
150
  git diff --cached --exit-code
151
151
 
152
- git tag -a v4.0.4 -m "v4.0.4"
153
- git push origin v4.0.4
152
+ git tag -a v4.0.5 -m "v4.0.5"
153
+ git push origin v4.0.5
154
154
  ```
155
155
 
156
156
  Do not push another commit to `main` between the final verification and the tag push.
package/SBOM.cdx.json CHANGED
@@ -6,20 +6,20 @@
6
6
  "metadata": {
7
7
  "component": {
8
8
  "type": "library",
9
- "bom-ref": "pkg:npm/unified-ble-manager@4.0.4",
9
+ "bom-ref": "pkg:npm/unified-ble-manager@4.0.5",
10
10
  "name": "unified-ble-manager",
11
- "version": "4.0.4",
11
+ "version": "4.0.5",
12
12
  "licenses": [
13
13
  {
14
14
  "expression": "Apache-2.0"
15
15
  }
16
16
  ],
17
- "purl": "pkg:npm/unified-ble-manager@4.0.4"
17
+ "purl": "pkg:npm/unified-ble-manager@4.0.5"
18
18
  },
19
19
  "properties": [
20
20
  {
21
21
  "name": "unified-ble-manager:pnpm-lock-sha256",
22
- "value": "95b40628ee5be6e80662325b6f7c09547541957e885f4bb714fe1aca28f4153f"
22
+ "value": "5fb778bd200cb93f552ec61264d53829dca5bdd27623ccc692d4d9bcbf9ec296"
23
23
  },
24
24
  {
25
25
  "name": "unified-ble-manager:dependency-scope",
@@ -28,6 +28,25 @@
28
28
  ]
29
29
  },
30
30
  "components": [
31
+ {
32
+ "type": "library",
33
+ "bom-ref": "pkg:npm/%40babel/runtime@7.29.7",
34
+ "group": "@babel",
35
+ "name": "runtime",
36
+ "version": "7.29.7",
37
+ "licenses": [
38
+ {
39
+ "expression": "MIT"
40
+ }
41
+ ],
42
+ "purl": "pkg:npm/%40babel/runtime@7.29.7",
43
+ "properties": [
44
+ {
45
+ "name": "unified-ble-manager:license-source",
46
+ "value": "package-metadata"
47
+ }
48
+ ]
49
+ },
31
50
  {
32
51
  "type": "library",
33
52
  "bom-ref": "pkg:npm/%40isaacs/fs-minipass@4.0.1",
@@ -428,6 +447,10 @@
428
447
  }
429
448
  ],
430
449
  "dependencies": [
450
+ {
451
+ "ref": "pkg:npm/%40babel/runtime@7.29.7",
452
+ "dependsOn": []
453
+ },
431
454
  {
432
455
  "ref": "pkg:npm/%40isaacs/fs-minipass@4.0.1",
433
456
  "dependsOn": [
@@ -537,8 +560,9 @@
537
560
  "dependsOn": []
538
561
  },
539
562
  {
540
- "ref": "pkg:npm/unified-ble-manager@4.0.4",
563
+ "ref": "pkg:npm/unified-ble-manager@4.0.5",
541
564
  "dependsOn": [
565
+ "pkg:npm/%40babel/runtime@7.29.7",
542
566
  "pkg:npm/%40tauri-apps/api@2.11.1",
543
567
  "pkg:npm/node-addon-api@8.9.0",
544
568
  "pkg:npm/node-gyp@12.4.0"
@@ -4,12 +4,12 @@
4
4
  "schemaVersion": "1.0.0",
5
5
  "package": {
6
6
  "name": "unified-ble-manager",
7
- "version": "4.0.4"
7
+ "version": "4.0.5"
8
8
  },
9
9
  "source": {
10
10
  "method": "pnpm-lock production graph with installed-manifest license audit",
11
11
  "lockfile": "pnpm-lock.yaml",
12
- "lockfileSha256": "95b40628ee5be6e80662325b6f7c09547541957e885f4bb714fe1aca28f4153f"
12
+ "lockfileSha256": "5fb778bd200cb93f552ec61264d53829dca5bdd27623ccc692d4d9bcbf9ec296"
13
13
  },
14
14
  "reviewedOverrides": [
15
15
  {
@@ -27,6 +27,13 @@
27
27
  ],
28
28
  "unresolved": [],
29
29
  "packages": [
30
+ {
31
+ "name": "@babel/runtime",
32
+ "version": "7.29.7",
33
+ "license": "MIT",
34
+ "licenseSource": "package-metadata",
35
+ "purl": "pkg:npm/%40babel/runtime@7.29.7"
36
+ },
30
37
  {
31
38
  "name": "@isaacs/fs-minipass",
32
39
  "version": "4.0.1",
@@ -255,7 +255,8 @@ class UnifiedBleProtocolAndroidDispatcher(
255
255
  scanMode = options.requiredSignedInteger(3).toInt(),
256
256
  callbackType = options.requiredSignedInteger(4).toInt(),
257
257
  legacyScan = options.requiredBoolean(5),
258
- allowDuplicates = options.requiredBoolean(2)
258
+ allowDuplicates = options.requiredBoolean(2),
259
+ deviceAddresses = options.optionalStringList(6).toTypedArray()
259
260
  )
260
261
  emitSuccess(command, "scanStarted")
261
262
  } catch (error: Exception) {
@@ -1180,6 +1181,11 @@ private fun ProtocolWireRecord.requiredStringList(fieldId: Int): List<String> {
1180
1181
  return if (value is ProtocolWireValue.StringListValue) value.value else throw IllegalArgumentException("String list field is missing")
1181
1182
  }
1182
1183
 
1184
+ private fun ProtocolWireRecord.optionalStringList(fieldId: Int): List<String> {
1185
+ val value = fields[fieldId] ?: return emptyList()
1186
+ return if (value is ProtocolWireValue.StringListValue) value.value else throw IllegalArgumentException("String list field is malformed")
1187
+ }
1188
+
1183
1189
  private fun Boolean?.toNativeConnectableState(): Int = when (this) {
1184
1190
  true -> 1
1185
1191
  false -> 0
@@ -3,7 +3,7 @@
3
3
  package com.sfourdrinier.unifiedblemanager.protocol.generated
4
4
 
5
5
  const val NATIVE_PROTOCOL_VERSION: Int = 2
6
- const val NATIVE_PROTOCOL_ABI_VERSION: Int = 3
6
+ const val NATIVE_PROTOCOL_ABI_VERSION: Int = 4
7
7
  const val NATIVE_PROTOCOL_CONTROL_SURFACE_VERSION: Int = 2
8
8
  const val MAXIMUM_CONTROL_RECORD_BYTES: Int = 262144
9
9
  const val MAXIMUM_BINARY_PAYLOAD_BYTES: Int = 524288
@@ -223,6 +223,7 @@ val NATIVE_PROTOCOL_FIELDS: List<FieldDescriptor> = listOf(
223
223
  FieldDescriptor(RecordKind.SCAN_OPTIONS, 3, "scanMode", "int64", true),
224
224
  FieldDescriptor(RecordKind.SCAN_OPTIONS, 4, "callbackType", "int64", true),
225
225
  FieldDescriptor(RecordKind.SCAN_OPTIONS, 5, "legacyScan", "boolean", true),
226
+ FieldDescriptor(RecordKind.SCAN_OPTIONS, 6, "deviceAddresses", "strings", false),
226
227
  FieldDescriptor(RecordKind.ADAPTER_STATE_SNAPSHOT, 1, "availability", "enum:adapterAvailability", true),
227
228
  FieldDescriptor(RecordKind.ADAPTER_STATE_SNAPSHOT, 2, "authorization", "enum:adapterAuthorization", true),
228
229
  FieldDescriptor(RecordKind.ADAPTER_STATE_SNAPSHOT, 3, "power", "enum:adapterPower", true),
@@ -394,8 +394,16 @@ class OwnedAndroidGattRadio(private val context: Context) {
394
394
  scanMode: Int,
395
395
  callbackType: Int = ScanSettings.CALLBACK_TYPE_ALL_MATCHES,
396
396
  legacyScan: Boolean = true,
397
- allowDuplicates: Boolean = true
397
+ allowDuplicates: Boolean = true,
398
+ deviceAddresses: Array<out String> = emptyArray()
398
399
  ) {
400
+ // ScanSettings.Builder.setLegacy exists only on API 26+; below that the
401
+ // platform can only run a legacy scan, so accepting legacyScan=false would
402
+ // silently ignore the caller's extended-advertising request. Fail closed
403
+ // before any scan state is touched.
404
+ require(legacyScan || Build.VERSION.SDK_INT >= 26) {
405
+ "legacyScan=false requires ScanSettings.Builder.setLegacy (API 26+); this device cannot honour it"
406
+ }
399
407
  val normalizedServiceUuids = normalizeScanServiceUuids(serviceUuids?.toList() ?: emptyList())
400
408
  check(scanCallback == null) { "Android scan cleanup is still owned by a prior scan" }
401
409
  scanSeenDeviceIds.clear()
@@ -404,6 +412,7 @@ class OwnedAndroidGattRadio(private val context: Context) {
404
412
  val builder = ScanSettings.Builder()
405
413
  .setScanMode(
406
414
  when (scanMode) {
415
+ -1 -> ScanSettings.SCAN_MODE_OPPORTUNISTIC
407
416
  0 -> ScanSettings.SCAN_MODE_LOW_POWER
408
417
  1 -> ScanSettings.SCAN_MODE_BALANCED
409
418
  2 -> ScanSettings.SCAN_MODE_LOW_LATENCY
@@ -417,8 +426,26 @@ class OwnedAndroidGattRadio(private val context: Context) {
417
426
  }
418
427
  val settings = builder.build()
419
428
  val filters = mutableListOf<ScanFilter>()
420
- normalizedServiceUuids.forEach { uuid ->
421
- filters.add(ScanFilter.Builder().setServiceUuid(ParcelUuid.fromString(uuid)).build())
429
+ val normalizedAddresses = deviceAddresses.map { it.uppercase() }.distinct()
430
+ if (normalizedAddresses.isEmpty()) {
431
+ normalizedServiceUuids.forEach { uuid ->
432
+ filters.add(ScanFilter.Builder().setServiceUuid(ParcelUuid.fromString(uuid)).build())
433
+ }
434
+ } else if (normalizedServiceUuids.isEmpty()) {
435
+ normalizedAddresses.forEach { address ->
436
+ filters.add(ScanFilter.Builder().setDeviceAddress(address).build())
437
+ }
438
+ } else {
439
+ normalizedAddresses.forEach { address ->
440
+ normalizedServiceUuids.forEach { uuid ->
441
+ filters.add(
442
+ ScanFilter.Builder()
443
+ .setDeviceAddress(address)
444
+ .setServiceUuid(ParcelUuid.fromString(uuid))
445
+ .build()
446
+ )
447
+ }
448
+ }
422
449
  }
423
450
  val cb = object : ScanCallback() {
424
451
  override fun onScanResult(callbackType: Int, result: AndroidScanResult) {
package/docs/ELECTRON.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Main owns the radio. The renderer uses a versioned IPC client and never loads a native addon.
6
6
 
7
- The current package is `4.0.4`. The release ships Node-API v8 prebuilds covering macOS and Windows `arm64`/`x64` for both Node and modern Electron.
7
+ The current package is `4.0.5`. The release ships Node-API v8 prebuilds covering macOS and Windows `arm64`/`x64` for both Node and modern Electron.
8
8
 
9
9
  `unified-ble-manager/electron/main` and
10
10
  `unified-ble-manager/electron/renderer` are the only Electron entrypoints.
@@ -7,7 +7,7 @@ start a radio, request runtime permissions during prebuild, or prove physical
7
7
  radio/restoration reliability. Expo Go is not a supported BLE execution
8
8
  environment because it cannot contain this native module.
9
9
 
10
- Use the v2 plugin options in the published `4.0.4` package. Those options match
10
+ Use the v2 plugin options in the published `4.0.5` package. Those options match
11
11
  the schema introduced at `4.0.0-rc.4`. Expo Go cannot load this native module.
12
12
 
13
13
  ## Installation and development build
@@ -15,7 +15,7 @@ the schema introduced at `4.0.0-rc.4`. Expo Go cannot load this native module.
15
15
  Pin the package so a later `latest` bump does not change native plugin options
16
16
  without a rebuild:
17
17
 
18
- pnpm add unified-ble-manager@4.0.4
18
+ pnpm add unified-ble-manager@4.0.5
19
19
  pnpm add expo@^57.0.0 expo-dev-client
20
20
  npx expo prebuild --clean
21
21
  npx expo run:ios
package/docs/GAPS.4.0.md CHANGED
@@ -14,7 +14,7 @@ This file tracks platform code, CI, package, lab, and live-radio evidence. It do
14
14
 
15
15
  The clean-baseline contract, unified core, public manager, deterministic backend, TCK, native protocol, first-party backend implementations, host-isolated package exports, SDK/CLI, and legacy-absence gates exist in the 4.0 source. Passing deterministic, compile, ABI, or package tests are implementation proof; they do not become physical-radio support evidence unless a retained record proves the corresponding live scenario.
16
16
 
17
- `unified-ble-manager@4.0.4` is the published, immutable stable package/API. Immutable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` remain published history. Backend support labels remain
17
+ `unified-ble-manager@4.0.5` is the published, immutable stable package/API. Immutable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` remain published history. Backend support labels remain
18
18
  evidence-derived. This package does not rewrite the evidence inventory: a backend remains at the support level
19
19
  justified by its records. The alpha train, including `v4.0.0-alpha.40`, remains historical implementation/release
20
20
  evidence and must not be used to claim a higher current support label than it actually proved.
@@ -4,7 +4,7 @@
4
4
 
5
5
  This page gets you to a first scan, connect, read, notify, and teardown on React Native. Other hosts are linked at the bottom. The root import does not turn Bluetooth on.
6
6
 
7
- The current package is `4.0.4`.
7
+ The current package is `4.0.5`.
8
8
 
9
9
  ## Pick a host
10
10
 
@@ -27,7 +27,7 @@ The current package is `4.0.4`.
27
27
  Pin the current package for a known native rebuild:
28
28
 
29
29
  ```sh
30
- pnpm add unified-ble-manager@4.0.4
30
+ pnpm add unified-ble-manager@4.0.5
31
31
  ```
32
32
 
33
33
  Declare Android Bluetooth permissions and the BLE hardware feature yourself,
@@ -37,10 +37,10 @@ request runtime permissions on Android 12+, add
37
37
  #### Expo / CNG v2
38
38
 
39
39
  The Expo v2 schema and `unified-ble-manager/expo` factory are in the published
40
- `4.0.4` package. Pin that exact version:
40
+ `4.0.5` package. Pin that exact version:
41
41
 
42
42
  ```sh
43
- pnpm add unified-ble-manager@4.0.4
43
+ pnpm add unified-ble-manager@4.0.5
44
44
  ```
45
45
 
46
46
  The package does not run in Expo Go.
package/docs/NODE.md CHANGED
@@ -10,7 +10,7 @@ The root import does not open an adapter. Pick one backend:
10
10
  | `unified-ble-manager/node/winrt` | Windows |
11
11
  | `unified-ble-manager/node/bluez` | Linux (needs `dbus-next@^0.10.2` in the app) |
12
12
 
13
- The current package is `4.0.4`. The release ships Node-API v8 prebuilds for macOS and Windows on `arm64` and `x64`. A normal install should not compile native code. BlueZ talks D-Bus and has no addon.
13
+ The current package is `4.0.5`. The release ships Node-API v8 prebuilds for macOS and Windows on `arm64` and `x64`. A normal install should not compile native code. BlueZ talks D-Bus and has no addon.
14
14
 
15
15
  ## One-call factories
16
16
 
package/docs/PLATFORMS.md CHANGED
@@ -8,7 +8,7 @@ This page is an evidence index, not a static compatibility matrix. An applicatio
8
8
 
9
9
  ## Package stability and backend support are separate
10
10
 
11
- `unified-ble-manager@4.0.4` is the published **stable package/API** for the 4.x contract; it is immutable. Backend support labels remain evidence-derived and independent of this SemVer. Immutable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` remain published history.
11
+ `unified-ble-manager@4.0.5` is the published **stable package/API** for the 4.x contract; it is immutable. Backend support labels remain evidence-derived and independent of this SemVer. Immutable `4.0.0`, `4.0.1`, `4.0.2`, and `4.0.3` remain published history.
12
12
 
13
13
  This package is the portable API/semantics freeze; it does **not** mean every first-party backend is
14
14
  automatically Preview, Supported, or Reliability-qualified.
package/docs/WEB.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Use `unified-ble-manager/web` in a secure context (HTTPS or localhost) from a user gesture. There is no background scan and no process-level restoration.
6
6
 
7
- The current package is `4.0.4`. The backend is Experimental until artifact-bound physical-hardware validation says otherwise. See [`PLATFORMS.md`](PLATFORMS.md).
7
+ The current package is `4.0.5`. The backend is Experimental until artifact-bound physical-hardware validation says otherwise. See [`PLATFORMS.md`](PLATFORMS.md).
8
8
 
9
9
  ## Create the manager
10
10
 
@@ -6,7 +6,7 @@ This page is generated by `scripts/docs/generate-platform-support.js` from valid
6
6
 
7
7
  ## Current package
8
8
 
9
- `unified-ble-manager@4.0.4`
9
+ `unified-ble-manager@4.0.5`
10
10
 
11
11
  No evidence record is bound to this exact package version and artifact. Consequently, this generated page makes no Preview, Live Preview, Supported, or Reliability-qualified platform claim for the current package.
12
12
 
@@ -3,7 +3,7 @@
3
3
  import Foundation
4
4
 
5
5
  public let nativeProtocolVersion: UInt32 = 2
6
- public let nativeProtocolABIVersion: UInt32 = 3
6
+ public let nativeProtocolABIVersion: UInt32 = 4
7
7
  public let nativeProtocolControlSurfaceVersion: UInt32 = 2
8
8
  public let maximumControlRecordBytes: Int = 262144
9
9
  public let maximumBinaryPayloadBytes: Int = 524288
@@ -223,6 +223,7 @@ public let nativeProtocolFields: [FieldDescriptor] = [
223
223
  FieldDescriptor(record: .scanOptions, fieldID: 3, name: "scanMode", type: "int64", required: true),
224
224
  FieldDescriptor(record: .scanOptions, fieldID: 4, name: "callbackType", type: "int64", required: true),
225
225
  FieldDescriptor(record: .scanOptions, fieldID: 5, name: "legacyScan", type: "boolean", required: true),
226
+ FieldDescriptor(record: .scanOptions, fieldID: 6, name: "deviceAddresses", type: "strings", required: false),
226
227
  FieldDescriptor(record: .adapterStateSnapshot, fieldID: 1, name: "availability", type: "enum:adapterAvailability", required: true),
227
228
  FieldDescriptor(record: .adapterStateSnapshot, fieldID: 2, name: "authorization", type: "enum:adapterAuthorization", required: true),
228
229
  FieldDescriptor(record: .adapterStateSnapshot, fieldID: 3, name: "power", type: "enum:adapterPower", required: true),
@@ -7,6 +7,7 @@ exports.advertisementMatchesFilter = advertisementMatchesFilter;
7
7
  exports.assertScanFilter = assertScanFilter;
8
8
  exports.deviceIdentity = deviceIdentity;
9
9
  var _errors = require("./errors.js");
10
+ var _primitives = require("./primitives.js");
10
11
  // src/backend-contract/advertisement.ts
11
12
 
12
13
  /** How the backend obtained this observation, independent of individual field provenance. */
@@ -38,6 +39,18 @@ function assertScanFilter(filter, operation) {
38
39
  if (filter.localNamePrefix !== null && filter.localNamePrefix.length === 0) {
39
40
  throw (0, _errors.contractError)('scan.filter-invalid', 'scan', operation);
40
41
  }
42
+ if (filter.deviceAddresses !== undefined) {
43
+ if (filter.deviceAddresses.length === 0) {
44
+ throw (0, _errors.contractError)('scan.filter-invalid', 'scan', operation);
45
+ }
46
+ for (const address of filter.deviceAddresses) {
47
+ try {
48
+ (0, _primitives.canonicalBleAddress)(address);
49
+ } catch {
50
+ throw (0, _errors.contractError)('scan.filter-invalid', 'scan', operation);
51
+ }
52
+ }
53
+ }
41
54
  for (const manufacturer of filter.manufacturerData) {
42
55
  if (!Number.isSafeInteger(manufacturer.companyIdentifier) || manufacturer.companyIdentifier < 0 || manufacturer.companyIdentifier > 0xffff) {
43
56
  throw (0, _errors.contractError)('scan.filter-invalid', 'scan', operation);
@@ -51,6 +64,12 @@ function advertisementMatchesFilter(filter, observation) {
51
64
  if (filter.localNamePrefix !== null && (observation.localName.state !== 'present' || !observation.localName.value.startsWith(filter.localNamePrefix))) {
52
65
  return false;
53
66
  }
67
+ if (filter.deviceAddresses !== undefined && filter.deviceAddresses.length > 0) {
68
+ const observedAddress = observation.device.address;
69
+ if (observedAddress === null || !filter.deviceAddresses.includes(observedAddress.value)) {
70
+ return false;
71
+ }
72
+ }
54
73
  if (filter.serviceUuids.length > 0) {
55
74
  const observedServices = observation.serviceUuids;
56
75
  if (observedServices.state !== 'present' || !filter.serviceUuids.every(uuid => observedServices.value.includes(uuid))) {
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","deviceIdentity","id","backendInstanceId","address","Object","freeze","scope","stableAcrossRestarts","value","type","assertScanFilter","filter","operation","localNamePrefix","length","contractError","manufacturer","manufacturerData","Number","isSafeInteger","companyIdentifier","advertisementMatchesFilter","observation","localName","state","startsWith","serviceUuids","observedServices","every","uuid","includes","observedManufacturerData","filterEntry","some","entry","dataPrefix","hasBytePrefix","prefix","byteLength","index"],"sourceRoot":"../../../src","sources":["backend-contract/advertisement.ts"],"mappings":";;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAFA;;AAoBA;;AAeA;;AAKA;AACA;AACA;AACA;;AASA;AACO,SAASC,cAAcA,CAC5BC,EAAsB,EACtBC,iBAAgD,EAChDC,OAA6B,EACD;EAC5B,OAAOC,MAAM,CAACC,MAAM,CAAC;IACnBJ,EAAE;IACFC,iBAAiB;IACjBI,KAAK,EAAE,SAAS;IAChBC,oBAAoB,EAAE,KAAK;IAC3BJ,OAAO,EAAEA,OAAO,KAAK,IAAI,GAAG,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC;MAAEG,KAAK,EA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,CAAC,EACzE;MACA,OAAO,KAAK;IACd;EACF;EACA,IAAIlB,MAAM,CAACM,gBAAgB,CAACH,MAAM,KAAK,CAAC,EAAE;IACxC,OAAO,IAAI;EACb;EACA,MAAMiB,wBAAwB,GAAGT,WAAW,CAACL,gBAAgB;EAC7D,IAAIc,wBAAwB,CAACP,KAAK,KAAK,SAAS,EAAE;IAChD,OAAO,KAAK;EACd;EACA,OAAOb,MAAM,CAACM,gBAAgB,CAACW,KAAK,CAACI,WAAW,IAC9CD,wBAAwB,CAACvB,KAAK,CAACyB,IAAI,CACjCC,KAAK,IACHA,KAAK,CAACd,iBAAiB,KAAKY,WAAW,CAACZ,iBAAiB,KACxDY,WAAW,CAACG,UAAU,KAAK,IAAI,IAAIC,aAAa,CAACF,KAAK,CAAC1B,KAAK,EAAEwB,WAAW,CAACG,UAAU,CAAC,CAC1F,CACF,CAAC;AACH;AAEA,SAASC,aAAaA,CAAC5B,KAA2B,EAAE6B,MAA4B,EAAW;EACzF,IAAIA,MAAM,CAACC,UAAU,GAAG9B,KAAK,CAAC8B,UAAU,EAAE;IACxC,OAAO,KAAK;EACd;EACA,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,MAAM,CAACC,UAAU,EAAEC,KAAK,IAAI,CAAC,EAAE;IACzD,IAAI/B,KAAK,CAAC+B,KAAK,CAAC,KAAKF,MAAM,CAACE,KAAK,CAAC,EAAE;MAClC,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"names":["_errors","require","_primitives","deviceIdentity","id","backendInstanceId","address","Object","freeze","scope","stableAcrossRestarts","value","type","assertScanFilter","filter","operation","localNamePrefix","length","contractError","deviceAddresses","undefined","canonicalBleAddress","manufacturer","manufacturerData","Number","isSafeInteger","companyIdentifier","advertisementMatchesFilter","observation","localName","state","startsWith","observedAddress","device","includes","serviceUuids","observedServices","every","uuid","observedManufacturerData","filterEntry","some","entry","dataPrefix","hasBytePrefix","prefix","byteLength","index"],"sourceRoot":"../../../src","sources":["backend-contract/advertisement.ts"],"mappings":";;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAHA;;AAqBA;;AAeA;;AAKA;AACA;AACA;AACA;;AASA;AACO,SAASE,cAAcA,CAC5BC,EAAsB,EACtBC,iBAAgD,EAChDC,OAA6B,EACD;EAC5B,OAAOC,MAAM,CAACC,MAAM,CAAC;IACnBJ,EAAE;IACFC,iBAAiB;IACjBI,KAAK,EAAE,SAAS;IAChBC,oBAAoB,EAAE,KAAK;IAC3BJ,OAAO,EAAEA,OAAO,KAAK,IAAI,GAAG,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC;MAAEG,KAAK,EAAEL,OAAO,CAACK,KAAK;MAAEC,IAAI,EAAEN,OAAO,CAACM;IAAK,CAAC;EAC/F,CAAC,CAAC;AACJ;AACA;;AA0FA;AACO,SAASC,gBAAgBA,CAACC,MAAkB,EAAEC,SAAiB,EAAQ;EAC5E,IAAID,MAAM,CAACE,eAAe,KAAK,IAAI,IAAIF,MAAM,CAACE,eAAe,CAACC,MAAM,KAAK,CAAC,EAAE;IAC1E,MAAM,IAAAC,qBAAa,EAAC,qBAAqB,EAAE,MAAM,EAAEH,SAAS,CAAC;EAC/D;EACA,IAAID,MAAM,CAACK,eAAe,KAAKC,SAAS,EAAE;IACxC,IAAIN,MAAM,CAACK,eAAe,CAACF,MAAM,KAAK,CAAC,EAAE;MACvC,MAAM,IAAAC,qBAAa,EAAC,qBAAqB,EAAE,MAAM,EAAEH,SAAS,CAAC;IAC/D;IACA,KAAK,MAAMT,OAAO,IAAIQ,MAAM,CAACK,eAAe,EAAE;MAC5C,IAAI;QACF,IAAAE,+BAAmB,EAACf,OAAO,CAAC;MAC9B,CAAC,CAAC,MAAM;QACN,MAAM,IAAAY,qBAAa,EAAC,qBAAqB,EAAE,MAAM,EAAEH,SAAS,CAAC;MAC/D;IACF;EACF;EACA,KA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EACA,IAAIxB,MAAM,CAACS,gBAAgB,CAACN,MAAM,KAAK,CAAC,EAAE;IACxC,OAAO,IAAI;EACb;EACA,MAAMsB,wBAAwB,GAAGX,WAAW,CAACL,gBAAgB;EAC7D,IAAIgB,wBAAwB,CAACT,KAAK,KAAK,SAAS,EAAE;IAChD,OAAO,KAAK;EACd;EACA,OAAOhB,MAAM,CAACS,gBAAgB,CAACc,KAAK,CAACG,WAAW,IAC9CD,wBAAwB,CAAC5B,KAAK,CAAC8B,IAAI,CACjCC,KAAK,IACHA,KAAK,CAAChB,iBAAiB,KAAKc,WAAW,CAACd,iBAAiB,KACxDc,WAAW,CAACG,UAAU,KAAK,IAAI,IAAIC,aAAa,CAACF,KAAK,CAAC/B,KAAK,EAAE6B,WAAW,CAACG,UAAU,CAAC,CAC1F,CACF,CAAC;AACH;AAEA,SAASC,aAAaA,CAACjC,KAA2B,EAAEkC,MAA4B,EAAW;EACzF,IAAIA,MAAM,CAACC,UAAU,GAAGnC,KAAK,CAACmC,UAAU,EAAE;IACxC,OAAO,KAAK;EACd;EACA,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,MAAM,CAACC,UAAU,EAAEC,KAAK,IAAI,CAAC,EAAE;IACzD,IAAIpC,KAAK,CAACoC,KAAK,CAAC,KAAKF,MAAM,CAACE,KAAK,CAAC,EAAE;MAClC,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -13,6 +13,12 @@ var _primitives = require("./primitives.js");
13
13
  var _serializable = require("./serializable.js");
14
14
  // src/backend-contract/backend.ts
15
15
 
16
+ /**
17
+ * A canonical out-of-band radio address accepted by the optional `peer:address-targeting`
18
+ * capability. Only public/static addresses are expressible; resolvable private addresses
19
+ * must re-enter through a durable `PeerReference`.
20
+ */
21
+
16
22
  /** A loss is scoped to the exact attachment, connection generation, and owner lease. */
17
23
 
18
24
  /** Normalized scan delivery, separate from a stream's bounded overflow accounting record. */
@@ -1 +1 @@
1
- {"version":3,"names":["_identity","require","_errors","_primitives","_serializable","backendDisconnectReasons","Object","freeze","connectionStates","assertBackendEvent","event","Number","isSafeInteger","ingressOrdinal","contractError","attachment","attachmentId","kind","database","attachmentRecordsEqual","connection","includes","previous","current","reason","authenticatedAttachedBackends","WeakMap","AttachedBackend","authenticatedReceiptMarker","constructor","hasAuthenticatedReceiptMarker","exports","IssuedAttachedBackend","backend","set","snapshotAttachmentRecord","identity","snapshotBackendIdentityClaim","attachBackend","coreCompatibility","attach","assertAttachmentMatchesBackend","assertCoreVersionsAccepted","versions","assertAttachedBackend","attachedBackend","authentication","get","undefined","completeAttachmentRecordsEqual","backendIdentityClaimsEqual","registeredBackendId","registeredPlatformId","snapshotApplicableVersionAxes","runtime","hostKind","implementationVersion","diagnostics","snapshotSerializableRecord","value","expected","actual","applicableVersionAxesEqual","serializableRecordsEqual","left","right","adapter","displayName","state","availability","authorization","power","backendGeneration","updatedAt","safeReason","stringArraysEqual","limitations","length","index","backendInstanceId","adapterId","adapterGeneration"],"sourceRoot":"../../../src","sources":["backend-contract/backend.ts"],"mappings":";;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAsCA,IAAAC,OAAA,GAAAD,OAAA;AAkBA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AA7DA;;AA8SA;;AAQA;;AAcA,MAAMI,wBAA4D,GAAGC,MAAM,CAACC,MAAM,CAAC,CACjF,OAAO,EACP,MAAM,EACN,SAAS,EACT,iBAAiB,CAClB,CAAC;AACF,MAAMC,gBAA4C,GAAGF,MAAM,CAACC,MAAM,CAAC,CACjE,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,MAAM,CACP,CAAC;;AA+DF;;AAuBO,SAASE,kBAAkBA,CAA4BC,KAA+B,EAAQ;EACnG,IAAI,CAACC,MAAM,CAACC,aAAa,CAACF,KAAK,CAACG,cAAc,CAAC,IAAIH,KAAK,CAACG,cAAc,GAAG,C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iBAAiB;MACvDL,WAAW,EAAEtE,MAAM,CAACC,MAAM,CAAC,CAAC,GAAGQ,UAAU,CAACmD,OAAO,CAACU,WAAW,CAAC;IAChE,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["_identity","require","_errors","_primitives","_serializable","backendDisconnectReasons","Object","freeze","connectionStates","assertBackendEvent","event","Number","isSafeInteger","ingressOrdinal","contractError","attachment","attachmentId","kind","database","attachmentRecordsEqual","connection","includes","previous","current","reason","authenticatedAttachedBackends","WeakMap","AttachedBackend","authenticatedReceiptMarker","constructor","hasAuthenticatedReceiptMarker","exports","IssuedAttachedBackend","backend","set","snapshotAttachmentRecord","identity","snapshotBackendIdentityClaim","attachBackend","coreCompatibility","attach","assertAttachmentMatchesBackend","assertCoreVersionsAccepted","versions","assertAttachedBackend","attachedBackend","authentication","get","undefined","completeAttachmentRecordsEqual","backendIdentityClaimsEqual","registeredBackendId","registeredPlatformId","snapshotApplicableVersionAxes","runtime","hostKind","implementationVersion","diagnostics","snapshotSerializableRecord","value","expected","actual","applicableVersionAxesEqual","serializableRecordsEqual","left","right","adapter","displayName","state","availability","authorization","power","backendGeneration","updatedAt","safeReason","stringArraysEqual","limitations","length","index","backendInstanceId","adapterId","adapterGeneration"],"sourceRoot":"../../../src","sources":["backend-contract/backend.ts"],"mappings":";;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAsCA,IAAAC,OAAA,GAAAD,OAAA;AAkBA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AA7DA;;AAwKA;AACA;AACA;AACA;AACA;;AAiJA;;AAQA;;AAcA,MAAMI,wBAA4D,GAAGC,MAAM,CAACC,MAAM,CAAC,CACjF,OAAO,EACP,MAAM,EACN,SAAS,EACT,iBAAiB,CAClB,CAAC;AACF,MAAMC,gBAA4C,GAAGF,MAAM,CAACC,MAAM,CAAC,CACjE,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cA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S,EAAE1D,UAAU,CAACmD,OAAO,CAACE,KAAK,CAACK,SAAS;QAC7CC,UAAU,EAAE3D,UAAU,CAACmD,OAAO,CAACE,KAAK,CAACM;MACvC,CAAC,CAAC;MACFO,iBAAiB,EAAElE,UAAU,CAACmD,OAAO,CAACe,iBAAiB;MACvDL,WAAW,EAAEtE,MAAM,CAACC,MAAM,CAAC,CAAC,GAAGQ,UAAU,CAACmD,OAAO,CAACU,WAAW,CAAC;IAChE,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -22,7 +22,14 @@ const BUILT_IN_FEATURE_IDS = exports.BUILT_IN_FEATURE_IDS = Object.freeze({
22
22
  discoveryContinuousScan: 'discovery:continuous-scan',
23
23
  discoverySystemChooser: 'discovery:system-chooser',
24
24
  discoveryAdvertisementWatch: 'discovery:advertisement-watch',
25
+ scanPlatformOptions: 'scan:platform-options',
25
26
  peerResolveReference: 'peer:resolve-reference',
27
+ /**
28
+ * The backend can target a peer by an out-of-band radio address: the `addresses` scan
29
+ * clause and the address form of `connect()`. Only public/static addresses are
30
+ * addressable; peers using resolvable private addresses need a durable `PeerReference`.
31
+ */
32
+ peerAddressTargeting: 'peer:address-targeting',
26
33
  peerKnown: 'peer:known',
27
34
  peerSystemConnected: 'peer:system-connected',
28
35
  peerBonded: 'peer:bonded',