@condorinst/mobile-bridge 0.23.0 → 0.23.1

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.
@@ -32,7 +32,7 @@ Four numbers coexist. Only one tells you what the device can do.
32
32
  | `nativeVersion` | `0.18.0` | **The capability signal.** The bridge schema the app on this device implements. No Canvas release is in the field yet; the first one implements `0.18.0`. Later releases will coexist with it on phones for a while, so read it at runtime — never assume the latest. |
33
33
  | `shellVersion` | `0.6.0` | The Condor shell wrapping your iframe. |
34
34
  | client protocol | `0.5.0` | The postMessage protocol `BridgeClient` speaks. |
35
- | package | `0.23.0` | The npm version you compiled against. |
35
+ | package | `0.23.1` | The npm version you compiled against. |
36
36
 
37
37
  ```ts
38
38
  const ack = await BridgeClient.handshake({ clientVersion: '1.0.0' });
@@ -423,8 +423,8 @@ stops it. Send `add` for each device after the list arrives.
423
423
  - **"Disconnected" is the normal state.** An ActLumus is not connected all the
424
424
  time: it opens a short BLE session to sync every few minutes
425
425
  (`devicesConfig[].bleConnectionPeriod`, in minutes) and the app disconnects
426
- it as soon as the sync ends, successful or not — unless `realTime` is on for
427
- that device (below).
426
+ it as soon as the sync ends, successful or not. With `realTime` on, the app
427
+ does not disconnect it, but the session still ends within minutes (below).
428
428
  Show the last sync time (`devicesTelemetry[].updataDateTime`) rather than a
429
429
  red "offline" badge.
430
430
 
@@ -444,11 +444,15 @@ connected, and their ack does **not** mean "done":
444
444
  - **Do not disable these actions while the device is disconnected.** Say what
445
445
  will happen instead: "The clock will be set at the next sync" / "The memory
446
446
  will be erased after the next sync uploads its data".
447
- - **`realTime` keeps the session open.** With it on, the app does not
448
- disconnect the device after the sync: readings keep flowing until you switch
449
- `realTime` off (then the session ends) or the BLE link drops. Readings stop
450
- when the session ends and resume at its next session while `realTime` stays
451
- on. There is no "last connection" field: the last sync
447
+ - **A live session is short.** With `realTime` on, the app does not
448
+ disconnect the device after the sync, and switching `realTime` off ends the
449
+ session. But on a real device (an ActLumus Plus on an Android tablet, twice)
450
+ the session ended about **3 minutes** after it started, with `realTime` still
451
+ on — the link or the device ends it, not the app. Design "live" as a few
452
+ minutes per sync, not a continuous stream: say "connected now" only while
453
+ readings arrive, and expect the next readings at the next session
454
+ (`bleConnectionPeriod`). Readings stop when the session ends and resume at
455
+ its next session while `realTime` stays on. There is no "last connection" field: the last sync
452
456
  (`devicesTelemetry[].updataDateTime`) is the closest one. The app switches `realTime` off for every
453
457
  device when it restarts — switch it on again from your screen when you need
454
458
  it, and off when the person leaves that screen.
@@ -175,7 +175,7 @@ under it, as on the phone.
175
175
  | `scenario` | the scenario in use, after every override |
176
176
  | `log` | everything sent, answered and dropped: `{ at, kind, command?, key?, detail, args?, payload? }[]`. `detail` is a shortened line; `args` (sent) and `payload` (reply) are complete |
177
177
  | `setStatus({ internet: false })` | changes `systemStatus` and emits it, as the app does; without internet `sensorLog` fails, and it recovers with `{ internet: true }` |
178
- | `setConnected(deviceId, true \| false)` | starts or ends a device's BLE session: `deviceConnection` (if you sent `add`), the `deviceLightSensors` stream (if `realTime` is on) and the sync's `deviceNotification` steps, 200 ms apart, ending in `pipeline_done_notification`. As on the phone, the session then **ends by itself** — unless `realTime` is on for that device, which keeps it open until `realTime` goes off |
178
+ | `setConnected(deviceId, true \| false)` | starts or ends a device's BLE session: `deviceConnection` (if you sent `add`), the `deviceLightSensors` stream (if `realTime` is on) and the sync's `deviceNotification` steps, 200 ms apart, ending in `pipeline_done_notification`. As on the phone, the session then **ends by itself**; with `realTime` on it lasts until `realTime` goes off or 3 min after it started (`realTimeSessionMs`), whichever comes first |
179
179
  | `emit(key, payload)` | any native event, typed as in `docs/bridge-contract.md` — e.g. `emit('language', { deviceLocale: 'pt-BR', appLanguage: 'pt', resolvedLanguage: 'pt' })` |
180
180
  | `setConfirmations('accept' \| 'decline' \| 'ask')` | answers the app's confirmation dialog for you |
181
181
  | `pressBack()` | the OS back button |
@@ -200,6 +200,7 @@ scenario; every field is optional:
200
200
  "logPeriodS": 300,
201
201
  "firstSessionAfterMs": null,
202
202
  "sessionFailAt": "get_data_log",
203
+ "realTimeSessionMs": 30000,
203
204
  "history": { "days": 14, "dockHours": [7], "gapHours": [2, 3], "gapDates": ["2026-10-18"] },
204
205
  "sensorLogFailOnRequest": 3,
205
206
  "userDeviceError": "NETWORK",
@@ -300,7 +301,7 @@ dev.kill(); // node, not npx: no orphan
300
301
 
301
302
  The harness does nothing on its own after load, except one session (the first
302
303
  device of the `default` scenario connects after 3 s, syncs, and disconnects
303
- about 4 s later unless `realTime` is on). Internet loss, a
304
+ about 4 s later, or up to 3 min later with `realTime` on). Internet loss, a
304
305
  device disconnecting, or a reading arriving are things your test does through
305
306
  `window.condorDev`.
306
307
 
@@ -14,7 +14,7 @@
14
14
  "node": ">=18"
15
15
  },
16
16
  "dependencies": {
17
- "@condorinst/mobile-bridge": "^0.23.0"
17
+ "@condorinst/mobile-bridge": "^0.23.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^22.0.0",
package/llms-full.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @condorinst/mobile-bridge 0.23.0 — full documentation
1
+ # @condorinst/mobile-bridge 0.23.1 — full documentation
2
2
 
3
3
  Generated from the files listed below, in reading order. Payload types are
4
4
  canonical in dist/index.d.ts; the machine-readable contract is
@@ -138,12 +138,12 @@ build. Copy it, then install, so its `package.json` is the one you keep:
138
138
 
139
139
  ```bash
140
140
  mkdir my-home && cd my-home
141
- npm pack @condorinst/mobile-bridge@^0.23.0 && tar -xzf condorinst-mobile-bridge-*.tgz
141
+ npm pack @condorinst/mobile-bridge@^0.23.1 && tar -xzf condorinst-mobile-bridge-*.tgz
142
142
  cp -r package/examples/minimal-home/. . && rm -rf package condorinst-mobile-bridge-*.tgz
143
143
  npm install
144
144
  ```
145
145
 
146
- In a project you already have: `npm install @condorinst/mobile-bridge@^0.23.0`
146
+ In a project you already have: `npm install @condorinst/mobile-bridge@^0.23.1`
147
147
  (the caret gives you patches only while the package is below 1.0.0) and copy
148
148
  `build.mjs` from `node_modules/@condorinst/mobile-bridge/examples/minimal-home/`.
149
149
 
@@ -338,7 +338,7 @@ Four numbers coexist. Only one tells you what the device can do.
338
338
  | `nativeVersion` | `0.18.0` | **The capability signal.** The bridge schema the app on this device implements. No Canvas release is in the field yet; the first one implements `0.18.0`. Later releases will coexist with it on phones for a while, so read it at runtime — never assume the latest. |
339
339
  | `shellVersion` | `0.6.0` | The Condor shell wrapping your iframe. |
340
340
  | client protocol | `0.5.0` | The postMessage protocol `BridgeClient` speaks. |
341
- | package | `0.23.0` | The npm version you compiled against. |
341
+ | package | `0.23.1` | The npm version you compiled against. |
342
342
 
343
343
  ```ts
344
344
  const ack = await BridgeClient.handshake({ clientVersion: '1.0.0' });
@@ -729,8 +729,8 @@ stops it. Send `add` for each device after the list arrives.
729
729
  - **"Disconnected" is the normal state.** An ActLumus is not connected all the
730
730
  time: it opens a short BLE session to sync every few minutes
731
731
  (`devicesConfig[].bleConnectionPeriod`, in minutes) and the app disconnects
732
- it as soon as the sync ends, successful or not — unless `realTime` is on for
733
- that device (below).
732
+ it as soon as the sync ends, successful or not. With `realTime` on, the app
733
+ does not disconnect it, but the session still ends within minutes (below).
734
734
  Show the last sync time (`devicesTelemetry[].updataDateTime`) rather than a
735
735
  red "offline" badge.
736
736
 
@@ -750,11 +750,15 @@ connected, and their ack does **not** mean "done":
750
750
  - **Do not disable these actions while the device is disconnected.** Say what
751
751
  will happen instead: "The clock will be set at the next sync" / "The memory
752
752
  will be erased after the next sync uploads its data".
753
- - **`realTime` keeps the session open.** With it on, the app does not
754
- disconnect the device after the sync: readings keep flowing until you switch
755
- `realTime` off (then the session ends) or the BLE link drops. Readings stop
756
- when the session ends and resume at its next session while `realTime` stays
757
- on. There is no "last connection" field: the last sync
753
+ - **A live session is short.** With `realTime` on, the app does not
754
+ disconnect the device after the sync, and switching `realTime` off ends the
755
+ session. But on a real device (an ActLumus Plus on an Android tablet, twice)
756
+ the session ended about **3 minutes** after it started, with `realTime` still
757
+ on — the link or the device ends it, not the app. Design "live" as a few
758
+ minutes per sync, not a continuous stream: say "connected now" only while
759
+ readings arrive, and expect the next readings at the next session
760
+ (`bleConnectionPeriod`). Readings stop when the session ends and resume at
761
+ its next session while `realTime` stays on. There is no "last connection" field: the last sync
758
762
  (`devicesTelemetry[].updataDateTime`) is the closest one. The app switches `realTime` off for every
759
763
  device when it restarts — switch it on again from your screen when you need
760
764
  it, and off when the person leaves that screen.
@@ -1375,7 +1379,7 @@ under it, as on the phone.
1375
1379
  | `scenario` | the scenario in use, after every override |
1376
1380
  | `log` | everything sent, answered and dropped: `{ at, kind, command?, key?, detail, args?, payload? }[]`. `detail` is a shortened line; `args` (sent) and `payload` (reply) are complete |
1377
1381
  | `setStatus({ internet: false })` | changes `systemStatus` and emits it, as the app does; without internet `sensorLog` fails, and it recovers with `{ internet: true }` |
1378
- | `setConnected(deviceId, true \| false)` | starts or ends a device's BLE session: `deviceConnection` (if you sent `add`), the `deviceLightSensors` stream (if `realTime` is on) and the sync's `deviceNotification` steps, 200 ms apart, ending in `pipeline_done_notification`. As on the phone, the session then **ends by itself** — unless `realTime` is on for that device, which keeps it open until `realTime` goes off |
1382
+ | `setConnected(deviceId, true \| false)` | starts or ends a device's BLE session: `deviceConnection` (if you sent `add`), the `deviceLightSensors` stream (if `realTime` is on) and the sync's `deviceNotification` steps, 200 ms apart, ending in `pipeline_done_notification`. As on the phone, the session then **ends by itself**; with `realTime` on it lasts until `realTime` goes off or 3 min after it started (`realTimeSessionMs`), whichever comes first |
1379
1383
  | `emit(key, payload)` | any native event, typed as in `docs/bridge-contract.md` — e.g. `emit('language', { deviceLocale: 'pt-BR', appLanguage: 'pt', resolvedLanguage: 'pt' })` |
1380
1384
  | `setConfirmations('accept' \| 'decline' \| 'ask')` | answers the app's confirmation dialog for you |
1381
1385
  | `pressBack()` | the OS back button |
@@ -1400,6 +1404,7 @@ scenario; every field is optional:
1400
1404
  "logPeriodS": 300,
1401
1405
  "firstSessionAfterMs": null,
1402
1406
  "sessionFailAt": "get_data_log",
1407
+ "realTimeSessionMs": 30000,
1403
1408
  "history": { "days": 14, "dockHours": [7], "gapHours": [2, 3], "gapDates": ["2026-10-18"] },
1404
1409
  "sensorLogFailOnRequest": 3,
1405
1410
  "userDeviceError": "NETWORK",
@@ -1500,7 +1505,7 @@ dev.kill(); // node, not npx: no orphan
1500
1505
 
1501
1506
  The harness does nothing on its own after load, except one session (the first
1502
1507
  device of the `default` scenario connects after 3 s, syncs, and disconnects
1503
- about 4 s later unless `realTime` is on). Internet loss, a
1508
+ about 4 s later, or up to 3 min later with `realTime` on). Internet loss, a
1504
1509
  device disconnecting, or a reading arriving are things your test does through
1505
1510
  `window.condorDev`.
1506
1511
 
package/llms.txt CHANGED
@@ -7,7 +7,7 @@
7
7
  > pagination, permissions, system status and language.
8
8
 
9
9
  Every URL below is plain text over HTTPS, pinned to a released version, and
10
- needs no authentication. Replace `0.23.0` with the version you depend on; the
10
+ needs no authentication. Replace `0.23.1` with the version you depend on; the
11
11
  contract changes between minors while the package is below 1.0.0.
12
12
 
13
13
  The same files ship inside the npm tarball, so if you have run
@@ -16,27 +16,27 @@ The same files ship inside the npm tarball, so if you have run
16
16
 
17
17
  ## Start here
18
18
 
19
- - [AGENTS.md](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/AGENTS.md): The procedure, for agents and people alike — hard rules, the golden-path boot sequence, the harness, the validation loop, and which file owns each subject. Read before writing code.
20
- - [llms-full.txt](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/llms-full.txt): AGENTS.md and every document under docs/ concatenated into one file, for a single fetch.
19
+ - [AGENTS.md](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/AGENTS.md): The procedure, for agents and people alike — hard rules, the golden-path boot sequence, the harness, the validation loop, and which file owns each subject. Read before writing code.
20
+ - [llms-full.txt](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/llms-full.txt): AGENTS.md and every document under docs/ concatenated into one file, for a single fetch.
21
21
 
22
22
  ## Reference
23
23
 
24
- - [Bridge contract](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/docs/bridge-contract.md): Every observable key, every command, the three error shapes, and the capability matrix by native version.
25
- - [Machine-readable contract](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/contract/bridge-contract.json): The same contract as JSON. Also importable as `@condorinst/mobile-bridge/contract`.
26
- - [Limits](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/docs/limits.md): Every hard limit — payload size, rate limits, bundle size, timeouts — with what happens when you cross it.
27
- - [Troubleshooting](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/docs/troubleshooting.md): Why a command did nothing, and why the device list never came. Silence is the platform's dominant failure mode.
28
- - [Testing and publishing](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/docs/device-testing.md): The browser harness and scripted tests, what `validate` checks, publishing from the command line, the phone, and where errors go.
29
- - [TypeScript declarations](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/dist/index.d.ts): Authoritative payload shapes, with documentation on every member.
24
+ - [Bridge contract](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/docs/bridge-contract.md): Every observable key, every command, the three error shapes, and the capability matrix by native version.
25
+ - [Machine-readable contract](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/contract/bridge-contract.json): The same contract as JSON. Also importable as `@condorinst/mobile-bridge/contract`.
26
+ - [Limits](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/docs/limits.md): Every hard limit — payload size, rate limits, bundle size, timeouts — with what happens when you cross it.
27
+ - [Troubleshooting](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/docs/troubleshooting.md): Why a command did nothing, and why the device list never came. Silence is the platform's dominant failure mode.
28
+ - [Testing and publishing](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/docs/device-testing.md): The browser harness and scripted tests, what `validate` checks, publishing from the command line, the phone, and where errors go.
29
+ - [TypeScript declarations](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/dist/index.d.ts): Authoritative payload shapes, with documentation on every member.
30
30
 
31
31
  ## Guides
32
32
 
33
- - [Pilot onboarding](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/docs/pilot-onboarding.md): Checklist from zero to a bundle delivered to Condor.
34
- - [README](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/README.md): Package overview, install, quickstart.
35
- - [CHANGELOG](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/CHANGELOG.md): When each capability was introduced. The most precise record of what a given native version supports.
33
+ - [Pilot onboarding](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/docs/pilot-onboarding.md): Checklist from zero to a bundle delivered to Condor.
34
+ - [README](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/README.md): Package overview, install, quickstart.
35
+ - [CHANGELOG](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/CHANGELOG.md): When each capability was introduced. The most precise record of what a given native version supports.
36
36
 
37
37
  ## Examples
38
38
 
39
- - [Minimal home](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.0/examples/minimal-home/src/main.ts): A complete, working client with the reference boot sequence. Copy this as your starting point, and run it with `npx condor-mobile-bridge dev`.
39
+ - [Minimal home](https://cdn.jsdelivr.net/npm/@condorinst/mobile-bridge@0.23.1/examples/minimal-home/src/main.ts): A complete, working client with the reference boot sequence. Copy this as your starting point, and run it with `npx condor-mobile-bridge dev`.
40
40
 
41
41
  ## Optional
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@condorinst/mobile-bridge",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "TypeScript SDK for the JS↔Native bridge of the Condor white-label mobile app.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "private": false,