@camstack/addon-provider-hikvision 1.2.82 → 1.2.84

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
@@ -7844,17 +7844,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7844
7844
  /**
7845
7845
  * DERIVED per-camera storage summary — the single field cheap consumers read
7846
7846
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7847
- * - `off` — no band covers the camera (or it is disabled).
7848
- * - `events` — every band records around triggers only.
7849
- * - `continuous` — at least one band records continuously.
7850
- *
7851
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7852
- * every save (`activeModeForConfig`). Writing it has no effect.
7847
+ * - `off` — no band covers the camera (or it is disabled).
7848
+ * - `events` — every band records around triggers only.
7849
+ * - `continuous` — at least one band records continuously.
7850
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7851
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7852
+ * is no schedule to author, because there is no hour to program — see
7853
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7854
+ *
7855
+ * NEVER authored: the recorder stamps it from the authoritative intent
7856
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7857
+ * has no effect.
7858
+ *
7859
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7860
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7861
+ * something the operator makes (the live gate is the recorder's own "demand
7862
+ * window"), and a knob whose name suggests the operator starts it while the
7863
+ * device actually does is the D62 shape — a control nobody can predict.
7853
7864
  */
7854
7865
  var RecordingStorageModeSchema = _enum([
7855
7866
  "off",
7856
7867
  "events",
7857
- "continuous"
7868
+ "continuous",
7869
+ "on-device-decision"
7858
7870
  ]);
7859
7871
  /**
7860
7872
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7904,22 +7916,7 @@ var RecordingTriggersSchema = object({
7904
7916
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7905
7917
  * registrare.
7906
7918
  */
7907
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7908
- /**
7909
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7910
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7911
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7912
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7913
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7914
- *
7915
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7916
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7917
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7918
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7919
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7920
- * (`holdTrigger` / `releaseTrigger`).
7921
- */
7922
- deviceSignal: boolean().optional()
7919
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7923
7920
  });
7924
7921
  /**
7925
7922
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8003,8 +8000,29 @@ var RecordingConfigSchema = object({
8003
8000
  * "off" is the absence of a covering band, never a band value.
8004
8001
  */
8005
8002
  bands: array(RecordingBandSchema).default([]),
8003
+ /**
8004
+ * THE device-decided intent: record for as long as the camera itself raises
8005
+ * `recording-signal` (`active: true` while the device is in function — a
8006
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8007
+ * recording intent that is not a band.
8008
+ *
8009
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8010
+ * no hour to program: the device decides. What it costs the operator is one
8011
+ * flag — "this camera can record on its own" — and what it buys is the same
8012
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8013
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8014
+ * job however long it is, and closes one pad after the fall.
8015
+ *
8016
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8017
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8018
+ * operator switching this camera off is REPORTED off, never as broken.
8019
+ */
8020
+ deviceDecision: boolean().optional(),
8006
8021
  retention: RecordingRetentionSchema.optional()
8007
- }).strict();
8022
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8023
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8024
+ path: ["bands"]
8025
+ });
8008
8026
  /**
8009
8027
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8010
8028
  *
@@ -21332,11 +21350,7 @@ var CameraAudioStatusSchema = object({
21332
21350
  });
21333
21351
  /** Recording block — null when no recording cap is active for this device. */
21334
21352
  var CameraRecordingStatusSchema = object({
21335
- mode: _enum([
21336
- "off",
21337
- "continuous",
21338
- "events"
21339
- ]),
21353
+ mode: RecordingStorageModeSchema,
21340
21354
  active: boolean(),
21341
21355
  storageBytes: number()
21342
21356
  });
@@ -29827,11 +29841,10 @@ var rebootCapability = {
29827
29841
  var RecordingStatusSchema = object({
29828
29842
  deviceId: number(),
29829
29843
  enabled: boolean(),
29830
- activeMode: _enum([
29831
- "off",
29832
- "continuous",
29833
- "events"
29834
- ]),
29844
+ /** THE derived storage mode, from the one definition
29845
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29846
+ * `on-device-decision` could have reached the recorder and not the status. */
29847
+ activeMode: RecordingStorageModeSchema,
29835
29848
  nodeId: string(),
29836
29849
  storageBytes: number()
29837
29850
  });
package/dist/addon.mjs CHANGED
@@ -7845,17 +7845,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7845
7845
  /**
7846
7846
  * DERIVED per-camera storage summary — the single field cheap consumers read
7847
7847
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7848
- * - `off` — no band covers the camera (or it is disabled).
7849
- * - `events` — every band records around triggers only.
7850
- * - `continuous` — at least one band records continuously.
7851
- *
7852
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7853
- * every save (`activeModeForConfig`). Writing it has no effect.
7848
+ * - `off` — no band covers the camera (or it is disabled).
7849
+ * - `events` — every band records around triggers only.
7850
+ * - `continuous` — at least one band records continuously.
7851
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7852
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7853
+ * is no schedule to author, because there is no hour to program — see
7854
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7855
+ *
7856
+ * NEVER authored: the recorder stamps it from the authoritative intent
7857
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7858
+ * has no effect.
7859
+ *
7860
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7861
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7862
+ * something the operator makes (the live gate is the recorder's own "demand
7863
+ * window"), and a knob whose name suggests the operator starts it while the
7864
+ * device actually does is the D62 shape — a control nobody can predict.
7854
7865
  */
7855
7866
  var RecordingStorageModeSchema = _enum([
7856
7867
  "off",
7857
7868
  "events",
7858
- "continuous"
7869
+ "continuous",
7870
+ "on-device-decision"
7859
7871
  ]);
7860
7872
  /**
7861
7873
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7905,22 +7917,7 @@ var RecordingTriggersSchema = object({
7905
7917
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7906
7918
  * registrare.
7907
7919
  */
7908
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7909
- /**
7910
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7911
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7912
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7913
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7914
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7915
- *
7916
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7917
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7918
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7919
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7920
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7921
- * (`holdTrigger` / `releaseTrigger`).
7922
- */
7923
- deviceSignal: boolean().optional()
7920
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7924
7921
  });
7925
7922
  /**
7926
7923
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8004,8 +8001,29 @@ var RecordingConfigSchema = object({
8004
8001
  * "off" is the absence of a covering band, never a band value.
8005
8002
  */
8006
8003
  bands: array(RecordingBandSchema).default([]),
8004
+ /**
8005
+ * THE device-decided intent: record for as long as the camera itself raises
8006
+ * `recording-signal` (`active: true` while the device is in function — a
8007
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8008
+ * recording intent that is not a band.
8009
+ *
8010
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8011
+ * no hour to program: the device decides. What it costs the operator is one
8012
+ * flag — "this camera can record on its own" — and what it buys is the same
8013
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8014
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8015
+ * job however long it is, and closes one pad after the fall.
8016
+ *
8017
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8018
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8019
+ * operator switching this camera off is REPORTED off, never as broken.
8020
+ */
8021
+ deviceDecision: boolean().optional(),
8007
8022
  retention: RecordingRetentionSchema.optional()
8008
- }).strict();
8023
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8024
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8025
+ path: ["bands"]
8026
+ });
8009
8027
  /**
8010
8028
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8011
8029
  *
@@ -21333,11 +21351,7 @@ var CameraAudioStatusSchema = object({
21333
21351
  });
21334
21352
  /** Recording block — null when no recording cap is active for this device. */
21335
21353
  var CameraRecordingStatusSchema = object({
21336
- mode: _enum([
21337
- "off",
21338
- "continuous",
21339
- "events"
21340
- ]),
21354
+ mode: RecordingStorageModeSchema,
21341
21355
  active: boolean(),
21342
21356
  storageBytes: number()
21343
21357
  });
@@ -29828,11 +29842,10 @@ var rebootCapability = {
29828
29842
  var RecordingStatusSchema = object({
29829
29843
  deviceId: number(),
29830
29844
  enabled: boolean(),
29831
- activeMode: _enum([
29832
- "off",
29833
- "continuous",
29834
- "events"
29835
- ]),
29845
+ /** THE derived storage mode, from the one definition
29846
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29847
+ * `on-device-decision` could have reached the recorder and not the status. */
29848
+ activeMode: RecordingStorageModeSchema,
29836
29849
  nodeId: string(),
29837
29850
  storageBytes: number()
29838
29851
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.82",
3
+ "version": "1.2.84",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",