unified-ble-manager 4.0.1 → 4.0.2

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 (53) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/MIGRATION_4.0.md +1 -1
  3. package/README.md +1 -1
  4. package/RELEASE.md +14 -6
  5. package/SBOM.cdx.json +4 -4
  6. package/THIRD_PARTY_LICENSES.json +1 -1
  7. package/docs/ELECTRON.md +1 -1
  8. package/docs/EXPO_PLUGIN.md +2 -2
  9. package/docs/GAPS.4.0.md +1 -1
  10. package/docs/GETTING_STARTED.md +4 -4
  11. package/docs/NODE.md +1 -1
  12. package/docs/PLATFORMS.md +1 -1
  13. package/docs/WEB.md +1 -1
  14. package/docs/generated/PLATFORM_SUPPORT.md +1 -1
  15. package/lib/commonjs/implementation-version.js +1 -1
  16. package/lib/commonjs/ipc/manager.js +245 -57
  17. package/lib/commonjs/ipc/manager.js.map +1 -1
  18. package/lib/commonjs/public/ble-manager.js +44 -11
  19. package/lib/commonjs/public/ble-manager.js.map +1 -1
  20. package/lib/module/implementation-version.js +1 -1
  21. package/lib/module/ipc/manager.js +244 -57
  22. package/lib/module/ipc/manager.js.map +1 -1
  23. package/lib/module/public/ble-manager.js +43 -11
  24. package/lib/module/public/ble-manager.js.map +1 -1
  25. package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
  26. package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
  27. package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
  28. package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
  29. package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts +1 -1
  30. package/lib/typescript/commonjs/src/implementation-version.d.ts +1 -1
  31. package/lib/typescript/commonjs/src/ipc/manager.d.ts +29 -3
  32. package/lib/typescript/commonjs/src/ipc/manager.d.ts.map +1 -1
  33. package/lib/typescript/commonjs/src/public/ble-manager.d.ts +6 -0
  34. package/lib/typescript/commonjs/src/public/ble-manager.d.ts.map +1 -1
  35. package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts +1 -1
  36. package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts +1 -1
  37. package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts +1 -1
  38. package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts +1 -1
  39. package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts +1 -1
  40. package/lib/typescript/module/src/implementation-version.d.ts +1 -1
  41. package/lib/typescript/module/src/ipc/manager.d.ts +29 -3
  42. package/lib/typescript/module/src/ipc/manager.d.ts.map +1 -1
  43. package/lib/typescript/module/src/public/ble-manager.d.ts +6 -0
  44. package/lib/typescript/module/src/public/ble-manager.d.ts.map +1 -1
  45. package/native/PREBUILDS.json +5 -5
  46. package/native/electron/corebluetooth/prebuilds/darwin-arm64/unified_ble_corebluetooth.node +0 -0
  47. package/native/electron/corebluetooth/prebuilds/darwin-x64/unified_ble_corebluetooth.node +0 -0
  48. package/native/electron/winrt/prebuilds/win32-arm64/unified_ble_winrt.node +0 -0
  49. package/native/electron/winrt/prebuilds/win32-x64/unified_ble_winrt.node +0 -0
  50. package/package.json +1 -1
  51. package/src/implementation-version.ts +1 -1
  52. package/src/ipc/manager.ts +289 -59
  53. package/src/public/ble-manager.ts +53 -11
package/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ All notable changes to `unified-ble-manager` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [4.0.2] - 2026-08-24
8
+
9
+ Public coalesced scans no longer lose duplicate suppression after lost-peer or presence-cap churn: fingerprint deletions now decrement the retained-byte counter. IPC pre-registration buffering is globally bounded (ID/item/byte/age) with fail-visible tombstones. Connection release attempts `connection.disconnect` even when lifecycle unsubscribe rejects or returns `release-failed`, and preserves both cleanup failures. Does not retag `v4.0.1`.
10
+
11
+ ### Fixes
12
+
13
+ - Coalesced public scans keep exact fingerprint byte accounting across `reportLost` and presence eviction (#53).
14
+ - IPC pending streams for unknown IDs are aggregate-bounded; quota/TTL loss is visible when the ID later registers (#54).
15
+ - IPC connection release no longer skips physical `connection.disconnect` after a lifecycle unsubscribe failure (#56).
16
+
17
+ ### Release integrity
18
+
19
+ - Cut from the exact post-PR #57 `main` merge commit through the tag-driven trusted-publishing workflow.
20
+ - Intended for publication as `latest`; this does not promote backend support labels or claim physical-radio evidence.
21
+
7
22
  ## [4.0.1] - 2026-08-24
8
23
 
9
24
  Tauri JS transport now accepts the adapter-state snapshot the Rust plugin emits (`heard: null` on unsampled bootstrap, non-negative integer on live `adapter.state`). Extra or missing adapter-state keys stay fail-closed and are named in the decode error. Teaching docs describe the current stable 4.x install instead of RC-as-current. Does not retag `v4.0.0`.
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.1`. 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.2`. 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.1` 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.2` 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` is immutable. `4.0.1` is the current train head.
84
+ once tagged. Stable `4.0.0` and `4.0.1` are immutable. `4.0.2` is the current train head.
85
85
 
86
86
  ```sh
87
87
  release_candidate=4.0.0-rc.N
@@ -111,7 +111,15 @@ git tag -a v4.0.0 -m "v4.0.0"
111
111
 
112
112
  ## Releasing 4.0.1
113
113
 
114
- 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`.
114
+ The `v4.0.1` tag is immutable published history. Do not recreate or move it.
115
+
116
+ ```sh
117
+ git tag -a v4.0.1 -m "v4.0.1"
118
+ ```
119
+
120
+ ## Releasing 4.0.2
121
+
122
+ 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` or `v4.0.1`.
115
123
 
116
124
  On release day:
117
125
 
@@ -121,12 +129,12 @@ git checkout main
121
129
  git pull --ff-only origin main
122
130
 
123
131
  test "$(git branch --show-current)" = "main"
124
- test "$(node -p "require('./package.json').version")" = "4.0.1"
132
+ test "$(node -p "require('./package.json').version")" = "4.0.2"
125
133
  git diff --exit-code
126
134
  git diff --cached --exit-code
127
135
 
128
- git tag -a v4.0.1 -m "v4.0.1"
129
- git push origin v4.0.1
136
+ git tag -a v4.0.2 -m "v4.0.2"
137
+ git push origin v4.0.2
130
138
  ```
131
139
 
132
140
  Do not push another commit to `main` between the final verification and the tag push.
@@ -181,7 +189,7 @@ Never move or recreate a published version tag to hide a failed release.
181
189
 
182
190
  - If the workflow fails **before npm publication**, fix the source on `main`, increment/version as appropriate, and create the correct new tag.
183
191
  - If npm publication succeeds but a later GitHub-release step fails, preserve the immutable npm version and rerun the workflow. The recovery path skips the current-`main` admission check and attaches the exact npm registry tarball rather than newly linked native binaries.
184
- - If a defect is discovered after `4.0.0` is published, fix it and release `4.0.1`; do not replace `4.0.0`.
192
+ - If a defect is discovered after a stable tag is published, fix it and release a new patch; do not replace the published tag.
185
193
 
186
194
  ## Prereleases after 4.0.0
187
195
 
package/SBOM.cdx.json CHANGED
@@ -6,15 +6,15 @@
6
6
  "metadata": {
7
7
  "component": {
8
8
  "type": "library",
9
- "bom-ref": "pkg:npm/unified-ble-manager@4.0.1",
9
+ "bom-ref": "pkg:npm/unified-ble-manager@4.0.2",
10
10
  "name": "unified-ble-manager",
11
- "version": "4.0.1",
11
+ "version": "4.0.2",
12
12
  "licenses": [
13
13
  {
14
14
  "expression": "Apache-2.0"
15
15
  }
16
16
  ],
17
- "purl": "pkg:npm/unified-ble-manager@4.0.1"
17
+ "purl": "pkg:npm/unified-ble-manager@4.0.2"
18
18
  },
19
19
  "properties": [
20
20
  {
@@ -537,7 +537,7 @@
537
537
  "dependsOn": []
538
538
  },
539
539
  {
540
- "ref": "pkg:npm/unified-ble-manager@4.0.1",
540
+ "ref": "pkg:npm/unified-ble-manager@4.0.2",
541
541
  "dependsOn": [
542
542
  "pkg:npm/%40tauri-apps/api@2.11.1",
543
543
  "pkg:npm/node-addon-api@8.9.0",
@@ -4,7 +4,7 @@
4
4
  "schemaVersion": "1.0.0",
5
5
  "package": {
6
6
  "name": "unified-ble-manager",
7
- "version": "4.0.1"
7
+ "version": "4.0.2"
8
8
  },
9
9
  "source": {
10
10
  "method": "pnpm-lock production graph with installed-manifest license audit",
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.1`. 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.2`. 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.1` package. Those options match
10
+ Use the v2 plugin options in the published `4.0.2` 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.1
18
+ pnpm add unified-ble-manager@4.0.2
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.1` is the published, immutable stable package/API. Immutable `4.0.0` remains published history. Backend support labels remain
17
+ `unified-ble-manager@4.0.2` is the published, immutable stable package/API. Immutable `4.0.0` and `4.0.1` 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.1`.
7
+ The current package is `4.0.2`.
8
8
 
9
9
  ## Pick a host
10
10
 
@@ -27,7 +27,7 @@ The current package is `4.0.1`.
27
27
  Pin the current package for a known native rebuild:
28
28
 
29
29
  ```sh
30
- pnpm add unified-ble-manager@4.0.1
30
+ pnpm add unified-ble-manager@4.0.2
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.1` package. Pin that exact version:
40
+ `4.0.2` package. Pin that exact version:
41
41
 
42
42
  ```sh
43
- pnpm add unified-ble-manager@4.0.1
43
+ pnpm add unified-ble-manager@4.0.2
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.1`. 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.2`. 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.1` 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` remains published history.
11
+ `unified-ble-manager@4.0.2` 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` and `4.0.1` 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.1`. The backend is Experimental until artifact-bound physical-hardware validation says otherwise. See [`PLATFORMS.md`](PLATFORMS.md).
7
+ The current package is `4.0.2`. 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.1`
9
+ `unified-ble-manager@4.0.2`
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
 
@@ -7,5 +7,5 @@ exports.UNIFIED_BLE_IMPLEMENTATION_VERSION = void 0;
7
7
  // src/implementation-version.ts
8
8
 
9
9
  /** The one production version stamped into every first-party backend identity. */
10
- const UNIFIED_BLE_IMPLEMENTATION_VERSION = exports.UNIFIED_BLE_IMPLEMENTATION_VERSION = '4.0.1';
10
+ const UNIFIED_BLE_IMPLEMENTATION_VERSION = exports.UNIFIED_BLE_IMPLEMENTATION_VERSION = '4.0.2';
11
11
  //# sourceMappingURL=implementation-version.js.map