@camstack/addon-provider-reolink 1.2.98 → 1.2.100
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 +66 -38
- package/dist/addon.mjs +66 -38
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8138,17 +8138,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
8138
8138
|
/**
|
|
8139
8139
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
8140
8140
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
8141
|
-
* - `off`
|
|
8142
|
-
* - `events`
|
|
8143
|
-
* - `continuous`
|
|
8144
|
-
*
|
|
8145
|
-
*
|
|
8146
|
-
*
|
|
8141
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
8142
|
+
* - `events` — every band records around triggers only.
|
|
8143
|
+
* - `continuous` — at least one band records continuously.
|
|
8144
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
8145
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
8146
|
+
* is no schedule to author, because there is no hour to program — see
|
|
8147
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
8148
|
+
*
|
|
8149
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
8150
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
8151
|
+
* has no effect.
|
|
8152
|
+
*
|
|
8153
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
8154
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
8155
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
8156
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
8157
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
8147
8158
|
*/
|
|
8148
8159
|
var RecordingStorageModeSchema = _enum([
|
|
8149
8160
|
"off",
|
|
8150
8161
|
"events",
|
|
8151
|
-
"continuous"
|
|
8162
|
+
"continuous",
|
|
8163
|
+
"on-device-decision"
|
|
8152
8164
|
]);
|
|
8153
8165
|
/**
|
|
8154
8166
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -8198,22 +8210,7 @@ var RecordingTriggersSchema = object({
|
|
|
8198
8210
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8199
8211
|
* registrare.
|
|
8200
8212
|
*/
|
|
8201
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8202
|
-
/**
|
|
8203
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8204
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8205
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8206
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8207
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8208
|
-
*
|
|
8209
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8210
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8211
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8212
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8213
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8214
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8215
|
-
*/
|
|
8216
|
-
deviceSignal: boolean().optional()
|
|
8213
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8217
8214
|
});
|
|
8218
8215
|
/**
|
|
8219
8216
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8243,13 +8240,28 @@ var RecordingBandSchema = object({
|
|
|
8243
8240
|
end: string().regex(HHMM),
|
|
8244
8241
|
mode: RecordingBandModeSchema,
|
|
8245
8242
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8243
|
+
/**
|
|
8244
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8245
|
+
*
|
|
8246
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8247
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8248
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8249
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8250
|
+
* expression of the broker's retention, in different units, in a different
|
|
8251
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8252
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8253
|
+
* left to configure here.
|
|
8254
|
+
*
|
|
8255
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8256
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8257
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8258
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8259
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8260
|
+
*/
|
|
8246
8261
|
preBufferSec: number().min(0).optional(),
|
|
8247
8262
|
postBufferSec: number().min(0).optional()
|
|
8248
8263
|
});
|
|
8249
|
-
({
|
|
8250
|
-
preBufferSec: 15,
|
|
8251
|
-
postBufferSec: 30
|
|
8252
|
-
}).postBufferSec * 1e3;
|
|
8264
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8253
8265
|
/**
|
|
8254
8266
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8255
8267
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8297,8 +8309,29 @@ var RecordingConfigSchema = object({
|
|
|
8297
8309
|
* "off" is the absence of a covering band, never a band value.
|
|
8298
8310
|
*/
|
|
8299
8311
|
bands: array(RecordingBandSchema).default([]),
|
|
8312
|
+
/**
|
|
8313
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8314
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8315
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8316
|
+
* recording intent that is not a band.
|
|
8317
|
+
*
|
|
8318
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8319
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8320
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8321
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8322
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8323
|
+
* job however long it is, and closes one pad after the fall.
|
|
8324
|
+
*
|
|
8325
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8326
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8327
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8328
|
+
*/
|
|
8329
|
+
deviceDecision: boolean().optional(),
|
|
8300
8330
|
retention: RecordingRetentionSchema.optional()
|
|
8301
|
-
}).strict()
|
|
8331
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8332
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8333
|
+
path: ["bands"]
|
|
8334
|
+
});
|
|
8302
8335
|
/**
|
|
8303
8336
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8304
8337
|
*
|
|
@@ -21669,11 +21702,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21669
21702
|
});
|
|
21670
21703
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21671
21704
|
var CameraRecordingStatusSchema = object({
|
|
21672
|
-
mode:
|
|
21673
|
-
"off",
|
|
21674
|
-
"continuous",
|
|
21675
|
-
"events"
|
|
21676
|
-
]),
|
|
21705
|
+
mode: RecordingStorageModeSchema,
|
|
21677
21706
|
active: boolean(),
|
|
21678
21707
|
storageBytes: number()
|
|
21679
21708
|
});
|
|
@@ -30138,11 +30167,10 @@ var rebootCapability = {
|
|
|
30138
30167
|
var RecordingStatusSchema = object({
|
|
30139
30168
|
deviceId: number(),
|
|
30140
30169
|
enabled: boolean(),
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
]),
|
|
30170
|
+
/** THE derived storage mode, from the one definition
|
|
30171
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
30172
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
30173
|
+
activeMode: RecordingStorageModeSchema,
|
|
30146
30174
|
nodeId: string(),
|
|
30147
30175
|
storageBytes: number()
|
|
30148
30176
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -8133,17 +8133,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
8133
8133
|
/**
|
|
8134
8134
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
8135
8135
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
8136
|
-
* - `off`
|
|
8137
|
-
* - `events`
|
|
8138
|
-
* - `continuous`
|
|
8139
|
-
*
|
|
8140
|
-
*
|
|
8141
|
-
*
|
|
8136
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
8137
|
+
* - `events` — every band records around triggers only.
|
|
8138
|
+
* - `continuous` — at least one band records continuously.
|
|
8139
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
8140
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
8141
|
+
* is no schedule to author, because there is no hour to program — see
|
|
8142
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
8143
|
+
*
|
|
8144
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
8145
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
8146
|
+
* has no effect.
|
|
8147
|
+
*
|
|
8148
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
8149
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
8150
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
8151
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
8152
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
8142
8153
|
*/
|
|
8143
8154
|
var RecordingStorageModeSchema = _enum([
|
|
8144
8155
|
"off",
|
|
8145
8156
|
"events",
|
|
8146
|
-
"continuous"
|
|
8157
|
+
"continuous",
|
|
8158
|
+
"on-device-decision"
|
|
8147
8159
|
]);
|
|
8148
8160
|
/**
|
|
8149
8161
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -8193,22 +8205,7 @@ var RecordingTriggersSchema = object({
|
|
|
8193
8205
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8194
8206
|
* registrare.
|
|
8195
8207
|
*/
|
|
8196
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8197
|
-
/**
|
|
8198
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8199
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8200
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8201
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8202
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8203
|
-
*
|
|
8204
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8205
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8206
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8207
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8208
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8209
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8210
|
-
*/
|
|
8211
|
-
deviceSignal: boolean().optional()
|
|
8208
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8212
8209
|
});
|
|
8213
8210
|
/**
|
|
8214
8211
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8238,13 +8235,28 @@ var RecordingBandSchema = object({
|
|
|
8238
8235
|
end: string().regex(HHMM),
|
|
8239
8236
|
mode: RecordingBandModeSchema,
|
|
8240
8237
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8238
|
+
/**
|
|
8239
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8240
|
+
*
|
|
8241
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8242
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8243
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8244
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8245
|
+
* expression of the broker's retention, in different units, in a different
|
|
8246
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8247
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8248
|
+
* left to configure here.
|
|
8249
|
+
*
|
|
8250
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8251
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8252
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8253
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8254
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8255
|
+
*/
|
|
8241
8256
|
preBufferSec: number().min(0).optional(),
|
|
8242
8257
|
postBufferSec: number().min(0).optional()
|
|
8243
8258
|
});
|
|
8244
|
-
({
|
|
8245
|
-
preBufferSec: 15,
|
|
8246
|
-
postBufferSec: 30
|
|
8247
|
-
}).postBufferSec * 1e3;
|
|
8259
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8248
8260
|
/**
|
|
8249
8261
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8250
8262
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8292,8 +8304,29 @@ var RecordingConfigSchema = object({
|
|
|
8292
8304
|
* "off" is the absence of a covering band, never a band value.
|
|
8293
8305
|
*/
|
|
8294
8306
|
bands: array(RecordingBandSchema).default([]),
|
|
8307
|
+
/**
|
|
8308
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8309
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8310
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8311
|
+
* recording intent that is not a band.
|
|
8312
|
+
*
|
|
8313
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8314
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8315
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8316
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8317
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8318
|
+
* job however long it is, and closes one pad after the fall.
|
|
8319
|
+
*
|
|
8320
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8321
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8322
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8323
|
+
*/
|
|
8324
|
+
deviceDecision: boolean().optional(),
|
|
8295
8325
|
retention: RecordingRetentionSchema.optional()
|
|
8296
|
-
}).strict()
|
|
8326
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8327
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8328
|
+
path: ["bands"]
|
|
8329
|
+
});
|
|
8297
8330
|
/**
|
|
8298
8331
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8299
8332
|
*
|
|
@@ -21664,11 +21697,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21664
21697
|
});
|
|
21665
21698
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21666
21699
|
var CameraRecordingStatusSchema = object({
|
|
21667
|
-
mode:
|
|
21668
|
-
"off",
|
|
21669
|
-
"continuous",
|
|
21670
|
-
"events"
|
|
21671
|
-
]),
|
|
21700
|
+
mode: RecordingStorageModeSchema,
|
|
21672
21701
|
active: boolean(),
|
|
21673
21702
|
storageBytes: number()
|
|
21674
21703
|
});
|
|
@@ -30133,11 +30162,10 @@ var rebootCapability = {
|
|
|
30133
30162
|
var RecordingStatusSchema = object({
|
|
30134
30163
|
deviceId: number(),
|
|
30135
30164
|
enabled: boolean(),
|
|
30136
|
-
|
|
30137
|
-
|
|
30138
|
-
|
|
30139
|
-
|
|
30140
|
-
]),
|
|
30165
|
+
/** THE derived storage mode, from the one definition
|
|
30166
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
30167
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
30168
|
+
activeMode: RecordingStorageModeSchema,
|
|
30141
30169
|
nodeId: string(),
|
|
30142
30170
|
storageBytes: number()
|
|
30143
30171
|
});
|