@camstack/addon-provider-reolink 1.2.97 → 1.2.99

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 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` — 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
- *
8145
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8146
- * every save (`activeModeForConfig`). Writing it has no effect.
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.
@@ -8297,8 +8294,29 @@ var RecordingConfigSchema = object({
8297
8294
  * "off" is the absence of a covering band, never a band value.
8298
8295
  */
8299
8296
  bands: array(RecordingBandSchema).default([]),
8297
+ /**
8298
+ * THE device-decided intent: record for as long as the camera itself raises
8299
+ * `recording-signal` (`active: true` while the device is in function — a
8300
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8301
+ * recording intent that is not a band.
8302
+ *
8303
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8304
+ * no hour to program: the device decides. What it costs the operator is one
8305
+ * flag — "this camera can record on its own" — and what it buys is the same
8306
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8307
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8308
+ * job however long it is, and closes one pad after the fall.
8309
+ *
8310
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8311
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8312
+ * operator switching this camera off is REPORTED off, never as broken.
8313
+ */
8314
+ deviceDecision: boolean().optional(),
8300
8315
  retention: RecordingRetentionSchema.optional()
8301
- }).strict();
8316
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8317
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8318
+ path: ["bands"]
8319
+ });
8302
8320
  /**
8303
8321
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8304
8322
  *
@@ -21669,11 +21687,7 @@ var CameraAudioStatusSchema = object({
21669
21687
  });
21670
21688
  /** Recording block — null when no recording cap is active for this device. */
21671
21689
  var CameraRecordingStatusSchema = object({
21672
- mode: _enum([
21673
- "off",
21674
- "continuous",
21675
- "events"
21676
- ]),
21690
+ mode: RecordingStorageModeSchema,
21677
21691
  active: boolean(),
21678
21692
  storageBytes: number()
21679
21693
  });
@@ -30138,11 +30152,10 @@ var rebootCapability = {
30138
30152
  var RecordingStatusSchema = object({
30139
30153
  deviceId: number(),
30140
30154
  enabled: boolean(),
30141
- activeMode: _enum([
30142
- "off",
30143
- "continuous",
30144
- "events"
30145
- ]),
30155
+ /** THE derived storage mode, from the one definition
30156
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30157
+ * `on-device-decision` could have reached the recorder and not the status. */
30158
+ activeMode: RecordingStorageModeSchema,
30146
30159
  nodeId: string(),
30147
30160
  storageBytes: number()
30148
30161
  });
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` — 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
- *
8140
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8141
- * every save (`activeModeForConfig`). Writing it has no effect.
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.
@@ -8292,8 +8289,29 @@ var RecordingConfigSchema = object({
8292
8289
  * "off" is the absence of a covering band, never a band value.
8293
8290
  */
8294
8291
  bands: array(RecordingBandSchema).default([]),
8292
+ /**
8293
+ * THE device-decided intent: record for as long as the camera itself raises
8294
+ * `recording-signal` (`active: true` while the device is in function — a
8295
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8296
+ * recording intent that is not a band.
8297
+ *
8298
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8299
+ * no hour to program: the device decides. What it costs the operator is one
8300
+ * flag — "this camera can record on its own" — and what it buys is the same
8301
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8302
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8303
+ * job however long it is, and closes one pad after the fall.
8304
+ *
8305
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8306
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8307
+ * operator switching this camera off is REPORTED off, never as broken.
8308
+ */
8309
+ deviceDecision: boolean().optional(),
8295
8310
  retention: RecordingRetentionSchema.optional()
8296
- }).strict();
8311
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8312
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8313
+ path: ["bands"]
8314
+ });
8297
8315
  /**
8298
8316
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8299
8317
  *
@@ -21664,11 +21682,7 @@ var CameraAudioStatusSchema = object({
21664
21682
  });
21665
21683
  /** Recording block — null when no recording cap is active for this device. */
21666
21684
  var CameraRecordingStatusSchema = object({
21667
- mode: _enum([
21668
- "off",
21669
- "continuous",
21670
- "events"
21671
- ]),
21685
+ mode: RecordingStorageModeSchema,
21672
21686
  active: boolean(),
21673
21687
  storageBytes: number()
21674
21688
  });
@@ -30133,11 +30147,10 @@ var rebootCapability = {
30133
30147
  var RecordingStatusSchema = object({
30134
30148
  deviceId: number(),
30135
30149
  enabled: boolean(),
30136
- activeMode: _enum([
30137
- "off",
30138
- "continuous",
30139
- "events"
30140
- ]),
30150
+ /** THE derived storage mode, from the one definition
30151
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30152
+ * `on-device-decision` could have reached the recorder and not the status. */
30153
+ activeMode: RecordingStorageModeSchema,
30141
30154
  nodeId: string(),
30142
30155
  storageBytes: number()
30143
30156
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.97",
3
+ "version": "1.2.99",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",