@camstack/addon-provider-reolink 1.2.167 → 1.2.169
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.
- package/dist/addon.js +192 -112
- package/dist/addon.mjs +192 -112
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7503,7 +7503,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7503
7503
|
return DeviceRole;
|
|
7504
7504
|
}({});
|
|
7505
7505
|
//#endregion
|
|
7506
|
-
//#region ../types/dist/composition-
|
|
7506
|
+
//#region ../types/dist/composition-D7ULvLdD.mjs
|
|
7507
7507
|
/**
|
|
7508
7508
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7509
7509
|
*
|
|
@@ -7557,20 +7557,20 @@ function portable(target) {
|
|
|
7557
7557
|
}
|
|
7558
7558
|
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
7559
7559
|
/**
|
|
7560
|
-
*
|
|
7561
|
-
*
|
|
7560
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
7561
|
+
* pure evaluator of its EDGE.
|
|
7562
7562
|
*
|
|
7563
|
-
*
|
|
7564
|
-
*
|
|
7565
|
-
*
|
|
7566
|
-
*
|
|
7567
|
-
*
|
|
7568
|
-
*
|
|
7563
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
7564
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7565
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
7566
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
7567
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
7568
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
7569
7569
|
*
|
|
7570
|
-
* ⚠
|
|
7571
|
-
*
|
|
7572
|
-
*
|
|
7573
|
-
*
|
|
7570
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
7571
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
7572
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
7573
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
7574
7574
|
*/
|
|
7575
7575
|
/**
|
|
7576
7576
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -9197,22 +9197,22 @@ var CLASS_MAP_MACRO_TARGETS = [
|
|
|
9197
9197
|
"package"
|
|
9198
9198
|
];
|
|
9199
9199
|
/**
|
|
9200
|
-
*
|
|
9201
|
-
*
|
|
9200
|
+
* The FIRST-LEVEL macro classes: those an object detector emits and that
|
|
9201
|
+
* an operator can select.
|
|
9202
9202
|
*
|
|
9203
|
-
*
|
|
9203
|
+
* They are the three offered by the `object-detection` step
|
|
9204
9204
|
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
9205
|
-
* `enabledMacroClasses`). `package`
|
|
9206
|
-
* `MACRO_LABELS` —
|
|
9207
|
-
* `package-detection`,
|
|
9208
|
-
*
|
|
9205
|
+
* `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
|
|
9206
|
+
* `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
|
|
9207
|
+
* `package-detection`, whose enablement is driven by zones, and offering the
|
|
9208
|
+
* same word twice has already made an operator turn on the COCO proxy
|
|
9209
9209
|
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
9210
9210
|
*
|
|
9211
|
-
*
|
|
9212
|
-
*
|
|
9213
|
-
* (`types/detection.ts`);
|
|
9214
|
-
* (`RecordingTriggers.objectClasses`)
|
|
9215
|
-
*
|
|
9211
|
+
* ONE list. Before today the same three were hand-written in the step's offer
|
|
9212
|
+
* and a second time as the union `FirstLevelMacro`
|
|
9213
|
+
* (`types/detection.ts`); a third copy for the recording trigger
|
|
9214
|
+
* (`RecordingTriggers.objectClasses`) would have made the later divergence
|
|
9215
|
+
* invisible.
|
|
9216
9216
|
*/
|
|
9217
9217
|
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
9218
9218
|
"person",
|
|
@@ -9277,17 +9277,17 @@ var RecordingStorageModeSchema = _enum([
|
|
|
9277
9277
|
"on-device-decision"
|
|
9278
9278
|
]);
|
|
9279
9279
|
/**
|
|
9280
|
-
*
|
|
9281
|
-
*
|
|
9280
|
+
* The macro classes that can open a recording window — the same
|
|
9281
|
+
* three offered by the `object-detection` step, from ONE list
|
|
9282
9282
|
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
9283
9283
|
*/
|
|
9284
9284
|
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
9285
9285
|
/**
|
|
9286
|
-
* True
|
|
9286
|
+
* True when `values` does not repeat an element.
|
|
9287
9287
|
*
|
|
9288
|
-
*
|
|
9289
|
-
*
|
|
9290
|
-
*
|
|
9288
|
+
* A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
|
|
9289
|
+
* becomes a SOURCE in `bandTriggerSources`, and the same source twice
|
|
9290
|
+
* would count its windows twice in `segmentMissedByMs`.
|
|
9291
9291
|
*/
|
|
9292
9292
|
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
9293
9293
|
/** Which detectors trigger an `events`-mode band. */
|
|
@@ -9295,34 +9295,34 @@ var RecordingTriggersSchema = object({
|
|
|
9295
9295
|
motion: boolean().optional(),
|
|
9296
9296
|
audioThresholdDbfs: number().optional(),
|
|
9297
9297
|
/**
|
|
9298
|
-
*
|
|
9299
|
-
*
|
|
9300
|
-
*
|
|
9301
|
-
*
|
|
9298
|
+
* The macro classes whose detection opens a window. ABSENT = the source
|
|
9299
|
+
* is not listened to; an EMPTY array is rejected, because "events band, object
|
|
9300
|
+
* trigger on, no class" is the same shape "enabled and records
|
|
9301
|
+
* nothing, forever" that `eventsBandCanEverDemand` is written against.
|
|
9302
9302
|
*
|
|
9303
|
-
*
|
|
9304
|
-
*
|
|
9305
|
-
* `minConfidence<Macro>`
|
|
9306
|
-
* (`source: 'onboard'`)
|
|
9307
|
-
*
|
|
9303
|
+
* The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
|
|
9304
|
+
* those that went through `enabledMacroClasses`, the
|
|
9305
|
+
* `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
|
|
9306
|
+
* (`source: 'onboard'`) goes through none of those gates and does NOT open
|
|
9307
|
+
* windows — see `recorder/object-trigger.ts`.
|
|
9308
9308
|
*/
|
|
9309
9309
|
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
9310
9310
|
/**
|
|
9311
|
-
*
|
|
9312
|
-
*
|
|
9311
|
+
* The LINKED devices whose RISING EDGE opens a window. Absent = the source
|
|
9312
|
+
* is not listened to; an empty array is rejected for the same reason as
|
|
9313
9313
|
* `objectClasses`.
|
|
9314
9314
|
*
|
|
9315
|
-
*
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9318
|
-
*
|
|
9319
|
-
* device (D12) —
|
|
9315
|
+
* These are SOURCE device ids, not cameras: the band names them, so the
|
|
9316
|
+
* hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
|
|
9317
|
+
* does no RPC. The OFFER from which the operator picks them is another question, and
|
|
9318
|
+
* is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
9319
|
+
* device (D12) — never a global list of caps.
|
|
9320
9320
|
*
|
|
9321
|
-
*
|
|
9322
|
-
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`)
|
|
9323
|
-
*
|
|
9324
|
-
*
|
|
9325
|
-
*
|
|
9321
|
+
* What "high" means depends on the device TYPE and is not decided here:
|
|
9322
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
|
|
9323
|
+
* the same one as the composite doorbell (D671). And it is the EDGE, not
|
|
9324
|
+
* the level: a contact found already open at runner restart does not
|
|
9325
|
+
* record.
|
|
9326
9326
|
*/
|
|
9327
9327
|
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
9328
9328
|
});
|
|
@@ -10574,7 +10574,7 @@ function findTimezone(id) {
|
|
|
10574
10574
|
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
10575
10575
|
* thing: the logging settings document on the `system` cap. Two authorities
|
|
10576
10576
|
* over the values is the exact defect
|
|
10577
|
-
* `docs/design/plans/2026-08-26-
|
|
10577
|
+
* `docs/design/plans/2026-08-26-per-component-logging.md` was written to
|
|
10578
10578
|
* remove; re-introducing it from the cure side would be grotesque.
|
|
10579
10579
|
*
|
|
10580
10580
|
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
@@ -14486,7 +14486,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
14486
14486
|
*
|
|
14487
14487
|
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
14488
14488
|
* was wrong — corrected 2026-08-26 after the hop map
|
|
14489
|
-
* (`docs/design/2026-08-26-
|
|
14489
|
+
* (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
|
|
14490
14490
|
* There is **no Zod parse at all** between the door and the engine: the
|
|
14491
14491
|
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
14492
14492
|
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
@@ -15462,7 +15462,17 @@ var SiteZoneSchema = object({
|
|
|
15462
15462
|
var ProviderStatusSchema = object({
|
|
15463
15463
|
connected: boolean(),
|
|
15464
15464
|
deviceCount: number(),
|
|
15465
|
-
error: string().optional()
|
|
15465
|
+
error: string().optional(),
|
|
15466
|
+
/**
|
|
15467
|
+
* `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
|
|
15468
|
+
* — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
|
|
15469
|
+
* which every provider bundles, so only a provider BUILT from D696-amended
|
|
15470
|
+
* code says it. ABSENT means an older provider that may still write it (raw
|
|
15471
|
+
* VMD writes, a boot seed), and the orchestrator's provider gate keeps that
|
|
15472
|
+
* provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
|
|
15473
|
+
* — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
|
|
15474
|
+
*/
|
|
15475
|
+
motionSliceWriter: literal("orchestrator").optional()
|
|
15466
15476
|
});
|
|
15467
15477
|
object({
|
|
15468
15478
|
externalId: string(),
|
|
@@ -16679,7 +16689,7 @@ method(object({
|
|
|
16679
16689
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
16680
16690
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
16681
16691
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
16682
|
-
* ricontrolliamo tutti questi punti"
|
|
16692
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
16683
16693
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
16684
16694
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
16685
16695
|
* be READ.
|
|
@@ -20964,6 +20974,29 @@ object({
|
|
|
20964
20974
|
firstAt: number(),
|
|
20965
20975
|
lastAt: number()
|
|
20966
20976
|
});
|
|
20977
|
+
var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
|
|
20978
|
+
var NcAlarmDelaySecSchema = number().int().min(0).max(600);
|
|
20979
|
+
var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
|
|
20980
|
+
var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
|
|
20981
|
+
var NcAlarmModeDelaysListSchema = array(object({
|
|
20982
|
+
mode: AlarmArmModeSchema,
|
|
20983
|
+
exitDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20984
|
+
entryDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20985
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
|
|
20986
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20987
|
+
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20988
|
+
mode: AlarmArmModeSchema,
|
|
20989
|
+
exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20990
|
+
entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20991
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
|
|
20992
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20993
|
+
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20994
|
+
var NcAlarmNonBlockingEditSchema = object({
|
|
20995
|
+
mode: AlarmArmModeSchema,
|
|
20996
|
+
deviceId: number().int().positive(),
|
|
20997
|
+
/** true = on the list (may be open, does not block); false = off the list (blocks). */
|
|
20998
|
+
nonBlocking: boolean()
|
|
20999
|
+
});
|
|
20967
21000
|
/**
|
|
20968
21001
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
20969
21002
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
@@ -20972,10 +21005,10 @@ object({
|
|
|
20972
21005
|
var NcAlarmNonBlockingListSchema = array(object({
|
|
20973
21006
|
mode: AlarmArmModeSchema,
|
|
20974
21007
|
deviceIds: array(number().int()).max(200)
|
|
20975
|
-
})).max(8).refine(
|
|
21008
|
+
})).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
20976
21009
|
/**
|
|
20977
|
-
* The three durations
|
|
20978
|
-
* transitions, and which openings each mode tolerates.
|
|
21010
|
+
* The three durations — global, and per mode since D697 — the panel's state
|
|
21011
|
+
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
20979
21012
|
*
|
|
20980
21013
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
20981
21014
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -20985,15 +21018,15 @@ var NcAlarmNonBlockingListSchema = array(object({
|
|
|
20985
21018
|
*/
|
|
20986
21019
|
var NcAlarmSettingsSchema = object({
|
|
20987
21020
|
/** Grace period between arming and the mode taking effect. 0 = immediate. */
|
|
20988
|
-
exitDelaySec:
|
|
21021
|
+
exitDelaySec: NcAlarmDelaySecSchema,
|
|
20989
21022
|
/** Grace period between a trigger and the alarm firing. 0 = immediate. */
|
|
20990
|
-
entryDelaySec:
|
|
21023
|
+
entryDelaySec: NcAlarmDelaySecSchema,
|
|
20991
21024
|
/**
|
|
20992
21025
|
* How long `triggered` lasts before the panel re-arms itself.
|
|
20993
21026
|
* **0 = until an operator disarms it** — the behaviour before this field
|
|
20994
21027
|
* existed, and therefore what an untouched install keeps doing.
|
|
20995
21028
|
*/
|
|
20996
|
-
triggeredDurationSec:
|
|
21029
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema,
|
|
20997
21030
|
/**
|
|
20998
21031
|
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
20999
21032
|
* remove after one release. Optional so an older admin's patch (which still
|
|
@@ -21016,17 +21049,30 @@ var NcAlarmSettingsSchema = object({
|
|
|
21016
21049
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
21017
21050
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
21018
21051
|
*/
|
|
21019
|
-
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
21052
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
21053
|
+
/**
|
|
21054
|
+
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
21055
|
+
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
21056
|
+
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
21057
|
+
*/
|
|
21058
|
+
modeDelays: NcAlarmModeDelaysListSchema.default([])
|
|
21020
21059
|
});
|
|
21021
21060
|
/**
|
|
21022
21061
|
* Every field optional — a tab edits one control at a time.
|
|
21023
21062
|
*
|
|
21024
|
-
* `nonBlocking`
|
|
21025
|
-
* remove an inner `.default()`, so a patch that never
|
|
21026
|
-
* parse to `
|
|
21027
|
-
* (the same trap {@link NcRulePatchSchema} documents).
|
|
21063
|
+
* `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
|
|
21064
|
+
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
21065
|
+
* named the field would parse to `[]` and wipe every mode's list on an
|
|
21066
|
+
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
21067
|
+
* `modeDelays` means EDITS, not the stored overrides.
|
|
21028
21068
|
*/
|
|
21029
|
-
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21069
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21070
|
+
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
21071
|
+
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
21072
|
+
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
21073
|
+
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
21074
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
21075
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
|
|
21030
21076
|
/**
|
|
21031
21077
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
21032
21078
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -21126,6 +21172,28 @@ var NcAlarmConfigSchema = object({
|
|
|
21126
21172
|
*/
|
|
21127
21173
|
live: NcAlarmLiveSchema.optional()
|
|
21128
21174
|
});
|
|
21175
|
+
var NcAlarmSensorReadingSchema = _enum([
|
|
21176
|
+
"open",
|
|
21177
|
+
"closed",
|
|
21178
|
+
"unknown",
|
|
21179
|
+
"not-opening"
|
|
21180
|
+
]);
|
|
21181
|
+
/** One device's state as the alarm reads it — the classifier the arm check uses. */
|
|
21182
|
+
var NcAlarmSensorStateSchema = object({
|
|
21183
|
+
deviceId: number().int().positive(),
|
|
21184
|
+
reading: NcAlarmSensorReadingSchema,
|
|
21185
|
+
/** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
|
|
21186
|
+
state: string().nullable(),
|
|
21187
|
+
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
21188
|
+
unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
|
|
21189
|
+
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
21190
|
+
online: boolean().nullable()
|
|
21191
|
+
});
|
|
21192
|
+
var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
|
|
21193
|
+
var NcAlarmSensorsSchema = object({
|
|
21194
|
+
sensors: array(NcAlarmSensorStateSchema),
|
|
21195
|
+
readAt: number().int().nonnegative()
|
|
21196
|
+
});
|
|
21129
21197
|
/**
|
|
21130
21198
|
* ONE rule's demand on ONE camera's clip ring.
|
|
21131
21199
|
*
|
|
@@ -21216,7 +21284,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
21216
21284
|
}), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
|
|
21217
21285
|
kind: "mutation",
|
|
21218
21286
|
auth: "admin"
|
|
21219
|
-
});
|
|
21287
|
+
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
21220
21288
|
/**
|
|
21221
21289
|
* Zod schemas for persisted record types.
|
|
21222
21290
|
*
|
|
@@ -22368,14 +22436,14 @@ var TrackSchema = object({
|
|
|
22368
22436
|
* `derive-returned-null tile=standin`,
|
|
22369
22437
|
* `native-tile tile=native no-key-frame-at-close`, …) written at close and
|
|
22370
22438
|
* CLEARED by the late-keyFrame upgrade when a native tile lands after all.
|
|
22371
|
-
* The operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
22439
|
+
* The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
|
|
22372
22440
|
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
22373
22441
|
*
|
|
22374
22442
|
* **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
|
|
22375
22443
|
* the TILE ranked below native, so a track whose thumbnail landed natively
|
|
22376
22444
|
* while its key frame missed carried no reason at all — three of the four
|
|
22377
22445
|
* `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
|
|
22378
|
-
* that shape, and their "niente ultimo" had no cause anywhere on the row.
|
|
22446
|
+
* that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
|
|
22379
22447
|
* The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
|
|
22380
22448
|
* lastFrame copy source`), so its absence is now on this line whatever the
|
|
22381
22449
|
* tile ended up being.
|
|
@@ -22462,7 +22530,7 @@ var MotionEventSchema = object({
|
|
|
22462
22530
|
/**
|
|
22463
22531
|
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
22464
22532
|
* first entry is always `0`) of every genuine off→on transition the
|
|
22465
|
-
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
22533
|
+
* episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
|
|
22466
22534
|
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
22467
22535
|
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
22468
22536
|
* explicit `false` mid-episode and then resumes before the quiet window
|
|
@@ -27919,7 +27987,7 @@ var ClipPlaybackSchema = object({
|
|
|
27919
27987
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
27920
27988
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
27921
27989
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
27922
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
27990
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
27923
27991
|
* D558 "Considered and not taken").
|
|
27924
27992
|
*/
|
|
27925
27993
|
var ClipWakeSchema = _enum(["authorised"]);
|
|
@@ -28315,7 +28383,7 @@ var videoclipsCapability = {
|
|
|
28315
28383
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
28316
28384
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
28317
28385
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
28318
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
28386
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
28319
28387
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
28320
28388
|
* retention policy; footage the camera itself holds is the same question,
|
|
28321
28389
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -28376,7 +28444,7 @@ var videoclipsCapability = {
|
|
|
28376
28444
|
* It replaced `sources?: string[]`, a VIEW filter over source ids that
|
|
28377
28445
|
* assumed the answer was a fan-out over everything a camera has. The
|
|
28378
28446
|
* operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
|
|
28379
|
-
* solo"* — so the list is asked of one provider at a time and there is
|
|
28447
|
+
* solo"* [there is only one user] — so the list is asked of one provider at a time and there is
|
|
28380
28448
|
* nothing to filter out of it.
|
|
28381
28449
|
*/
|
|
28382
28450
|
provider: string().min(1)
|
|
@@ -36697,7 +36765,7 @@ var ReadGopBytesResultSchema = object({
|
|
|
36697
36765
|
/**
|
|
36698
36766
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
36699
36767
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
36700
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
36768
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
36701
36769
|
* a replay needs several seconds of native pixels, not one frame.
|
|
36702
36770
|
*
|
|
36703
36771
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -41502,13 +41570,14 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
41502
41570
|
async getStatus() {
|
|
41503
41571
|
const all = await this.ctx.kernel.devices?.getAll() ?? [];
|
|
41504
41572
|
const summary = this.restoreFailureSummary();
|
|
41505
|
-
|
|
41573
|
+
const base = {
|
|
41506
41574
|
connected: true,
|
|
41507
|
-
deviceCount: all.length
|
|
41575
|
+
deviceCount: all.length,
|
|
41576
|
+
motionSliceWriter: "orchestrator"
|
|
41508
41577
|
};
|
|
41578
|
+
if (summary === null) return base;
|
|
41509
41579
|
return {
|
|
41510
|
-
|
|
41511
|
-
deviceCount: all.length,
|
|
41580
|
+
...base,
|
|
41512
41581
|
error: summary
|
|
41513
41582
|
};
|
|
41514
41583
|
}
|
|
@@ -47107,6 +47176,12 @@ Object.freeze({
|
|
|
47107
47176
|
addonId: null,
|
|
47108
47177
|
access: "view"
|
|
47109
47178
|
},
|
|
47179
|
+
"notificationRules.getAlarmSensors": {
|
|
47180
|
+
capName: "notification-rules",
|
|
47181
|
+
capScope: "system",
|
|
47182
|
+
addonId: null,
|
|
47183
|
+
access: "view"
|
|
47184
|
+
},
|
|
47110
47185
|
"notificationRules.getClipRetentionAsks": {
|
|
47111
47186
|
capName: "notification-rules",
|
|
47112
47187
|
capScope: "system",
|
|
@@ -51590,6 +51665,11 @@ Object.freeze({
|
|
|
51590
51665
|
form: "single",
|
|
51591
51666
|
optional: false
|
|
51592
51667
|
}],
|
|
51668
|
+
"notificationRules.getAlarmSensors": [{
|
|
51669
|
+
name: "deviceIds",
|
|
51670
|
+
form: "array",
|
|
51671
|
+
optional: false
|
|
51672
|
+
}],
|
|
51593
51673
|
"notificationRules.setDeviceMuted": [{
|
|
51594
51674
|
name: "deviceId",
|
|
51595
51675
|
form: "single",
|
|
@@ -53387,7 +53467,7 @@ var PreviewTextField = string().max(200);
|
|
|
53387
53467
|
* Whether the notification's preview is a STILL or a short animation.
|
|
53388
53468
|
*
|
|
53389
53469
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
53390
|
-
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
53470
|
+
* rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
|
|
53391
53471
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
53392
53472
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
53393
53473
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -161056,37 +161136,37 @@ function buildOnboardWrites(patch, schedule) {
|
|
|
161056
161136
|
//#endregion
|
|
161057
161137
|
//#region src/battery-charging.ts
|
|
161058
161138
|
/**
|
|
161059
|
-
*
|
|
161060
|
-
*
|
|
161061
|
-
*
|
|
161062
|
-
*
|
|
161063
|
-
*
|
|
161064
|
-
* - `adapterStatus` —
|
|
161065
|
-
* (
|
|
161066
|
-
*
|
|
161067
|
-
* `mapHubAdapterStatus` in `reolink-hub.ts`),
|
|
161068
|
-
*
|
|
161069
|
-
* - `chargeStatus` —
|
|
161070
|
-
* 2
|
|
161071
|
-
*
|
|
161072
|
-
*
|
|
161073
|
-
*
|
|
161074
|
-
*
|
|
161075
|
-
*
|
|
161076
|
-
* 1, firmware 2026)
|
|
161077
|
-
*
|
|
161078
|
-
*
|
|
161079
|
-
*
|
|
161080
|
-
* 2026-09-05
|
|
161081
|
-
*
|
|
161082
|
-
*
|
|
161083
|
-
*
|
|
161084
|
-
*
|
|
161085
|
-
*
|
|
161086
|
-
* `'unknown'` —
|
|
161087
|
-
* `nullable` (D315).
|
|
161088
|
-
* push
|
|
161089
|
-
*
|
|
161139
|
+
* From `adapterStatus` + `chargeStatus` to the power source.
|
|
161140
|
+
*
|
|
161141
|
+
* The two fields answer TWO different questions, and confusing them is the bug that
|
|
161142
|
+
* this module exists to close:
|
|
161143
|
+
*
|
|
161144
|
+
* - `adapterStatus` — is the power CONNECTED? The firmware sends 0/1/2
|
|
161145
|
+
* (none · DC adapter · solar panel) and the hub boundary
|
|
161146
|
+
* translates it into `'none' | 'dc' | 'solarPanel'` (`mapHubChargeStatus` and
|
|
161147
|
+
* `mapHubAdapterStatus` in `reolink-hub.ts`), because the vocabulary of the
|
|
161148
|
+
* standalone path is already strings.
|
|
161149
|
+
* - `chargeStatus` — what is the CELL doing? 0 stopped · 1 charging ·
|
|
161150
|
+
* 2 fully charged.
|
|
161151
|
+
*
|
|
161152
|
+
* The old derivation consulted the adapter ONLY to look for 'solar' in it, and
|
|
161153
|
+
* a connected DC fell into the fallback `'none'`. Two Argus 3E units hid it by
|
|
161154
|
+
* chance: full and connected they answer `chargeStatus: 2`, which the `isCharging`
|
|
161155
|
+
* branch mapped to `'dc'` for the wrong reason. The Argus MagiCam (batteryVersion
|
|
161156
|
+
* 1, firmware 2026) permanently connected answers `chargeStatus: 0`, and for
|
|
161157
|
+
* its whole life it was reported as NOT charging.
|
|
161158
|
+
*
|
|
161159
|
+
* That `adapterStatus` is a real signal and not a constant is MEASURED: on
|
|
161160
|
+
* 2026-09-05 the operator unplugged device 3628 and the raw payload
|
|
161161
|
+
* went from `adapterStatus: 1` to `0`, with `chargeStatus: 0` on both
|
|
161162
|
+
* sides — i.e. `chargeStatus` alone does NOT distinguish the two states.
|
|
161163
|
+
*
|
|
161164
|
+
* Two absent fields are NOT `'none'`: `'none'` is a negative the firmware
|
|
161165
|
+
* has stated ("no adapter, cell stopped"), the absence of both is
|
|
161166
|
+
* `'unknown'` — the same boundary `percentage` closed by becoming
|
|
161167
|
+
* `nullable` (D315). The caller (`mapBatteryInfo`) does not arrive here with a
|
|
161168
|
+
* push that says nothing about power: `reportsPowerSource` filters it out first and
|
|
161169
|
+
* keeps the previous belief.
|
|
161090
161170
|
*/
|
|
161091
161171
|
function deriveChargingSource(adapterStatus, chargeStatus) {
|
|
161092
161172
|
if (adapterStatus === void 0 && chargeStatus === void 0) return "unknown";
|
package/dist/addon.mjs
CHANGED
|
@@ -7496,7 +7496,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7496
7496
|
return DeviceRole;
|
|
7497
7497
|
}({});
|
|
7498
7498
|
//#endregion
|
|
7499
|
-
//#region ../types/dist/composition-
|
|
7499
|
+
//#region ../types/dist/composition-D7ULvLdD.mjs
|
|
7500
7500
|
/**
|
|
7501
7501
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7502
7502
|
*
|
|
@@ -7550,20 +7550,20 @@ function portable(target) {
|
|
|
7550
7550
|
}
|
|
7551
7551
|
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
7552
7552
|
/**
|
|
7553
|
-
*
|
|
7554
|
-
*
|
|
7553
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
7554
|
+
* pure evaluator of its EDGE.
|
|
7555
7555
|
*
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
*
|
|
7559
|
-
*
|
|
7560
|
-
*
|
|
7561
|
-
*
|
|
7556
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
7557
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7558
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
7559
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
7560
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
7561
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
7562
7562
|
*
|
|
7563
|
-
* ⚠
|
|
7564
|
-
*
|
|
7565
|
-
*
|
|
7566
|
-
*
|
|
7563
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
7564
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
7565
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
7566
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
7567
7567
|
*/
|
|
7568
7568
|
/**
|
|
7569
7569
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -9190,22 +9190,22 @@ var CLASS_MAP_MACRO_TARGETS = [
|
|
|
9190
9190
|
"package"
|
|
9191
9191
|
];
|
|
9192
9192
|
/**
|
|
9193
|
-
*
|
|
9194
|
-
*
|
|
9193
|
+
* The FIRST-LEVEL macro classes: those an object detector emits and that
|
|
9194
|
+
* an operator can select.
|
|
9195
9195
|
*
|
|
9196
|
-
*
|
|
9196
|
+
* They are the three offered by the `object-detection` step
|
|
9197
9197
|
* (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
|
|
9198
|
-
* `enabledMacroClasses`). `package`
|
|
9199
|
-
* `MACRO_LABELS` —
|
|
9200
|
-
* `package-detection`,
|
|
9201
|
-
*
|
|
9198
|
+
* `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
|
|
9199
|
+
* `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
|
|
9200
|
+
* `package-detection`, whose enablement is driven by zones, and offering the
|
|
9201
|
+
* same word twice has already made an operator turn on the COCO proxy
|
|
9202
9202
|
* (suitcase/backpack/handbag) lasciando spento il detector dedicato.
|
|
9203
9203
|
*
|
|
9204
|
-
*
|
|
9205
|
-
*
|
|
9206
|
-
* (`types/detection.ts`);
|
|
9207
|
-
* (`RecordingTriggers.objectClasses`)
|
|
9208
|
-
*
|
|
9204
|
+
* ONE list. Before today the same three were hand-written in the step's offer
|
|
9205
|
+
* and a second time as the union `FirstLevelMacro`
|
|
9206
|
+
* (`types/detection.ts`); a third copy for the recording trigger
|
|
9207
|
+
* (`RecordingTriggers.objectClasses`) would have made the later divergence
|
|
9208
|
+
* invisible.
|
|
9209
9209
|
*/
|
|
9210
9210
|
var FIRST_LEVEL_MACRO_CLASSES = [
|
|
9211
9211
|
"person",
|
|
@@ -9270,17 +9270,17 @@ var RecordingStorageModeSchema = _enum([
|
|
|
9270
9270
|
"on-device-decision"
|
|
9271
9271
|
]);
|
|
9272
9272
|
/**
|
|
9273
|
-
*
|
|
9274
|
-
*
|
|
9273
|
+
* The macro classes that can open a recording window — the same
|
|
9274
|
+
* three offered by the `object-detection` step, from ONE list
|
|
9275
9275
|
* ({@link FIRST_LEVEL_MACRO_CLASSES}).
|
|
9276
9276
|
*/
|
|
9277
9277
|
var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
|
|
9278
9278
|
/**
|
|
9279
|
-
* True
|
|
9279
|
+
* True when `values` does not repeat an element.
|
|
9280
9280
|
*
|
|
9281
|
-
*
|
|
9282
|
-
*
|
|
9283
|
-
*
|
|
9281
|
+
* A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
|
|
9282
|
+
* becomes a SOURCE in `bandTriggerSources`, and the same source twice
|
|
9283
|
+
* would count its windows twice in `segmentMissedByMs`.
|
|
9284
9284
|
*/
|
|
9285
9285
|
var noDuplicates = (values) => new Set(values).size === values.length;
|
|
9286
9286
|
/** Which detectors trigger an `events`-mode band. */
|
|
@@ -9288,34 +9288,34 @@ var RecordingTriggersSchema = object({
|
|
|
9288
9288
|
motion: boolean().optional(),
|
|
9289
9289
|
audioThresholdDbfs: number().optional(),
|
|
9290
9290
|
/**
|
|
9291
|
-
*
|
|
9292
|
-
*
|
|
9293
|
-
*
|
|
9294
|
-
*
|
|
9291
|
+
* The macro classes whose detection opens a window. ABSENT = the source
|
|
9292
|
+
* is not listened to; an EMPTY array is rejected, because "events band, object
|
|
9293
|
+
* trigger on, no class" is the same shape "enabled and records
|
|
9294
|
+
* nothing, forever" that `eventsBandCanEverDemand` is written against.
|
|
9295
9295
|
*
|
|
9296
|
-
*
|
|
9297
|
-
*
|
|
9298
|
-
* `minConfidence<Macro>`
|
|
9299
|
-
* (`source: 'onboard'`)
|
|
9300
|
-
*
|
|
9296
|
+
* The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
|
|
9297
|
+
* those that went through `enabledMacroClasses`, the
|
|
9298
|
+
* `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
|
|
9299
|
+
* (`source: 'onboard'`) goes through none of those gates and does NOT open
|
|
9300
|
+
* windows — see `recorder/object-trigger.ts`.
|
|
9301
9301
|
*/
|
|
9302
9302
|
objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
|
|
9303
9303
|
/**
|
|
9304
|
-
*
|
|
9305
|
-
*
|
|
9304
|
+
* The LINKED devices whose RISING EDGE opens a window. Absent = the source
|
|
9305
|
+
* is not listened to; an empty array is rejected for the same reason as
|
|
9306
9306
|
* `objectClasses`.
|
|
9307
9307
|
*
|
|
9308
|
-
*
|
|
9309
|
-
*
|
|
9310
|
-
*
|
|
9311
|
-
*
|
|
9312
|
-
* device (D12) —
|
|
9308
|
+
* These are SOURCE device ids, not cameras: the band names them, so the
|
|
9309
|
+
* hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
|
|
9310
|
+
* does no RPC. The OFFER from which the operator picks them is another question, and
|
|
9311
|
+
* is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
|
|
9312
|
+
* device (D12) — never a global list of caps.
|
|
9313
9313
|
*
|
|
9314
|
-
*
|
|
9315
|
-
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`)
|
|
9316
|
-
*
|
|
9317
|
-
*
|
|
9318
|
-
*
|
|
9314
|
+
* What "high" means depends on the device TYPE and is not decided here:
|
|
9315
|
+
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
|
|
9316
|
+
* the same one as the composite doorbell (D671). And it is the EDGE, not
|
|
9317
|
+
* the level: a contact found already open at runner restart does not
|
|
9318
|
+
* record.
|
|
9319
9319
|
*/
|
|
9320
9320
|
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
9321
9321
|
});
|
|
@@ -10567,7 +10567,7 @@ function findTimezone(id) {
|
|
|
10567
10567
|
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
10568
10568
|
* thing: the logging settings document on the `system` cap. Two authorities
|
|
10569
10569
|
* over the values is the exact defect
|
|
10570
|
-
* `docs/design/plans/2026-08-26-
|
|
10570
|
+
* `docs/design/plans/2026-08-26-per-component-logging.md` was written to
|
|
10571
10571
|
* remove; re-introducing it from the cure side would be grotesque.
|
|
10572
10572
|
*
|
|
10573
10573
|
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
@@ -14479,7 +14479,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
|
|
|
14479
14479
|
*
|
|
14480
14480
|
* ⚠ An earlier version of this comment blamed Zod stripping, and that
|
|
14481
14481
|
* was wrong — corrected 2026-08-26 after the hop map
|
|
14482
|
-
* (`docs/design/2026-08-26-
|
|
14482
|
+
* (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
|
|
14483
14483
|
* There is **no Zod parse at all** between the door and the engine: the
|
|
14484
14484
|
* dispatcher forwards the payload verbatim and UDS carries it whole. A
|
|
14485
14485
|
* field declared here reaches `SqliteSettingsBackend` either way.
|
|
@@ -15455,7 +15455,17 @@ var SiteZoneSchema = object({
|
|
|
15455
15455
|
var ProviderStatusSchema = object({
|
|
15456
15456
|
connected: boolean(),
|
|
15457
15457
|
deviceCount: number(),
|
|
15458
|
-
error: string().optional()
|
|
15458
|
+
error: string().optional(),
|
|
15459
|
+
/**
|
|
15460
|
+
* `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
|
|
15461
|
+
* — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
|
|
15462
|
+
* which every provider bundles, so only a provider BUILT from D696-amended
|
|
15463
|
+
* code says it. ABSENT means an older provider that may still write it (raw
|
|
15464
|
+
* VMD writes, a boot seed), and the orchestrator's provider gate keeps that
|
|
15465
|
+
* provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
|
|
15466
|
+
* — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
|
|
15467
|
+
*/
|
|
15468
|
+
motionSliceWriter: literal("orchestrator").optional()
|
|
15459
15469
|
});
|
|
15460
15470
|
object({
|
|
15461
15471
|
externalId: string(),
|
|
@@ -16672,7 +16682,7 @@ method(object({
|
|
|
16672
16682
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
16673
16683
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
16674
16684
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
16675
|
-
* ricontrolliamo tutti questi punti"
|
|
16685
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
16676
16686
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
16677
16687
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
16678
16688
|
* be READ.
|
|
@@ -20957,6 +20967,29 @@ object({
|
|
|
20957
20967
|
firstAt: number(),
|
|
20958
20968
|
lastAt: number()
|
|
20959
20969
|
});
|
|
20970
|
+
var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
|
|
20971
|
+
var NcAlarmDelaySecSchema = number().int().min(0).max(600);
|
|
20972
|
+
var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
|
|
20973
|
+
var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
|
|
20974
|
+
var NcAlarmModeDelaysListSchema = array(object({
|
|
20975
|
+
mode: AlarmArmModeSchema,
|
|
20976
|
+
exitDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20977
|
+
entryDelaySec: NcAlarmDelaySecSchema.optional(),
|
|
20978
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
|
|
20979
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
|
|
20980
|
+
var NcAlarmModeDelaysEditListSchema = array(object({
|
|
20981
|
+
mode: AlarmArmModeSchema,
|
|
20982
|
+
exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20983
|
+
entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
|
|
20984
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
|
|
20985
|
+
})).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
|
|
20986
|
+
/** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
|
|
20987
|
+
var NcAlarmNonBlockingEditSchema = object({
|
|
20988
|
+
mode: AlarmArmModeSchema,
|
|
20989
|
+
deviceId: number().int().positive(),
|
|
20990
|
+
/** true = on the list (may be open, does not block); false = off the list (blocks). */
|
|
20991
|
+
nonBlocking: boolean()
|
|
20992
|
+
});
|
|
20960
20993
|
/**
|
|
20961
20994
|
* The per-mode lists, at most one per mode. Two lists for one mode have no
|
|
20962
20995
|
* meaning a reader could agree on (union? the last one?), so they are refused
|
|
@@ -20965,10 +20998,10 @@ object({
|
|
|
20965
20998
|
var NcAlarmNonBlockingListSchema = array(object({
|
|
20966
20999
|
mode: AlarmArmModeSchema,
|
|
20967
21000
|
deviceIds: array(number().int()).max(200)
|
|
20968
|
-
})).max(8).refine(
|
|
21001
|
+
})).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
|
|
20969
21002
|
/**
|
|
20970
|
-
* The three durations
|
|
20971
|
-
* transitions, and which openings each mode tolerates.
|
|
21003
|
+
* The three durations — global, and per mode since D697 — the panel's state
|
|
21004
|
+
* machine runs on, who hears about its transitions, and which openings each mode tolerates.
|
|
20972
21005
|
*
|
|
20973
21006
|
* They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
|
|
20974
21007
|
* `alarm-panel` is `deviceNative` and its other provider mirrors somebody
|
|
@@ -20978,15 +21011,15 @@ var NcAlarmNonBlockingListSchema = array(object({
|
|
|
20978
21011
|
*/
|
|
20979
21012
|
var NcAlarmSettingsSchema = object({
|
|
20980
21013
|
/** Grace period between arming and the mode taking effect. 0 = immediate. */
|
|
20981
|
-
exitDelaySec:
|
|
21014
|
+
exitDelaySec: NcAlarmDelaySecSchema,
|
|
20982
21015
|
/** Grace period between a trigger and the alarm firing. 0 = immediate. */
|
|
20983
|
-
entryDelaySec:
|
|
21016
|
+
entryDelaySec: NcAlarmDelaySecSchema,
|
|
20984
21017
|
/**
|
|
20985
21018
|
* How long `triggered` lasts before the panel re-arms itself.
|
|
20986
21019
|
* **0 = until an operator disarms it** — the behaviour before this field
|
|
20987
21020
|
* existed, and therefore what an untouched install keeps doing.
|
|
20988
21021
|
*/
|
|
20989
|
-
triggeredDurationSec:
|
|
21022
|
+
triggeredDurationSec: NcAlarmTriggeredSecSchema,
|
|
20990
21023
|
/**
|
|
20991
21024
|
* Deprecated by D630 — every transition is announced. Parsed, never read;
|
|
20992
21025
|
* remove after one release. Optional so an older admin's patch (which still
|
|
@@ -21009,17 +21042,30 @@ var NcAlarmSettingsSchema = object({
|
|
|
21009
21042
|
* per mode is meaningful. Defaulted to `[]` so a blob stored before D630
|
|
21010
21043
|
* parses as "every opening blocks" — the behaviour it was written under.
|
|
21011
21044
|
*/
|
|
21012
|
-
nonBlocking: NcAlarmNonBlockingListSchema.default([])
|
|
21045
|
+
nonBlocking: NcAlarmNonBlockingListSchema.default([]),
|
|
21046
|
+
/**
|
|
21047
|
+
* Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
|
|
21048
|
+
* without a field, uses the global value above — so `[]`, the default, is exactly the
|
|
21049
|
+
* behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
|
|
21050
|
+
*/
|
|
21051
|
+
modeDelays: NcAlarmModeDelaysListSchema.default([])
|
|
21013
21052
|
});
|
|
21014
21053
|
/**
|
|
21015
21054
|
* Every field optional — a tab edits one control at a time.
|
|
21016
21055
|
*
|
|
21017
|
-
* `nonBlocking`
|
|
21018
|
-
* remove an inner `.default()`, so a patch that never
|
|
21019
|
-
* parse to `
|
|
21020
|
-
* (the same trap {@link NcRulePatchSchema} documents).
|
|
21056
|
+
* `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
|
|
21057
|
+
* `.partial()` does not remove an inner `.default()`, so a patch that never
|
|
21058
|
+
* named the field would parse to `[]` and wipe every mode's list on an
|
|
21059
|
+
* unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
|
|
21060
|
+
* `modeDelays` means EDITS, not the stored overrides.
|
|
21021
21061
|
*/
|
|
21022
|
-
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21062
|
+
var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
|
|
21063
|
+
nonBlocking: NcAlarmNonBlockingListSchema,
|
|
21064
|
+
/** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
|
|
21065
|
+
modeDelays: NcAlarmModeDelaysEditListSchema,
|
|
21066
|
+
/** ONE membership change; the panel applies it to the list it holds at its turn. */
|
|
21067
|
+
nonBlockingEdit: NcAlarmNonBlockingEditSchema
|
|
21068
|
+
}).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
|
|
21023
21069
|
/**
|
|
21024
21070
|
* What one arm mode actually arms, DERIVED from the enabled rules gated on it.
|
|
21025
21071
|
* Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
|
|
@@ -21119,6 +21165,28 @@ var NcAlarmConfigSchema = object({
|
|
|
21119
21165
|
*/
|
|
21120
21166
|
live: NcAlarmLiveSchema.optional()
|
|
21121
21167
|
});
|
|
21168
|
+
var NcAlarmSensorReadingSchema = _enum([
|
|
21169
|
+
"open",
|
|
21170
|
+
"closed",
|
|
21171
|
+
"unknown",
|
|
21172
|
+
"not-opening"
|
|
21173
|
+
]);
|
|
21174
|
+
/** One device's state as the alarm reads it — the classifier the arm check uses. */
|
|
21175
|
+
var NcAlarmSensorStateSchema = object({
|
|
21176
|
+
deviceId: number().int().positive(),
|
|
21177
|
+
reading: NcAlarmSensorReadingSchema,
|
|
21178
|
+
/** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
|
|
21179
|
+
state: string().nullable(),
|
|
21180
|
+
/** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
|
|
21181
|
+
unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
|
|
21182
|
+
/** The device manager's liveness as the centre mirrors it; null = not known. */
|
|
21183
|
+
online: boolean().nullable()
|
|
21184
|
+
});
|
|
21185
|
+
var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
|
|
21186
|
+
var NcAlarmSensorsSchema = object({
|
|
21187
|
+
sensors: array(NcAlarmSensorStateSchema),
|
|
21188
|
+
readAt: number().int().nonnegative()
|
|
21189
|
+
});
|
|
21122
21190
|
/**
|
|
21123
21191
|
* ONE rule's demand on ONE camera's clip ring.
|
|
21124
21192
|
*
|
|
@@ -21209,7 +21277,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
21209
21277
|
}), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
|
|
21210
21278
|
kind: "mutation",
|
|
21211
21279
|
auth: "admin"
|
|
21212
|
-
});
|
|
21280
|
+
}), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
|
|
21213
21281
|
/**
|
|
21214
21282
|
* Zod schemas for persisted record types.
|
|
21215
21283
|
*
|
|
@@ -22361,14 +22429,14 @@ var TrackSchema = object({
|
|
|
22361
22429
|
* `derive-returned-null tile=standin`,
|
|
22362
22430
|
* `native-tile tile=native no-key-frame-at-close`, …) written at close and
|
|
22363
22431
|
* CLEARED by the late-keyFrame upgrade when a native tile lands after all.
|
|
22364
|
-
* The operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
22432
|
+
* The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
|
|
22365
22433
|
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
22366
22434
|
*
|
|
22367
22435
|
* **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
|
|
22368
22436
|
* the TILE ranked below native, so a track whose thumbnail landed natively
|
|
22369
22437
|
* while its key frame missed carried no reason at all — three of the four
|
|
22370
22438
|
* `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
|
|
22371
|
-
* that shape, and their "niente ultimo" had no cause anywhere on the row.
|
|
22439
|
+
* that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
|
|
22372
22440
|
* The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
|
|
22373
22441
|
* lastFrame copy source`), so its absence is now on this line whatever the
|
|
22374
22442
|
* tile ended up being.
|
|
@@ -22455,7 +22523,7 @@ var MotionEventSchema = object({
|
|
|
22455
22523
|
/**
|
|
22456
22524
|
* Ms offsets from `timestamp` (the episode's own first rising edge, so the
|
|
22457
22525
|
* first entry is always `0`) of every genuine off→on transition the
|
|
22458
|
-
* episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
|
|
22526
|
+
* episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
|
|
22459
22527
|
* push: a firmware source that keepalives at ~1 Hz for the whole burst
|
|
22460
22528
|
* (Reolink, Hikvision) produces exactly one edge; a source that reports an
|
|
22461
22529
|
* explicit `false` mid-episode and then resumes before the quiet window
|
|
@@ -27912,7 +27980,7 @@ var ClipPlaybackSchema = object({
|
|
|
27912
27980
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
27913
27981
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
27914
27982
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
27915
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
27983
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
27916
27984
|
* D558 "Considered and not taken").
|
|
27917
27985
|
*/
|
|
27918
27986
|
var ClipWakeSchema = _enum(["authorised"]);
|
|
@@ -28308,7 +28376,7 @@ var videoclipsCapability = {
|
|
|
28308
28376
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
28309
28377
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
28310
28378
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
28311
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
28379
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
28312
28380
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
28313
28381
|
* retention policy; footage the camera itself holds is the same question,
|
|
28314
28382
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -28369,7 +28437,7 @@ var videoclipsCapability = {
|
|
|
28369
28437
|
* It replaced `sources?: string[]`, a VIEW filter over source ids that
|
|
28370
28438
|
* assumed the answer was a fan-out over everything a camera has. The
|
|
28371
28439
|
* operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
|
|
28372
|
-
* solo"* — so the list is asked of one provider at a time and there is
|
|
28440
|
+
* solo"* [there is only one user] — so the list is asked of one provider at a time and there is
|
|
28373
28441
|
* nothing to filter out of it.
|
|
28374
28442
|
*/
|
|
28375
28443
|
provider: string().min(1)
|
|
@@ -36690,7 +36758,7 @@ var ReadGopBytesResultSchema = object({
|
|
|
36690
36758
|
/**
|
|
36691
36759
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
36692
36760
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
36693
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
36761
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
36694
36762
|
* a replay needs several seconds of native pixels, not one frame.
|
|
36695
36763
|
*
|
|
36696
36764
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -41495,13 +41563,14 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
41495
41563
|
async getStatus() {
|
|
41496
41564
|
const all = await this.ctx.kernel.devices?.getAll() ?? [];
|
|
41497
41565
|
const summary = this.restoreFailureSummary();
|
|
41498
|
-
|
|
41566
|
+
const base = {
|
|
41499
41567
|
connected: true,
|
|
41500
|
-
deviceCount: all.length
|
|
41568
|
+
deviceCount: all.length,
|
|
41569
|
+
motionSliceWriter: "orchestrator"
|
|
41501
41570
|
};
|
|
41571
|
+
if (summary === null) return base;
|
|
41502
41572
|
return {
|
|
41503
|
-
|
|
41504
|
-
deviceCount: all.length,
|
|
41573
|
+
...base,
|
|
41505
41574
|
error: summary
|
|
41506
41575
|
};
|
|
41507
41576
|
}
|
|
@@ -47100,6 +47169,12 @@ Object.freeze({
|
|
|
47100
47169
|
addonId: null,
|
|
47101
47170
|
access: "view"
|
|
47102
47171
|
},
|
|
47172
|
+
"notificationRules.getAlarmSensors": {
|
|
47173
|
+
capName: "notification-rules",
|
|
47174
|
+
capScope: "system",
|
|
47175
|
+
addonId: null,
|
|
47176
|
+
access: "view"
|
|
47177
|
+
},
|
|
47103
47178
|
"notificationRules.getClipRetentionAsks": {
|
|
47104
47179
|
capName: "notification-rules",
|
|
47105
47180
|
capScope: "system",
|
|
@@ -51583,6 +51658,11 @@ Object.freeze({
|
|
|
51583
51658
|
form: "single",
|
|
51584
51659
|
optional: false
|
|
51585
51660
|
}],
|
|
51661
|
+
"notificationRules.getAlarmSensors": [{
|
|
51662
|
+
name: "deviceIds",
|
|
51663
|
+
form: "array",
|
|
51664
|
+
optional: false
|
|
51665
|
+
}],
|
|
51586
51666
|
"notificationRules.setDeviceMuted": [{
|
|
51587
51667
|
name: "deviceId",
|
|
51588
51668
|
form: "single",
|
|
@@ -53380,7 +53460,7 @@ var PreviewTextField = string().max(200);
|
|
|
53380
53460
|
* Whether the notification's preview is a STILL or a short animation.
|
|
53381
53461
|
*
|
|
53382
53462
|
* The operator's ask, verbatim: *"inviato come gif o video (come per le altre
|
|
53383
|
-
* rule)"* — the other rules already offer an animated preview, and a ten-hour
|
|
53463
|
+
* rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
|
|
53384
53464
|
* night reads better as three seconds of motion than as one frame of it. Both
|
|
53385
53465
|
* modes get the SAME treatment (blurred frame, large centred title); `'gif'`
|
|
53386
53466
|
* simply applies it to a dozen frames sampled across the render and assembles
|
|
@@ -161049,37 +161129,37 @@ function buildOnboardWrites(patch, schedule) {
|
|
|
161049
161129
|
//#endregion
|
|
161050
161130
|
//#region src/battery-charging.ts
|
|
161051
161131
|
/**
|
|
161052
|
-
*
|
|
161053
|
-
*
|
|
161054
|
-
*
|
|
161055
|
-
*
|
|
161056
|
-
*
|
|
161057
|
-
* - `adapterStatus` —
|
|
161058
|
-
* (
|
|
161059
|
-
*
|
|
161060
|
-
* `mapHubAdapterStatus` in `reolink-hub.ts`),
|
|
161061
|
-
*
|
|
161062
|
-
* - `chargeStatus` —
|
|
161063
|
-
* 2
|
|
161064
|
-
*
|
|
161065
|
-
*
|
|
161066
|
-
*
|
|
161067
|
-
*
|
|
161068
|
-
*
|
|
161069
|
-
* 1, firmware 2026)
|
|
161070
|
-
*
|
|
161071
|
-
*
|
|
161072
|
-
*
|
|
161073
|
-
* 2026-09-05
|
|
161074
|
-
*
|
|
161075
|
-
*
|
|
161076
|
-
*
|
|
161077
|
-
*
|
|
161078
|
-
*
|
|
161079
|
-
* `'unknown'` —
|
|
161080
|
-
* `nullable` (D315).
|
|
161081
|
-
* push
|
|
161082
|
-
*
|
|
161132
|
+
* From `adapterStatus` + `chargeStatus` to the power source.
|
|
161133
|
+
*
|
|
161134
|
+
* The two fields answer TWO different questions, and confusing them is the bug that
|
|
161135
|
+
* this module exists to close:
|
|
161136
|
+
*
|
|
161137
|
+
* - `adapterStatus` — is the power CONNECTED? The firmware sends 0/1/2
|
|
161138
|
+
* (none · DC adapter · solar panel) and the hub boundary
|
|
161139
|
+
* translates it into `'none' | 'dc' | 'solarPanel'` (`mapHubChargeStatus` and
|
|
161140
|
+
* `mapHubAdapterStatus` in `reolink-hub.ts`), because the vocabulary of the
|
|
161141
|
+
* standalone path is already strings.
|
|
161142
|
+
* - `chargeStatus` — what is the CELL doing? 0 stopped · 1 charging ·
|
|
161143
|
+
* 2 fully charged.
|
|
161144
|
+
*
|
|
161145
|
+
* The old derivation consulted the adapter ONLY to look for 'solar' in it, and
|
|
161146
|
+
* a connected DC fell into the fallback `'none'`. Two Argus 3E units hid it by
|
|
161147
|
+
* chance: full and connected they answer `chargeStatus: 2`, which the `isCharging`
|
|
161148
|
+
* branch mapped to `'dc'` for the wrong reason. The Argus MagiCam (batteryVersion
|
|
161149
|
+
* 1, firmware 2026) permanently connected answers `chargeStatus: 0`, and for
|
|
161150
|
+
* its whole life it was reported as NOT charging.
|
|
161151
|
+
*
|
|
161152
|
+
* That `adapterStatus` is a real signal and not a constant is MEASURED: on
|
|
161153
|
+
* 2026-09-05 the operator unplugged device 3628 and the raw payload
|
|
161154
|
+
* went from `adapterStatus: 1` to `0`, with `chargeStatus: 0` on both
|
|
161155
|
+
* sides — i.e. `chargeStatus` alone does NOT distinguish the two states.
|
|
161156
|
+
*
|
|
161157
|
+
* Two absent fields are NOT `'none'`: `'none'` is a negative the firmware
|
|
161158
|
+
* has stated ("no adapter, cell stopped"), the absence of both is
|
|
161159
|
+
* `'unknown'` — the same boundary `percentage` closed by becoming
|
|
161160
|
+
* `nullable` (D315). The caller (`mapBatteryInfo`) does not arrive here with a
|
|
161161
|
+
* push that says nothing about power: `reportsPowerSource` filters it out first and
|
|
161162
|
+
* keeps the previous belief.
|
|
161083
161163
|
*/
|
|
161084
161164
|
function deriveChargingSource(adapterStatus, chargeStatus) {
|
|
161085
161165
|
if (adapterStatus === void 0 && chargeStatus === void 0) return "unknown";
|